3 ms·
> Is there a C++ to Lua compiler that produces performance code... ? This statement makes zero sense. It's like someone saying Forth is silly because it doesn'
by billyhoffman 12y ago
> Is there a C++ to Lua compiler that produces performance code... ?
This statement makes zero sense. It's like someone saying Forth is silly because it doesn't have an asm.js-like layer.
Clearly you don't understand the use cases of Lua.
https://sites.google.com/site/marbux/home/where-lua-is-used https://sites.google.com/site/marbux/home/where-lua-is-used
- astrodust 12y agoWhat I'm trying to show here is that JavaScript is also a JVM-like runtime, so it's possible to "cross-compile" things to JavaScript and get a lot of functionality that way. Lua is a convenient, easily embeddable scripting language, but that alone does not make it the best choice given how complicated the world is.
- MichaelGG 12y agoSo now people are going to "transpile" their nginx configs? (And still not be as fast as Lua?) In nginx there are two places for scripting that I know of. One, to replace the somewhat awkward config stuff, like the "if" statement. Two, to enhance HTTP requests/routing a bit. I doubt people are writing long applications and I hope nginx isn't trying to become an application server. I just can't see how a weak language like JS makes any sense for such an environment. Maybe that's why the nginx guy says he's making his own JS VM, to get it working well enough for nginx.
- astrodust 12y agoIt's a glue language. I don't expect people to transpile things, but it's an option on the table. JavaScript might be "weak", but it's strong enough for that sort of task. There's a lot to hate about JavaScript, but ubiquity and support is not one of those things.