Slashdot Mirror


Microsoft Asks Node.js To Allow ChakraCore (Edge) Alongside Google's V8 Engine (softpedia.com)

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.

21 of 146 comments (clear)

  1. Why not... by Anonymous Coward · · Score: 2, Insightful

    Edge is a lot faster than Chrome in a lot of areas and handily spanks Firefox. Nothing wrong with competition.

    1. Re:Why not... by Z00L00K · · Score: 3, Insightful

      Do you have any documentation available on that?

      Not only benchmarks but also perceived performance by the user.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    2. Re:Why not... by Anonymous Coward · · 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.

    3. Re:Why not... by mwvdlee · · Score: 2, 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 enable any additional language features.

      If the two start to deviate in any significant way, it'll be Embrace, Extend & Extinguish all over again.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    4. Re:Why not... by Melkman · · Score: 2

      So basically you say this is the embrace step with an extend step to follow by using binary extensions ?

    5. Re:Why not... by Anonymous Coward · · 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.

    6. Re:Why not... by mwvdlee · · Score: 3, 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.

      --
      Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
    7. Re:Why not... by dave420 · · Score: 2

      It was probably created by an adult.

  2. Embrace and Extend by mr.dreadful · · Score: 4, Insightful

    Why would this be beneficial to anyone but microsoft?

  3. Re:But why? by Pseudonym · · 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?

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  4. Argh, matey by wonkey_monkey · · Score: 5, Funny

    the Node.js Foundation's Board o Directors

    Yargh, and it be a fine board too.

    --
    systemd is Roko's Basilisk.
  5. Re:V8 doesn't support Windows? by DrXym · · Score: 3, Insightful
    Yes but maybe it doesn't compile under UWP which is Microsoft's universal API across IoT, mobile, desktop. UWP only supports of a subset Win32 so code that compiles to Win32 may not compile to UWP without lots of patching.

    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.

  6. don't support engines, OS's and devices by Anonymous Coward · · Score: 5, Insightful

    support standards instead.

  7. Re:Mafia by bluescrn · · Score: 4, Insightful

    Isn't Google the scarier massive corporation these days?

    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

  8. Re:But why? by Dog-Cow · · 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.

  9. Re:But why? by Dracos · · Score: 3, 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.

  10. Re: V8 doesn't support Windows? by DrXym · · Score: 2
    I haven't used Windows 10 IoT but previous Windows Embedded versions had a thing called platform builder where you got to pick and choose what components you wanted and then you built it. e.g. if you didn't need IE, you didn't choose it. So I wouldn't be so sure that a standalone JS engine is already there.

    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 issue by kludging in another engine is to Node.js's benefit so much as it is Microsoft's.

  11. Re:But why? by h33t+l4x0r · · Score: 2

    Improving V8 is not on the Node.js agenga. And how is having options a bad thing? Put down the MS hate for a minute and try to form a rational opinion.

  12. Re:But why? by Z00L00K · · Score: 4, 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.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  13. SpiderMonkey, ChakraCore, JavaScriptCore, Duktape by SirJorgelOfBorgel · · Score: 4, 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.

  14. Re: But why? by Anonymous Coward · · 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