Live data from Hacker News

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

github.com

91–100 of 130 posts

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

#91
post #54

Earlier quoted context omitted.

I 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.

Dont 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.

The obvious choice would be mozilla's spider monkey.

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

#92
post #90

Earlier quoted context omitted.

Dont 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.

I 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?

Sure, but we're talking realllllly long term here.

Is there any real point in trying to write a roadmap for something more than 2 years (at least) in the future?

No one has any idea what will be going on at that point; there isn't even a roadmap for an engine independent node api; and even when one is made (never mind implemented...), it will certainly not include 'drop v8' as part of it.

So we're talking about some nebulous future in which something may or may not happen after another thing which may or may not happen at some point in the future.

It's pointless to speculate about such obscure possibilities.

V8 isn't going away any time soon.

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

#93
post #48
post #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…

The thing is, Node needs to keep up with those same APIs.

And it (and native modules) do this pretty well via nan (https://github.com/nodejs/nan).

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

#94
post #52

Earlier quoted context omitted.

Does it matter? If V8 deoptimizes code with try/catch, then I as a developer need to account for that.

It does! V8 has expressed interest in fixing the try/catch deopt, but it keeps falling behind on their list because not many people are using it. Most people aren't using it because V8 (and in some minds, mine included until 5 days ago, all of Javascript) doesn't optimize it. It's a bit of a catch 22, and having alternate engines where that deopt doesn't happen can be the way out. Basically having an alternate engine…

> it keeps falling behind on their list because not many people are using it.

How can that be true? try/catch is as common a JS idiom as a for loop.

This causes significant trouble all over React and many other libraries, as many hot areas of code are covered in try/catches to ensure developer error doesn't blow the whole render. Optimizing it could lead to pretty serious performance gains.

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

#95
post #52

Earlier quoted context omitted.

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"

Does it matter? If V8 deoptimizes code with try/catch, then I as a developer need to account for that.

Yes, you need to account for that, and potentially make the decision that you should investigate targeting a different engine as the one you develop against. Your infrastructure should absolutely not be set in stone, and this includes looking at different compilers, different javascript engines, and different operating systems. If the most straightforward way of writing your code involves lots of try/catch blocks, then it sounds reasonable that you should target an engine that provides better speed for try/catch blocks.

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

#96
post #40

Why should a developer care about this? What does ChkraCore bring to the table that V8 doesn't ?

Same 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.

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

#97

It'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'…

Correct me if I'm wrong but isn't the big win here having Node.js run on Vuze ?

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

#98
post #89
post #44

Earlier quoted context omitted.

I 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.

On 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.

The line is not merely drawn at humor, but you'd better actually be funny if you want to post a joke.

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

#99
post #91

Earlier quoted context omitted.

Dont 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.

The obvious choice would be mozilla's spider monkey.

What's Apple's Nitro (i.e. JavaScriptCore) like?

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

#100
post #3

They should also have the option to use FireFox's engine as well. Who has the fastest JS core these days?

I'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.
Post reply on HN