Live data from Hacker News

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

github.com

11–20 of 130 posts

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

#12

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

For example the chakra engine has a better coverage of es6 than v8. see edge score there https://kangax.github.io/compat-table/es6/

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

#13

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

As long as they stay compatible to each other it might create competition between engines, leading to innovation and improvement in both.

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

#14

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

I think the goal is to have Node applications in the windows store. Having a v8 dependency there would be a big problem with embedded devices.

Microsoft is trying to get into the whole IoT hype. This would help them a lot.

It also means they can write servers on Azure that don't need to be able to run V8.

Mostly windows store apps though.

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

#15

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

Competition in the space leads to better engines.

I put a link in another comment to last week's discussion on the topic. But my main concern is developers writing code that tries to bend around then V8 implementation, even if it's not required by the language.

One great example from that thread was about try/catch:

"For example, a try/catch in V8 triggers deoptimization for the entire function it's in, while it might not in other engines. So this leads to many developers avoiding try/catch in performance critical code. This ends up with them avoiding it in general usage, which means that now "avoiding try/catch" is considered a general purpose performance tip in javascript, even though it might only apply to one engine (and the v8 team has expressed interest in trying to stop that deopt)"[0]

"It is a good example actually. Chakra does fully optimize functions with try/catch. Caveat: we don't optimize try/finally yet... Disclaimer: I work for MSFT on Chakra."[1]

"try/catch has pretty much no runtime overhead in SpiderMonkey unless an actual exception is thrown."[2]

[0] - https://news.ycombinator.com/item?id=10896729

[1] - https://news.ycombinator.com/item?id=10896971

[2] - https://news.ycombinator.com/item?id=10897851

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

#16
post #2

This is incredibly cool, I have a request. Please do not post comments on the GH issue unless you have something important to add. These issues gain a lot of attention and it makes it _incredibly_ hard for collaborators to communicate. Locking the issue to collaborators means other people from the outside who have a significant contribution or want to help can't do that. Comments like +1 -1 and such create a signific…

Looks like that didn't work out well. https://github.com/nodejs/node/pull/4765#issuecomment-172933...

Right above your clone of this comment on the thread. :/

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

#17
post #15

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

Competition in the space leads to better engines. I put a link in another comment to last week's discussion on the topic. But my main concern is developers writing code that tries to bend around then V8 implementation, even if it's not required by the language. One great example from that thread was about try/catch: "For example, a try/catch in V8 triggers deoptimization for the entire function it's in, while it migh…

[deleted]

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

#18
post #2

This is incredibly cool, I have a request. Please do not post comments on the GH issue unless you have something important to add. These issues gain a lot of attention and it makes it _incredibly_ hard for collaborators to communicate. Locking the issue to collaborators means other people from the outside who have a significant contribution or want to help can't do that. Comments like +1 -1 and such create a signific…

+1

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

#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 can create v8/chakra/spidermonkey adapters for I can't see this being a success.

That being said, I hope that Node and V8 coupling becomes less tight and the interface between the two does become abstract so that we can all benefit from a choice of engine that implements the requirements of NodeJS.

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

#20
post #15

I don't understand what the goal is here. Honest question, not a criticism. Can someone please explain. Is the intention to have node work on multiple Javascript engines like spidermonkey? I can see why Chakra developers could want this but as a developer using node I don't see how I would benefit.

Competition in the space leads to better engines. I put a link in another comment to last week's discussion on the topic. But my main concern is developers writing code that tries to bend around then V8 implementation, even if it's not required by the language. One great example from that thread was about try/catch: "For example, a try/catch in V8 triggers deoptimization for the entire function it's in, while it migh…

And that was just the first thing off the top of my head, there are tons of other little performance things that many people consider a "JavaScript thing" instead of a "V8 thing"
Post reply on HN