Live data from Hacker News

Microsoft Edge's JavaScript engine to go open-source

blogs.windows.com

271–280 of 283 posts

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

#271

Earlier quoted context omitted.

On v8 right? This one is probably the best broad overview: http://www.html5rocks.com/en/tutorials/speed/v8/ To get into the gory details google Vyacheslav Egorov - he's a v8 engineer with a number of talks on YouTube, presentation slides, and blog posts on v8 internals. He also maintains a tool called IRhydra, that lets you examine functions after they've been compiled into v8's internal representation.

I am glad you find my stuff useful enough to recommend it to other people! Thanks. I just wanted to point out a minor detail: I am an ex-V8 engineer - I have not been working on V8 since 2012.

Duly noted, and thanks ;)

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

#272

Earlier quoted context omitted.

Speaking as someone tuning a JS game, I focus on V8 over other engines because there are great articles around that explain in detail what v8 knows how to optimize, what causes functions to deopt, what kicks object property lookups into slow mode, etc. Articles explaining this for SpiderMonkey would be greatly appreciated!

FWIW, people in Mozilla are working on a "JIT coach", which will tell you if performance critical sections of your code aren't getting JITed, and why. I believe this is almost ready for use, though I'm not sure when it will be presented.

Sounds analogous to the way the chrome profiler tells you when functions have permanently deoptimized, right? That would be a terrific feature for Firefox, looking forward to it!

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

#273
post #270

Earlier quoted context omitted.

Shared memory in Javascript is a Bad Idea(tm). Run, don't walk, to your standards body, and tell them not to entertain such notions. You know what happens with shared typed arrays? Shared Uint8 arrays. You know what happens with shared Uint8 arrays? Multiple workers using JSON.parse. Do you want ants? Because this is how we get ants. :(

Why would anybody ever want to JSON.parse typed arrays from web workers when the parsed data (or unparsed strings) can be passed around directly? Strings are immutable and are not copied when you pass them around. I don't see your point.

Remember: web workers communicate (to the best of my knowledge) using a full serialization/deserialization of message objects (which is why they added transferable objects). So, to create a one-to-many broadcast mechanism, you'd do exactly what I described. Additionally, I am unsure, but I could easily see immutable strings being copied nonetheless between web workers because of the desire to give every worker a private heap.

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

#274
post #269
post #268

Earlier quoted context omitted.

What do you mean by / what are you referring to with " it was already being rewritten as Gecko "? And what was the Mariner fiasco?

Mariner was an attempt to upgrade the old Netscape 4 codebase that got cancelled. Gecko/NGLayout was the new rewritten layout engine. WaSP pushed for this cancellation: http://www.mozillazine.org/talkback.html?article=88 http://www.mozillazine.org/talkback.html?article=1524 http://www.mozillazine.org/talkback.html?article=1708

Wow, wow and wow.

This is full of TILs, and mind-bogglingly enlightening to read.

In many ways the Web feels like exactly the same place as it was 16 years ago (especially to read about the WSP xD) but things have gotten significantly better for the user and standards of late.

TIL that NS/Mozilla was really the thorn in everyone's side on the tech front, but M$ wore the blame for the Web's early history because of the antitrust cases... that's insane. Absolutely insane.......

Are there any binary builds of Mariner, newlayout and NGLayout I can track down?

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

#275
post #116

Earlier quoted context omitted.

Microsoft is already working on Node, and it's actually already possible to run Node on Chakra. See https://blogs.windows.com/buildingapps/2015/05/12/bringing-n... and https://ms-iot.github.io/content/en-US/win10/samples/Nodejs....

That's cool but only run on Windows 10 which limit its usage and hence the community. A widely used non-V8 Node.js would be a great project in my opinion.

Give it time. When Node was new it didn't work on Windows, which limited its usage and hence the community.

Now, Node is probably the most reliable cross platform language host. Write something for node, nearly anything, and if it works on your OS it'll probably work elsewhere too.

There's no reason something similar couldn't happen with Chakra, especially now that it's open source

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

#276
post #100

Earlier quoted context omitted.

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.

If I understand correctly, MS was found guilty of abusing its monopoly by bundling IE with OS, which has put other browsers to disadvantage. The way I see it, the only trouble with the case was that it was too late. By that time IE has already won. Are you suggesting some other consequence of this case, leading to stagnation of IE development? I can't see any...

«Are you suggesting some other consequence of this case, leading to stagnation of IE development?»

I think that you could see a lot of optimistic excitement from Microsoft in the idea of merging IE into Windows just prior to the antitrust case. There were experiments with using the HTML renderer everywhere in the OS from widgets (the "Active Desktop" thing) to applications (HTML Help, even the HTML usage of Windows (now File) Explorer)... Admittedly today with have mixed opinions of such experiments (and their often poor performance), but it is hard not to wonder what could have happened had Microsoft invested fully into that combined Windows/IE rendering platform had they been less afraid of the antitrust repercussions...

We're finally starting to see HTML/JS/CSS "everywhere" application toolkits (it's a vertical slice in the "Universal Windows Platform", and then there's efforts like Electron and Cordova), and it's interesting to think that maybe some of that would have happened sooner in a world without that antitrust lawsuit. (Certainly the counter is that it would have been less standardized, but I don't think that is necessarily the case, either: it would have largely have been different standards though.)

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

#277

Earlier quoted context omitted.

The performance is hard, but the bug-for-bug compatibility is what will kill you.

Actually, 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…

Enumeration order was indeed (finally) added to the ES2015 spec. Here's a link to the release candidate spec for the [[OwnPropertyKeys]] algorithm:

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-or...

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

#278
post #147

Earlier quoted context omitted.

Unless 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. ;-)

He said it was not impossible, he never said MS was considering it ATM

Thanks for the correction!

Still, given where Microsoft is coming from and given Russinovich's position, this is significant.

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

#279
post #270

Earlier quoted context omitted.

Why would anybody ever want to JSON.parse typed arrays from web workers when the parsed data (or unparsed strings) can be passed around directly? Strings are immutable and are not copied when you pass them around. I don't see your point.

Remember: web workers communicate (to the best of my knowledge) using a full serialization/deserialization of message objects (which is why they added transferable objects). So, to create a one-to-many broadcast mechanism, you'd do exactly what I described. Additionally, I am unsure, but I could easily see immutable strings being copied nonetheless between web workers because of the desire to give every worker a priv…

I still think is faster to send the same message to all than using JSON.parse on each (not to mention much more compatible). Since each worker is going to make a copy anyway (with JSON.parse or by receiving a message), why does it matter?

Also, assuming what you say is true, what's the problem? It's much easier for the JS implementations to synchronize things only with a specific type of typed arrays than sharing all kinds of GC-managed data structures.

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

#280
post #206

Earlier quoted context omitted.

It's just very rare to use a Windows VM in a cloud service environment to deploy services. This may change with the Docker support we are seeing promised. Powershell is definitely a workable remote shell. But it's not the case that this is sufficient today.

Azure is the second biggest cloud provider in the world (after amazon) - and we (TipRanks) deploy VMs to Azure. It's a lot less common but I wouldn't call it `very rare`

Azure provides a massive number of Linux boxes. It's actually their preferred target, if you hear them tell it at Connect2015.

I had a friend go there, came back talking about hallway discussions of Posh on Redhat.

Post reply on HN