[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: JavaScript to Lua compiler
- From: Jakub Piotr Cłapa <jpc-ml@...>
- Date: Fri, 18 Nov 2011 14:28:05 +0100
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