Why isn't Love 0.8.0 on Lua 5.2?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
YellowAfterlife
Prole
Posts: 29
Joined: Mon Jan 23, 2012 4:05 pm
Contact:

Why isn't Love 0.8.0 on Lua 5.2?

Post by YellowAfterlife »

This might be a somewhat rhetorical question, but anyway. Why doesn't it?

Lua 5.2 brings in such new features as bit32 library and goto statements.

goto statements are evil. But cool, because you can substitute a lot of features from other programming languages with them. Also you can accidentally make your code look extremely awkward if over-using these. But that's another story.

bit32 library adds bitwise operators. Bitwise operations are cool. And fast. And you can fit up to 32 'boolean' values into single number, which is extremely useful for organizing grid-based levels. Current workarounds include splitting number into a 32-element array (which means allocating 32x more memory for every, and harder conversions) or abusing modulo and math.floor on division to split few bits (which is quite bad, and works slowly).
yal.cc
Contains things I work on. Also gets Love2d examples time to time.
User avatar
pk
Citizen
Posts: 67
Joined: Wed Dec 14, 2011 2:13 am
Location: Texas, United States
Contact:

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by pk »

viewtopic.php?f=3&t=5561

Basically, it's too early. Maybe next release.
ALL CREATURE WILL DIE AND ALL THE THINGS WILL BE BROKEN. THAT'S THE LAW OF SAMURAI.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by thelinx »

YellowAfterlife wrote: goto statements are evil
A common misconception.

goto isn't evil, bad program design is
User avatar
YellowAfterlife
Prole
Posts: 29
Joined: Mon Jan 23, 2012 4:05 pm
Contact:

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by YellowAfterlife »

thelinx wrote:
YellowAfterlife wrote: goto statements are evil
A common misconception.

goto isn't evil, bad program design is
Well, it is rather obvious that it is not actually evil, and on lowest level everything else is organized upon it, but I decided to go with that to not get thread going off the topic too early. Well, it did anyway.

Some languages do not have actual control structures, leaving only goto's to organize logic. Mostly these also have a call\return statements, first of which is essentially a goto with current position being pushed to stack.

"Evilness" in this case comes from fact that many do not notice a border between just removing unneeded iterations and condition wraps and turning code into barely readable mass that gives suspects that program was built from disassembled low-level commands.

On-topic, will wait if it's too early. Also could say that linked topic ended a bit too early, with author linking to fork that he did to fix things.
yal.cc
Contains things I work on. Also gets Love2d examples time to time.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by miko »

YellowAfterlife wrote:This might be a somewhat rhetorical question, but anyway. Why doesn't it?

Lua 5.2 brings in such new features as bit32 library and goto statements.

goto statements are evil. But cool, because you can substitute a lot of features from other programming languages with them. Also you can accidentally make your code look extremely awkward if over-using these. But that's another story.

bit32 library adds bitwise operators. Bitwise operations are cool. And fast. And you can fit up to 32 'boolean' values into single number, which is extremely useful for organizing grid-based levels. Current workarounds include splitting number into a 32-element array (which means allocating 32x more memory for every, and harder conversions) or abusing modulo and math.floor on division to split few bits (which is quite bad, and works slowly).
I don't care about goto, but for bit lib you can use luajit. And it will be way faster than lua 5.2 could ever be.
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by Inny »

Lua 5.2 is the bleeding edge release which will take a year for adoption to spread, and 5.1.5 is the official currently supported legacy version from PUC-Rio. Lua 5.2 introduces a small handful on incompatible features with 5.1 code that would be problematic and make a ton of existing lua tools and libraries broken. So yeah, it's basically too new.

As for the goto statement, thats a can of worms that PUC-Rio opened ;). I'll allow that "bad program design is evil, not goto", but it's been long known that the goto keyword should be rarely if ever used, and that the whole point of the break and continue keywords was to eliminate 99.9% of cases where you could use goto.
User avatar
Xgoff
Party member
Posts: 211
Joined: Fri Nov 19, 2010 4:20 am

Re: Why isn't Love 0.8.0 on Lua 5.2?

Post by Xgoff »

Inny wrote:Lua 5.2 is the bleeding edge release which will take a year for adoption to spread, and 5.1.5 is the official currently supported legacy version from PUC-Rio. Lua 5.2 introduces a small handful on incompatible features with 5.1 code that would be problematic and make a ton of existing lua tools and libraries broken. So yeah, it's basically too new.
i'd imagine that the main reason 5.2 isn't being adopted all that quickly is because apart from the bc breaking, it doesn't really have any killer features. the two big features are the bit library and removal of many coroutine yielding restrictions... problem is both of those have been available to 5.1 for years

i wouldnt worry about goto too much since it was mainly wanted for things like code generation and error handling. it also replaces some uses for tail calls since it's cheaper. and, like one of lua's authors mentioned: at least they aren't continuations ;)
Inny wrote:that the whole point of the break and continue keywords was to eliminate 99.9% of cases where you could use goto
technically, goto follows lua's tendency to eliminate cruft. since break and continue are just special cases of goto, it makes sense to just use the more general version. plus, continue has the problem of wonky semantics with locals with the repeat until loop. so does goto, but they changed the definition of scope to account for that. of course they could have done the same with continue but i guess the goto way was more elegant (better to say "scope ends at a label if there are no further uses of the variable" than say the same about continue but not for break)
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 83 guests