Live data from Hacker News

WebAssembly support now shipping in all major browsers

blog.mozilla.org

291–300 of 346 posts

Re: WebAssembly support now shipping in all major browsers

#291

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

Currently DOM interop is a distant wishlist, so I wouldn't hold my breath. JavaScript isn't a perfect language, but it does have native lexical scope, which makes it a good fit for the architecture of web technologies. > Seriously JS should not be the lingua franca of the web What would you recommend for a replacement? When I typically see this it is from people can't figure out JavaScript as opposed to any rational…

If you have the ability to compile to WASM, and a little glue in the form of an isomorphic application framework (something to glue together server-side with client-side processes), I'd say it's quite a compelling alternative to JS.

If you look at all the large Javascript frameworks, the increase in hardcore software engineering approaches taken to the front-end are an interesting signal. We have MVC in the front-end, we have MVC in the backend. Why have two MVCs if you can write an isomorphic application and have one?

I'm thinking, for example, something like this... write C#, use a framework (fictional "Isomorph#") that can determine whether code should run on the client or server, and if you have interfaces to UI, you have the full solution. C# (client/server) + WASM/JS + remoting/web services + HTML/CSS/SVG/etc UI = real "apps".

And that could just as easily have been Python (client/server) + WASM/JS and the rest of the stack, or Go + WASM/JS.. etc. etc. I was shocked when I learned of Skulpt.org, which is a python interpreter running in the browser - so we can't be far off from the same thing running on WebAssembly.

Re: WebAssembly support now shipping in all major browsers

#292
post #267

Earlier quoted context omitted.

Implement a WASM JIT in kernelspace & you don't have to have a userspace while still having hot code hopefully optimized to remove bounds checking. Now all your programs are WASM modules & we can replace your CPU with some random architecture that doesn't have to care about supporting more than ring0. Oh why not implement a nearly-WASM CPU? Probably just change branches to GOTO. Now the only program people care about…

There’s prior art for this too, Microsoft started a research project called Singularity that was essentially a kernel that only executed .NET bytecode, and had similar advantages (everything in ring0, no syscall overhead, etc.) It died pretty unceremoniously though.

We had Joe Duffey talk about it at RustConf this year! https://www.youtube.com/watch?v=CuD7SCqHB7k

Re: WebAssembly support now shipping in all major browsers

#293

Earlier quoted context omitted.

Could be a new source of undefined behavior and memory exploits, if threaded code is allowed to access collections that allocate memory without taking all the locks they should?

Inside the VM, yes. But not a security threat for the host. The VM should be sandboxing the pages from each other, so those are potential security threats against targets on the same pages only. Not something to be too concerned about.

Help me understand: What's the difference between that and process separation?

Re: WebAssembly support now shipping in all major browsers

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

>You want Gimp for Windows running in Firefox for Linux running in Chrome for Mac? Yeah sure.

I actually do. I want all code ever written and every environment it was ever written for to have a URL that will let me run it in the browser. Everyone else seems to want the web to go back to being whitepapers but I want actual cyberspace already!

Re: WebAssembly support now shipping in all major browsers

#296

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

> get away from JS on frontend Yes, it's just about time for another generation to be old enough to think that we need to rewrite everything in a new language.

But now we get to rewrite everything in every language. Everybody wins!

Re: WebAssembly support now shipping in all major browsers

#297
post #54
post #36

Earlier quoted context omitted.

> I don’t think there is a single web site with human readable javascript on the web anymore. Meaningless hyperbole - there are plenty. You're posting on one right now.

Sorry, I forgot Hacker News, the representative of modern web development practices.

Ok fair enough.

Hacker News and at least every Wordpress site. So that covers a significant portion of the existing web.

Re: WebAssembly support now shipping in all major browsers

#298

Earlier quoted context omitted.

wasm files are already a binary format, an explicit Uint8Array should only only necessary if you want to inline the wasm directly with the JS that instantiates it.

Right, I thought it was odd; I remember reading that part of the big benefit of WASM was more compact, faster-to-parse source code. Going all the way up to text form and back down to binary data is at odds with that. > an explicit Uint8Array should only only necessary if you want to inline the wasm directly with the JS that instantiates it. Are there any realistic scenarios where this is the more sensible option? Any…

I suppose you could avoid having the extra request roundtrip by inlining a uint8array (or a base64 encoded string or something), and it also lets you have wasm and it's associated JS be put together which would automatically avoid cache/version mismatch without any extra work, but I would be surprised if that makes sense in any normal scenario.

Re: WebAssembly support now shipping in all major browsers

#299

Earlier quoted context omitted.

and js. eventually!

JS is a language and not a bytecode media. Perhaps chocolate will replace cars and airplanes. I love me some chocolate.

I love it when computer nerds get so convinced ephemeral things are exactly that which they claim

Re: WebAssembly support now shipping in all major browsers

#300
post #39

Earlier quoted context omitted.

Expect every language out there to have a WebAssembly implementation, including Flash.

Is there really demand for the resurgence of Flash? In its final years it was used to provide capabilities that the browser couldn't, like video playback. Web Assembly will not provide that same advantage.

Archival purposes of old flash videos? It would be sad if it would become impossible to watch those old pieces of Internet culture unless someone had exported them to an mp4 video file.

Same with games, for which there isn't even an alternative format to save them in.

Post reply on HN