Live data from Hacker News

Web Assembly

github.com

11–20 of 70 posts

Re: Web Assembly

#11

I imagine a future where instead of the DOM, everything is driven by WebGL with logic being in Web Assembly. So, basically... a standardized game engine, running across all platforms. Almost feels like a throwback to the days of entirely flash-based websites......

We're working hard to make sure that WebAssembly is a first-class citizen in the open web platform in ways that other native execution environments didn't accomplish.

For example, it's a goal to have WebAssembly modules interopt with the ES6 module system, and as soon as GC is supported, you'll be able to access the DOM and the JavaScript context in WebAssembly [0]. Both of these are huge steps towards ensuring that wasm plays well with everything that's great about the web today.

[0]: https://github.com/WebAssembly/design/blob/master/Web.md

(Disclaimer: I'm a Google Chrome PM contributing to the WebAssembly project)

Re: Web Assembly

#12
post #9

Earlier quoted context omitted.

It feels exactly like a throwback to the days of entirely flash-based websites. Not entirely sure how I feel about that.

Big regression in accessibility, copy/paste, automatic translation, everything that makes the web uniquely great.

The #1 thing that makes the web uniquely great is that all you need to do to access a program is to paste a short string into a box, and your browser takes care of the rest. Anyone can slap a website onto a server they control, and anyone in the world can then access it.

Outside that one advantage, web applications (not talking about simple documents here) are worse in almost every way than native applications. (It’s not without reason that Photoshop, ProTools, Maya, Excel, Final Cut, SolidWorks, ArcGIS, Sibelius, Mathematica, Visual Studio, and thousands of other serious tools don’t have credible web alternatives.)

They’re slower. They aren’t persistent. They change all the time with no ability for the user to prevent it, sometimes spontaneously breaking when the developer stops supporting the user’s browser or goes out of business. They make it hard for users to load/save local data, and instead they store personal data on a faraway server. Accidentally pressing the back button can destroy hours of user work. They usually have terrible accessibility. They don’t interoperate with other applications on the system. They flagrantly violate UI design conventions on every platform. They can’t access most local hardware devices. They have an extremely limited user input device model. Their UI layout tools are limited, inflexible, and incredibly hard to work with. They throw out decades of implementation effort on various standard solutions to problems and force complete reimplementation from scratch. They are difficult or impossible to build proper cryptographic primitives on top of.

In short, web applications are inherently second-class citizens on every platform.

BUT! Web applications are also amazing. Dropping the barrier to entry – URLs and HTTP and fairly reliable code sandboxing – makes all the difference, and makes the web an extremely attractive platform despite its many flaws.

Re: Web Assembly

#13

I imagine a future where instead of the DOM, everything is driven by WebGL with logic being in Web Assembly. So, basically... a standardized game engine, running across all platforms. Almost feels like a throwback to the days of entirely flash-based websites......

It feels exactly like a throwback to the days of entirely flash-based websites. Not entirely sure how I feel about that.

Flash should definitely export to WebAssembly and retire its player once and for all. Whether Adobe is ready to do that is another issue.

Flash is still an excellent IDE for artists. And I enjoy some "creativity" on the web. The "everything's flat and like the next site because Bootstrap" web is getting old.

Re: Web Assembly

#14
post #9

Earlier quoted context omitted.

Big regression in accessibility, copy/paste, automatic translation, everything that makes the web uniquely great.

The #1 thing that makes the web uniquely great is that all you need to do to access a program is to paste a short string into a box, and your browser takes care of the rest. Anyone can slap a website onto a server they control, and anyone in the world can then access it. Outside that one advantage, web applications (not talking about simple documents here) are worse in almost every way than native applications. (It’s…

Yeah, I wouldn't mind being able to write something like QT for the web.

Re: Web Assembly

#15

As someone who works in the web space, albeit on the back-end, can anyone explain why a project like this is desired over a better language / run-time?

> this is desired over a better language

Some people say Javascript is the best language , you see the problem ? nobody will ever agree on what "a better language" means.

JavaScript is constrained by forward compatibility. The goal here is to let people choose the language they want to develop with. The APIs will stay the same, and that's what matters. Front end development shouldn't be about knowing Javascript ninja tricks, but web and DOM apis.

Re: Web Assembly

#16

With the adoption of wasm, won't the web become inherently less hackable? Right now i can pretty-print some minified js and at least have a basic idea of what APIs are getting called. Difficult to see how one could do the same with wasm. Not saying wasm is a bad idea (i think it's good), I'm just concerned about what this will look like in terms of keeping the nuts and bolts of the web semi-readable.

