Live data from Hacker News

Microsoft Edge's JavaScript engine to go open-source

blogs.windows.com

201–210 of 283 posts

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

#201
post #69

Earlier quoted context omitted.

A toy javascript interpreter is quite easy. But a high-performance, production-ready engine is a totally different story.

Anyone have a recommendation for a good place to begin, if I was interested in writing a toy javascript interpreter?

Friends of mine used "Create Your Own Programming Language" to get started learning about interpreters: http://createyourproglang.com

I personally learned with SICP (But reading this book isn't just about interpreter, it will make you a better programmer and blow your mind in so many different ways. I wouldn't say it's for experts only, but this isn't the kind of book that beginners would get excited about. However, if someone is serious about improving as a developer, I can't think of a better book): http://www.amazon.com/Structure-Interpretation-Computer-Prog...

Finally, (How to Write a (Lisp) Interpreter (in Python)) by norvig is a great read if you're getting started with interpreter: http://norvig.com/lispy.html

* The reason the two last links are lisp related is because writing interpreter in Lisp is really straightforward (Since the code is the AST). Similarly, if you wanted to learn about memory management, a language like assembler or C might be more suited than say Python.

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

#202

Earlier quoted context omitted.

Not sure what you mean by "lining up with"? The development of ES6/ES2015, and the development of all the browsers and their various JS engines are pretty much ongoing, all the time. The Edge, Chrome, Firefox and WebKit teams are all working on ES6 compatibility, and releasing new versions pretty frequently. The Edge team are in the lead because they've implemented more features, faster. Chrome/V8 was actually quite…

Of course, I'm merely saying that there might be some benefit that arises from implementing a specification (ES6) into a newer engine vs a legacy engine.

Ah, I see. The JS engine actually wasn't changed for Edge, just the rendering engine. Chakra has been around since 2009, and was used in IE9-11. It was one a wave of new JS engines developed in response to the release of Chrome/V8 which destroyed the previous generation of JS engines in terms of performance (I'm sure the various browser vendors would say they always planned to create faster JS engines, but there's no doubt that the release of Chrome/V8 in 2008 accelerated their efforts).

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

#204

Earlier quoted context omitted.

Of course, I'm merely saying that there might be some benefit that arises from implementing a specification (ES6) into a newer engine vs a legacy engine.

Ah, I see. The JS engine actually wasn't changed for Edge, just the rendering engine. Chakra has been around since 2009, and was used in IE9-11. It was one a wave of new JS engines developed in response to the release of Chrome/V8 which destroyed the previous generation of JS engines in terms of performance (I'm sure the various browser vendors would say they always planned to create faster JS engines, but there's no…

> It was one a wave of new JS engines developed in response to the release of Chrome/V8 which destroyed the previous generation of JS engines in terms of performance (I'm sure the various browser vendors would say they always planned to create faster JS engines, but there's no doubt that the release of Chrome/V8 in 2008 accelerated their efforts).

Well, TraceMonkey can at least legitimately argue to not be inspired by it: it was publicly announced prior to Chrome, and work obviously started on it before that.

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

#205
post #33

Earlier quoted context omitted.

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]

Mandatory types is obvious—it needs to be compatible with existing JS code. Gradual typing is entirely plausible (and I think highly likely), and from there it's easy to add some static lint that ensures a codebase is statically typed.

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

#206
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....

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`

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

#207
post #144

Earlier quoted context omitted.

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 can't see any... I can't directly see any either because I don't know anyone at Microsoft, least of all on the IE team. But I think the coincident pause in IE's evolution is undeniable. As for a cause and effect link, that's just conjecture. To me, it seems likely that there were either formal business decisions that…

I think the antitrust suit also scared Microsoft off from including antivirus software with Windows, which has protected the incumbents in the antivirus industry, but the monetization model of Norton and MacAfee makes them little better than the malware they combat.

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

#209
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.

> which is now the recommended way to build native modules, offers a way out

On paper. In reality, HELL NO. I maintain node native addons, and the thing is, NAN is great, but they simply cannot foresee what will break next in v8.

Once something breaks, they provide a node-version-independent feature-shim, but every time there's a new version of Node, I DREAD the work I'm going to have to do to maintain my add ons.

It's simply less work to cross compile C++ to JS w/ Emscripten or write it in JS (or higher level language and compile to JS) in the first place.

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

#210

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?

Linux, because of servers.
Post reply on HN