I demand that LÖVE add support of lua 5.3

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
ericlong
Prole
Posts: 3
Joined: Thu Jan 12, 2017 1:03 am
Location: Guangdong, China

I demand that LÖVE add support of lua 5.3

Post 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.
User avatar
slime
Solid Snayke
Posts: 3131
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

Post 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.
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

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

Post 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.
Me and my stuff :3True 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.
ericlong
Prole
Posts: 3
Joined: Thu Jan 12, 2017 1:03 am
Location: Guangdong, China

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

Post 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:
EliterScripts
Citizen
Posts: 85
Joined: Sat Oct 25, 2014 7:07 pm

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

Post 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!
pedrosgali
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

Post by pedrosgali »

What situation and what feature out of interest?

Code: Select all

if not wearTheseGlasses() then
  chewing_on_trashcan = true
end
EliterScripts
Citizen
Posts: 85
Joined: Sat Oct 25, 2014 7:07 pm

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

Post by EliterScripts »

pedrosgali wrote: Fri Oct 12, 2018 9:32 pm What situation and what feature out of interest?
string.pack()

string.unpack()
User avatar
slime
Solid Snayke
Posts: 3131
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

Post 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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 64 guests