Lua to Javascript translator
github.com
Lua to Javascript translator
1–10 of 30 posts
Re: Lua to Javascript translator
#2Re: Lua to Javascript translator
#3Re: Lua to Javascript translator
#4Lua is a better language than Javascript in every possible way. I have half-a-mind to hack LuaJIT into Webkit, but I'm afraid that it may be futile at this point. The biggest shame in all of web development is the "type" attribute on the HTML "script" tag...
Re: Lua to Javascript translator
#5Lua is a better language than Javascript in every possible way. I have half-a-mind to hack LuaJIT into Webkit, but I'm afraid that it may be futile at this point. The biggest shame in all of web development is the "type" attribute on the HTML "script" tag...
I disagree that Lua is better in every possible way. There are at least a couple of ways in which it is merely equal, yet where improvement would be possible.
Re: Lua to Javascript translator
#6Lua is a better language than Javascript in every possible way. I have half-a-mind to hack LuaJIT into Webkit, but I'm afraid that it may be futile at this point. The biggest shame in all of web development is the "type" attribute on the HTML "script" tag...
Re: Lua to Javascript translator
#7Javascript is a simple language. Compile(translate) other language seems good. But complicated things.
Re: Lua to Javascript translator
#8A lot of the metatable functionality just won't work: http://www.lua.org/manual/5.1/manual.html#2.8
Second, it's missing co-routines. Which is a way to suspend the execution of a piece of code.
These features aren't possible in a compiler that simply translates from Lua to JS because JS doesn't have the ability to reproduce these concepts in its own constructs. You would have to output significantly different code to simulate these features.
Without these you're just writing JavaScript in another dialect.
Re: Lua to Javascript translator
#9This is a cool project, but sadly it's not a complete Lua. It's missing two of Lua's most powerful features: A lot of the metatable functionality just won't work: http://www.lua.org/manual/5.1/manual.html#2.8 Second, it's missing co-routines. Which is a way to suspend the execution of a piece of code. These features aren't possible in a compiler that simply translates from Lua to JS because JS doesn't have the abilit…
There are more than a few language X -> Y translators (not compilers), and I suspect they all miss some aspects of the source or target language.