Page 1 of 1

I demand that LÖVE add support of lua 5.3

Posted: Thu Jan 12, 2017 1:25 am
by ericlong
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.

Re: I demand that LÖVE add support of lua 5.3

Posted: Thu Jan 12, 2017 2:06 am
by slime
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.

Re: I demand that LÖVE add support of lua 5.3

Posted: Thu Jan 12, 2017 2:33 am
by zorg
Also, for future reference, you might want to double-check your English dictionary when asking for help somewhere; :3
To "demand" things from anyone, is, quite frankly, not that nice. You were probably looking for the word "ask" instead.

Re: I demand that LÖVE add support of lua 5.3

Posted: Thu Jan 12, 2017 4:18 am
by ericlong
zorg wrote:Also, for future reference, you might want to double-check your English dictionary when asking for help somewhere; :3
To "demand" things from anyone, is, quite frankly, not that nice. You were probably looking for the word "ask" instead.
thx for your suggestion :oops:

Re: I demand that LÖVE add support of lua 5.3

Posted: Fri Oct 12, 2018 7:43 am
by EliterScripts
I just ran into a situation where I need a feature from Lua 5.3. Would you please consider running 5.3?

Thanks!

Re: I demand that LÖVE add support of lua 5.3

Posted: Fri Oct 12, 2018 9:32 pm
by pedrosgali
What situation and what feature out of interest?

Re: I demand that LÖVE add support of lua 5.3

Posted: Sat Oct 13, 2018 2:58 am
by EliterScripts
pedrosgali wrote: Fri Oct 12, 2018 9:32 pm What situation and what feature out of interest?
string.pack()

string.unpack()

Re: I demand that LÖVE add support of lua 5.3

Posted: Sat Oct 13, 2018 4:53 am
by slime
EliterScripts wrote: Sat Oct 13, 2018 2:58 am string.pack()

string.unpack()
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