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.
Microsoft Edge's JavaScript engine to go open-source
21–30 of 283 posts
Re: Microsoft Edge's JavaScript engine to go open-source
#22Wow, 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?
Servo is a rendering engine written in Rust, why would it choose Chakra, which is written in C++, over WebKit, which is written in C++?
Re: Microsoft Edge's JavaScript engine to go open-source
#23As 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 ?
Re: Microsoft Edge's JavaScript engine to go open-source
#24I 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.
Re: Microsoft Edge's JavaScript engine to go open-source
#25Wow, 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?
Servo is a rendering engine written in Rust, why would it choose Chakra, which is written in C++, over WebKit, which is written in C++?
Re: Microsoft Edge's JavaScript engine to go open-source
#26As 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 ?
Re: Microsoft Edge's JavaScript engine to go open-source
#27I 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.
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.
Re: Microsoft Edge's JavaScript engine to go open-source
#28Edge 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.
I'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 c…
Re: Microsoft Edge's JavaScript engine to go open-source
#29Earlier quoted context omitted.
Servo is a rendering engine written in Rust, why would it choose Chakra, which is written in C++, over WebKit, which is written in C++?
Servo 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.
Re: Microsoft Edge's JavaScript engine to go open-source
#30As 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 ?
There are many JS engines which are extremely small compared to the big guys used in browsers. Most of them tend to grab a subset of the language and implement that.
For example, the creators of nginx created their own specialized engine called nginScript that runs JS for their stuff https://www.nginx.com/resources/wiki/nginScript/
There is even a javascript interpreter written in javascript which can be a good starting point to learn a bit how it works https://github.com/jterrace/js.js/