7 ms·
Temporary fork enables Node.js to optionally use the Chakra JavaScript engine
- Hansi 11y agoIs there a benchmark comparison available anywhere?
- cmwelsh 11y agoCan I browse my node_modules folder in Explorer yet? [1] [1] https://github.com/joyent/node/issues/6960 https://github.com/joyent/node/issues/6960
- rational-future 11y agoWith every new version of Windows, Explorer gets worse and worse. I personally switched to Directory Opus long time ago.
- chimeracoder 11y ago> With every new version of Windows, Explorer gets worse and worse. This criticism is a bit misplaced here, since the whole reason for this limitation is due to backward compatibility with older versions of Windows (and software written for older versions). It's not like this is a new change in Windows; it's been there for ages.
- orik 11y agoThis isn't a limitation of Explorer, but actually is a very well documented part of the Windows API. MAXPATH has always been 260 characters. https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath https://msdn.microsoft.com/en-us/library/aa365247(VS.85).asp...
- frik 11y agoHow long will Microsoft wait till the fix MAXPATH and other limitations? (and various other Win32 limitations that are usually a legacy porting helper thing from Win16). There would have been a good point with the introduction of Win64API - but Microsoft forgot about it and was apparently busy with something else.
- CHY872 11y agoI doubt it's too high up on the list of priorities. It would require really careful work to work in a backwards compatible way (there are almost certainly a tonne of apps that expect <=260 character filenames). I guess the main thing is that it's one of those 'who cares' problems. The only time I've ever seen this limitation being complained about, it's by people who've had problems with npm. That directory structure is undoubtedly horrible and is not mirrored by any other piece of software that I've seen.
- jessaustin 11y agoMeanwhile it's also a "who cares?" problem for the npm people. They don't use this OS, and don't expect ever to do so. I think the node_modules directory structure is a novel, though straightforward, solution to the problem of interdependent module versioning. It's very Unix; it reminds me a bit of GNU stow. It makes perfect sense that it will be tweaked in the new npm to be less redundant, but it only really makes sense to tweak systems that already work perfectly. (Otherwise they should be fixed first, then tweaked.) Certainly it's better than having a separate LD_LIBRARY_PATH setting for every command invocation! (even that doesn't fix everything...)
- xienze 11y agoIt doesn't even seem like an obvious solution to the problem. Take Maven for instance: a global dependency repository under which the dependencies are stored in the form <groupId>/<artifactId>/<version>. If X depends on Y.1 and Z depends on Y.2, so what? You have all the dependencies stored on your filesystem in a relatively flat structure.
- jessaustin 11y agoIf I had coded in Java on Windows for years, I wouldn't trust my sense of what's "obvious". I'm not too impressed by a "global" repository either. Python struggled against that stupid architecture for years before they got virtualenv in good working order. Node just took a shortcut to the future. "All direct dependencies are in the node_modules directory, full-stop" is a pretty simple rule. Really, that's the only rule, and that's all of it. You don't need to worry about second-order dependencies, because those are direct dependencies of some other module, which means... they are in that module's node_modules directory.
- efdee 11y agoIt is a limitation of Explorer and CMD.EXE - Windows has had Unicode APIs to access paths up to 32767 characters, but for some reason they have Explorer and CMD.EXE use the older ANSI API which does not support it.
- dyscrete 11y agoWow, what's up Microsoft?
- pionar 11y agoActually, I was thinking, what's up node? Each dependency keeps a private copy of its dependencies? How messed up is that? Or am I just reading that wrong?
- bryanlarsen 11y agoThat's a feature, not a bug. It lets A rely on version 0.9 of X while B relies on version 0.8.
- pionar 11y agoI don't call that a feature. There's other ways of doing version pinning without junking up my filesystem.
- tdicola 11y agoRegardless of who is right or wrong at the end of the day it's still broken for many people. If Microsoft and Joyent/the node & npm community care about people using node & npm on Windows then the issues needs to be resolved, period.
- ksherlock 11y agoThat can introduce other problems. https://news.ycombinator.com/item?id=8213273 https://news.ycombinator.com/item?id=8213273 http://i.imgur.com/AZJti8I.png http://i.imgur.com/AZJti8I.png
- nemothekid 11y agoI don't see how this npm's problem - the language itself doesn't let you catch this problem - and the pattern itself is dangerous. I'd have to agree with IsaacSchlueter here. If I have a library (libA) that uses fooV1 and another (libB) that uses fooV2, there is no reason I should expect those two dependencies to interop with each other (except explicitly stated by the developer). The solution (that there should be one set of dependencies) is an even worse problem that currently afflicts the Golang community, which they have decided to solve the same way npm has decided to solve it - vendoring. Now with Golang, if you only have 1 set of dependancies, and one of your libraries depended on an older version - your program just won't compile (unless you update the library to use fooV2) and I'm not sure how thats useful to anyone. Most people will just tell you should have have just versioned that dependency.
- rational-future 11y agoWill this work on Raspberry Pi?
- doczoidberg 11y agothe chances are good: http://blogs.windows.com/buildingapps/2015/05/12/bringing-node-js-to-windows-10-iot-core/ http://blogs.windows.com/buildingapps/2015/05/12/bringing-no...
- elisee 11y agoThis tweet from May 1 might be related: https://twitter.com/conoro/status/594196246727774208 https://twitter.com/conoro/status/594196246727774208
- aeroevan 11y agoI'm betting raspberry pi 2 only (i.e. armv7 only) since that's all Windows IoT runs on. Doubt they'd put the effort into armv6 for all of the existing raspberry pi 1 devices.
- sgv 11y agoYes, this works on Raspberry Pi 2 and MinnowBoard MAX, running Windows 10 IOT Core preview - http://ms-iot.github.io/content/Downloads.htm http://ms-iot.github.io/content/Downloads.htm
- elisee 11y ago"This temporary fork enables Node.js to optionally use the Chakra JavaScript engine on Windows 10, allowing Node.js to run on Windows on ARM." (the submission title has been updated after I posted this, was initially "MS releases a fork of Node that uses the Chakra JavaScript engine instead of V8") Looks like they intend to merge back with node mainline... ? EDIT: Found this: http://blogs.windows.com/buildingapps/2015/05/12/bringing-node-js-to-windows-10-iot-core/ http://blogs.windows.com/buildingapps/2015/05/12/bringing-no... They're doing this to be able to run Node.js apps on Windows 10 ARM (on which V8 supposedly doesn't run?) "We will be submitting a pull request to Node.js after stabilizing this code, fixing key gaps and responding to early community feedback." "Going forward, we plan to work closely with the Node Foundation, the Node.js Technical Committee(s), IO.js contributors and the community to discuss and participate in conversations around creating JavaScript engine agnostic hosting APIs for Node.js, which provide developers a choice of JavaScript engine that they would want to use in their Node.js workflow" Looks like the pull request will consist mostly of exposing new hooks to integrate with Chakra / other JS engines and won't involve pulling any Chakra code into Node.js (which would be unlikely to be merged). Might lead to a SpiderMonkey version of Node.js at some point, too. Nice to see IO.js mentioned. Looks like a very positive initiative (assuming it doesn't complicate Node core too much)
- magicalist 11y ago> They're doing this to be able to run Node.js apps on Windows 10 ARM (on which V8 supposedly doesn't run?) V8 definitely has an ARM runtime, so maybe this is a result of the restrictions on what's allowed to run on the platform? (e.g. iOS and Windows Phone don't allow JIT compilers except the ones provided by the platform itself)
- gsnedders 11y agoI'd guess, at the very least, that it doesn't support the Win/ARM ABI.
- magicalist 11y agoThe issue is really what has been eliminated from the API. This is one of the ways they prevent you from generating your own executable code. See, e.g. this (closed) V8 bug for adding Windows Phone support: https://code.google.com/p/v8/issues/detail?id=2427 https://code.google.com/p/v8/issues/detail?id=2427
- revelation 11y agoEmbrace: https://nodejstools.codeplex.com/ https://nodejstools.codeplex.com/ http://azure.microsoft.com/en-us/develop/nodejs/ http://azure.microsoft.com/en-us/develop/nodejs/ Extend: https://github.com/Microsoft/node https://github.com/Microsoft/node Extinguish: ?
- mkr-hn 11y agoWhen was the last time they went all the way?
- frik 11y agoRead for yourself: http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish and http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt
- mkr-hn 11y agoLooks like it's been close to a decade. The CEO responsible for that whole ordeal is gone. When do people decide Microsoft has behaved long enough to be given a second chance?
- SXX 11y agoI think it's pretty clear that this would take long time. Reputation it's not something company can get just by changing CEO or releasing few things as open source. After all they still continue their aggressive patents usage and there is still uncertainness around audio/video codecs for web standards mainly because of Microsoft. Pretty sure others may remember some areas where their politics didn't changed for a bit.
- wehrkeoruw 11y agoReputation no, but the behavior itself? Quite possibly.
- flipchart 11y agoI wasn't aware that Chakra could be used standalone in this manner. I had assumed that it was tightly bundled to IE. Is this new?
- mmozeiko 11y agoThey are using this API: https://msdn.microsoft.com/en-us/library/dn903710.aspx https://msdn.microsoft.com/en-us/library/dn903710.aspx
- bhouston 11y agoIt would be cool if the JavaScript engine was interchangable in NodeJS and IO.JS so you could pick Chakra, V8 or SpiderMonkey very easily. SpiderMonkey is faster than V8 these days on a lot of benchmarks.
- consptheorist 11y agoI can attest to that. I was experimenting a couple of days ago with high duty and extreme DOM nodes crunching and FF's SpiderMoneky blew Chrome's V8 out of the water for 7 - 9 multiples gain in performance measured in time elapsed to complete the operations. Chrome's V8 engine at this point is so overrated
- magicalist 11y ago> I was experimenting a couple of days ago with high duty and extreme DOM nodes crunching and FF's SpiderMoneky blew Chrome's V8 out of the water for 7 - 9 multiples gain in performance measured in time elapsed to complete the operations. This likely has nothing to do with the JS engines themselves and everything to do with the browser they were running in. To actually benchmark something like that you'd need to simulate the dom with something like https://github.com/tmpvar/jsdom https://github.com/tmpvar/jsdom
- consptheorist 11y agoAre you suggesting that the remarkable disparity in performance was DOM specific? Strange because I used a very common method appendChild() and I was under the impression that both browsers had optimized their respective inner workings a long time ago to the point that we should not notice such divergence in performance.
- dpe82 11y agoYes. DOM manipulation in all major browsers is implemented in C/C++. The JS engine is just a wrapper; any noticeable performance difference in DOM manipulation is almost certainly due to differences in the underlying layout engine and not in the JS engine.
- cpeterso 11y agoInteresting that Microsoft forked Node instead of io.js. The Microsoft repo says, "This branch is 16 commits ahead, 29 commits behind joyent:master".
- jjcm 11y agoI work for MS, right now we're working on win10. Some of the UI is written in html/js now, so I'm not surprised by this at all. I'm guessing we'll see some native node.js apps on windows in the future.
- untog 11y agoI think what the OP meant was that it is interesting that MS forked Node, and not the io.js project that's more advanced than Node. IMO it's not too surprising - it's relatively simple to fast forward to io.js from where it is now, wheras reverse engineering it backwards to Node compatibility would be mayhem.
- htilford 11y agoThis was a long time coming. I remember some MS folks talking to Ryan Dahl about doing this back at nodeconf 2011.
- frik 11y agoWhat about the license of Node.js/Chromium? Isn't linking a closed source library (Chakra) problematic? You know it includes multiple code parts under various licenses, Wikipedia says: BSD license, MIT License, LGPL, MS-PL and MPL/GPL/LGPL tri-licensed ( http://en.wikipedia.org/wiki/Chromium_(web_browser) http://en.wikipedia.org/wiki/Chromium_(web_browser) ) There is a reason why major open source projects like Linux, etc. choose licenses like GNU GPL v2+. http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish http://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish and http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt http://en.wikipedia.org/wiki/Fear,_uncertainty_and_doubt
- coldtea 11y ago>Isn't linking a closed source library (Chakra) problematic? Yeah, because the tech world didn't have enough problems with projects being immature, unreliable, stale 30+ year designs, abandoned, incompatible, not provided by a specific distribution, coflicting, patented and 100 other issues to consider. It just had to also add 200 legal distinctions behind what you can and you cannot do, and how you can link stuff and under what circumstances.
- magicalist 11y agoIf you're asking if software licenses are important, the answer is yes, they're very important. To the GP, though, I don't immediately see how linking to Chakra in this way would be a license issue. The more important thing is the license information for Node, though, not Chromium: https://github.com/joyent/node/blob/master/LICENSE https://github.com/joyent/node/blob/master/LICENSE (some overlap but quite a bit that doesn't)
- coldtea 11y ago>If you're asking if software licenses are important, the answer is yes, they're very important. I'm not asking about their importance, I complain about their existince (and need).
- poizan42 11y ago
- cpeterso 11y agoJXcore is another fork of Node that makes the VM pluggable, supporting both V8 and SpiderMonkey. I wonder how similar Microsoft's and JXcore's VM abstraction layers are and whether Node upstream would accept them. Drawing a hard line between the Node native code and the VM would make binary addon compatibility more stable (and lessen the need for NaN, the "Native Abstractions for Node").
- streamline92 11y agoThe problem with the way JXcore did the SpiderMonkey port is their extensive use of C++ macros - not unlike NAN for Node.js. This makes the code hard to debug and maintain. The Microsoft Chakra Node port is more elegant because they've mimicked the V8 C++ API making it much more likely that it will be merged into Node.js and IO.js. In time I suspect Mozilla and other javascript engines will make V8-compatible API shims similar to what Microsoft did: https://github.com/Microsoft/node/tree/ch0.12.2/deps/chakrashim https://github.com/Microsoft/node/tree/ch0.12.2/deps/chakras...
- pluma 11y agoI know Microsoft apparently has changed, but just to play devil's advocate: [x] embrace [x] extend [ ] extinguish
- chralieboy 11y agoThey are very open that this is not their plan here. They are _temporarily_ forking Node.js to add support for their JS engine. They want to extend Node to abstract away the JS engine so that it doesn't rely on V8 or Chakra or SpiderMonkey but can sit on any one of them. It's actually exactly the opposite. Their API abstraction work will only increase competition, especially since they aren't trying to run a competing fork. Despite their history, those in favor of a more open Node.js platform should commend this.
- jbigelow76 11y agoExtinguish Javascript? Good luck with that.
- nivla 11y agoTo play the devil's advocate of the devil's advocate, how exactly would an [x]extinguish work in an open source world especially for something that is under a liberal licence (MIT vs GPL)? Isn't that the whole point of open source? That if even something gets abandoned or ignored, as long as there is still an active interest in it, it can still be used or improved upon?
- pluma 11y agoYou're probably aware I'm not considering it to be likely that this is Old Microsoft in action but to humour the thought experiment: I don't think they could succeed either. IE is still only barely recovering from Microsoft's history and Windows has largely been defeated by OSX both in the consumer and developer space. We're unlikely to see Microsoft Space Nazis descend upon us from a hidden moon base any time soon. That said, there are plenty of examples of the extinguish phase not working out or resulting in less of a bang and more of a whimper. It's always been more of an infected blanket than nuclear warheads.
- ilaksh 11y agoI don't see how anyone can rationally trust Microsoft here given their track record.
- Ezhik 11y agoI wonder if MS is going to end up open sourcing Edge? Between this and the fact that Visual Studio Code uses Chromium, it really seems like where MS should head, but who knows.
- bastawhiz 11y agoI'd expect them to open source various components of it before they open source the whole shebang. I.e., I'd expect to see them put Chakra out, maybe the browser chrome, the parsers, etc. before they put out all of edgehtml.dll. I could be wrong. Edge (and particularly IE) are fairly heavily tied to the OS in a bunch of places. IE, for example, can do weird FTP and Windows Explorer stuff. The infamous "Internet Settings" dialog and the way IE deals with stuff like proxy servers is only sort-of part of IE. IE's network stack is largely dependant on the bits and pieces available in the OS below (consider IE11 can only use SPDY on Windows 8). I wouldn't be surprised if open sourcing the browser wholesale would start unraveling a lot of things that MS doesn't intend to be public.
- Ezhik 11y agoI wonder if making it standalone will be a part of the whole 'ditching IE legacy' process?
- z3t4 11y agoI wonder if they have made it so that you can use milliseconds (1/1000) instead of (1/100) in setTimeout and setInterval. It was one of the things that annoyed me the most running Node.JS on Windows ...