Every version Lua changed a lot. For example, Today I've created a class syntactic sugar in my project. I used _ENV in Lua 5.3 to change the environment variable instead of setfenv in 5.1. I tested it in official compiler and it's OK.
However, when I put it in my LÖVE project, it didn't work. The version differences make me in trouble.
I thought of changing the source code, but I don't know how to deal with. I hope you guys can help me in some way.
I demand that LÖVE add support of lua 5.3
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: I demand that LÖVE add support of lua 5.3
love uses LuaJIT by default. It does so because LuaJIT is 2-200 times as fast as standard Lua, and because LuaJIT has a built-in FFI which allows people to do many things that either require compiled C code or are simply not possible, with regular Lua.
LuaJIT 2.0 is based on Lua 5.1's API but includes several features from Lua 5.2: http://luajit.org/extensions.html#lua52
Additionally, many useful features from Lua 5.2 and 5.3 (e.g. bitwise operations) are covered either by LuaJIT's FFI or (in the case of bitwise ops) by a module included with LuaJIT: http://luajit.org/extensions.html#bit
LuaJIT is used by default, but love's source code should work with stock Lua 5.1, 5.2, and 5.3. Of course pretty much every game written to use love makes use of Lua 5.1 (and sometimes LuaJIT extensions), so other games may not work if you use different Lua versions with love.
LuaJIT 2.0 is based on Lua 5.1's API but includes several features from Lua 5.2: http://luajit.org/extensions.html#lua52
Additionally, many useful features from Lua 5.2 and 5.3 (e.g. bitwise operations) are covered either by LuaJIT's FFI or (in the case of bitwise ops) by a module included with LuaJIT: http://luajit.org/extensions.html#bit
LuaJIT is used by default, but love's source code should work with stock Lua 5.1, 5.2, and 5.3. Of course pretty much every game written to use love makes use of Lua 5.1 (and sometimes LuaJIT extensions), so other games may not work if you use different Lua versions with love.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: I demand that LÖVE add support of lua 5.3
Also, for future reference, you might want to double-check your English dictionary when asking for help somewhere;
To "demand" things from anyone, is, quite frankly, not that nice. You were probably looking for the word "ask" instead.
To "demand" things from anyone, is, quite frankly, not that nice. You were probably looking for the word "ask" instead.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: I demand that LÖVE add support of lua 5.3
thx for your suggestionzorg wrote:Also, for future reference, you might want to double-check your English dictionary when asking for help somewhere;
To "demand" things from anyone, is, quite frankly, not that nice. You were probably looking for the word "ask" instead.
-
- Citizen
- Posts: 85
- Joined: Sat Oct 25, 2014 7:07 pm
Re: I demand that LÖVE add support of lua 5.3
I just ran into a situation where I need a feature from Lua 5.3. Would you please consider running 5.3?
Thanks!
Thanks!
-
- Party member
- Posts: 107
- Joined: Wed Oct 15, 2014 5:00 pm
- Location: Yorkshire, England
Re: I demand that LÖVE add support of lua 5.3
What situation and what feature out of interest?
Code: Select all
if not wearTheseGlasses() then
chewing_on_trashcan = true
end
-
- Citizen
- Posts: 85
- Joined: Sat Oct 25, 2014 7:07 pm
Re: I demand that LÖVE add support of lua 5.3
string.pack()
string.unpack()
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: I demand that LÖVE add support of lua 5.3
I've got good news, those are already in love (in a different module, but the code for them is from Lua 5.3's source code.)
love.data.pack
love.data.unpack
Who is online
Users browsing this forum: No registered users and 2 guests