
Google, Microsoft, Mozilla and Others Team Up to Launch WebAssembly - mirceasoaica
http://techcrunch.com/2015/06/17/google-microsoft-mozilla-and-others-team-up-to-launch-webassembly-a-new-binary-format-for-the-web/?ncid=rss&utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29
======
weland
At this rate, I predict that about ten years from now, they'll just ditch the
bloody memory-leaking browser and just ship out a VM and a language that will
have a small GUI library with a DOM-like organization in the standard library
compiling for it.

Sure, there are going to be nitpickers who will point out that we had that in
2005 and it was called Java, but what do they know about innovation.

~~~
marcosdumay
If you are kidding (I just can't decide), be aware that Microsoft killed
Netscape at the 90's because Netscape was starting to sell exactly that VM.

When Netscape became Mozilla, it shipped with XUL runner, that is exactly
that, but nobody used it.

Firefox OS is that, again, sold for smartphones.

If they come out with a good VM (measured by the languages it can run), and a
good DOM-like organization, it will happen in no time. But if we get another
XUL, it just won't happen.

~~~
pcwalton
How is XUL similar to Web Assembly at all?

~~~
marcosdumay
XUL aimed to replace the desktop with web applications, Web Assembly may do
just that.

But you are right in that there's no similarity in structure at all.

------
6t6t6
This is important because that could mean the beginning of the end of
JavaScript.

But also it means the end of the native apps. Apparently Microsoft and Google
are playing hard against Apple.

~~~
bitL
Hooray! Can't wait to use some real language for web apps finally! We might be
at the brink of a revolution due for a long time!

~~~
Touche
Serious question, because a lot of people have had this sentiment; what is it
you think you'll get from WebAssembly as far as new languages that you don't
already get from transpile-to-JS languages today? There's everything from very
dynamic languages like Opal to typed languages like Elm. What else do you
expect?

~~~
wizeman
Efficiency and ease of debugging? Just because it's possible to transpile to
JS doesn't mean the resulting code will be fast/responsive or easy to debug.
Which in turn means it won't be used for significant projects.

~~~
Touche
Debugging will use SourceMaps which already exist today. As for efficiency, I
haven't read anything that suggests WebAssembly will be more efficient than
asm.js, why would it be?

~~~
cicero
Try reading this: [https://brendaneich.com/2015/06/from-asm-js-to-
webassembly/](https://brendaneich.com/2015/06/from-asm-js-to-webassembly/)

"Why: asm.js is great, but once engines optimize for it, the parser becomes
the hot spot — very hot on mobile devices. Transport compression is required
and saves bandwidth, but decompression before parsing hurts."

------
hodgesmr
Why stop with WebAssembly? Why not address the entire notion that we're
tricking document-rendering browsers into being application runtimes?

~~~
wtetzner
I actually don't see a problem with using a document renderer for
applications, assuming it's actually treated that way. The document-rendering
of a browser is lower-level than a UI toolkit, and that makes it more powerful
in a lot of ways. But we need to be able to build abstractions on top of it to
actually build UIs. I think react.js's approach (or something similar) is
actually pretty good here.

A lot of the problems we run into are people treating DOM nodes as if they
were UI widgets, when in reality they are lower-level primitives for drawing
and capturing input.

------
louhike
The Unity team has already made some tests for their Engine with WebGL and
WebAssembly and it seems promising:
[http://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-
fe...](http://blogs.unity3d.com/2015/06/18/webgl-webassembly-and-feature-
roadmap/)

~~~
M8
Hopefully we will not need Unity3d to have high-performance C# engines in
browser.

~~~
sanxiyn
How else you will get C# in the browser? C# is high-level, WebAssembly is low-
level, something needs to do lowering.

Edit: I don't see how future addition of GC to WebAssembly changes anything I
wrote above.

~~~
wtetzner
You write a compiler from C# to WebAssembly. I don't see how C# is different
from any other language in that regard.

~~~
sanxiyn
I think we are in agreement? Unity3d provides C# to JavaScript compiler.

I replied to "Hopefully we will not need _compiler_ to have high-performance
C# engines in browser", because that does not make sense.

~~~
M8
_Unity3d provides C# to JavaScript compiler_

Unity3d does too many things (except new versions of C# :P) and ties to
itself. There should be a direct C# -> WebAssembly compiler in future.

------
Animats
Is the purpose of this to make ad blocking harder? It's much harder to work on
an executable form than a declarative one like HTML/CSS.

Really, how many useful web pages need to execute much code? Games, sure.
Other than that, not so much. Is this trip really necessary? We just got rid
of Flash, after all.

(And, of course, it's basically Java, round 2. "Write once, debug
everywhere.")

------
estefan
"The team notes that the idea here is not to replace JavaScript, by the way,
but to allow many more languages to be compiled for the Web."

Yeah, good luck with that. Ta ta Javascript :-)

~~~
EugeneOZ
I hope Dart lang team will jump into this wagon as one of first users.

~~~
M8
Dart and TypeScript will be as irrelevant as JS. Why Dart if you can have
Go/Scala/F#/Haskell/Ruby/etc. compiled to WebAssembly?

~~~
sanxiyn
If. All languages you listed need GC, which won't be in the initial version of
WebAssembly. In other words, you won't be able to compile Ruby to WebAssembly
any time soon.

You will be able to compile _Ruby implementation_ to WebAssembly, but you can
already compile that to asm.js. That is different from compiling Ruby to
WebAssembly.

~~~
rplnt
Yes and no. You can have native VM for running WebAssembly's Ruby VM... Oh my
god, that sounds horrible as I wrote it.. but it can certainly be better than
asm.js.

------
EugeneOZ
Brendan Eich deserves big respect for his help with WebAssembly. Thank you!
And, of course, thanks to all involved.

WebAssembly also can be new JVM for desktop apps and widgets.

------
sharpercoder
Bob Nystrom argues [0] that a language VM has important advantages over a
bytecode VM. His primary argument is development iteration speed.

How does this compare to WebAssembly?

[0]: [https://www.dartlang.org/articles/why-not-
bytecode/](https://www.dartlang.org/articles/why-not-bytecode/)

~~~
sanxiyn
WebAssembly (and asm.js) is not really a "VM" as in JVM or .NET in that it
does not provide services they do, like GC and adaptive JIT. I think the best
description of WebAssembly is a reincarnation of p-code.

~~~
dtech
It is very much a VM, in that it executes generic bytecode. Furthermore the
Javascript engines of modern browsers (on which this proposal is based) do JIT
JS. Not having GC doesn't mean it's not a VM.

Quoting the wikipedia article of p-code:

> In computer programming, a p-code machine ... is a __virtual machine
> __designed to execute p-code

~~~
bryanlarsen
Wasm is not a bytecode. It is a binary AST.

------
bovermyer
This is very welcome news.

Don't get me wrong; I like JavaScript. It has its warts, and it can cause all
kinds of problems in the wrong hands, but both of those things are true of all
popular languages.

However, performance has always been a sore spot for the current JS-to-
machine-instruction process. Being able to write code that will execute faster
is important, regardless of the language that code was originally written in.

------
cdnsteve
Sigh, seriously all this front end stuff is becoming a PITA. Maybe it's just
me but I still find the web a mess today. Lately I've been feeling the app
stores sound more appealing than actual web development. JS this, 5 new
frameworks a week that, some byte code tech... All this change is making me
nauseous. Time to stick to the back-end I guess, maybe with a pinch of native
apps.

------
nickstefan12
Would it be wrong to interpret this as the possible end of browser focused
engineers?

It seems to me that consumers have spoken that they prefer native apps
(especially mobile ones) that they can quickly find on their phone's home
screen. Consumers are using desktop web apps less comparatively to native
mobile ones.

So rather than people making web apps and then trying to port them to native,
we're going to have a bunch of native apps that port to the web?

OR

... maybe web goes back to being the defacto standard if people start making
insane unity engine powered byte code based web apps that perform like
native..

------
yAnonymous
It will also make malware faster and more difficult to reverse engineer.

------
UserRights
security nightmares ahead - running random binaries from the web - but wet
dreams of privacy invaders of all sorts becoming real.

~~~
rockdoe
It will sit on top of the existing JavaScript engines and APIs, so no new
security issues there.

------
yeureka
Wow. If C/C++ code can run at near native speeds on most browsers, specially
mobile browsers, this could make a dent on app stores revenues, specially for
IAP based games.

~~~
moonchrome
You will still be using sandboxed DOM APIs (that adds both overhead and
restricted API access), you won't have access to app store stuff like in-app
purchases and your adds will be blocked by adblock that will be shipping
built-in to browsers.

------
dimitar
I wonder what the FSF might say about this development.

~~~
kenrick95
Yeah, since it is binary format, will the web start to serve closed-source JS-
like scripts?

~~~
andybak
There's nothing stopping people distributing closed-source obfuscated scripts
at the moment. There's not a massive difference between minified javascript
and decompiled asm.js.

~~~
jmickey
Am I the only one who thinks there actually is quite a difference between
minified & obfuscated javascript vs bytecode?

Minification & obfuscation can only do so much without changing the logic of
the script. Sure, spaces are removed, variable and function names make no
sense, but most of the logic is still there just as the developer intended.

If we look at compiled Java/C++/Any high level language code, how the
application logic is presented is _substantially_ different from the original
logic of the application. Making it so much harder to understand how the
application works.

~~~
flohofwoe
Not much of a difference if you're running your JS code through Googles
closure
([https://developers.google.com/closure/](https://developers.google.com/closure/)),
this basically does a complete re-compilation of your JS, removing dead code,
unused variables, and lots of other optimizations, and in the end spits out a
big ASCII blob that could just as well be byte code. It has nothing in common
with the original source code.

~~~
kuschku
And then you throw JSNice at it, give it to a college student, wait a weekend,
and have a nicely readable source version.

Source: Am college student, for fun I disassemble websites, including the
funny VM Google built for ReCaptcha.

Additionally, I wonder what the EU thinks about this, as anyone who has the
ability to use a software has the right to take it apart, inspect it, and
learn from it. This right can not be signed away with contracts (making the
"Do not decompile" clause invalid) and is violated by all these closed source
web projects.

Tbh, I should probably just decompile, deobfuscate and refactor the Google
Inbox client source, and publish it on GitHub over summer break, just to show
Google how useless and annoying their obfuscation is.

------
scrrr
This came up so quickly, nobody was able to create the WebAssembly page on
Wikipedia yet [1], it seems.

    
    
      [1] https://en.wikipedia.org/wiki/WebAssembly

------
no_gravity

        The WebAssembly team decided to go with a binary
        format because that code can be compressed even
        more than the standard JavaScript text files and
        because it’s much faster for the engine to decode
        the binary format
    

Are there real world examples of websites where the size of the JavaScript and
the time it needs to decode it make up a significant portion of the load time?

~~~
yenda
Gmail ? Google Docs ?

And it might also be the final blow on Flash.

~~~
jonlucc
Did flash need a final blow? I assumed it is still around in small pockets
because of projects that are abandoned and casual developers who don't intend
to learn a new set of tools.

~~~
bovermyer
It's more pervasive and hard-to-kill than you think. At least these days we
don't have project managers asking "can we add Flash?"

------
tinganho
I must say about DAMN TIME!

------
ssebastianj
I'm learning Rust and it would be nice to see a Rust powered kernel, just for
hack with it a learn a lot.

~~~
gbersac
This is the post I created to discuss this on reddit :
[https://www.reddit.com/r/rust/comments/3abgbo/webassembly_ru...](https://www.reddit.com/r/rust/comments/3abgbo/webassembly_rust_compile_to_web/)

------
geertj
Does this get us integers in Javascript?

~~~
pcwalton
Yes, because you already had them. (It uses the Emscripten tricks to use
integers in JS, which VMs readily understand at this point.)

It doesn't add Value Objects yet though—that's a separate proposal.

------
eklavya
Yay!!! Choices, choices, choices. The future is bright and full of
opportunities.

------
ahomescu1
Earlier discussion on this topic:
[https://news.ycombinator.com/item?id=9732827](https://news.ycombinator.com/item?id=9732827)

------
BerislavLopac
And how will this affect security and privacy on the Web?

~~~
creshal
Why would it? Bytecode is not substantially harder or easier to disassemble
and grok than minified and obfuscated JS.

------
UserRights
does already a plugin exist that blocks this crap?

------
tddfuckwitz
Does this eventually end up as yet another virtualization layer? How big and
bloated does the web stack become before we start again, with a lean protocol
and markup language for text documents?

~~~
slowmotiony
Let's ditch HTML/CSS for XAML! No more googling how to vertically align a
block in another block. I'm in 100%.

~~~
M8
That would be a dream.

------
nirajoza
[http://www.techzigg.com/2015/06/google-microsoft-apple-
and-m...](http://www.techzigg.com/2015/06/google-microsoft-apple-and-mozilla-
team.html)

