Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

101–110 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#101
post #78
post #56

Earlier quoted context omitted.

I think it would still be possible to implement Scheme with the current specification, which is on my snowy weekends to do list for the upcoming Winter. How far I would get before losing interest or facing those issues, I don't know.

It's possible , yes, but it isn't possible to do particularly efficiently. If you want separate compilation, it gets even worse. (Separate compilation is where proper tail calls come in very handy.)

Ah you got a point there, forgot about separate compilation.

Re: WebAssembly support now shipping in all major browsers

#102
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…

We're still a long ways off from garbage-collected languages inside wasm.

That said, it's not the technology's fault that people abuse or otherwise make poor use of it. I see no point in limiting it on that basis.

Re: WebAssembly support now shipping in all major browsers

#103
post #6

Earlier quoted context omitted.

In order to port other languages (Haskell, Go, Python) to target WASM, we definitely need the possibility of writing a GC in WASM. But to build an efficient GC, we need multithreading and synchronization/memory barrier primitives.

You can already compile your language's runtime to wasm; this includes the GC. The downsides is that now you're adding all that to your binary size. "GC support" means being able to integrate with JS's GC, basically, so that your language's wasm runtime could use it instead of your own, saving bytes.

Saving bytes and improving interop, I imagine.

Re: WebAssembly support now shipping in all major browsers

#104
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…

I'd like to interject for a moment here, and pitch my idea about what I call the "Web 4.0". It's basically a binary equivalent of HTML, without the many inconveniences of HTML for content providers.

Web 4.0 pages are obfuscated WebAssembly payloads, that draw their contents via WebGL. This way, adblocking becomes impossible, as the actual content and ads are within the same opaque WebGL framebuffer. Stealing copyrighted text is also made significantly harder, beause the Web 4.0 platform leaves it up to the publisher to enable glyph selection and copying. You have concerns about accessibility? Web 4.0 is 100% accessible thanks WebAudio based realtime speech synthesis!

Re: WebAssembly support now shipping in all major browsers

#105
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…

I'd like to interject for a moment here, and pitch my idea about what I call the "Web 4.0". It's basically a binary equivalent of HTML, without the many inconveniences of HTML for content providers. Web 4.0 pages are obfuscated WebAssembly payloads, that draw their contents via WebGL. This way, adblocking becomes impossible, as the actual content and ads are within the same opaque WebGL framebuffer. Stealing copyrigh…

it'll also be harder to learn how things work... i wonder how much we've learned from reverse engineering the easy to read inline script tags... I definitely remember teaching myself JavaScript by reading blizzard.com's late 90s markup... figuring out that mouse over effect with onmouseover and onmouseout... works in ie4... but whats that strange bug in netscape 4..

Re: WebAssembly support now shipping in all major browsers

#106

Can't wait for DOM interop and get away from JS on frontend. Seriously JS should not be the lingua franca of the web :)

>> Seriously JS should not be the lingua franca of the web But neither should this. Really, keep your code off my computer as much as possible.

So, fell free to lock both JS and WebASM on it.

Re: WebAssembly support now shipping in all major browsers

#107
post #34

A good occasion to watch Gary Bernhardt's talk "The Birth & Death of JavaScript" [0] again, where he talks about the precursor of WebAssembly: asm.js and the future implication it "could" have in the future in a really humorous way. A few years old but still relevant. You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure. [0] https://www.destroyallsoftware.com/talks/the-birth-and…

Or how about a live coding environment for a Atari VCS (1200) emulator ;)

http://8bitworkshop.com/?platform=vcs&file=examples%2Fhello

Re: WebAssembly support now shipping in all major browsers

#108

Can't wait for DOM interop and get away from JS on frontend. Seriously JS should not be the lingua franca of the web :)

For now, couldn't someone build a jswasm bridge so that you could have DOM access? This[1] seems to suggest it's possible

[1] https://github.com/WebAssembly/design/issues/126

Re: WebAssembly support now shipping in all major browsers

#109
post #44

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…

99%+ of people don't think like you and don't care about the distinction between code on the browser and code on the OS. "A red herring is something that misleads or distracts from a relevant or important issue. It may be either a logical fallacy or a literary device that leads readers or audiences towards a false conclusion." I don't see how my comment is a red herring. Computers are for running code. That's what th…

Computers are for running code as much as cars are for consuming fuel. They both need them to function in the manner that we currently use them, but that's not what they are for.

Both computers and cars exist to perform tasks that enable humans to do other things. It's possible to have a useful car that does not consume fuel and it's possible to have a useful computer that runs no code (hint: hardware's not just for mounting those pretty lights in your computer case).

Re: WebAssembly support now shipping in all major browsers

#110
post #96

Earlier quoted context omitted.

> 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).

So we're both agreed then that the goal isn't to "use less code"? I get your point though, so I'll rephrase:

> The goal should be to try harder to use less code

Why is this the goal? At best it's a performance optimisation that some (probably most) sites could use to speed up time to render. But at the same time, there are many other sites where this doesn't make sense or for which the purpose isn't the traditional document based web that is sped up by removing JS. Why should sites that actually benefit from something like WebAssembly be limited just because other sites will use it and (continue to) be slow bug ridden monsters?

Post reply on HN