15 ms·
Microsoft Edge's JavaScript engine to go open-source
- yuhong 11y agoI was wishing that MS Open Tech could make the other JS engines Windows x64 ABI compliant including SEH for a while now.
- caleblloyd 11y agoFantastic news! Now all we need is for Edge to support Server Sent Events (eventsource)
- rakstrooper 11y agoHere's hoping an android port Will be made by microsoft
- deleted 11y ago[deleted]
- cdnsteve 11y agoWell I guess we can all start using ES6, no need to compile to ES5 anymore.
- cpeterso 11y agoYou will still need to compile to ES5 to support older browsers.
- deleted 11y ago[deleted]
- nocman 11y ago"I literally blown away by their name". ^^ I'm so sorry to hear about your accident. I hope your injuries were not serious! :-D https://www.youtube.com/watch?v=9jh4Mpgbi4A https://www.youtube.com/watch?v=9jh4Mpgbi4A
- coldtea 11y agoHere, meet a dictionary of the english language: Literary [lemma 2]: in effect, virtually <will literally turn the world upside down to combat cruelty or injustice — Norman Cousins> It's a use that predates Shakespeare.
- krisdol 11y agoIt's a term that has two accepted meanings, the other meaning being the total opposite of the intended, making it a meaningless "flavor" word. Leave it out of phrases from now on, and the phrase will not lose any meaning or clarity.
- coldtea 11y ago>It's a term that has two accepted meanings, the other meaning being the total opposite of the intended, making it a meaningless "flavor" word. No, it's a term that has two accepted meanings that context makes perfectly clear which one was meant. Like "bad" (which can mean actually bad, or "great" as slang, both meanings in the dictionary). In fact many common terms have that characteristic, including fast ("moving quickly" or "fixed in place"), dust (which also means removing dust), etc. https://en.wikipedia.org/wiki/Auto-antonym https://en.wikipedia.org/wiki/Auto-antonym >Leave it out of phrases from now on, and the phrase will not lose any meaning or clarity. It's not meant to add to the core meaning of a phrase. It's meant to emphasize something in it. Without it the literal (sic) meaning would be the same, but the intended impact of the phrase would be lessened. It's like: "I don't care for your bonus" and "I don't care for your fucking bonus". The meaning would be the same without the expletive but the intended emphasis and impact lost. Something that Dickens and Shakespeare (who used it that way among tons of others) understood.
- PavlovsCat 11y agoQuote Shakespeare and/or Dickens so I can see whether their use of that word improves the passages, or carries any signal at all for that matter. Otherwise I'll just assume that since they wrote a lot, there's going to be some mediocre bits and padding in it. For all I know, they might simply not have paid attention.
- nocman 11y ago"I was literally blown away by Visual Studio Code" ^^ Wow, Microsoft should really be more cautious with their code. There seems to be an epidemic of injuries. I'm so sorry to hear about your accident. I hope your injuries were not serious! :-D https://www.youtube.com/watch?v=9jh4Mpgbi4A https://www.youtube.com/watch?v=9jh4Mpgbi4A
- GFK_of_xmaspast 11y agoDon't be tiresome.
- dang 11y agoWe detached this subthread from https://news.ycombinator.com/item?id=10682076 https://news.ycombinator.com/item?id=10682076 and marked it off-topic.
- ghrifter 11y agoIE 11 and Edge are great. It's still fun to hear the circlejerk from "tech" friends/people about how IE is slow, bad, etc compared to Chrome or Firefox. Yeah, back in the day it was, but in the past few years IE has been great.
- xxxxc308 11y agoGg
- zobzu 11y agoThere's no such thing as 'firefox alpha', its 'firefox nightly' Kinda odd to see when they get the rest right and they're engineers. feels like they dont know firefox o.O
- deleted 11y ago[deleted]
- datashovel 11y agoMicrosoft is slowly but surely winning me as a fan. Keep doing things that matter, show that you're committed to the open source community, and continue to help push the web forward and I think nothing but good things will come from this.
- shmerl 11y agoHow about open sourcing the whole browser?
- keklord 11y agoYay I cant wait to test this out
- sdegutis 11y agoWow. They're really serious about changing their philosophy aren't they. Using Github for their stuff, making and open sourcing Visual Studio Code, other stuff I can't remember, and now this.
- Inthenameofmine 11y agoIf they go full SaaS I would not be surprized if they go Open Source on Windows itself, seriously. I think for that to happen Nadella needs one big win/turnaround and the shareholders might be on board.
- krylon 11y agoUnless my memory is playing tricks on me, a couple of months back, Mark Russinovich (of SysInternals fame) gave a talk somewhere and mentioned that they were looking into that. Sounds kind of strange to say it out loud, though. ;-)
- oblio 11y agoWell, it seems feasible if they take out enterprisey features. For example Windows without AD support could be an option. Or without remote desktop support. The hobbyists would use it as is but no company would touch it without support anyway.
- outside1234 11y agoI was literally blown away by Visual Studio Code. It is an amazing editor. I haven't opened sublime since.
- gtirloni 11y agoEdge is certainly much faster than Chrome/Firefox for JS processing that I wish I could use it on Linux. Looks like that might be happening. Really great news. I didn't know Node.js could use anything but v8. This is also very nice.
- ameen 11y agoI think theoretically Node.js could work without V8, and guess some of MS's work for IoT was indeed that (swapping V8 for Chakra).
- frik 11y agoThere used to be an Mozilla spidermonley based node.js too, though it isn't maintained atm. https://news.ycombinator.com/item?id=2469786 https://news.ycombinator.com/item?id=2469786 https://github.com/zpao/spidernode https://github.com/zpao/spidernode
- node_uzer 11y agoThere is an actively maintained Spidermonkey port of Node.js called jxcore. It also supports an older version of V8 from the 0.10 branch. https://github.com/jxcore/jxcore https://github.com/jxcore/jxcore
- Klathmon 11y agoI'm not sure where the hangup is, but I've found that Edge is fast as hell for initial page startup, but lags behind quite a lot when under heavy load. I've seen the benchmarks but in my experience it just... lags... For example, on the kangax ES6 compatibility table [1]. On chrome clicking a column takes less than a second, on Edge (i'm on an up-to-date Windows 10 machine, no preview stuff) it loads faster than in chrome, but takes 3+ seconds to switch between columns. Even some of the stuff i've written acts similarly, and i can't figure out why. [1]https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- 11y ago
- Sir_Cmpwn 11y agoWow, I'll admit that I haven't been looking at Edge simply because of the IE stigma, but this blog post impressed me. 90% ES6 support? More so than Babel? Awesome. And it's getting open sourced! I hope to see it ported to the Unixes. Perhaps Servo+Chakra could be a thing?
- nly 11y agoServo is a rendering engine written in Rust, why would it choose Chakra, which is written in C++, over WebKit, which is written in C++?
- adrianlmm 11y agoServo is use in production by any browser? or any Project like Chakra? or is just an experiment till now?
- gh02t 11y agoNot yet. I don't think it's an experiment and they are intending to actually use it at some point, but it is still in development right now
- jccalhoun 11y agoI don't think so. From the roadmap it looks like in a year or so it might start to be approaching a beta https://github.com/servo/servo/wiki/Roadmap https://github.com/servo/servo/wiki/Roadmap
- Sir_Cmpwn 11y agoServo currently uses SpiderMonkey as its JavaScript engine (SpiderMonkey is the Firefox JS engine). Sure, a JavaScript engine written at Rust would be useful at some point, but right now that's not on their roadmap.
- DiabloD3 11y agoFrom what I heard, it is on a roadmap, just not on Servo's. Apparently, it'll someday be a sister project to Servo.
- deleted 11y ago[deleted]
- miralabs 11y agoI wonder if in the future node will enable swappable js engine edit: ok just found this https://news.ycombinator.com/item?id=9534138 https://news.ycombinator.com/item?id=9534138
- Klathmon 11y agoI've hoped for this since it's inception. It gives the benefits of having multiple competing implementations but unlike the browser platform we (the developers) get to choose which one we use.
- ndesaulniers 11y agoNative addons and even Node core are too tightly coupled with v8. NAN will need an overhaul.
- adrianlmm 11y agoI'd like to see Node.js using Chkara by default, V8 developers have showed that they don't care much about Node.js, they are more interested in Chrome, and MS have showed more interest in Node.js than Google and I'm sure it will be better for all, fingers crossed.
- deleted 11y ago[deleted]
- hitekker 11y agoThis is the first I've heard that v8 devs don't care for node. Since I am not in the know, are there some sources that detail this issue in depth?
- deleted 11y ago[deleted]
- frik 11y agoI don't. A lot of code out in the wild already relies on v8, and won't work with Chkara. Node 5 is up-to-date with v8. Though, I would like to see Mozilla devsvwpuld revives the unofficial spidermonkey Node.js support (https://news.ycombinator.com/item?id=2469786 https://news.ycombinator.com/item?id=2469786 , https://github.com/zpao/spidernode https://github.com/zpao/spidernode ).
- oblio 11y agoI have a somewhat off topic question: is there anything in the design of Javascript that mandates single-threadedness? Could any Javascript engine implement threads? I'm asking because I'm wondering if Node.js's evented approach is the only way to do things.
- Matthias247 11y agoThe JVM implementations of Javascript (e.g. Nashorn) support multithreading. Imho it's not a good thing, because all existing Javascript code is written with singlethreading in mind and lots of stuff will break if you use it from multiple threads. Multithreaded code for Nashorn requires the use of JVM synchronization primitives, which are then not supported by other Javascript engines.
- jimbobimbo 11y agoMy speculation is that before Node stepped into the picture, primary use-case for JS was browser, hence UI manipulation. That usually prompts for a single thread that can update UI, unless you're willing to introduce a lot of mental overhead when dealing with synchronization primitives.
- mook 11y agoIt used to be possible to write Firefox extensions that used multi-threaded JS; however, like any other language, accessing the DOM was not threadsafe (so you can't have a window be your global object, and therefore they needed to live in separate source files). As JS lacked native support for threading, you also had to be very, very careful and often ended up with less obvious threading issues anyway. In the last few years SpiderMonkey (Firefox's JS engine) has dropped support for this more and more, and these days you can't anymore. But that's a consequence of the engine implementation, and not the language.
- ndesaulniers 11y agoMozilla is working on a spec for something called SharedArrayBuffer, which will allow Workers other than the main thread of execution to share memory. The reason for this is that as soon as you have separate threads sharing memory, it introduces non-determinsism into the mix. When developers use synchronization mechanisms incorrectly, or not at all, this can lead to deadlock between threads. This must not be allowed to occur on the main thread shared with the rendering engine. So keep your eyes out for SharedArrayBuffer. The event loop is very important to the existing language semantics and isn't going anywhere.
- 1971genocide 11y agoAs a mere mortal - How hard would it be for a day programmer to built something cool like an JavaScript engine ? I sometimes have crazy thoughts about the world ending. How hard would it be to built your own javascript engine from scratch ?
- facepalm 11y agoWhile at university I attended a "learn Scheme" summer course and it was taught by implementing your own Scheme interpreter (in Scheme). It is not that hard to implement a programming language, but making it perform well might be a completely different ballpark.
- jacquesm 11y agoBuilding a javascript engine is super simple. But to build one that has performance on par with the current crop will take you - as a single person - a lifetime and by then the state of the art will have moved on.
- Locke1689 11y agoThe performance is hard, but the bug-for-bug compatibility is what will kill you.
- jacquesm 11y agoYou could just leave them out ;)
- bzbarsky 11y agoActually, for JS engines this is a much smaller problem than for other parts of the web platform. There are two nasty warts I'm aware of: the "function inside if" mess, and the fact that the spec says enumeration order is undefined but actual web pages depend on some things about enumeration order that all browsers implement; chances are this will make it into the spec at some point. But by and large JS engines agree with each other and with the spec. Much more so than, say, DOM or CSS implementations.
- roddux 11y agoWait, Edge does better on ES6 coverage than both Chrome and Firefox? Microsoft have seriously stepped up their game, especially seeing as it's now neck and neck for performance with Chrome: http://venturebeat.com/2015/09/10/browser-benchmark-battle-september-2015-chrome-vs-firefox-vs-edge/view-all/ http://venturebeat.com/2015/09/10/browser-benchmark-battle-s...
- megablast 11y agoThey skip a lot of stuff supposedly. It is more a subset of javascript than Chrome and Firefox.
- jandem 11y agoThe next Firefox Nightly build should get 84% on that page, much closer to Edge than Firefox 44 (74%). I work on SpiderMonkey and I'm super excited about this news. All JS engines have added more-or-less similar performance optimizations but often implemented differently and I'm really interested to see what the Chakra team did. I'd be happy to write a blog post on it next month, if people are interested.
- Scarbutt 11y agoOne would think Firefox would lead here, since the browser is Mozilla's primary product, imagine how much hype and PR Firefox would get if only they were far ahead on ES6.
- judofyr 11y agoThe browser is the primary product to the Chrome team. Does it make any difference?
- Scarbutt 11y agoAlthough important for their future, Chrome is not Google's cash cow, Chrome is everyday stealing Firefox's market share, they have the luxury to wait, Chrome's pressure (and now Edge) on Firefox hasn't made Firefox step up their game as one would expect.
- mschuster91 11y agoWhat in blazes?! Okay MS, that's an impressive step. I'm waiting for the first ports to Linux or, hell, a native port of IE... given the trend, it's not unreasonable that MS will open source a load of stuff.
- nojvek 11y agoI just want node running on chakra on my linux box. Given MS has a lot of money to make from Azure, I see this happening.
- idibidiart 11y agoMicrosoft. Former Evil Empire. Current open source champion. What is not to like? Leadership is everything.
- jfoster 11y agoNo mention of license. Is it safe to assume it'll be Apache or MIT?
- justincormack 11y agoI believe MIT.
- abchatra 11y agoI work for Chakra team and it is going to under MIT license.
- supermatt 11y agoThis is great news!
- proyb 11y agoGood idea. And please add support for WebMIDI.
- abchatra 11y agoWebMIDI is not owned by Chakra. Please voice your opinion here https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/6508429-web-midi-api https://wpdev.uservoice.com/forums/257854-microsoft-edge-dev...
- seba_dos1 11y agoI don't think WebMIDI is in the scope of JavaScript engine.
- japhyr 11y agoWe have a bunch of laptops at school running Windows 10 with Edge. Students can't copy and paste into Google Docs while using Edge. Was this a deliberate choice by Microsoft to steer people away from Google products, or is it something more benign than that?
- simoncion 11y agoI know a guy who works on core web-dev stuff at Google. He tells me that Edge is often very quirky in very subtle ways. He's had to spend many, many hours diagnosing, reporting, and working around quirks in Edge. These quirks sometimes get fixed and sometimes do not, but are often not present in Internet Explorer.
- ygra 11y agoWe have a fairly large-ish JS codebase at work and from what I saw so far is that Edge's JS was never a problem. SVG rendering on the other hand is horribly broken currently for some cases. That being said, since our JS is generated, it's purely ES5 since it still has to run on IE9. So maybe the weird cases are in the more modern JS parts we don't use.
- soared 11y agoThis is just how google docs/scheets/slides etc. works on every browser and every OS.
- pimpl 11y agoI had similar problems using Google Docs on Safari too, so I think it’s just a bug on Google’s side.
- vonklaus 11y agoI find myself hoping Microsoft makes a comeback and they are really doing a lot to win developers which I think is the right move. Obviously, they are a huge platform and developers inherently will be using it but they have taken a lot of great steps like open sourcing this engine as well as other projects. The Code editor they released is built on Atom Electron and seems more performant than Atom in the few experiences I have had switching between them. If they can continue to gain trust in the community and improve their UI they could become great again. You can tell they have thought about how to do this. A few years ago now I remember the guys from the IE team did an AMA about the new explorer IIRC it was 10. They talked about cross browser compatibility and wanted developer feedback. I am not sure if they are actually an "underdog" but I find myself feeling like that, and hoping they can get it together.
- zer0defex 11y agoDitto - and I agree, underdog doesn't quite feel like the right word. It's more like yesterday's champion coming out of retirement to deliver some good old-fashioned ego checks on today's cocky up-and-comers. Either way, it's fun to watch.
- meowface 11y ago"Developers developers developers developers" :)
- d0m 11y agoOut of curiosity, why rebuilding a whole new engine rather than using/improving V8?
- nojvek 11y agoChakra started from a clean slate so they could think about problems differently and not be bogged down by v8 architecture.
- spicyj 11y agoThey've already built it, I think before V8 existed or around the same timeframe.
- _wmd 11y agoWhy build v8 when SpiderMonkey existed? Why build Chrome when Firefox existed? Ad infinitum
- bzbarsky 11y agoBecause you may want to implement things you care about, not necessarily the things the V8 developers care about. Unless you mean "why write your own engine instead of forking V8", in which case the answer might be that if you have the time to do it, it's easier to become expert on something you created yourself rather than an existing large complex system. And while you're at it you can make sure the system you create is good at solving the problems you mean to solve, which the existing system may not be. A concrete example of one of the design tradeoffs here: V8 doesn't have an interpreter mode, just several levels of JIT. Every single other browser JS engine does have an interpreter, because it turns out that for cold code (which is most code) that's both faster and less memory-intensive than a JIT. Not to mention allowing your engine to run on hardware for which you haven't created a JIT yet.