Which JavaScript VM are they going to use?
From the article: > I have a working prototype of a JavaScript VM that is highly optimized for NGINX’s unique requirements and we’ve begun the task of embedding it within NGINX Open Source.
NGINX Open Source: Reflecting Back and Looking Ahead
31–40 of 42 posts
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#32Earlier quoted context omitted.
Lua is a great scripting language in its own right, but the trouble is it's not JavaScript which at this time has an extraordinary amount of momentum behind it. You can use JavaScript inside Postgres, for example, which makes it extremely versatile as a glue language for back-end services. Lua has nowhere near the traction or support. Is there a C++ to Lua compiler that produces performant code when using an asm.js-l…
> 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
Lua is a convenient, easily embeddable scripting language, but that alone does not make it the best choice given how complicated the world is.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#33Earlier quoted context omitted.
Lua is a great scripting language in its own right, but the trouble is it's not JavaScript which at this time has an extraordinary amount of momentum behind it. You can use JavaScript inside Postgres, for example, which makes it extremely versatile as a glue language for back-end services. Lua has nowhere near the traction or support. Is there a C++ to Lua compiler that produces performant code when using an asm.js-l…
Many applications (e.g. Redis) are designed to work with Lua scripts out of the box. If you label yourself a "javascript" or "lua" programmer, that is a bigger problem imo than which scripting language you need to use.
If you've got a lot of JavaScript code, or you want to use NPM, you can't use Lua.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#34Earlier quoted context omitted.
> 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
What 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.
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.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#35I've been digging the last few months of blog posts that nginx has been putting out, especially the articles around microservices. They're very well written and have inspired our company to think differently about a few of our applications. When we were offered the opportunity to talk with nginx directly for a private webinar, we were left with a very underwhelming feeling. It may have been the specific sales person,…
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#36Earlier quoted context omitted.
Many applications (e.g. Redis) are designed to work with Lua scripts out of the box. If you label yourself a "javascript" or "lua" programmer, that is a bigger problem imo than which scripting language you need to use.
I'm not going after labels here, I think programmers should be able to tackle new languages, however libraries don't magically switch from one language to another. If you've got a lot of JavaScript code, or you want to use NPM, you can't use Lua.
What does javascript have in NPM that is so awesome it isn't easily replicated and/or already existing in a lua implementation?
I honestly don't know a single NPM library I'd use that I don't know the Lua equivalent or Python equivalent or PHP equivalent. :/
> If you've got a lot of JavaScript code, or you want to use NPM, you can't use Lua.
Well, yes, if you have an existing Node.js codebase you want to port its great.
However, you made the original claim that:
"Lua has nowhere near the traction or support."
Lua is in Postgres, Redis, Nginx [already supported!]
You've got Cassandra lua implementations that try to boilerplate an API for you: https://github.com/jbochi/lua-resty-cassandra
You've got a NPM style installer in the form of luarocks: https://rocks.moonscript.org/
I really just don't understand the claim that Lua has "nowhere near the transaction or support". Is there even one cache [e.g. Redis] that supports Javascript? I can't name any.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#37Nginx Plus seems like they took a lot of the obvious feature upgrades, some which look fairly easy (remove cached item) and put them in a pay wall. Nothing wrong with that, just feels weird. And the pricing is enough to pay for a Windows license, not that IIS is even close to nginx (it's reverse proxy capability is terrible). I'm sad to hear about JS; I thought the work with Lua was going well and would be a better c…
Quite arguable. Creating a paywalled version of a FLOSS product like this has never been seen well by the FLOSS community (especial when there's been so many contributors) and has actually been subject to a lot of controversy.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#38Earlier quoted context omitted.
What 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.
So 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…
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.
Re: NGINX Open Source: Reflecting Back and Looking Ahead
#39Re: NGINX Open Source: Reflecting Back and Looking Ahead
#40Earlier quoted context omitted.
I'm not going after labels here, I think programmers should be able to tackle new languages, however libraries don't magically switch from one language to another. If you've got a lot of JavaScript code, or you want to use NPM, you can't use Lua.
> I'm not going after labels here, I think programmers should be able to tackle new languages, however libraries don't magically switch from one language to another. What does javascript have in NPM that is so awesome it isn't easily replicated and/or already existing in a lua implementation? I honestly don't know a single NPM library I'd use that I don't know the Lua equivalent or Python equivalent or PHP equivalent…
This requires learning the new library, porting code you've already written over to the new library, testing the new code using a totally different test framework. Non-trivial.
Lua has a lot of support, don't get me wrong, but it has way, way less support than JavaScript. To say otherwise is seriously dishonest.
I am not in any way equating "support" with "superior".