Updating Lua from 5.1 to something newer

Posted by Kahenraz on Sat 14 Apr 2018 01:56 AM — 5 posts, 24,547 views.

#0
I have read this thread:
http://www.gammon.com.au/forum/?id=14028

I would be willing to assist in updating libraries to work with a newer version (5.2 or 5.3).

If this could be a real thing I'm sure there are others who would be willing to help as well.
USA Global Moderator #1
Why? "Because it's newer" isn't a compelling reason to break compatibility with everything. LuaJIT 2.1 incorporates the most useful features of later versions without needlessly breaking compatibility. You can just swap in its DLL yourself without making any changes to MUSHclient or existing scripts except to fix previously-silently broken string escapes.
Amended on Sat 14 Apr 2018 04:02 PM by Fiendish
#2
My argument isn't simply because it's newer. I asked because there are new features in Lua that I would like to use.

Whether it's compelling or not is up for discussion as it's not up to just me; that's why I proposed assisting in the update and left it open for others to offer as well.
Amended on Sat 14 Apr 2018 08:17 PM by Kahenraz
Australia Forum Administrator #3
Unfortunately, the changes made to Lua 5.2 will simply break a lot of existing code, in particular the stuff described here:

http://www.gammon.com.au/forum/?id=4960

By removing setfenv, anyone who has followed the guidelines for serializing tables will have their code fail. Fixing this is not just a case of updating libraries.

We would have a massive mis-match of plugins, scripts, functions built into triggers, etc. which would fail for many users.

In March 2018 alone there were 1725 downloads of the older version of MUSHclient (4.94). Based on that I would estimate 20000+ downloads a year. Unbelievably high though that may seem, I don't want to be fielding thousands of complaints about how MUSHclient's plugins or tutorials have stopped working when a new release comes out with a new version of Lua.

The current version of Lua works, and there are no known major issues with it. Fiendish uses LuaJIT in the Aardwolf download, which is a drop-in alternative that would be faster and almost 100% compatible, as he notes.

The downsides are just too great. You are one person that wants extra features. I am one developer that doesn't want to field hundreds or thousands of complaints from other users.

Since the source code is publicly available you are certainly welcome to re-jig the client to your satisfaction, and use whatever version of Lua you like.

You might say "well, people don't have to download the improved version", which would be true. But when a bug is found (as you have been finding recently) then there would need to be a way of making the fix for the old and the new version. This would basically be doubling my workload.
USA Global Moderator #4
Would you share which new features you're looking for? We might be able to find reasonable polyfills for unmet needs.