Hacker News new | past | comments | ask | show | jobs | submit login

[Unfortunately, IMHO] Lua "minor versions" tend to break compatibility with older versions, making it problematic to upgrade to new versions without breaking scripts written for older versions. I believe mpv is stuck on 5.2 due to this. Here's the list of incompatibilities for 5.4: https://www.lua.org/manual/5.4/manual.html#8

Yeah, Lua doesn't use semver, which is ok. Just multiply by 10 and pretend it does. So this would be Lua 54.

Yes, Lua doesn’t do “minor versions”. You can think of 5.4.0 as 54.0.0, and 5.3.5 as 53.0.5.

The only thing you're saying is that it's lamentable that they use the "5.4" version number for something that's not a minor version.

That's what this is, this is the next major version of Lua.

I think new versions of a language, major or minor, breaking compatibility with old code is generally lamentable regardless of version scheme. The version scheme they chose is not the root of my disappointment. Because so many programs will likely never upgrade their version of Lua, this leads to fragmentation of the community.

Likewise OpenResty is "stuck" on 5.1.

"Stuck" might be a wrong word. OpenResty actually dropped support for Lua and is now LuaJIT only. LuaJIT is a fork of Lua 5.1, but it has features from 5.2 [1] (and from later versions where it sees fit). Because of this, Lua 5.1 is a golden standard of Lua world at the moment.

[1] http://luajit.org/extensions.html#lua52

There is more modern alternative to LuaJIT though - MoonJIT [1]. Unlike the former it supports modern Lua standards.

[1] https://github.com/moonjit/moonjit

AFAICT, MoonJIT is just a fork of LuaJIT. Both support many 5.2 extensions. Additionally, MoonJIT also has a few Lua 5.3 extensions, but it is not fully compatible with Lua 5.3 or even Lua 5.2. Quote:

"Note: this provides only partial compatibility with Lua 5.2 at the language and Lua library level. moonjit is API+ABI-compatible with Lua 5.1, which prevents implementing features that would otherwise break the Lua/C API and ABI (e.g. _ENV)."

Some internal language changes in 5.3, like the new integer type, would require deep surgery in the JIT. This also seems to be the main (but not only) reason why Mike Pall doesn't have plans to ever support Lua 5.3. (https://www.reddit.com/r/lua/comments/2zutj8/mike_pall_luaji...)

Yes, and OpenResty maintains their own fork [1] as well.

[1] https://github.com/openresty/luajit2

Am I wrong? I thought the author of LuaJIT has been pretty well over it for the last 5 years and no one else picked it up.

LuaJIT had a beta release 3 years ago and hasn't been updated since.

Looks like Mike Pall is still actively working on the project: https://github.com/LuaJIT/LuaJIT/commits/v2.1

The last commit is from 5 days ago.

<close> seems to be a nice feature. wish it could be ported to luajit.

And doesn't seem to suffer from it.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact