Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

91–100 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#91
Great. We will soon have an entire JVM running inside each browser's tab, just to run an animated slider. Maybe even more than one. Plus a .NET VM, several Python and Ruby interpreters, and so on.

Because webmasters will keep loading ready-made plugins from CDNs, exactly like they are doing now, except that the new generation of web software will carry their own interpreter or runtime with them, because the developer wanted to use Python or whatever.

The web is getting better by the day.

Re: WebAssembly support now shipping in all major browsers

#92
post #45

Earlier quoted context omitted.

Is this relevant what the people are aware of? If you drive a car do you need to be aware of its internals? WebAssembly looks like a safe, portable, intermediate bytecode. What's wrong with giving people more options (e.g. running native applications in their browsers)?

> If you drive a car do you need to be aware of its internals? You walked yourself into an obvious answer there: yes, to a limited extent you do. That includes understanding a bare minimum about tires, the engine (what noises are normal, what noises aren't normal), oil changing (why, when), windshield washer fluid, basic indications of electric problems, basics about the need to change brakes (indications of brakes g…

Most drivers don't concern themselves with the alloy composition of their catalysator or the exact air-to-fuel ratio in their cylinder headers or the necessary pressure in the breakheads during an emergency halt.

Or the composition of the road below them in exact ratios of chemical components.

Re: WebAssembly support now shipping in all major browsers

#93
post #41

Earlier quoted context omitted.

Until wasm supports proper tail calls, only the ones with uninteresting control structures.

There is a proposal, though it's taken some work due to ABI issues. My understanding is that it's fairly close though.

I'm really looking forward to it.

For others who are curious about it, here it is: https://github.com/WebAssembly/tail-call/blob/master/proposa...

Re: WebAssembly support now shipping in all major browsers

#94
post #90
post #75

Earlier quoted context omitted.

WASM is used to run native code in the Web browser without going through JavaScript. With it, it should be possible to run code at near-native performance in the browser. WASM is an intermediate representation which is output by your compiler (of your favorite language) and consumed by the browser's compiler to emit native code. WASM is a bit similar to LLVM IR, but it's architecture independent. Compare this to, say…

But is this how it is implemented by actual browsers? if memory serves v8 is pretty much reusing most of JS VM for WASM?

Yes, the browsers do share parts of their JavaScript execution engine with WASM. Which makes sense because WASM still needs to interact with JS. That doesn't mean it can't be fast or start quickly (or at least quicker than asm.js).

From the developer's point of view that doesn't matter. You're delivering WASM and not C or JS code over to the clients.

Re: WebAssembly support now shipping in all major browsers

#95
post #20

Earlier quoted context omitted.

But what is a computer for if not running other people's code? I can't imagine there are many people in this world who have a computer with more than even 1% their own code running on it.

Red herring. People install or explicitly download code they want to run. The general public doesn't even realize that most web pages are full of code (js not html) and most developers have gotten so used to it they feel entitled. The goal should be to try harder to use less code, not enable native execution. I understand, engineers like to think about what is possible (wouldn't it be cool if..!) but sometime they ne…

> "Red herring. People install or explicitly download code they want to run."

When you visit a website, and you have given your browser permission to run JS, you're giving your permission to run JS. If you want to block scripts by default, use an extension like uMatrix:

https://addons.mozilla.org/en-GB/firefox/addon/umatrix/

Re: WebAssembly support now shipping in all major browsers

#96

Earlier quoted context omitted.

Red herring. People install or explicitly download code they want to run. The general public doesn't even realize that most web pages are full of code (js not html) and most developers have gotten so used to it they feel entitled. The goal should be to try harder to use less code, not enable native execution. I understand, engineers like to think about what is possible (wouldn't it be cool if..!) but sometime they ne…

> The goal should be to try harder to use less code The goal is to deliver content and experiences that people actually want, it has nothing to do with the amount of code at all. At best, using less code might be a performance optimisation (though not always).

>The goal is to deliver content and experiences that people actually want

Wrong. 99% of the time the goal is to sell ads. The tricky stuff is to bundle it with something that people actually want (or think they want).

Re: WebAssembly support now shipping in all major browsers

#97

For those in the know, what doors is web assembly expected to open? Better cross platform platforms via a browser wrap? Will new types of browser applications be possible that aren't now in JS only world? What are they?

Most exciting for me is really that this opens up the web for true cross-platform development. The same code runs natively on iOS, Android, Raspi, Linux, Windows, Mac etc with the smallest possible footprint and highest performance, and at the same time I can take the exactly same code (minus a few hundred lines platform-specific stuff) and have it run in the browser at near-native speed, without installation, code-signing, walled-garden app stores, 'smart-screen' scare dialogs, etc...

You just compile, upload and share the URL. Like in the old days ;)

Re: WebAssembly support now shipping in all major browsers

#98
post #91

Great. We will soon have an entire JVM running inside each browser's tab, just to run an animated slider. Maybe even more than one. Plus a .NET VM, several Python and Ruby interpreters, and so on. Because webmasters will keep loading ready-made plugins from CDNs, exactly like they are doing now, except that the new generation of web software will carry their own interpreter or runtime with them, because the developer…

Then there should be a huge market opportunity to provide identical services at far smaller and faster downloads.

Re: WebAssembly support now shipping in all major browsers

#99

Unfortunately SIMD is still not supported on any browsers and with the move away from SIMD.js it looks like this might take a while. We've been working on porting over our fairly large barcode scanner library to WebAssembly. While the performance is close to what we have on other platforms ( http://websdk.scandit.com ), the major bottleneck for now is not being able to use optimized code relying on SIMD (and not havi…

My understanding is that SIMD support has a proposal that most people are happy with, and will be landing in 2018.

Right now there are SIMD prototypes in 3 engines (SpiderMonkey, ChakraCore, and V8) and the remaining work is standardization between them, tool support, and performance tuning. There will be an official SIMD proposal for WASM in 2018 and it should move through the standardization process pretty quickly.

Re: WebAssembly support now shipping in all major browsers

#100
post #91

Great. We will soon have an entire JVM running inside each browser's tab, just to run an animated slider. Maybe even more than one. Plus a .NET VM, several Python and Ruby interpreters, and so on. Because webmasters will keep loading ready-made plugins from CDNs, exactly like they are doing now, except that the new generation of web software will carry their own interpreter or runtime with them, because the developer…

wasm is modular, so in theory, you could produce a jvm9.wasm file, put it on a CDN with caching, and every site that wanted to do that could share it, and you'd only download it once.

I do agree that runtime-less languages have an advantage here though.

Post reply on HN