Live data from Hacker News

Web Assembly

github.com

1–10 of 70 posts

Re: Web Assembly

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

Re: Web Assembly

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

Re: Web Assembly

#4
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?

Re: Web Assembly

#5

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.

Re: Web Assembly

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

Re: Web Assembly

#7

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?

I guess the argument boils down to "path dependence". We're highly unlikely to get any language environment other than Javascript, so mutate Javascript to try and strong-arm it into something better.

Re: Web Assembly

#8

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?

wasm and asm.js are perfect examples of incremental improvements rather than building something from scratch. The benefit of this is that incremental improvements can be built slowly on top of existing deployed JavaScript engines, whereas writing something from scratch has a serious bootstrapping problem.

The wasm/asm.js story goes like this so far:

1. emscripten, a JavaScript backend for LLVM, demonstrates that you can "compile" C/C++ code into JavaScript.

2. Some vendors start writing specific optimisations for emscripten-style JavaScript code.

3. This is formalised into a subset of JavaScript called asm.js.

4. More browser vendors get onboard with asm.js optimisations.

5. wasm is proposed. Initially it is a compact binary format that is equivalent to asm.js and that can be trivially translated into asm.js at runtime using a polyfill.

The future might look like this:

6. Browsers adopt wasm natively, so the asm.js shim can be dropped, giving more performance benefits.

7. Further enhancements to wasm follow and wasm perhaps begins to diverge from its underlying JavaScript runtime.

8. ???

Re: Web Assembly

#9

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.

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

Re: Web Assembly

#10

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.

It's definitely a goal to make sure that wasm is as readable as possible. The binary format will be able to be "pretty-printed" into a textual format [0]. We haven't finalized the exact format yet, but it will be much more readable than current asm.js javascript [1].

[0]: https://github.com/WebAssembly/design/blob/master/TextFormat... [1]: https://twitter.com/BrendanEich/status/643828456631857152

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

Post reply on HN