Lua 5.3.0 beta now available
permalink.gmane.org
permalink.gmane.org
- Basic UTF-8 library
- Bitwise operators
- Integers
http://www.lua.org/work/doc/#changesFor example, one of the differences is that you can shift by a negative number with Lua (making the shift go in the opposite direction). Who ever needs to do that?
This was all discussed at length on the lists, I don't have a link handy though.
At this point, it seems there are two distinct versions of Lua, Lua and LuaJIT. I have some modules I wrote that support both Lua 5.1 and Lua 5.2, so I can still use them with LuaJIT if need be, but it's a pain (conditional code in both C and Lua) and it will only get worse if Lua 5.3 comes out [3].
[1] Up to Lua 5.2, Lua only supported one type of number (internally, a double [2]). Lua 5.3 now supports a distinct integer type, which has its implications (doubles don't wrap; you now get x.0 where before you would get x when printed, etc).
The reason for 64-bit integer support is that doubles only support integer operations up to 2^53 or so. [3]
[2] Unless you changed the internal representation of numbers in Lua, an easy change to make in the Lua sources.
[3] I already had to work around 64-bit integers in some code dealing with process limits on a 64-bit system and Lua 5.1/5.2.
[1]: Here is one reference though it's not necessarily the best: http://lua-users.org/lists/lua-l/2012-01/msg00796.html
Sure it's a little complicated, but language implementation is a complicated topic. It's hard for me to imagine Lua's code being much simpler than it is.
Not sure what Lua's internals have to do with PHP, though.
Here is a tour guide of the code base, written by Mike Pall (author of LuaJIT, not Lua, but obviously quite familiar with the Lua code base): http://www.reddit.com/r/programming/comments/63hth/ask_reddi...
Maybe you were thinking about the LuaJIT code base? That one is indeed very tricky, in part because a lot of it is in ASM and in part because the algorithms behind it are very tricky. I doubt anybody other than Mike Pall understands it all.