Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

151–160 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#151
post #85

Earlier quoted context omitted.

...really? From my perspective, it's a bunch of companies that are known only for operating within China (360 / Alibaba / Baidu / Tencent), two hardware companies best known for being Chinese (Huawei / Xiaomi), and one I've never heard of (agora.io). Over half of the testimonials are in Chinese. I'm curious too - was there really no non-Chinese company that would endorse this?

Well, apparently this was a real question. W3C members are visible here: https://www.w3.org/Consortium/Member/List Those are the members that decided that WebAssembly is now an official web standard, not the testimonials. I'm investigating more about the voting system here, https://www.w3.org/Consortium/Process/ERB.html .

The voting system is roughly: any paying member company can submit a "formal objection", which will be considered by W3C management ("on behalf of" Tim Berners-Lee). If upheld by management then the recommendation doesn't go forward. (This is very rare; I don't know of any instances off the top of my head.)

Re: WebAssembly becomes a W3C Recommendation

#152

Now if only we get a good web-oriented Python with a WASM backend, we'll finally be able to throw Javascript where it belongs: into the dustbin of history.

Python would be a bad choice for the web since it was not designed around events. JS was designed specifically to turn on top of a browser with an event loop to respond to events as they happen. Python would just make a slow non responsive browsing experience. Also WASM wasn't designed for "any languages goes" in mind, it was designed for lower level languages like C/Rust which have manual memory management to run high performance applications like games, and video editing tools etc.

Also as someone who uses Python regularly, Python is by no means a perfect language. I am assuming you only know Python since it's an attitude I often come across for devs who only develop in Python and believe it's the superior to every language in every way.

Re: WebAssembly becomes a W3C Recommendation

#153

Earlier quoted context omitted.

You raised a very valid point here. How much difference will be between a canvas-painted web-app and a native Windows application? The line woll get increasingly blurry.

The "web" app will have worse performance.

You mean for accessibility? Maybe but there shouldn't be any fundamental reason why an accessibility tool can read a windows app and not web app, since under the hood Chrome and Firefox can use the same interface this tool interfaces with.

If you meant performance in terms of runtime, I'm not convinced this is the case. Obviously WebAssembly will have some overhead, but I don't think the overhead is critical enough for most applications to matter. Especially if those applications are written in anything other than C/C++, they'll have similar performance characteristics.

Re: WebAssembly becomes a W3C Recommendation

#154
post #14

Earlier quoted context omitted.

WASM is angling to break out of the web and become a cross-platform runtime. Its main competition for this space is Java.

Without defining a standard set of abstractions around operating system resources it is pretty far from competitive with Java and more closely related to something like LLVM bitcode.

LLVM bitcode is not cross platform.

Re: WebAssembly becomes a W3C Recommendation

#155
post #88

Earlier quoted context omitted.

HTML isn't legacy cruft, it's an essential part of the web that will never go away. If you want to ship an app with no HTML, then use a different platform.

This is a generic argument that can be used against any sort of proposed improvement. “If you don’t like the status quo, use something else”. It also comes off as defensive; I’m not sure if that’s what you intended or not.

I don't think WASM is proposed as an improvement over either HTML or JS. It's proposed as an addition that fills out certain shortcomings for particular niches. WASM is not (currently) envisioned as the "new" way to write for the web, but as a handy capability to reach for if you need it.

Re: WebAssembly becomes a W3C Recommendation

#156
post #72
post #53

Earlier quoted context omitted.

I think I remember reading something on HN about some kind of tool for running WASM in some kind of kernel module to speed up app performance. EDIT: here it is: https://medium.com/wasmer/running-webassembly-on-the-kernel-...

I remember something like that being posted too; I think this is it? https://github.com/nebulet/nebulet

So cool!

Re: WebAssembly becomes a W3C Recommendation

#157

It's really uncanny how Gary Bernhardt predicted it all [0] a few years ago. [0] https://www.destroyallsoftware.com/talks/the-birth-and-death...

Seems like the obvious next step is using WebAssembly outside the browser so we can really go full-circle on this one EDIT: some quick googling shows it's already being done https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...

It isn't just done, it is productized. Both Cloudflare [1] and Fastly [2] have been marketing that they support WASM in their edge networks. Both companies seem to suggest that this is a competitive advantage they could have over other cloud offerings.

1. https://blog.cloudflare.com/webassembly-on-cloudflare-worker...

2. https://www.fastly.com/blog/announcing-lucet-fastly-native-w...

Re: WebAssembly becomes a W3C Recommendation

#158

Does anyone have any good success stories with WebAssembly in the actual context of using it on the web? That list of testimonials doesn't seem very inspiring as to whether or not the standard has seen actual production usage to justify being a recommended standard...

We currently use wasm on the Adobe XD team for rendering shared prototypes in the browser. It allows us to share C++ rendering code across desktop and web and has been a massive success for us.

The browser support is good enough for our customer base, as it works across all operating systems and mobile devices, and we can fall back for asm.js for IE11.

Re: WebAssembly becomes a W3C Recommendation

#159
post #41

I wonder if people think work involving web assembly will coalesce around a few languages over time?

I think "native" web-tech like JavaScript & HTML will still have a lot of momentum in it. WASM is about other languages getting access to browser as a delivery platform. I wonder if language JavaScript that was originally designed to run on the web should have a competitive edge here? The drawback of JavaScript has so far been its low execution speed, maybe WASM will make it run faster. In other words maybe WASM will…

It seems to me that, given the incredible number of person-years put into making Javascript fast, it's probably approaching its max speed of execution already without modifying the language itself. I'd expect the C/C++ interpreters are already using so many tricks to speed it up that remaining gains would be difficult without adding more information to the language itself (e.g. stricter typing) or modifying the way it works (fewer things represented as objects, more types of collections).

In short, I suspect the actual instructions executed when JS runs on a modern interpreter are already pretty damn close to what a fairly well-optimized JS-to-WASM compiler would provide. If you want more major gains I think you'd have to start looking at locking down (or at least providing the option to lock down, in performance-critical code) the ability of Javascript to do all kinds of wacky stuff at runtime.

Re: WebAssembly becomes a W3C Recommendation

#160

Earlier quoted context omitted.

Mostly I was just curious, although I could see one argument for it. HTML/DOM was meant to display interactive documents, which is far smaller in scope than what browsers are used for today. A lot of the web today (web applications in particular) are therefore hacks of HTML. I know that the standard has responded to these uses by incorporating more application-level features, but IMO this has become burdensome and bl…

> You could argue for an alternative to html/DOM - some kind of rendering format that is meant specifically for full-featured applications. Well, there are three ways to do that. You can use a 2D canvas, you can use a WebGL canvas, or you can use a bitmap canvas. This is roughly equivalent to what you get when you’re programming a desktop application anyway. This is a cornucopia of alternatives here! I’m having a har…

What is missing is a way for one's wasm code to make WebGL or 2D canvas calls (or even write directly into a bitmap canvas), without writing a bunch of Javascript trampoline / thunk / whatever code. If I'm mistaken, a pointer to some C / C++ / Rust code that compiles down to wasm that actually touches a canvas that's being displayed in the browser would be most appreciated.
Post reply on HN