Microsoft Asks Node.js To Allow ChakraCore (Edge) Alongside Google's V8 Engine (softpedia.com) 146
campuscodi writes: Microsoft has submitted an official pull request to the Node.js project, through which it's asking the project's maintainers to enable support for ChakraCore, the JavaScript engine packed inside Microsoft's Edge browser, as an alternative to Node's built-in V8 engine, developed by Google. Earlier in December 2015, Microsoft open-sourced ChakraCore. Microsoft has also been one of the biggest companies to adopt Node.js early on, and is also part of the Node.js Foundation's Board o Directors. The main reason to add ChakraCore support in Node.js will help the IoT version of Windows 10 to run JS apps on IoT devices, just like Samsung is also thinking about.
What if they say no? (Score:2)
Re: (Score:2)
Why not... (Score:2, Insightful)
Edge is a lot faster than Chrome in a lot of areas and handily spanks Firefox. Nothing wrong with competition.
Re:Why not... (Score:4, Insightful)
Do you have any documentation available on that?
Not only benchmarks but also perceived performance by the user.
Re:Why not... (Score:5, Funny)
If only there was a queryable index of websites you could search by keyword this would be a lot easier. Guess we'll never know.
Re: (Score:1)
Benchmark: http://blogs.unity3d.com/2015/12/15/updated-webgl-benchmark-results/ [unity3d.com]
Re: (Score:2, Insightful)
That's nice, but that's
1. A benchmark of WebGL and not the JavaScript engines
2. A benchmark of asm.js which is a Firefox thing
All it proves is that a benchmark optimized for Firefox is fastest in (gasp) Firefox.
Any benchmark designed around testing real-world browser performance shows Chrome and even Edge handily spanking Firefox. Firefox is only "fast" in the benchmarks that either are designed to test Firefox technology (asm.js) or benchmarks Firefox has optimized itself for. But never in the real world.
Re: (Score:2)
Re: (Score:2)
Not done by Microsoft, but here is a benchmark that was done in July between IE, Edge, Chrome, and Firefox by Anandtech:
Benchmark IE 11 Edge 20 Chrome 43 Firefox 39
Sunspider 149.7ms 133.4ms 247.5ms 234.6ms
Octane 2.0 9861 22278 19407 19012
These are the relevant tests that stress the javascript engines. I've omitted the ones that test chrome's proprietary HTML extensions, or graphic rendering. There are plenty of other benchmarks testing the entire browser for page l
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Probably not much. See benchmarks [techrepublic.com] of a pre-release version of Edge from May last year.
Re: (Score:1)
Re: (Score:3, Insightful)
Does it matter? If ChakraCore's language support for JavaScript covers 100% of V8's language support, no more no less, they can integrate it in Node.js just let the user decide which is better in which situation.
The main issue is this language compatibility. Node.js would need to define the language syntax they officially support, possibly defined by just taking most of V8's language support, and would have to get a binding commitment that the other one will stay in line within a reasonable time and not ena
Re: (Score:2)
Re: (Score:3)
So basically you say this is the embrace step with an extend step to follow by using binary extensions ?
Re: (Score:2)
main issue is binary modules...
main issue is wtf are we putting javascript into more and more things connected to the Internet for? We already have tons of examples of "what could go wrong."
Re: (Score:1)
I know it's not JavaScript but, damn it, I'm waiting for a resurgence in Java applets in the browser. I shit you not, I seriously expect to see this happen in the not-to-distant-future. Why? Someone will think it's a grand idea, all over again.
Re: (Score:2)
Re: (Score:1)
Why would MS have to restrict themselves to the subset implemented by V8? Who's to say that node won't change their mind and use Chakra and replace V8?
In fact, who's to say that V8 won't change their language implementation in ways incompatable with node.js anyway?
There clearly is a push inside node.js to target ES6 instead of V8's particular variant.
Re:Why not... (Score:4, Insightful)
There's nothing stopping V8 from doing the same dick-move.
But right now, Node.JS's language effectively IS whatever V8 is.
If Node.js can set their own language standards and block syntax outside that standard, it would make swapping engines a total non-issue.
Re: (Score:1)
Because when V8 does it, it will be called progress and be hailed as innovative.
Re: (Score:2)
All the browsers did and still do this. If all browsers strictly used the WWW standards all our website would still look like geocities pages ca 1995.
It is called innovation.
Re: Why not... (Score:2)
So IE 6 is innovation then? Why does Google get a free pass?
Re: (Score:2)
Re: (Score:2)
I think the review of public record on lawsuits against google would be a much larger pile about now.
Re: (Score:3)
It was probably created by an adult.
Re:Mafia (Score:5, Insightful)
There's more choice of OS than ever (if you consider mobile, too) - but Google have a lot of power over huge aspects of the Internet that Microsoft has very little influence over
Re: Mafia (Score:1)
Re: Why not... (Score:2)
I have a web app that uses javascript heavily to render a complicated table
In my experience edge is much faster with HTML rendering of a large table but the js is slower
Re: (Score:1, Informative)
Nothing wrong with competition.
Very true. But this is Microsoft. A corporation that will wiggle into protocols and standards, then use their market share to gain instant market penetration, and then add proprietary extensions or redefine existing functionality with the sole purpose of breaking compatibility to ensure their implementation is the only one people can use.
That's the biggest issue, and why people are deeply concerned. They never want to help, they want to embrace, extend then extinguish. It's their modus operandi since the 19
Re: (Score:1)
I believe it has a more complete ES6 implementation as well.
Re: (Score:2)
Embrace and Extend (Score:4, Insightful)
Re: (Score:2)
That is a good question.
Another interesting question is the risk of bugs in that engine that might infect other applications as well. If the same engine is used in multiple platforms this may mean that malware may be more successful than expected.
Re: (Score:1)
An actually interesting question is who allowed you on the Internet? Your question makes absolutely no sense at all, considering that V8 is currently multi-platform and backs every Node.js implementation in existence (outside labs).
Re: (Score:1, Insightful)
Yeah, choices are silly.
Re: (Score:2)
Why would this be harmful to anyone but Google?
Re: (Score:2)
Re:But why? (Score:5, Insightful)
V8 is already cross platform and open source, what is the need to have alternative engines?
We've been here before. What's the point of Linux when we already have 386BSD?
Re: (Score:2)
Window sucked very much in 1993. I used Linux then. It was waaaaay better.
Re: (Score:2)
It seriously wasn't. Linux was horribly difficult to work with, and get work done with, in 1993. Windows 3.1x was also horrid in 1993, and most people ran some version of DOS with memory extenders and various TSR programs (like Norton SideKick)
In 1993 I owned a NeXTstation, and that was indeed a a lot better :-)
Re: (Score:2)
Because at the time BSD/386 was still the subject of litigation so it was entirely possible that 386BSD might also disappear if the USL v. BSDi law suite had gone the way of USL.
Further while the case was settled in 1993, the terms of the settlement did not become public till 2004, so the potential for further litigation was seen to be a potential possibility as the terms of the settlement where not know.
This produced a window of opportunity for Linux to gain critical mass.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Then you expend those resources. MS is submitting a PR, which means they did the work. If you want them to use V8 and not their own code, convince them.
Re: But why? (Score:2, Insightful)
As node.js is FOSS, Microsoft is actually being very polite about this. They could've just forked the source code and made their own compatible release. As it stands, I hope the folks at node.js take heart that MS didn't just pull a dick move on them. One of the few times when MS is actually playing fair and even
Re: (Score:2)
Improvements for non US standard keyboard layouts
VS Code dispatches key bindings based on [keyboard codes](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85). In keybindings.json and in all the UI, we used to render the key codes with the produced characters under the US standard keyboard layout. We received feedback that this was very confusing, therefore, we created a new Node.js module native-keymap that is used in VS Code to render the key bindings using the system's current keyboard layout.
Re:But why? (Score:4, Insightful)
Improving V8 would be more worthwhile to anyone who doesn't have a crippling case of not-invented-here syndrome.
And I don't get the IoT angle here... no hobbyists care about W10IoT, the Microsoft JS engine doesn't make the bait any better. Linux on RaspberryPi is a full fledged OS, not a glorified app bootloader.
Re: (Score:2)
The Windows 8 GUI is much better than the one on 7, and I am a Mac user before you accuse me of being a Windows fanboy.
Re: (Score:3)
Re: (Score:2)
Options are great! I have about half a dozen different JavaScript runtimes on this Linux box alone - V8 for Chrome, several different versions of JavaScript Core bound to webkit embedded in Qt and GTK+ plus SpiderMonkey for iceweasel. So I'm hardly going to drown with one more...
Does the world *need* yet another open source runtime? Well possibly not but if Microsoft are prepared to spend time and money in liberating Node from v8-isms then good luck to them. c.f. Python and Ruby have benefited in terms of m
Re:But why? (Score:5, Insightful)
I think that Microsoft needs to get their engine spread more than what Node.js needs the Microsoft engine.
However I also see a danger here - if Microsoft gets their engine as default into Node.js then they can change the licensing terms and effectively block Node.js from being viable. This has happened before, and will happen again. It smells like bait.
Re: (Score:1)
Yes, it does smell like bait. If Microsoft wants Node.js + Chakra then Microsoft should just fork Node.js and add Chakra. That way MS gets expend the labour ($) to maintain their own JavaScript environment (and not someone else).
Re: (Score:2)
The only bait i see here is having lines of products that require Windows to remotely administer or take advantage of all the bells and whistles.
I doubt it is about gaining control of node.js. Think along the lines of activeX plugins and such. A company uses node.js in their lights controller and MS makes a snazzy app for the Windows phone and tablets that use extensions they built into chakra.
I bet that's what it is about. That or they see the momentum and do not want third-party browsers to be required on
Re: (Score:2)
I think it's about getting control of node.js in order to take it off the market. Not to take control of how it's used on the market.
Re: (Score:2)
Finally, a professional engineer who has a reasonable opinion as opposed to the MS hating bunch here. I would also love to use Chakra under node, would be interesting to see. Microsoft's C compiler, for one, runs rings around gcc.
Re: (Score:2)
Language and compiler design is a tricky, difficult problem and innovation is a good idea. Microsoft has a world-class language/compiler group.
The next question is - why? (Score:2)
Perhaps it is or perhaps it isn't. If it's only marginally better, or not better at all, then why would Node.js want the maintenance headache of two backends with no meaningful differentiation?
V8 doesn't support Windows? (Score:2)
V8 doesn't support Windows?
Re:V8 doesn't support Windows? (Score:4, Insightful)
I've been lead on this merry dance of bullshit before with Windows Embedded where the toolchain only supports a subset of Win32, a subset of STL classes and C headers and suddenly code that used to be portable no longer is.
I wouldn't see that as an excuse to replace the entire backend though. Microsoft should supply patches to fix V8.
Re: (Score:2)
Re: (Score:3)
More likely V8 drags in a bunch of open source libs and tools like gyp and porting them to work on UWP is a bother. But its a problem of Microsoft's own making and I don't see that sidestepping the issu
Re: (Score:1)
Presumably chakracore will already be there, whereas V8 won't. Size is important in IoT.
The engine used by node is embedded inside node, so currently it has an embedded version of v8 and if you were to install a chakra based version of node, it will have it's own copy of ChakraCore embedded in it.
Re: (Score:2)
Possibly not, for the specified architecture. Windows 10 IoT targets the raspberry pi 2.
Google Chrome on Windows is amd64 and i386 only.
Argh, matey (Score:5, Funny)
the Node.js Foundation's Board o Directors
Yargh, and it be a fine board too.
don't support engines, OS's and devices (Score:5, Insightful)
support standards instead.
Re: (Score:2)
There is no standard Javascript engine implementation, and no standard for linking to JavaScript engines. So that isn't really an option here. I suppose someone could create a standard interface for linking to JavaScript engines, and make node.js support that. Then someone would have to either update V8 and ChakraCore to support that, or make an adapter.
Hmm... now that you fooled me into proposing a way to make it possible to do as you suggest, I actually like that approach
Embrace and extend (Score:1)
Microsoft will quickly add non standard extensions to their engine and suddenly you'll have node.js applications which will only work if engine == ChakraCore.
That's how Microsoft plays. This is not a "good competition", the only winner is MS.
They're pretending to be very nice those days, like a bully that's been ousted from the playground. Because they've been ousted from the playground.
But it's OK, we have new friends now and we don't need you any more Microsoft.
Now, let the MS PR guys down vote my comme
Re: (Score:2)
It's not very different from the Nigerian Prince mail scams we see now and then. It's a bait that can be used to reel in Node.js under the cover of Microsoft.
Re: (Score:2)
gcc has things that are not standard C++, Linux has API calls not in Windows, Firefox, Chrome, Opera all have things that IE and the other browsers can't do.
It is called "innovation"
Javascript is horrifying enough as it is, it could use some of that "innovation" thing.
SpiderMonkey, ChakraCore, JavaScriptCore, Duktape (Score:5, Informative)
I know a bunch of you think V8 is cross-platform enough, but really it isn't. It uses way too much memory for many platforms, there's no non-JIT mode (so can't run on iOS), oh and it is a female dog to compile.
Node.js' use cases are not limited to running a Node.js server. Embedding the core inside a bigger application and using it for some types of cross-platform logic, scripting, etc is a real thing. Maximizing compatibility is a must in that case.
Aside from just having options, various engines offer different features you may want to use, and better compatibility with your target platform.
JXCore has done a great job extending Node.js to support mobile, and they support SpiderMonkey and ChakraCore alongside V8. Compatibility wise they're king of the hill already, though they could still add JavaScriptCore and maybe even Duktape for good measure.
Re: (Score:2)
Exactly. Language platforms are not just about the syntax and libraries. It is also about the implementation underneath. And there different implementations have different pros and cons.
Re: (Score:2)
Node.js' use cases are not limited to running a Node.js server. Embedding the core inside a bigger application
Ding ding ding!!!
I am working on a project that needed an internal scripting engine. We first looked at nodeJS, but then realized exactly the limitation you point out: we can't "embed" node inside of an app. So I can't make in-process calls to/from JavaScript. There are various other wrappers that allow you to embed V8 into apps, and we went with one of those. But if Node supported that mode of operation, we would have used it. Most other scripting languages work this way: They are in-process libraries
Re: (Score:2)
When I use node.js I want 100% of node.js available
It would be.
The OP is referring to features of the JavaScript engine, not features of the node environment. Think of it as the difference between the compiler and the platform. I can write C++ code on Windows using gcc, msvc, or llvm. Each compiler offers different features. But either way, 100% of the Windows API is available. Using another platform as an example: I can write C++ code on Linux using gcc or llvm. Both offer different features. But both support 100% of the POSIX APIs.
Resistance is futile .. (Score:1)
I actually kind of like Chakra's design (Score:2)
In embedded v8, it is a headache and a half to create custom types that vitally need to perform some task such as releasing used memory held by a native implementation upon cleanup. In v8, if you simply want to have some cleanup code get called, you have to allocate a Persistent along with your data, explicitly invoke SetWeak on that Persistent to specify the finalize callback, and then make sure that you keep the allocated persistent around for the lifetime of your custom object (which means that your fi
No, No, No!!!!! (Score:2)
This request is pointless. It's clear how it's advantageous to Microsoft to have their engine used instead of Google's.
But it has NO advantageous to either the node.js project OR the people who make use of node.js. Please don't even consider it.
Re: (Score:2)