[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Development
. . -> [Subject]  Update Lua Version?
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Update Lua Version?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by WillFa   USA  (525 posts)  [Biography] bio
Date Tue 04 Jul 2017 07:00 PM (UTC)
Hey Nick,

Are there any plans to update Lua 5.1 to current versions of 5.3?
[Go to top] top

Posted by Fiendish   USA  (1,775 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Wed 05 Jul 2017 01:55 PM (UTC)

Amended on Wed 05 Jul 2017 02:17 PM (UTC) by Fiendish

I believe that 5.3 isn't fully compatible with code written for 5.1.
If the Lua engine is ever replaced, I'd rather see LuaJIT 2.1 get rolled in. Aside from various performance benefits, it also incorporates useful functionality from later Lua versions without breaking the 5.1 API/ABI. The only error-causing change it makes afaik is to abort on invalid string formatting instead of proceeding silently with potentially wrong behavior like 5.1 does (this is a safety feature that only happens when the author doesn't know how to achieve their intended goal with string escapes).

[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Fri 07 Jul 2017 05:11 AM (UTC)
There were some major changes in Lua 5.2 which put me off attempting to implement it.

See Changes in the Language

In particular:

  • Function module is deprecated. It is easy to set up a module with regular Lua code. Modules are not expected to set global variables.
  • Functions setfenv and getfenv were removed, because of the changes in environments.

This would impact on the way that things like table serialization work. Also, testing showed that other DLLs would be incompatible with Lua 5.2. For example, the MySQL DLL.

Basically, because of the changes to things like setfenv, existing code just wouldn't work. And even if it could be got to work you would then have to fiddle around getting the correct DLLs for other functions (if you wanted MySQL, for example). It was just going to be a mess.

Lua 5.1 works, and in this case my philosophy is "if it ain't broke, don't fix it".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]