lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello everyone,

In the recent thread there was quite a lot of discussion about how to compile Lua to JavaScript and the consensus was that this is very difficult in the general case because Lua has some advanced features (__index, tail calls, coroutines) that JavaScript lacks.

I am interested in whether anyone tried to do this the other way around? I have not found any JS to Lua compiler in the wild. As far as I know JS its features look like they should be quite easily mapped to Lua.

Why JS->Lua? To:
1. Allow JS programmers to easily script Lua programs.
2. Provide the worlds smallest JavaScript implementation (both Lua or LuaJIT are smaller than any JS VM out there). 3. Maybe even compare performance of some non-trivial programs (V8/nodejs vs. LuaJIT2/luvit).

I am curious what are your thoughts on that.

--
regards,
Jakub Piotr Cłapa