14 ms·
Enable Node.js to Run with Microsoft's ChakraCore Engine
- inglor 11y agoThis 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 significant amount of noise. Support open source, keep the discussion clean.
- joshmanders 11y agoLooks like that didn't work out well. https://github.com/nodejs/node/pull/4765#issuecomment-172933447 https://github.com/nodejs/node/pull/4765#issuecomment-172933... Right above your clone of this comment on the thread. :/
- ohnomrbill 11y agoLooks like this is a trolling attempt. The comment was subtly changed and the author, https://github.com/ingIor https://github.com/ingIor, is a misspelling of inglor and has no contributions.
- wdmeldon 11y ago+1
- andrewmcwatters 11y agoThis got downvoted? Lighten up HN, it's a joke. The same comment on DN would have gotten a ton of upvotes, and the coldness of HN's lack of humor makes this place really off-putting.
- Matachines 11y agoEveryone here tries hard to look "smart".
- andrewmcwatters 11y agoYeah, 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.
- jotux 11y agoI 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.
- andrewmcwatters 11y agoI can appreciate that point of view. I really wouldn't want that either.
- krapp 11y agoOn 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.
- oldmanjay 11y agoThe line is not merely drawn at humor, but you'd better actually be funny if you want to post a joke.
- oldmanjay 11y agoI don't try to look smart at all. I am smart and so don't need to try. I also appreciate humor. What I don't appreciate are simple Reddit-level karma-grubbing jokes, and I will vote them down every single time. You should be less cavalier with that broad brush. It isn't appreciated here.
- bhouston 11y agoThey should also have the option to use FireFox's engine as well. Who has the fastest JS core these days?
- inglor 11y agoLetting 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.
- empyrical 11y agoHere's Mozilla's effort to implement the V8 api on spidermonkey if anyone's curious: https://github.com/zpao/spidernode https://github.com/zpao/spidernode
- morebetterer 11y agoThe Node fork JXCore supports Chakra, SpiderMonkey and V8 right now. It's pretty fast, probably because it's based on a pre-0.12 node fork when node was known to be faster than it is presently. https://github.com/jxcore/jxcore https://github.com/jxcore/jxcore
- TazeTSchnitzel 11y agoI'd be curious about Nitro/JavaScriptCore (in WebKit). For certain workloads (haste-compiler JS output from compiling Haskell) it performs much better than Chrome or Firefox for me.
- kojoru 11y agoThere's a Microsoft blog post which gives much more details: https://blogs.windows.com/msedgedev/2016/01/19/nodejs-chakracore-mainline/ https://blogs.windows.com/msedgedev/2016/01/19/nodejs-chakra...
- minionslave 11y agoWhat does this mean for noje.js?
- yarrel 11y agoEmbrace, extend, extinguish.
- geofft 11y agoCan you explain what you mean by this comment in this context?
- mattkrea 11y agoWe'll see how long it takes to go cross platform. Only then can someone really say but so far this PR doesn't make me feel very comfortable with the Node ecosystem going forward.
- geofft 11y agoLinux support for ChakraCore is planned within the next few months: https://github.com/Microsoft/ChakraCore/wiki/Roadmap https://github.com/Microsoft/ChakraCore/wiki/Roadmap We can see if that actually happens. Can you explain what makes you feel uncomfortable about the Node ecosystem? I believe Node.js already works on non-Windows platforms.
- Sanddancer 11y agoFear, Uncertainty, Doubt. Stop spreading those things. The most likely thing to happen if ChakraCore starts getting more popular is that Google ups their game with V8, and the Javascript speed war that made browsers much faster starts hitting server space. Additionally, the entire stack is Free Software. There is absolutely nothing precluding you from pulling a copy of the repo "just in case"
- underbluewaters 11y agoI 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.
- rom1504 11y agoFor example the chakra engine has a better coverage of es6 than v8. see edge score there https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- s3th 11y agoWe're working on updating Kangax, but V8 now has 92% ES6 coverage in Chrome Canary (on track for shipping in Chrome M49)! Disclaimer: I work on V8
- sonnyp 11y agoHow so? I just loaded es6 kangax table in Canary "Version 49.0.2566.0 canary (64-bit)" and it reports 62% for current browser. EDIT: 92% reported for "Version 50.0.2626.0 canary (64-bit)" nice job!
- johannes1234321 11y agoAs long as they stay compatible to each other it might create competition between engines, leading to innovation and improvement in both.
- inglor 11y agoI 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.
- shad0wc0dex 11y agoWith Microsoft starting to open source more projects, things like this really start to become a reality. Awesome pull request, and I look forward to playing around with this once the request has been merged. (If it does get merged)
- dsp1234 11y agoSome HN comments on this topic from when ChakraCore was announced last week. https://news.ycombinator.com/item?id=10896063 https://news.ycombinator.com/item?id=10896063
- tjfontaine 11y agoCongratulations Microsoft and the Node.js team! Providing alternate JavaScript run times is critical to the success of a platform that requires predictable performance on a variety of environments. I'm so proud of everyone making this come true! Great work everyone.
- tbrock 11y agoThis 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.
- nevi-me 11y agoWell 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.
- Touche 11y agoI 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.
- shadowmint 11y agoDont 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.
- Touche 11y agoI 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?
- nevi-me 11y agoInteresting development, a good one at that! A few questions though. Node tracks V8 releases, so the first thing I'm wondering is whether ChakraCore will continue emulating V8 APIs into the future? What happens when ChakraCore adds breaking changes which V8 doesn't support? I presume MS will be supporting most development on the engine, as they benefit from IoT Core and other applications relying on Node. If Mozilla were to do the same and add SpiderMonkey, this would likely see the 3 major vendors accelerate adoption of JS standards further. I'm more bullish on JS development into the future. If I were to predict, I'd see Node switching to ChakraCore as its primary engine in a year. V8 has been 'we build you follow'. I know Domenic and other Google developers have helped with the relationship with Node contributors, but what will happen when MS offers a less-maintenance-prone engine? Embrace, extend, extinguish!
- domenicd 11y agoChakra only works on Windows. They have on their roadmap plans to work on the interpreter on other platforms, but nothing about getting the JIT running. So I sincerely doubt we'd see a switch.
- dsp1234 11y agoI'm wondering is whether ChakraCore will continue emulating V8 APIs into the future? One of the comments on the pull request talks about this a little.[0] "I have separately reached out to each of the V8 and Chakra teams and invited both to sit down face to face to work through the API/ABI impact of this change and figure out how we can make the ABI layer more robust." [0] - https://github.com/nodejs/node/pull/4765#issuecomment-172935993 https://github.com/nodejs/node/pull/4765#issuecomment-172935...
- sangnoir 11y ago> If I were to predict, I'd see Node switching to ChakraCore as its primary engine in a year. Chakra doesn't even compile on Mac OS or Linux, where the majority[1] of instances run. If I didn't know better, I'd say Microsoft isn't interested in Chakra-Node running on other platforms - only on Windows, but with a V8-beating performance or other 'desirable' Chakra-only extensions (extend). Want high performance NodeJS? Find it on Windows/Azure (extinguish) 1. This is an educated guess
- domenicd 11y agoIt's important to remember that ChakraCore only currently builds on Windows, so this is only for Windows Node.js builds. The ChakraCore roadmap [1] shows that they plan on porting the interpreter to Ubuntu, but not to Mac OS, and they don't plan on porting the JIT. So even it does go Windows + Linux, it will still be a low-performing toy on Linux. This is vaguely interesting from a technical point of view, but doesn't seem like it'll majorly impact the future of Node.js, except maybe as something Microsoft can offer for Azure customers that choose Windows Server. [1]: https://github.com/Microsoft/ChakraCore/wiki/Roadmap https://github.com/Microsoft/ChakraCore/wiki/Roadmap
- ihsw 11y agoSeems comparable to the divide between Go and GccGo -- largely identical but conceptually very distinct. I don't know of anyone voluntarily using GccGo.
- domenicd 11y agoThere was just a comment on GitHub [1] that updates this a bit: > For cross-platform support, the key target for next six months on the roadmap is to get the interpreter & runtime working. JIT would come after that (don't read it as no JIT forever - it was just a breakdown of what we need enable and its ordering for next 6 mos). So maybe eventually it will be fully supported. (No update on Mac OS yet, but I can give them the benefit of the doubt there...) [1]: https://github.com/nodejs/node/pull/4765#issuecomment-172942563 https://github.com/nodejs/node/pull/4765#issuecomment-172942...
- dogma1138 11y agoDidn't they open sourced the engine? If so people can port it as they like.
- deleted 11y ago[deleted]
- bterlson 11y agoThe goal is for all of ChakraCore to be broadly cross-platform eventually, including the JIT, and including many more platforms than just Ubuntu x64. The roadmap reflects our next steps for the next 6 months but is not the entire journey. Disclosure: I work on Chakra
- dev6563 11y agoWhy should a developer care about this? What does ChkraCore bring to the table that V8 doesn't ?
- scope 11y agoECMAScript 2015 coverage (even some ECMAScript 2016) by ChkraCore is better than V8 (or SpiderMonkey) [1] [1] http://kangax.github.io/compat-table/es6/ http://kangax.github.io/compat-table/es6/
- pritambaral 11y ago> V8 now has 92% ES6 coverage in Chrome Canary (on track for shipping in Chrome M49) Source: https://news.ycombinator.com/item?id=10932790 https://news.ycombinator.com/item?id=10932790
- Sanddancer 11y agoSame reason you should care that there are different web server engines, or that there are different programming languages. ChakraCore has a different set of pros and cons that you should weigh against to figure out what the best engine for your organization is, one of the examples being brought up elsewhere being that it has a better exception handler. One can and should occasionally benchmark against other stacks, or portions of stacks, to see if best practices then match up with current tech.
- morebetterer 11y agoI hope the V8 C++ API doesn't become the defacto Node engine API. Node really needs a proper engine-neutral API. This way the native node modules can truly be portable across engines and across node versions. Supporting additional JS engines would ultimately lead to a healthier ecosystem and higher quality JS implementations.
- ilaksh 11y agoBut it currently doesn't actually support any other platform or have a design that would easily allow that. You are at the front lines of embrace, extend, extinguish. Get away from the Dark Side and the Empire and join the rebels, before you are forced to do something terrible.
- smt88 11y ago> before you are forced to do something terrible A little melodramatic, don't you think?
- dang 11y agoWe detached this subthread from https://news.ycombinator.com/item?id=10932756 https://news.ycombinator.com/item?id=10932756 and marked it off-topic.
- ilaksh 11y agoIts not off-topic, embrace extend extinguish is a well documented policy of Microsoft (documented by internal memos that have been in the public domain for some time). Microsoft has been fined massive amounts for anti-trust issues. The web platform is the primary threat to Microsoft's business model since it constantly chips away at the near-monopolies in business and gaming software markets. Many of the managers and team leads at Microsoft aren't aware of this policy or are in denial, but the people really running the programs are aware of the business reality and affect things like priorities, such as the design goals for this project. The fact that Hacker News censored my comment is just evidence that Hacker News is in bed with large corporations, or just has no ability to stomach the harsh realities of our imperfect society. I used to be a Microsoft developer many years ago, until I got a taste of what Microsoft was doing to web development. For the last several years I have been a Node developer. Microsoft has contributed almost nothing important to Node, and this referenced effort is simply a danger to the Node ecosystem. That is the reality. Censorship is a big part of the reason that I do not recommend Hacker News to people anymore.
- jondubois 11y agoThis is great. I still feel that Google isn't particularly excited about Node.js. It's good to see that Microsoft puts faith in the platform. I guess Google has a few conflicts of interest with Go and Dart.
- TazeTSchnitzel 11y agoGoogle use a lot of Java, I believe. That probably has something to do with it.
- z3t4 11y agoAs a long time JS developer I was blown away by the V8 performance, and it still amaze me. And it works very well on Windows. What would be cool though, is if we could use vbScript in Node. Because vbScript is even easier to learn then JavaScript!
- morebetterer 11y agoMany 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.
- mattkrea 11y agoBecause if the argument is better support and wider reach then maybe wait until it runs on more than one platform. Edit: even if they had waited until the JITless builds for OS X and Linux were ready I'd be happier. This definitely feels like jumping the gun.
- morebetterer 11y agoAs long as each JS engine uses the same API (at this point V8's C++ API, hopefully something engine neutral later) what difference does it make?
- mattkrea 11y agoIt shouldn't be merged into core if it doesn't work on the rest of the platforms core works on. Keep it in some experimental branch until it is ready and more important why would they even submit the PR if a ton of tests are failing?
- morebetterer 11y agoIf it's a compile-time switch to build v8 or Chakra and it's not impeding Node development, there's no harm. Node is a large code base. The Chakra merge will eventually work and pass all tests - give it some time. One cannot reasonably expect such a large merge to work flawlessly out of the gate. Even the IBM PowerPC port of the V8 engine took many months to stabilize - and it's the same v8 engine.
- 11y ago
- taf2 11y agoI 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 don't believe the web is stronger with more rendering engines and more JS runtimes... I think it's weaker. What would make it stronger is more open source and more collaboration. We have to be very happy that MS is taking the first step in this direction. Open Sourcing ChakraCore is a huge first step and now integrating it with other systems as well . I just hope over the next 10 years we see more collaboration between webkit, blink, gecko, and trident... as well as the JS engines...
- morebetterer 11y ago>>> I don't believe the web is stronger with more rendering engines and more JS runtimes... I think it's weaker I disagree. I'm happy to see numerous JS engine implementations that embrace a common standard. If you have just one common code base you also have a common set of bugs. Competition is a great way to raise the bar and try out radically different design approaches. Take GCC and LLVM for example - who can argue that friendly competition hasn't helped them both immeasurably? Link Time Optimization, C++14 compliance - choice is a good thing.
- smt88 11y agoIf "together" means Google is involved, I absolutely prefer the separation. Google has repeatedly screwed me over by letting their products stagnate and, sometimes, killing them off. I find it incredibly frustrating that so much of my work and digital life rely on the whims of Google.
- fuck_google 11y agoAgreed. People need to get their head out of Google's ass and realize that Google has became just as bad as Microsoft of old, if not worse. Being dependent on any large organization is inherently bad as they seem to screw up everything they touch. We should strive for sustainability by embracing open, independent, decentralized development and services, even though it is harder.
- jordan801 11y agoHas anyone wrote up a Chakra vs V8 comparison?
- alkonaut 11y agoWhat is a potential benefit of using Chakra over V8? performance? licensing?
- jorangreef 11y agoI'm not sure if Google and V8 have always gone out of their way to embrace Node and optimize V8 for Node. Perhaps they have. I'm not sure. But this is Microsoft going out of its way to provide a swap-in engine for Node, with a focus on optimizing the engine for Node through benchmarks, and cross-platform builds in the pipeline. Hopefully, Microsoft will be able to achieve the following: 1. A smaller Node binary through a stripped-down engine. 2. A GC optimized for Node and server applications. 3. An engine optimized for Node, working closely with Node's core technical team. Perhaps this might encourage Google to do the same.
- git_son 11y agoChecking ChakraCore with static analyzer:http://www.viva64.com/en/b/0370/ http://www.viva64.com/en/b/0370/