News for hackers. Stuff that matters.
Re:Web Assembly by cauterize on Monday November 09, 2015 @06:56PM (#10536689)
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 by richdougherty on Monday November 09, 2015 @07:17PM (#10536783)
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 by cpeterso on Monday November 09, 2015 @10:37PM (#10537474)
How long until someone implements WebAssembly instructions in hardware? ARM's "Jazelle" supported some JVM instructions in hardware.
Re:Web Assembly by h1282227 on Tuesday November 10, 2015 @03:12AM (#10538116)
Hardware support only makes sense if the optimisations are already included in the compiler output. The JVM does all the optimisations which makes Java Bytecode not suitable for that purpose.
Re:Web Assembly by jfb on Monday November 09, 2015 @07:13PM (#10536766)
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 by aikah on Monday November 09, 2015 @07:40PM (#10536879)
> 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 by dorfsmay on Monday November 09, 2015 @08:04PM (#10536971)
The idea of a good language evolves over time, and varies among people. Look at how many languages transpile to JavaScript today. If you ask the users of those languages, they'll tell that their language is the "better language" you're looking for.
Re:Web Assembly by TimJYoung on Tuesday November 10, 2015 @07:23AM (#10538896)
Yep, I wrote a blog post about this not too long ago:

http://www.elevatesoft.com/blog?action=view&id=why_limit_web...

From the post, there's this very illuminating link that I'm sure most here have already seen:

https://github.com/jashkenas/coffeescript/wiki/list-of-langu...

That's a pretty long list. :-)

Re:Web Assembly by dorfsmay on Tuesday November 10, 2015 @12:29PM (#10540748)
Thanks, I hadn't even realised the scope of it, I really thought there was a dozen of them. This link is worth its own posting!