Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

31–40 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#31

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.

More work to be done, but Mozilla DID get Jupyter Notebook to run on the web with WASM.

https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scien...

Re: WebAssembly becomes a W3C Recommendation

#32
post #10

Is this the same case as with HTML5 that W3C takes what WHATWG creates, stamps their "approval" and then it's the W3C that "brings new language to the Web"? Could someone in the know shed some light in this matter?

It looks like w3c is just late with the announcement. From https://webassembly.org : --- quote --- Developer reference documentation for Wasm can be found on MDN's WebAssembly pages. The open standards for WebAssembly are developed in a W3C Community Group (that includes representatives from all major browsers) as well as a W3C Working Group. --- end quote ---

Off-topic, but I wish Markdown had a proper "multi line" block quote syntax like this. The current standard of ">" is open to too much interpretation around paragraph breaks. Similar to how fenced code blocks with ``` are a major improvement over prefixing the line with 4 spaces.

Re: WebAssembly becomes a W3C Recommendation

#33
post #11

Earlier quoted context omitted.

It would be hard (maybe not impossible) to access the DOM in WA without a GC making sure everything is sound, because the DOM and JS (meaning the GC) are very coupled. Currently, JS is used as a mediator between the two - so you do need some JS (but it could well be JS that you never have to write yourself). I recall one of the spec authors saying in an HN thread that a GC would be added eventually, back in the infan…

I'm a web dev and I don't know much about WASM. I've been wondering - will it be possible to render something to the screen without first going through the DOM? Or is the DOM literally the only way to display content? It's enticing to imagine being able to open a wasm file and seeing an application on the page. Kinda like how you can just open an image or a video in the browser, without rendering it via an html docum…

You can take a Canvas element and draw anything you like on it - even hardware accelerated 3d using webGL. I think there are some projects trying to (re) implement a 2d user interface, rendered onto canvas. However the issue id that you will need to reimplement a lot of things the browser already does for you: rendering text, scaling, zoom, input methods, highlighting text, accessibility features, etc... Unless you use case is very different from normal browser usage (e.g. 3d graphics) the advantages seem dubious to me.

Re: WebAssembly becomes a W3C Recommendation

#34
post #11

Earlier quoted context omitted.

It would be hard (maybe not impossible) to access the DOM in WA without a GC making sure everything is sound, because the DOM and JS (meaning the GC) are very coupled. Currently, JS is used as a mediator between the two - so you do need some JS (but it could well be JS that you never have to write yourself). I recall one of the spec authors saying in an HN thread that a GC would be added eventually, back in the infan…

> because the DOM and JS (meaning the GC) are very coupled. This wasn't the intention when the script tag was introduced. It's interesting that the web standardized on one programming language.

It's interesting that the web standardized on one programming language.

In hindsight I feel like this isn't surprising. How many platforms (that aren't themselves operating systems) support scripting in more than one language? Vim/Neovim is the only one I can think of off the top of my head.

Re: WebAssembly becomes a W3C Recommendation

#35
post #24
post #2

Why does the testimonial contains only Chinese company? I think it's really great but it would be better to have company from all around the world

I'm not from China, from my perspective, those companies are from around the world.

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

Re: WebAssembly becomes a W3C Recommendation

#36
post #4

Is it safe to say, future frameworks/websites can choose to stick to HTML/CSS/WA and completely bypass JS?

Wsam has similar ideas like flash and silverlight but its more powerful and more open. At this point I think wsam and JS has their own place...will have to see how this plays out.

Re: WebAssembly becomes a W3C Recommendation

#37

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

Repeating what I wrote here [1], Fabrice Bellard wrote JSLinux in 2011, which is a CPU emulator written in JavaScript that runs the Linux kernel (using typed arrays and relying on fast JITs).

That's just a way of saying that "the best way to predict the future is to invent it" (and do so before people who were "predicting" it).

If you knew about asm.js and Google's (now abandoned) Nacl and PNacl, there's nothing surprising about the development of wasm. It's been 10+ years in the making.

And 20+ years ago Microsoft's browser had ActiveX plugins (which didn't use a VM and were really unsafe and unportable). Making a portable, sandboxed bytecode solves an obvious problem with that.

Also the JVM ran in the browser, etc.

[1] https://news.ycombinator.com/item?id=21618323

Re: WebAssembly becomes a W3C Recommendation

#39

Earlier quoted context omitted.

I'm a web dev and I don't know much about WASM. I've been wondering - will it be possible to render something to the screen without first going through the DOM? Or is the DOM literally the only way to display content? It's enticing to imagine being able to open a wasm file and seeing an application on the page. Kinda like how you can just open an image or a video in the browser, without rendering it via an html docum…

You can take a Canvas element and draw anything you like on it - even hardware accelerated 3d using webGL. I think there are some projects trying to (re) implement a 2d user interface, rendered onto canvas. However the issue id that you will need to reimplement a lot of things the browser already does for you: rendering text, scaling, zoom, input methods, highlighting text, accessibility features, etc... Unless you u…

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

There are lots of issues coming from the fact that we're attempting to write application-level code on top of a platform that has historically been designed for documents.

You could argue for an alternative to html/DOM - some kind of rendering format that is meant specifically for full-featured applications.

Post reply on HN