News for hackers. Stuff that matters.
Re:Moonshine – A lightweight Lua VM for the browser by stcredzero on Tuesday April 01, 2014 @10:25AM (#7508378)
WHY? I mean, Lua is a dynamic language with first class functions just like Javascript is, no big difference here.

You can use objects as keys in Lua. This makes a lot of code in Lua a pain to port to JavaScript. I have Lua code I would like to port to JavaScript that this applies to.

Re:Moonshine – A lightweight Lua VM for the browser by nnq on Tuesday April 01, 2014 @10:29AM (#7508413)
Got some sample code or a link to it? I really like figuring out ways to express existing code in a different style/pattern/language :)
Re:Moonshine – A lightweight Lua VM for the browser by Excavator on Tuesday April 01, 2014 @02:00PM (#7510315)
Map¹ might've been an option, excepting no support in Safari and IE < 11. Although I dunno about the performance hit, if any.

¹ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Moonshine – A lightweight Lua VM for the browser by fit2rule on Wednesday April 02, 2014 @04:33PM (#7518791)
Refactor once: the object key. To a function returning the value of the object. Refactor a second time: function all the object things.

Whats not to like?