News for hackers. Stuff that matters.
Re:WebAssembly: a binary format for the web by haberman on Sunday November 01, 2015 @05:42PM (#10488752)
Java applets were slow to load because fast loading was never made a priority. WebAssembly is prioritizing small size and fast loading.

Java Applets were completely isolated from the surrounding web page, and vice-versa. I tried writing XEyes as a Java Applet back in the day, but the eyeballs could only follow the cursor while the cursor was directly on top of the applet's rectangle. WebAssembly operates on the single unified DOM and its event model.

Because it uses the DOM, the text and widgets are real. The text is selectable, looks like regular text, etc. Java Applets had their own GUI/widgeting system that looked bad and behaved differently.

Re:WebAssembly: a binary format for the web by wbillingsley on Sunday November 01, 2015 @07:09PM (#10489138)
There was a JavaScript to Java bridge in most browsers -- you could simply write a JS event handler that called a public API in your applet.

Before XMLHttpRequest became reliable across browsers, a fairly common trick was to use a 1 pixel Java applet to do the asynchronous calls to the server, and then call back out to JavaScript to manipulate the DOM.

Java only "behaved differently" if you wanted your applet to paint a square of the screen. Which was more about the problem that browsers also didn't support SVG, so if you wanted an interactive diagram you had to isolate yourself from HTML.

Re:WebAssembly: a binary format for the web by asdfologist on Sunday November 01, 2015 @08:33PM (#10489416)
Why was this downvoted? I found this quite informative.
Re:WebAssembly: a binary format for the web by pippy on Sunday November 01, 2015 @08:41PM (#10489443)
The example in article had went from a GZIPed size of 4.1 MB to 3.0 MB. For the massive increase of obscurity the transferal optimization trade off isn't that great. But it's a double edged sword, I'd also wager obscurity would entice larger AAA game developers to start targeting web.
Re:WebAssembly: a binary format for the web by k3d3 on Sunday November 01, 2015 @10:14PM (#10489770)
It's not an increase in obscurity though: https://github.com/WebAssembly/design/blob/master/TextFormat...

The format is intentionally being built in a way that you can look at the source, in the same way you would look at minified Javascript currently.

If you're worried about obscurity, look at what is generated by asm.js. WebAssembly won't be any worse than that (and is, in fact, more or less a more efficient/correct equivalent to asm.js).

Re:WebAssembly: a binary format for the web by awqrre on Sunday November 01, 2015 @08:23PM (#10489381)
There is no reason to use a binary web format if your only concern is fast web loading...
Re:WebAssembly: a binary format for the web by azakai on Sunday November 01, 2015 @08:35PM (#10489425)
A binary format can help tremendously with fast web loading:

1. Code size can be significantly smaller, reducing download time (even with gzip; tests show a 30% win).

2. Parse times for a binary format can be much faster than for code as text, by a very large margin.

Re:WebAssembly: a binary format for the web by awqrre on Monday November 02, 2015 @03:16PM (#10494858)
not worth the jump from open to close... a large margin when most pages already load almost instantly will go unnoticed by most people.

I think that you would see a much bigger performance increase if websites would not load resources from 10 different domains for serving a single web page (you have a much higher chance of getting some unforeseen delay from one of those hosts).

Re:WebAssembly: a binary format for the web by hackcasual on Sunday November 01, 2015 @08:43PM (#10489447)
Parse time is basically free with WebAssembly