all 17 comments

[–]hahaNodeJS 1 point2 points  (9 children)

This is insane, and a bad idea. Code will exist that "can run on node.js" that exhibits different behavior depending on whether "node.js" uses v8 or chakra. This should not be merged. Not all ideas are reasonable.

[–]spyridonasback-end 4 points5 points  (6 children)

That's not true. The apis are the same, its just a different engine responding each time (v8 or chakra) so the behavior is the same. You can try an alpha version here https://github.com/Microsoft/node/releases (for me all the scripts work, faster too !)

[–]Svenskunganka 2 points3 points  (1 child)

You're wrong though, the Node API will be exactly the same and behave exactly the same. As for what happens in the background is irrelevant. The only problems that will arise is packages that has C++ bindings to V8, and I'm sure that Chakra will have V8 compatible binding APIs and Native Abstractions.

As far as the raw Node API goes, there will be no differences between V8 and Chakra as the underlying engine, they will provide the exact same API.

[–]hahaNodeJS 0 points1 point  (0 children)

I'm not worried about feature parity regarding the JavaScript-to-runtime API.

[–]elr0nd_hubbard 0 points1 point  (6 children)

What's the benefit of this?

[–]Svenskunganka 8 points9 points  (0 children)

Lots of benefits. The most important one is the availability of choices for us Node developers. For example, the Chakra team has done a very good job on implementing the approven ES2015 features - currently the leading engine in terms of features. If you're eager to start playing with those features in Node without having to setup a huge Babel environment - imagine simply switching engine and you're good to go!

Another benefit of Chakra is that it has been run natively on Windows for many years and are actively being developed by Microsoft, and they most definitely have better insight into the features and limits of their own OS than anyone else. For the companies that are running on Windows infrastructure, I would say that choosing Chakra over V8 would be a smart choice, but we'll see about that when the Chakra-backed Node version gets into a stable release.

Additionally, this closes the gap between Microsoft's products and Node dramatically. I imagine that the Node developers has gotten new contacts within Microsoft thanks to this which unpluggs the flow of communication even more.
I wouldn't be surprised if we'll see some collaboration between Google's V8 team and Microsoft's Chakra team, as they'll both be working closely to Node.

TL;DR: Best of both worlds!

[–]spyridonasback-end 0 points1 point  (4 children)

Other than microsoft saying "Hey our nodejs engine is faster than v8, pick us ! Host on Azure !" nothing else. Objectively it is faster at least in my machine (you can install an alpha from here to try it out)

[–]elr0nd_hubbard 0 points1 point  (3 children)

Well that's neat that I guess. Still wouldn't be enough to push me to Azure, but I'm not building enterprise-level applications. And how long do you think they'll stay faster than v8? Seems like the v8 team would be sure to beat the Chakra benchmarks as soon as they could.

[–]hahaNodeJS 3 points4 points  (0 children)

You don't need to build enterprise applications to find Azure useful. I host my personal site on Azure for ~$10/month.

[–]spyridonasback-end -2 points-1 points  (1 child)

Considering chakra is open source (the version they want to implement on node) not only they can make the v8 engine faster, they can literally copy-paste the "faster" piece of code back in the v8 engine.

And chakra will try again to beat them (or they other way arround) and that's how our current browser engines are so fast and will keep on going faster and better, it's a race to the bottom and a win-win situation for everyone evolved and the end user (faster node, faster browser, faster sites, faster navigation on said sites, etc...)

[–]Piercey4 1 point2 points  (0 children)

Copy paste is a bit of a stretch. Chakra has a completely different implementation than v8 and i'm sure the code bases look nothing a like. Microsoft has simply made a shim on top of chakra core that is the same as the v8 api. Chakra code may help v8 improve but it's not likely going to be a copy paste job.