Live data from Hacker News

Enable Node.js to Run with Microsoft's ChakraCore Engine

github.com

81–90 of 130 posts

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#81
post #71

I am sure I'm a minority on this thread - but does anyone else think that if the engine is being developed in the open as open source then competition is not a good thing. I believe it's similar to having io.js and node.js - together it is a stronger platform. To this end, I think it would have made a lot of sense for MS to collaborate with webkit/blink and vice versa... that's the true spirit of open source IMO... I…

> I am sure I'm a minority on this thread - but does anyone else think that if the engine is being developed in the open as open source then competition is not a good thing

GCC vs EGCS, Xemacs vs Emacs, X.org vs Wayland, KDE vs Gnome, Firefox vs Chrome, GCC vs LLVM, etc., etc.

Competition is good even for Open Source projects.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#82
post #6
post #3

They should also have the option to use FireFox's engine as well. Who has the fastest JS core these days?

Letting ChakraCore run means effectively "wrapping Chakra to emulate V8's APIs". There was an experiment to do this for SpiderMonkey at one point but it's a lot of work to maintain.

Here's Mozilla's effort to implement the V8 api on spidermonkey if anyone's curious:

https://github.com/zpao/spidernode

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#83
post #52

Earlier quoted context omitted.

Does it matter? If V8 deoptimizes code with try/catch, then I as a developer need to account for that.

It does! V8 has expressed interest in fixing the try/catch deopt, but it keeps falling behind on their list because not many people are using it. Most people aren't using it because V8 (and in some minds, mine included until 5 days ago, all of Javascript) doesn't optimize it. It's a bit of a catch 22, and having alternate engines where that deopt doesn't happen can be the way out. Basically having an alternate engine…

We already have alternate engines in web browsers.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#84
post #77

Many posters in that Github Chakra pull request thread appear to be in the "Node is V8 and only V8" camp. This is disappointing. Since when is having a bigger developer community, supporting the latest ES6 standards, and having wider reach for NodeJS a bad thing? Look at what the friendly rivalry has done for the various browsers - the competition benefitted everyone and advanced technology immeasurably.

I'm a node.js developer and I don't really care what interpreter is being used as long as any code submitted to NPM is compatible with any version of node.js regardless of the JavaScript engine. The only issues would be in ChakraCore were to support additional ES6/7 features that people started to use that wouldn't work on a V8 node.js instance, or the other way around.

How is that different from how node v5 supports additional ES6/7 features that don't work in node v4? In the end you can only rely on package authors to be aware of their targets' capabilities and code to the minimum baseline accordingly.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#85
post #54
post #22

Earlier quoted context omitted.

Well said! One of the issues that spawned io.js was the lack of keeping up with V8 changes. I was asking the same question of what happens when V8 does something MS don't follow? It'll be interesting to see in the future. Good thing this happened when Node has an open governance model, so we can follow developments in future.

I think the long-term solution is to drop V8. The V8 developers pretty much do not care about Node at all. Perhaps Chakra can come to some agreement to keep their APIs stable and if so they can become the new default engine.

Dont be silly.

There may at some point be an effort to build an 'abstract node api interface' and main maintain bindings to various engines...

...but there's no way v8 will be dropped at any point in the foreseeable future.

What would you replace it with?

This? no way. We're years away from that even being plausible.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#86
post #48
post #19

This is awesome, but before anyone uses this for something real keep in mind that the way this works is that Microsoft has created a shim on top of Chakra that exposes a V8 API. If V8 changes its API drastically (which it frequently does) this little experiment is basically over. There is only so much work people can do to keep up with a moving target. Barring NodeJS creating an abstract JS engine API that developers…

The thing is, Node needs to keep up with those same APIs.

It needs to call them, not implement them. I am guessing the former is a lot simpler than the latter.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#87

Earlier quoted context omitted.

Node's and V8's APIs changed so frequently that someone created an abstraction layer called NaN ("Native Abstractions for Node.js") for people developing Node binary plugins. https://github.com/nodejs/nan

Keep in mind that native modules coded against NAN1 do not work with NAN2. Not sure about forward compatibility of NAN.

Even NAN2 is breaking some things. Or at least deprecating. It's hard to keep up, and the docs and examples suck. I tried converting a node v0.10 module to using it and flailed horribly.

Edit: I don't mean to say the project sucks - docs sucking is just a general open source problem I can't really blame the authors for.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#88
post #83

Earlier quoted context omitted.

It does! V8 has expressed interest in fixing the try/catch deopt, but it keeps falling behind on their list because not many people are using it. Most people aren't using it because V8 (and in some minds, mine included until 5 days ago, all of Javascript) doesn't optimize it. It's a bit of a catch 22, and having alternate engines where that deopt doesn't happen can be the way out. Basically having an alternate engine…

We already have alternate engines in web browsers.

[deleted]

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#89
post #44

Earlier quoted context omitted.

Yeah, and it's actually really anti-intellectual, since a well adjusted person is capable of both humor-depth and logical-depth understanding among many other things.

I really don't want HN to turn into reddit, with half the thread devoted to jokes/memes, so I appreciate self moderation that discourages that.

On the other hand, the subthreads complaining about them inevitably take up more space than the offending comments themselves, and are arguably of less value.

Hacker News is already host to memes, trite boilerplate and pseudo-intellectual posing - drawing a line in the sand at humor seems like a futile gesture.

Re: Enable Node.js to Run with Microsoft's ChakraCore Engine

#90
post #54

Earlier quoted context omitted.

I think the long-term solution is to drop V8. The V8 developers pretty much do not care about Node at all. Perhaps Chakra can come to some agreement to keep their APIs stable and if so they can become the new default engine.

Dont be silly. There may at some point be an effort to build an 'abstract node api interface' and main maintain bindings to various engines... ...but there's no way v8 will be dropped at any point in the foreseeable future. What would you replace it with? This? no way. We're years away from that even being plausible.

I said long-term. V8 makes changes all the time that breaks Node, degrades performance in certain ways and essentially says "tough shit". Why wouldn't you look for an alternative?
Post reply on HN