News for hackers. Stuff that matters.
Re:Moonshine – A lightweight Lua VM for the browser by plorkyeran on Tuesday April 01, 2014 @10:23AM (#7508363)
Coroutines, and Lua's metatables are more powerful than what can be done in ES5 (ES6 closes the gap a bit, and generators are equivalent to coroutines).

Lua is pretty much JS done right, which actually makes it a poor choice for something like this IMO. A program written in Lua is not going to be fundamentally different from the same program written in JS, and the problems introduced by using this (worse debugging experience etc.) are very likely to outweigh the benefits of avoiding JS's warts.

Re:Moonshine – A lightweight Lua VM for the browser by stcredzero on Tuesday April 01, 2014 @12:39PM (#7509570)
(worse debugging experience etc.)

How do you know? Maybe try this first? Apparently, there is a in-browser debugger you can activate just by including two files. This is theoretically a first-class debugger that doesn't even need source maps.

http://moonshinejs.org/how-to/debug-locally/

Were you assuming that Moonshine is a compiler targeting Javascript? It's actually a Lua bytecode VM.

Re:Moonshine – A lightweight Lua VM for the browser by Tanner on Tuesday April 01, 2014 @01:59PM (#7510300)
From my cursory evaluation, the debugging support is actually better than vanilla Lua. The only point of friction I can see if that you have to "compile" something that is normally interpreted.
Re:Moonshine – A lightweight Lua VM for the browser by paulcuth on Wednesday April 02, 2014 @09:30AM (#7515345)
This is true. However the distiller can --watch a directory and do this step for you in the background.

For more info: $ moonshine help distil

Re:Moonshine – A lightweight Lua VM for the browser by anonymoushn on Tuesday April 01, 2014 @12:53PM (#7509696)
Generators are equivalent to corourintes only as long as every single function you write is a generator and every single function call (to one of your own funcitons, anyway) is actually delegating to another generator. You can use a trampoline to make this less painful, but then you don't get to see your "real" call stack in the debugger...