You'll be able to reverse engineer. Interpreting JS is a massive waste of CPU/battery for the majority of users. The savings is worth a slight increase in complexity for developers.

Re: Web Assembly

#17

I imagine a future where instead of the DOM, everything is driven by WebGL with logic being in Web Assembly. So, basically... a standardized game engine, running across all platforms. Almost feels like a throwback to the days of entirely flash-based websites......

This would be terrible for the web from crawl-ability, accessibility, extension and OS integration points of view.

The web is awesome because it's document based, and largely because of links embedded in a open document format. Get rid of the document and you get rid of readable links, web crawlers, find-in-page, screen readers, and on and on...

Re: Web Assembly

#18
post #11

I imagine a future where instead of the DOM, everything is driven by WebGL with logic being in Web Assembly. So, basically... a standardized game engine, running across all platforms. Almost feels like a throwback to the days of entirely flash-based websites......

We're working hard to make sure that WebAssembly is a first-class citizen in the open web platform in ways that other native execution environments didn't accomplish. For example, it's a goal to have WebAssembly modules interopt with the ES6 module system, and as soon as GC is supported, you'll be able to access the DOM and the JavaScript context in WebAssembly [0]. Both of these are huge steps towards ensuring that…

> As soon as GC is supported, you'll be able to access the DOM and the JavaScript context in WebAssembly.

Do you have any anticipated timeline for this? For React, at least, we're eagerly looking forward to the opportunity to write at a lower level while maintaining the same JS-facing API.

Re: Web Assembly

#19

Been checking in on this since the initial hubbub a few months ago... It would be great if it started to swing into high gear. I'm still in love with the idea of a language-agnostic, web-centric compilation target, but I think we should all emotionally prepare for 10+ years before it's feasible to use in production, let alone well-integrated with our favorite languages.

Things are definitely picking up speed!

There are already a bunch of awesome community implementations of the MVP WebAssembly spec [0][1][2]. Meanwhile, the V8 [3], SpiderMonkey [4], Chakra [5], and JSC [6] teams have all started work on implementing wasm in actual browser engines.

We've still got a long ways to go, but it's much nearer than 10+ years!

[0]: https://github.com/WebAssembly/wasm-jit-prototype [1]: https://github.com/WebAssembly/wasmint [2]: https://github.com/WebAssembly/wasm-aot-prototype [3]: https://github.com/WebAssembly/v8-native-prototype [4]: http://hg.mozilla.org/mozilla-central/file/ca086f9ef8bc/js/s... [5]: http://blogs.msdn.com/b/mikeholman/archive/2015/06/17/workin... [6]: https://bugs.webkit.org/show_bug.cgi?id=146064

(Disclaimer: I'm a Google Chrome PM contributing to the WebAssembly project)

Re: Web Assembly

#20

I imagine a future where instead of the DOM, everything is driven by WebGL with logic being in Web Assembly. So, basically... a standardized game engine, running across all platforms. Almost feels like a throwback to the days of entirely flash-based websites......

It feels exactly like a throwback to the days of entirely flash-based websites. Not entirely sure how I feel about that.

It's possible to eschew the DOM even today with just JavaScript & [0]! While this would be possible with wasm & WebGL as well, we're working to build something that integrates well into the open web platform. Check out #3 from our high-level goals [1].

[0]: https://github.com/Flipboard/react-canvas [1]: https://github.com/WebAssembly/design/blob/master/HighLevelG...

Post reply on HN