Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

171–180 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#171

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

Probably the most prominent use of WASM at scale is cryptocoin mining. Coinhive estimated it run at 65% performance of native code.

https://www.forcepoint.com/blog/x-labs/browser-mining-coinhi...

Re: WebAssembly becomes a W3C Recommendation

#172
post #95

Earlier quoted context omitted.

Good questions. WASM at this point seems more a locus of JS hate than anything practical. To create something cool, novel, and useful should be the goal, not avoid or use a certain language.

WASM isn’t very practical yet because it isn’t fully formed. There isn’t support for DOM access or parallelism, never mind the ecosystem. It’s a really ambitious project, and writing it off as “locus of JS hate” because it hasn’t completely changed the game in such a short time frame is really short sighted. It would be a fairer test to give it 5 years.

I'm not writing it off. I think it's a good idea to bring more options to the web. I tried it last year, but as you state and I agree, it's not ready yet.

In my experience in SF I encounter many never-JSers. Being a JS fan, for certain things, I don't get the hate. So maybe I feel threatened in a way, but I'm not going around wishing for the death of python or Haskell. That's all. I am reading random internet commenters and getting slightly upset. That's on me.

Re: WebAssembly becomes a W3C Recommendation

#173
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?

I think they wait for 3 independent implementations to be available before making it a standard.

Re: WebAssembly becomes a W3C Recommendation

#174

Earlier quoted context omitted.

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 bl…

It seems probable to me that some actual application GUI toolkits will target WASM+Canvas and finally give us good-looking, capable, better-performing, easy-to-work-with GUI application development in the browser, yes.

HTML's pretty bad at the use case it's been smushed into, and hacking a semi-reasonable GUI toolkit on top of it in Javascript is bound, no matter how good the effort, to be slower and less pleasant than something designed from the beginning to be used for heavily interactive application GUIs.

The two big risks I see are: 1) the tinkerer-friendliness of the Web is, very likely, going to take a big step backwards as WASM use spreads, and 2) there's a chance we'll end up with 100 different WASM GUI toolkits and they'll be super-trendy and all the job ads will demand familiarity with at least one of them, but not a single goddamn one of them will handle accessibility and various edge cases half as well as plain HTML or actual native development does (to be fair, Javascript that writes around limitations in HTML by re-implementing parts of it often has the same problem)

Re: WebAssembly becomes a W3C Recommendation

#175
post #123

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

I use it in a web worker to compile, assemble, and link C programs into 8-bit ROMs: https://8bitworkshop.com/ I was using asm.js in the past, but WASM gives a noticeable and necessary performance boost.

That looks awesome! I noticed that you don't have Game Boy on there, not sure if it's useful to you but I started to make a WebAssembly port of GBDK: https://github.com/chrismaltby/gbdk-emscripten which I was planning to use in my Game Boy game maker eventually https://www.gbstudio.dev/

Re: WebAssembly becomes a W3C Recommendation

#176

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

I've been developing a WebAssembly image processing library, and its performance has greatly surpassed JavaScript's, allowing for much faster and more performant image processing on the web.

I'm excited to see how I can improve upon it in the future, and make it even faster! It's on GitHub here, any feature requests or suggested improvements would be greatly appreciated too: https://github.com/silvia-odwyer/photon

Re: WebAssembly becomes a W3C Recommendation

#177
post #142

Earlier quoted context omitted.

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…

Absolutely, have a look at that: https://assemblyscript.org

Cool. And Types too!

Re: WebAssembly becomes a W3C Recommendation

#178

Earlier quoted context omitted.

In Markdown you can generally produce a single block quote with paragraph breaks by including quoted empty lines: > Paragraph 1 > > Paragraph 2 Whereas you'd get two sequential quote blocks by using an unquoted empty line: > Quote 1 > Quote 2

That doesn't work here > because if you have multiple lines not separated by an empty line, > > even with a "quoted" extra line, it's not formatted on hn as such, and everything collapses into a single line.

Well, yeah, why would it?

You can't get quote blocks here either.

Re: WebAssembly becomes a W3C Recommendation

#179
post #106

Earlier quoted context omitted.

LLVM kinda proved having a common target back-end doesn't kill language diversity, it actually achieves the opposite.

I wonder if web development were to shift dramatically... would it go to largely one or a few languages?

There are always few languages that dominate a niche.

I imagine binary size would be a concern for web development, what is a negative for complex runtimes... But then, if I carefully set the compiler to trim dead code, my Haskell email server is smaller than any modern JS framework (still larger than a new version Jquery), so the runtime may not actually make much of a difference.

Re: WebAssembly becomes a W3C Recommendation

#180
post #25

Earlier quoted context omitted.

And then if all web apps move to a canvas-painted UI with all the code in web assembly then there will be a major accessibility problem. Unless screen readers can now dive down into the canvas layer?

A very valid concern. I wonder if it would be easier at this point to have screenreaders work visually rather than trying to dive into the source to grab the text. Text recognition is getting pretty good nowadays afterall.

This seems like a really hard problem to me. I actually wish image formats like PNG could have annotations inside them saying "there a is 45px tall 34px wide letter 'a' at position ..." which would be automatically generated by image editing software and screenshot apps. It would make it possible to select text inside an image and allow screen readers to work better.
Post reply on HN