Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

211–220 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#211
post #135

Earlier quoted context omitted.

And for a somewhat more practical but at the same time more exotic example, the Internet Archive has a ton of old minicomputers and arcade games running in MESS/MAME, each compiled to webasm. One click and you can boot anything and play it in your browser. https://archive.org/details/softwarelibrary https://archive.org/donate/

Are you sure that's actually using WASM? It sounds to me like it's currently using ASM.js compiled via Emscripten. (Though in theory there's no reason why it _couldn't_ be WASM, since Emscripten supports WASM as a compiler target.)

I thought they switched over back in July. https://twitter.com/textfiles/status/884084207688892416

Re: WebAssembly support now shipping in all major browsers

#212

Can't wait for DOM interop and get away from JS on frontend. Seriously JS should not be the lingua franca of the web :)

Alternate universe: JVM was more secure and had better DOM interaction, so Applets won against JavaScript. The world goes around in circles.

IMO we would still need WebAssembly in such a world, because the JVM still enforces a heavyweight object model and GC.

The "wasm is just the JVM all over again" meme needs to die.

Re: WebAssembly support now shipping in all major browsers

#213

Unfortunately SIMD is still not supported on any browsers and with the move away from SIMD.js it looks like this might take a while. We've been working on porting over our fairly large barcode scanner library to WebAssembly. While the performance is close to what we have on other platforms ( http://websdk.scandit.com ), the major bottleneck for now is not being able to use optimized code relying on SIMD (and not havi…

This is precisely what I'm waiting for as well. I want to run the Nengo neural simulator in the browser, so I can share my research easily, but it looks like I'll have to wait a few years.

www.nengo.ai

wow, this is really cool! thx for sharing :]

Re: WebAssembly support now shipping in all major browsers

#214
post #34

A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the future implication it "could" have in the future in a really humorous way. A few years old but still relevant. You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure. [0] https://www.destroyallsoftware.com/talks/the-birth-and…

There's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If Web…

> Edge is closed source, but I'm almost sure there's some old IE code in there

EdgeHTML is a fork of Trident, so yes. That said, I'm led to believe there's about as much commonality there as there is between KHTML and Blink: they've moved quite a long way away from where they were.

> It's simply too expensive to create a fast (and compatible) JS engine.

I don't think that's so clear cut: Carakan, albeit now years out of date, was ultimately done by a relatively small team (~6 people) in 18 months. Writing a new JS VM from scratch is doable, and I don't think that the bar has gone up that significantly in the past seven years.

It's the rest of the browser that's the hard part. We can point at Servo and say it's possible for a comparatively small team (v. other browser projects) to write most of this stuff (and break a lot of new ground doing so), but they still aren't there with feature-parity to major browsers.

That said, browsers have rewritten major components multiple times: Netscape/Mozilla most obviously with NGLayout; Blink having their layout rewrite underway, (confusingly, accidentally) called LayoutNG; IE having had major layout rewrites in multiple releases (IE8, IE9, the original Edge release, IIRC).

Notably, though, nobody's tried to rewrite their DOM implementation wholesale, partly because the pay off is much smaller and partly because there's a lot of fairly boring uninteresting code there.

Re: WebAssembly support now shipping in all major browsers

#215
post #202

Earlier quoted context omitted.

There's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If Web…

The real problem is CSS. Implementing a compliant render engine is nearly impossible, as the spec keeps ballooning and the combinations of inconsistencies and incompatibilities between properties explode. Check out the size of the latest edition of the book "CSS: The Definitive Guide" : https://twitter.com/meyerweb/status/929097712754098181 Until CSS is replaced by a sane layout system, there's not going to be anothe…

Isn't Grid and Flexbox supposed to be that sane layout system? At least that's what I've heard from those who have used them.

Re: WebAssembly support now shipping in all major browsers

#217
post #202

Earlier quoted context omitted.

There's another reason why I want JavaScript in the browser to die: We haven't had a new browser engine written from scratch since KHTML. Firefox is a descendant of Netscape, Chrome (and Safari) is a descendant of WebKit which is itself a descendant of KHTML, Edge is closed source, but I'm almost sure there's some old IE code in there. Why? It's simply too expensive to create a fast (and compatible) JS engine. If Web…

The real problem is CSS. Implementing a compliant render engine is nearly impossible, as the spec keeps ballooning and the combinations of inconsistencies and incompatibilities between properties explode. Check out the size of the latest edition of the book "CSS: The Definitive Guide" : https://twitter.com/meyerweb/status/929097712754098181 Until CSS is replaced by a sane layout system, there's not going to be anothe…

I think Blink's LayoutNG project and Servo both show that you can rewrite your layout implementation (and Servo also having a new style implementation, now in Firefox as Stylo). I think both of those serve as an existence proof that it's doable.

Re: WebAssembly support now shipping in all major browsers

#218
post #202

Earlier quoted context omitted.

The real problem is CSS. Implementing a compliant render engine is nearly impossible, as the spec keeps ballooning and the combinations of inconsistencies and incompatibilities between properties explode. Check out the size of the latest edition of the book "CSS: The Definitive Guide" : https://twitter.com/meyerweb/status/929097712754098181 Until CSS is replaced by a sane layout system, there's not going to be anothe…

Isn't Grid and Flexbox supposed to be that sane layout system? At least that's what I've heard from those who have used them.

I presume parent's point is about how they then interact with other layout modes (what if you absolutely position a flex item, for example), along with the complexity of things that rely on fragmentation (like multicol).

Re: WebAssembly support now shipping in all major browsers

#219

All the excitement around wasm seems quite puzzling to me. Yes, I understand that you can program in whatever language you love but what new language are you hoping would be supported? C? C++? Fortran? As far as I am concerned, all the languages I care about already have compilers that target JS.

Another Rustacean checking in. I'd love to write Rust and run it in the browser. Rust uses LLVM so it can use emscripten already, but having closer to native speeds would be great.

Re: WebAssembly support now shipping in all major browsers

#220
post #202

Earlier quoted context omitted.

The real problem is CSS. Implementing a compliant render engine is nearly impossible, as the spec keeps ballooning and the combinations of inconsistencies and incompatibilities between properties explode. Check out the size of the latest edition of the book "CSS: The Definitive Guide" : https://twitter.com/meyerweb/status/929097712754098181 Until CSS is replaced by a sane layout system, there's not going to be anothe…

Isn't Grid and Flexbox supposed to be that sane layout system? At least that's what I've heard from those who have used them.

Even if Grid and Flexbox are awesome and perfect and the solution to all our problems, they don't make everything else in css suddenly disappear, a new layout/render engine still has to implement every bit of it, quirks included.
Post reply on HN