lua.vm.js icon indicating copy to clipboard operation
lua.vm.js copied to clipboard

Lua 5.1

Open agladysh opened this issue 10 years ago • 11 comments

Lua 5.1 is still widespread (and we maintain quite a lot of code in it), and Lua 5.2 still does not have as wide module support as one would like it to.

So. Can we get lua5.1.vm.js, please?

agladysh avatar Sep 09 '13 15:09 agladysh

Hello Alexander,

Good news! I've in hands what you are looking for (Lua.vm.js version 5.1.5). I you are interested I can send it directly to you. I've slightly modified the js API so that I can start/stop the VM multiple times without issues.

I will also post this information on github. Maybe someone can help to commit these changes in a nice way...

Regards, Nicolas (Sent from my iPhone)

Le 9 sept. 2013 à 17:34, Alexander Gladysh [email protected] a écrit :

Lua 5.1 is still widespread (and we maintain quite a lot of code in it), and Lua 5.2 still does not have as wide module support as one would like it to.

So. Can we get lua5.1.vm.js, please?

— Reply to this email directly or view it on GitHub.

nbertin avatar Sep 10 '13 07:09 nbertin

Great, I'm interested, thanks!

[email protected] if you prefer e-mail.

agladysh avatar Sep 10 '13 07:09 agladysh

I would very much appreciate a lua5.1.vm.js - could you share it or point to a place where can I get it?

Rush avatar Apr 24 '14 17:04 Rush

NB: https://github.com/logiceditor-com/lua5.1.js (not related to @nbertin code).

agladysh avatar Apr 24 '14 18:04 agladysh

I'm curious why you need 5.1 explicitly. With compatibility options turned on, 5.2 has almost everything 5.1 has.

Otherwise, you should be able to just swap out the lua directory with 5.1's. I don't think we use any 5.2 only features internally yet...

daurnimator avatar Aug 13 '14 10:08 daurnimator

I need LUA 5.1 because I am using tolua++ for my embedded project. It is working great despite all the negative opinions on the Internet. I want full source code compatibility with the web browser.

Rush avatar Aug 13 '14 14:08 Rush

Should a legacy branch be created for this compatibility?

adrian-castravete avatar Aug 13 '14 14:08 adrian-castravete

I need LUA

Please note, "Lua" is not an acronym

5.1 because I am using tolua++ for my embedded project. It is working great despite all the negative opinions on the Internet.

I assume those are opinions about tolua++ you're referring to? It would behoove you to read through http://lua-users.org/lists/lua-l/2012-12/msg00601.html to make sure you know it's limitations and bugs.

There are better binding utilities out there, e.g. https://github.com/lubyk/dub or https://github.com/jeremyong/Selene

I want full source code compatibility with the web browser.

As I mentioned, Lua 5.2 is 98% compatible with Lua 5.1, especially when COMPAT mode is on (which it currently is for lua.vm.js) What errors do you get in the current version?

daurnimator avatar Aug 13 '14 14:08 daurnimator

I have no issues with object lifetime in tolua++ because all my objects have their actual private data under smart pointers of type std::shared_ptr. I find everything properly cleaned up and garbage collected.

As I see it Selene required manual registration of classes - very ugly, not nice. tolua++ has a natural description of API. Dub seems promising, I will look it up but documentation seems pretty sparse.

Rush avatar Aug 13 '14 14:08 Rush

I have a large codebase (hundreds of KLOC) that is explicitly not Lua 5.2 compatible and I see no point in upgrading it (since we're mostly using LuaJIT). I still would like to be able to run Lua code in browser. Anyway, that's a moot point now: https://github.com/logiceditor-com/lua5.1.js

agladysh avatar Aug 20 '14 10:08 agladysh

For what it's worth, I've been considering how Lua scripts might look on the web in general, and I'm thinking attaching a version="5.1" or similar in the <script> tag would make sense.

This way we don't get in the mess that is javascript's eternal backwards compatability.

daurnimator avatar Sep 15 '14 03:09 daurnimator