lua-users home
lua-l archive

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

On Fri, Nov 18, 2011 at 9:28 PM, Jakub Piotr Cłapa <> wrote:
> 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).

In fact, I've been thinking seriously about that in the last year or
so. Because I'd really like to see JavaScript running out of the box
in our Nginx Lua module environment:

A big win here will be that JavaScript code that accesses MySQL,
Redis, and etc. can be written synchronously but run nonblockingly out
of the box like in Lua because Lua supports coroutines :) Node.js's
callback nightmare always makes me crazy ;)