Live data from Hacker News

Microsoft Edge's JavaScript engine to go open-source

blogs.windows.com

91–100 of 283 posts

Re: Microsoft Edge's JavaScript engine to go open-source

#91
post #27
post #10

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

If you allow threads to share memory arbitrarily you need to add locking to all internal VM structures, which is going to be a significant slowdown. Also it's not (any longer) considered good practice to have languages that allow mutable memory sharing since that makes software unreliable, so it's not really a good idea. Without arbitrary memory sharing, multi-threading is already supported with web workers.

Web Worker is very weird in that you have to have a separate file.

Re: Microsoft Edge's JavaScript engine to go open-source

#92
post #33
post #19

Wait, 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-s...

No wonder: Microsoft needs "class" syntax in JS, they are a driving for behind TypeScript and ES6. Especially interesting, as Javascript has prototype inheritance. The reason: All of MS code is class-based, and they want it to look similar to C#.

"JavaScript will never have mandatory types" says Brendan Eich, who doesn't work for Microsoft last I checked, which I mean to say Microsoft is not the driving force behind ES6.

Source: https://channel9.msdn.com/Blogs/Charles/SPLASH-2011-Brendan-... [10:04]

Re: Microsoft Edge's JavaScript engine to go open-source

#93
post #33
post #19

Wait, 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-s...

No wonder: Microsoft needs "class" syntax in JS, they are a driving for behind TypeScript and ES6. Especially interesting, as Javascript has prototype inheritance. The reason: All of MS code is class-based, and they want it to look similar to C#.

Developers of large JavaScript codebases have come to realize that class-based OO is exactly what they need. Prototype OO sounds interesting in theory, but in practice it tends to not be what's needed. Projects that use it end up trying to poorly imitate class OO. This wouldn't necessarily be a problem, except it isn't done consistently. There are multiple approaches, some of them which don't mesh well with others. Class-based OO, on the other hand, tends to be much more consistent and well-defined. This consistency improves developer productivity, it keeps the code cleaner, and it allows for greater code reuse between projects. Prototype OO hasn't proven itself in practice, while class OO has again and again.

Re: Microsoft Edge's JavaScript engine to go open-source

#94
post #36

Earlier quoted context omitted.

I 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://github.com/zpao/spidernode ).

This is definitely a problem today, but NAN ( https://github.com/nodejs/nan ) which is now the recommended way to build native modules, offers a way out. That project provides a stable API to insulate module developers from changes between v8 versions. Sometime down the line, a NAN-spidermonkey or NAN-chakra project might become feasible.

Sort of -- in practice, we found ourselves instead playing catchup to NAN (many changes across Node 10, 12, 4, etc.). It insulates from minor changes, and increasingly, part of that has been Node waiting longer and longer between v8 changes.

Re: Microsoft Edge's JavaScript engine to go open-source

#95

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

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

Re: Microsoft Edge's JavaScript engine to go open-source

#97

Earlier quoted context omitted.

Yep. They're kicking everyone's asses in ES6 feature coverage. All the more impressive when you consider how they came from behind. http://kangax.github.io/compat-table/es6/ I's almost sad that Edge is not cross-platform.

Engineer on the Chakra team here. As the blog post says, we are definitely interested in going cross-platform. Which platforms would you be interested in seeing first?

I would be very insteresting to see a Chakra-based Node.js project for server side apps, so Linux would be my first vote :)

Re: Microsoft Edge's JavaScript engine to go open-source

#99
post #2

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

I was literally blown away by Visual Studio Code. It is an amazing editor. I haven't opened sublime since.

I really wanted to like VSCode but couldn't get over the "working files" paradigm and consequent lack of tabs :(

Have gone back to Sublime 3 for now but if the VSCode devs ever decided to support tabs I'd switch.

Re: Microsoft Edge's JavaScript engine to go open-source

#100
post #85
post #19

Wait, 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-s...

Well, historically, when Microsoft was still in competition-mode, Internet Explorer was kicking Netscape's ass with the later versions. With the first few versions they were playing catch-up, but if I recall correctly, IE 4 and IE 5 actually had more features and better standards compliance than the current Netscape versions, as did IE 6 at its launch. "IE hell" started once Microsoft won the race.

Perhaps. But it's also worth noting that United States vs. Microsoft was coincident with the stagnation in Internet Explorer, with the case starting in 2000, during IE 5's tenure.

For better or for worse, I think the case had a lot to do with Internet Explorer's long pause. I often wonder how Microsoft's browser, its Internet services, and the company as a whole would be today had that case not been undertaken.

Post reply on HN