Lua 5.2 in LÖVE 0.9.0
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Lua 5.2 in LÖVE 0.9.0
any chance to see that happen?
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Lua 5.2 in LÖVE 0.9.0
Nope. Lua 5.2 has low adoption among tools and libraries and it's not backwards compatible with Lua 5.1 code in many cases - especially in its C API.
In particular, luasocket currently only supports Lua 5.1, and LuaJIT is fully compatible with Lua 5.1 (so can be used as a drop-in replacement), but not so with Lua 5.2.
In particular, luasocket currently only supports Lua 5.1, and LuaJIT is fully compatible with Lua 5.1 (so can be used as a drop-in replacement), but not so with Lua 5.2.
Re: Lua 5.2 in LÖVE 0.9.0
thanks. i just bumped into an annoying bug that is fixed in 5.2. *sigh*
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Lua 5.2 in LÖVE 0.9.0
What's the bug? Maybe it's fixed in LuaJIT as well.
Re: Lua 5.2 in LÖVE 0.9.0
The only notewhile feature we receive in lua5.2 is the _ENV table, which is cool and all, but we get along fine without it.
Re: Lua 5.2 in LÖVE 0.9.0
'__len' metamethod isn't invoked on tables. so '#some_table' always returns the actual length of some_table and the metatable isn't checked.slime wrote:What's the bug? Maybe it's fixed in LuaJIT as well.
in general i can't complain about lua5.1 either. my ride with it has been quite smooth... until yesterday:)Inny wrote:The only notewhile feature we receive in lua5.2 is the _ENV table, which is cool and all, but we get along fine without it.
Re: Lua 5.2 in LÖVE 0.9.0
In 5.1, I'm pretty sure the __len metamethod only applies to userdata. So it would not be a bug. 5.1 should do you well anyways. Good luck.
Re: Lua 5.2 in LÖVE 0.9.0
Indeed. That it works on tables too is new to 5.2. From http://www.lua.org/manual/5.2/readme.html#changes:
tables honor the __len metamethod
Shallow indentations.
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Lua 5.2 in LÖVE 0.9.0
if LuaJIT is built with "-DLUAJIT_ENABLE_LUA52COMPAT" then you get the __len metamethod on tables as well.
Re: Lua 5.2 in LÖVE 0.9.0
that should work for me. thanks a lot.slime wrote:if LuaJIT is built with "-DLUAJIT_ENABLE_LUA52COMPAT" then you get the __len metamethod on tables as well.
Who is online
Users browsing this forum: Bing [Bot] and 4 guests