Slashdot Mirror


Microsoft Open-Sources Its JavaScript Engine Chakra (windows.com)

An anonymous reader writes: As promised, Microsoft has open-sourced the core components of Chakra, the company's JavaScript engine used in Microsoft Edge and Internet Explorer. The project, dubbed ChakraCore, has been released under the MIT License on GitHub. The official blog post reads in part: "The ChakraCore repository provides a fully supported and open-source standalone JavaScript engine, with the same characteristics as the Microsoft Edge’s Chakra engine, to embed in projects, innovate on top of and contribute back to. We will be accepting community contributions and input to ChakraCore. Once the changes from any pull request have been vetted, our goal is to ensure that all changes find their way to be shipped as a part of the JavaScript engine powering Microsoft Edge and the Universal Windows Platform on Windows 10."

12 of 141 comments (clear)

  1. "with the same characteristics" by Anonymous Coward · · Score: 3, Interesting

    "...with the same characteristics..."

    So, not the same code, then. That isn't really the intent of open source, now is it?

    1. Re:"with the same characteristics" by CSHARP123 · · Score: 3, Informative

      From the blog at https://blogs.windows.com/msed... there are two differences
      1. It does not expose the bindings to Windows platform
      2. Instead of COM based diagnostic APIs, there provide a different set for Open source one.

    2. Re:"with the same characteristics" by TheRaven64 · · Score: 5, Insightful

      Not that there is much use to this

      It's MIT licensed and they're upstreaming patches to make Node.js work with it. They're also working on cross-platform support. Oh, and Microsoft has a history of being a lot better than Google at maintaining stable APIs (and ABIs). V8 has a nasty habit of breaking everything that's not Chromium by changing public APIs that everyone relies on. If this works well and becomes cross platform, I can see a lot of utility in it.

      --
      I am TheRaven on Soylent News
    3. Re:"with the same characteristics" by DuckDodgers · · Score: 5, Interesting

      At the very least, a monoculture for anything is bad. So any competitors to V8 are good, especially open source competitors.

  2. Re:Why is javascript being pushed as generic? by CSHARP123 · · Score: 3, Insightful

    because it is already well trenched. Abandoning now will create problems to already existing applications that depends on JavaScript. Also some of the JavaScript frameworks has made maintaining the code much easier.

  3. Re:It's a trap! by Richard_at_work · · Score: 4, Insightful

    As if you can just commit changes directly to Linux, Apache, MySQL, PHP, PostgreSQL, Android, Firefox, Gnome, KDE etc with no one related to those projects "vetting" them.

    Fucking lamest argument against MS doing this...

  4. The missing bindings are expected. by tlambert · · Score: 4, Interesting

    The missing bindings are expected. The browser bindings expose Windows APIs into the JS engine within the browser ("standard + extensions"), and the COM bindings on the debug API not being present are there to make it platform agnostic.

    The part that I find really amazing is that they are targeting x86, x64, and ARM binary support, with two levels of JIT, with feedback optimization. That's a pretty cool thing to have out there in the wild, under an MIT license:

    https://github.com/Microsoft/C...

    I think that some of the first contributions need to be buildability support on other platforms, which means CLang/LLVM and GCC support. Ideally, it would handle agnostic conversion from some common representation into both the project build mechanism in Java ("Jenkins"), and Makefiles. Not sure if I'm willing to jump on this, since it would mean a familiarity with both, and I'm not sure they'd accept something like that back (it looks like they specifically picked Jenkins for its cross-platform-ness, even though it adds a Java dependency).

    This would enable someone external to Microsoft to run *at least* nightly builds and regression testing for other platforms.

    I really have to wonder if it's been thought through, however, to enable people to identify the JavaScript engine, and decide *not* to use the Microsoft specific extensions to the Core platform, so as to keep the things that try to use it portable, or if that's of interest to them. A long time ago, I tried, and failed, to get a common cross-platform ABI adopted, and one of the *key* requirements for it would have been the ability to *turn off* vendor extensions in the runtime, so that you could build cross-platform software targeting it, by causing it to error out when the software used a vendor private API/ABI component.

    Without something like that, I fear, it will become an "embrace -- then extend and make incompatible", similar to gcc'isms being incorporated into otherwise portable source code, or the bash extensions to the Bourne shell that resulted in shell scripts actually not being runnable on any shell, but instead only runnable on bash due to bash'isms.

    A nice barrier enforcement mechanism that extended up through browser space to enable committing to portability would be nice. Otherwise, when a remote website sent JavaScript content down because of the runtime it though it was hitting, it could include them, unintentionally or no, and non-Microsoft browsers based on the Core implementation would fail to operate.

  5. Re:Why is javascript being pushed as generic? by monkeyxpress · · Score: 4, Informative

    Install base. JavaScript is installed on almost every PC/mobile platform in existence, and has been in some shape or form for nearly a decade. You can't say the same about iOS, Windows, Python etc.

    Sun tried to make Java into a universal platform, Adobe came close with Flash, and Microsoft had a go with Silverlight/.NET. None of these have endured in the same way JavaScript has. Why it did is a complex question.

    JavaScript isn't as bad as you might think, but does require a lot of discipline (much like C++) to be done well. It definitely shouldn't be the universal language. I consider it really a high level language builder, rather than a high level language in itself. It is actually quite incredible that some newbie can naively bash out decently structured imperative code using it, while an advanced user creates quite well formed functional stuff. But, like C, the downside of this flexibility is that it is extremely easy to shoot yourself in the foot - something that I don't think should be a characteristic of a high level language.

    Anyway, the way things are trending in the JavaScript world, eventually most people won't work directly in JavaScript but use derivative languages (such as CoffeeScript is doing now) better suited to their problem domain, so longer term you'll probably have your wish of developing in Python/C++ and then having that compiled to JavaScript. For now though, if you want the best performance (particular on mobile), you need to be developing in JavaScript and have a reasonable understanding of how the interpreter is working for you.

  6. Re:Why is javascript being pushed as generic? by gbjbaanb · · Score: 4, Interesting

    I'll tell you why those didn't succeed where javascript did - proprietaryness.

    Java wanted to be "pure java" where you only wrote Java. Flash and Silverlight were the same, in all cases you had to drink the kool-aid and become one of "them". Javascript was just so boring and crap that the major players ignored it, but as it was there, developers knocked out little bits of code using it until eventually everyone could program javascript but only a third could do Java, a third could do Flash and a third do Silverlight (you get my point, hopefully - nobody became a developer for all three of those competing proprietary platforms)

    And so the impetus for each of the big platforms waned while javascript kept growing.

    To replace it would have to be a standards thing, and get implemented in every browser and be recognised as better. Not Dart or Typescript or whatever, which are all failing too.

  7. Re:It's a trap! by hairyfeet · · Score: 3, Informative

    Anybody can spend all of 3 minutes making a free outlook account and signing up for the Windows 10 Insider program so yes Virginia Win 10 and Edge can be had for absolutely, free...just like Google's OSes and browser.

    In fact one could argue there is pretty much zero difference between MSFT and Google now, as both give away their OS and then proceed to datamine the shit out of you while tying everything to their services...hmm...where have I seen that before? Why I just don't know where I could have seen such a thing.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  8. Re:It's a trap! by Richard_at_work · · Score: 3, Insightful

    So you hate MS, why should I give a shit about that? And "you" having reservations about Microsoft and opensource doesnt mean "people" have reservations - I've been around on Slashdot since 2000 and while its a great anti-MS rhetorical slogan, I have yet to see Embrace, Extend and Extinguish in real life - .Net is awesome, and getting more open source by the day, and MS is releasing stuff as open source left right and centre. So tell me, just how long do I have to wait to be "extended" or "extinguished"? Another 5 years? 10? Am I going to die of old age first?

    Now, care to actually tell me how MS acting as gatekeeper for their project is any different from any of the other projects I mentioned? You cant, other than point to your hate filled rhetoric? Ho hum.

  9. Re:It's a trap! by drinkypoo · · Score: 3, Insightful

    In fact one could argue there is pretty much zero difference between MSFT and Google now, as both give away their OS and then proceed to datamine the shit out of you while tying everything to their services...hmm...where have I seen that before? Why I just don't know where I could have seen such a thing.

    The difference is that so long as I pick some hardware that works, I can run Android-x86 on a PC without being spied on by Google, but no matter what I do, I cannot run Windows 10 on a PC without being spied on by Microsoft, even when they claim they are not spying because you have turned off the options for the spying. I can do the same with my phone. I can opt out of Google services by getting my distribution elsewhere, but I can't opt out of Microsoft spyware because there's only one source for Windows, and it is tainted. I can also get an OSS version of their web browser, but you cannot get an OSS version of Aieeee! So in fact, the situation is completely different, and as a Microsoft whore you are shilling for them in order to make yourself look less unscrupulous. Your self-serving effort has been noted, and sneered at. And, of course, fellated by other Microsoft shills, with modpoints.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"