Hacker News new | past | comments | ask | show | jobs | submit login

Now it's time for them to move to Node.

They currently use the JS engine from Firefox 45 (over 2 years old) and are looking to move to 52 (almost 15 months old). Let's not forget that the update before that was from FF25 which was from 2013.

It's past time to port your stuff to N-API and actually allow devs to have access to standard dev tools using standard dev practices.

It would be a great change for Gnome devs too. Rather than spending weeks of dev time trying to shim in the latest SpiderMonkey version and make sure nothing broke, they could rely on N-API being stable, so they can focus instead on updating the JS interface to ES6+.




I've tried. Multiple times:

https://github.com/gnome/gnode https://github.com/WebReflection/node-gtk https://github.com/endlessm/eos-knowledge-content-node https://github.com/Place1/node-gir

The C++ V8 / Node API is actually more unstable than the equivalent SpiderMonkey one (there is supposed to be NaN, Node's wrapper abstraction library, but complex language bindings like I did requires a lot more than what's in NaN), and overall I encountered a lot of bugs in the ecosystem. Making libuv work with an external message loop like glib requires some complex plumbing. The thread story is a lot worse: glib wants to call your callback function from another thread, and V8 will crash if you try to do that.

There's a lot of edge cases when you're implementing language bindings, and I kept hitting into non-rounded-off edges, bad documentation, and impassable walls.


Have you tried N-APIs? It definitely helps with the documentation issue? What exactly was lacking?

https://nodejs.org/api/n-api.html


> Firefox 45 (over 2 years old) and are looking to move to 52 (almost 15 months old)

That is quite misleading. They are using the extended support releases: https://www.mozilla.org/en-US/firefox/organizations/

So "almost 15 months old" should be the "most recent one up until the start of this month".


It's actually not that far behind. GJS currently uses mozjs-52. They're working to update to 60 in 3.30 for this fall.


That'd mean even more of the world relying on a monopolist of ecosystem of V8/Blink.

V8/Blink already runs 70% of browsers and a massive amount of software, don't you think at some point it's enough with giving Google control over everything?


Not at all.

N-API was specifically added to make multiple back-ends possible (by removing dependency on the V8 FFI). You can currently use either Chakra or V8. Spidermonkey could be added (there's an outdated spiderNode around) if Mozilla ever got their act together.

EDIT: I really wish Apple would add JSC support to node. It would potentially allow more standard integrations on iOS. Aside from that, JSC is very fast (faster than v8 at quite a few things) and also supports proper tail calls (as specified by the ES6, 7, and 8 specs).


You can use Edge's engine ChakraCore with Node as well.


Why does using V8 or Blink give Google control over your software?


It means one company decides the future direction of the web. (Even more than they already do)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: