Hacker News new | comments | ask | show | jobs | submit login

Wow, 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?



> Perhaps Servo+Chakra could be a thing?

Sounds like a lot of work (not to say it's not possible or interesting). Our bindings code[1] is pretty complicated already. It depends highly on how Chakra deals with things internally -- if it's similar to SpiderMonkey; I'd be interested in having a look. Might become a fun project :)

Without a reference open source DOM implementation (which we have for SM -- Firefox's DOM), we'd also need good docs for the Chakra API. No idea if that exists.

[1]: https://github.com/servo/servo/tree/master/components/script...


Engineer on Chakra here- are these the docs you're looking for? https://msdn.microsoft.com/en-us/library/dn249552(v=vs.94).a...


I know it's off-topic, but since you're a Microsoft employee: haven't the MSDN guys ever heard about friendly URLs? Compare: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Sp...

(I'm guessing this would be at least the milionth time they hear about it :) )


MSDN does support friendly names: https://msdn.microsoft.com/library/system.string (works for any .net class)

I think the person who wrote this particular page simply didn't specify a friendly name, which is why it's falling back to the canonical name.


Yep! Especially the reference.

Will have a look and compare with the spidermonkey bindings when I get time.

Thanks!


Initially I thought Edge would just be IE with (yet another) skin, but I have to say, it's absurdly fast and lightweight. It's still not my main browser as I'm now too deeply entrenched in Chrome for development, but it makes me really happy to know they're actually pushing the web ahead.


Give the JavaScript Browser a go; is Edge render + Chakra, but has a faster starup - Also OSS by MS O_o https://www.microsoft.com/en-gb/store/apps/javascript-browse...


To be fair that's a sample app which is part of a tutorial demonstrating the capabilities of the web platform on Windows 10.

https://github.com/MicrosoftEdge/JSBrowser


I find its UI quite annoying and its tab management really poor, but technologically it's really solid. I've noticed it seems to handle HTML5 video more smoothly than Firefox (I rarely use Chrome so I can't really comment on it).


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++?


You're comparing apples and oranges here.

Rendering engines (all in C++ except Servo):

- Servo

- Blink (Chrome/Opera)

- Trident/Spartan (IE/Edge)

- Webkit (Safari)

JS engines:

- Spidermonkey (used by Servo and Firefox)

- Chakra (used by Trident/Edge)

- V8 (used by Blink, also by Node)

Servo already uses a JS engine in C++ because a Rust JS engine is a huge undertaking in itself (see [1])

It does make sense to try out Chakra or V8 for Servo. It's probably a lot of work, though. And there may not be a net gain out of that (We have access to in-house spidermonkey know-how, none of that for the others).

[1]: https://news.ycombinator.com/item?id=10682274


I have a vested interest in creating a SM -> Chakra adapter to swap out SpiderMonkey and be able to compare it to see how it does because Chakra is also an interpreter and not JIT-only like V8. Such an adapter would also make playing with Servo -> Chakra possible. I haven't play with Servo, but is there a list of all the JSAPI calls that it needs to function or can you easily dump that list?


The comments below link to the bindings (rust-mozjs is the Rust API, but the parts of it we use are in components/script/dom/bindings).

Here's a `git grep jsapi` on that folder: https://manishearth.pastebin.mozilla.org/8853940. Haven't removed duplicates or formatted it, so it's probably much shorter than it looks.

Please keep me posted about this!




Webkit uses JavaScriptCore, not V8.


TIL; fixed, thanks.


My bad, I meant JavascriptCore or the JS engines often paired with WebKit. What I meant was, why pair Servo with Chakra and not any of the other Javascript engines?


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.


From what I heard, it is on a roadmap, just not on Servo's. Apparently, it'll someday be a sister project to Servo.


Servo contributor here: Haven't heard of this plan (still could exist), though we do (mostly jokingly) toss the idea around every now and then. There are a couple of not-production-ready Rust JS interpreters floating around (https://github.com/swgillespie/rjs/ is the latest I've seen) though.

Stuff like JITs can't really reap Rust's safety+performance benefits[1], and overall the same might be said of a JS interpreter, with all the garbage collection and stuff. The other thing is that Spidermonkey/Chakra/V8 have had years of optimization and tweaks, starting from a clean slate would be _very_ hard. With Servo's small team this is an impossible task, but with a larger, dedicated, team, there's a chance. shrugs

[1]: though it's possible they will still be safer than the C++ counterparts, which is still good. The question then becomes, how much is that increase in safety, and can it justify a whole rewrite?


It is true, though, that a lot of the danger isn't in the JIT but rather in the bindings (e.g. the native implementation of the Date object, or Typed Array Buffer, or what have you), which Rust's safety features could help with.


Servo is use in production by any browser? or any Project like Chakra? or is just an experiment till now?


I 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


Not 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




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: