News for hackers. Stuff that matters.
Re:Compiling to Lua by copx on Friday August 23, 2013 @11:33PM (#6267492)
Yes. I once thought about cheating my way to "the fastest Ruby implementation ever" by simply compiling Ruby to Lua and handing the result to LuaJIT.

Many people "compile to C" if they just want to write some personal toy language or an experimental language. I think "compile to Lua" would be a superior alternative in many cases.

One should point out that this way you get an incremental garbage collector for free, one whose behavior can easily be controlled at runtime i.e. good for soft real-time applications (e.g. games).

Also both Lua and LuaJIT are very lightweight which means you can simply bundle the complete language implementation when creating standalone binaries. On Windows x86 Lua5.1 is ~308kb compiled, LuaJIT2 ~340kb.

Re:Compiling to Lua by burntsushi on Saturday August 24, 2013 @12:10AM (#6267572)
Have you heard of Terra[1]? I think it was pretty much designed for what you're saying. :-)

The cool thing is that the project looks really active too.[2]

[1] - http://terralang.org

[2] - https://github.com/zdevito/terra/commits/master

Re:Compiling to Lua by sitkack on Saturday August 24, 2013 @05:28AM (#6268185)
One could make a Lua backend to PyPy? :) Lua 5.2 has a nice `goto` which makes things very easy. Esp with builtin TCO.