Live data from Hacker News

Bringing the web up to speed with WebAssembly

blog.acolyer.org

51–60 of 172 posts

Re: Bringing the web up to speed with WebAssembly

#51

This is probably hand-waving but : instead of implementing threads directly into the WebAssembly language, would it make sense to compile a known micro-kernel to WebAssembly and then compile the C standard library (which, IIRC, implements threads)?

Yes. Let's combine the renowned safety of the C standard library with the speed and efficiency of a web browser!

Re: Bringing the web up to speed with WebAssembly

#52
post #5

WebAssembly is really going to bring some awesome fast processing for binary heavy tasks, like video and gaming, to the web. Essentially, WebAssembly is the new Flash, but it is an open standard, more secure, and language agnostic. Despite this I really get the impression a lot of non-JavaScript developers are really hoping this is some holy grail to allow them to write in their favorite language for the web platform…

> Essentially, WebAssembly is the new Flash, but it is an open standard, more secure, and language agnostic. I disagree. Flash could draw things without interacting with DOM thorough JS. Also Flash had sophisticated IDE. WebAssembly is just asm.js+ with a strong aim to compile C/C++ for the web, so you don't need to rewrite anything.

WebAssembly is a compilation target (like JVM Bytecode). You need an IDE for the source language, not the target.

Re: Bringing the web up to speed with WebAssembly

#53

WebAssembly is really going to bring some awesome fast processing for binary heavy tasks, like video and gaming, to the web. Essentially, WebAssembly is the new Flash, but it is an open standard, more secure, and language agnostic. Despite this I really get the impression a lot of non-JavaScript developers are really hoping this is some holy grail to allow them to write in their favorite language for the web platform…

Well anything that lets me run Lua in the browser[1] is cool by me ;). But yeah, interop is something that you can't just hand-wave away. It needs to be done carefully and with the right semantics and performance. That said I think we well get there and for a certain limited use cases it's already there. [1] https://github.com/vvanders/wasm_lua

Oh man, with Lua in the browser, I'd actually start to write web stuff again. And we could get a really nice fast port of Love2D running!

Re: Bringing the web up to speed with WebAssembly

#54
post #47

WebAssembly is really going to bring some awesome fast processing for binary heavy tasks, like video and gaming, to the web. Essentially, WebAssembly is the new Flash, but it is an open standard, more secure, and language agnostic. Despite this I really get the impression a lot of non-JavaScript developers are really hoping this is some holy grail to allow them to write in their favorite language for the web platform…

> more secure Is it? How do we know? The attack surface in browsers is huge.

A few ways that come to mind:

1. WebAssembly has almost no APIs to the platforms whereas Flash had a bunch (i.e. it's "as safe as JavaScript, because it can only call JavaScript"). 2. The code is all new, as opposed to what I hear is a hard-to-maintain older codebase which wasn't designed with security in mind. 3. It's very static in that memory accesses are pretty easy to bounds check for the compiler.

Implementation-wise there's plenty of interesting things that can be done to tighten security of WebAssembly.

Re: Bringing the web up to speed with WebAssembly

#56

Earlier quoted context omitted.

I hope not as HTML has accessibility built in while canvas doesn’t. No need to take a step backwards on this. I’m okay with rendering to canvas but long as accessibility is taken into account. (Hint: most of the time it is not.)

I've said the same, but you just know somebody comes along and says "If we render our entire site into a it'll make ad blocking more difficult," and then poof there goes the last 20 years of work on accessibility.

Good luck for that site getting indexed by Google ;)

Re: Bringing the web up to speed with WebAssembly

#57

WASM has the potential to change the world... a thought: while WASM will initially appear in compute-intense functions in web apps, it has the potential to be a true "Common Language Runtime". It may become the future platform that native, dekstop apps run on. This could be a good thing, if done correctly: 1. Desktop apps have a common, safe runtime upon which they run, and the packages can be easily distributed (and…

My first thought reading the specification was '6 months before there's silicon that runs the bytecode directly.'

Re: Bringing the web up to speed with WebAssembly

#58

WASM has the potential to change the world... a thought: while WASM will initially appear in compute-intense functions in web apps, it has the potential to be a true "Common Language Runtime". It may become the future platform that native, dekstop apps run on. This could be a good thing, if done correctly: 1. Desktop apps have a common, safe runtime upon which they run, and the packages can be easily distributed (and…

We had that in the 90s. We called it Java.

Java never had, or tried to have, binary portability.

Re: Bringing the web up to speed with WebAssembly

#59
post #48

I suspect that the use cases for WebAssembly will be something like this: - - 60% ad and tracking obfuscation - 20% annoying scrolling and transitions - 10% hostile code

It's frustrating to watch because it feels like we've learned nothing from the past 10+ years of web development.

Re: Bringing the web up to speed with WebAssembly

#60
post #30

I was a bit skeptical of WebAssembly when it started popping up, but reading through this and the MDN docs has made me get a bit more excited. In a few years WebAssembly might make for a great environment to learn about lower level programming. I've always loved assembly, since it gives you the bare minimum of concepts and tooling from which you can build everything. What's the reasonable thing to do when a grow-memo…

> I've always loved assembly, since it gives you the bare minimum of concepts and tooling from which you can build everything. Well... modern assembly is monstrously complex. Probably more so than your favorite high level programming language. Modern assembly is generally not a bare minimum, because it's designed to give compilers the interface to run code fast, not to be easy to program by people. And WebAssembly is…

It sounds like you're assuming they were talking about x86 when they didn't actually specify...
Post reply on HN