Live data from Hacker News

WebAssembly becomes a W3C Recommendation

w3.org

241–248 of 248 posts

Re: WebAssembly becomes a W3C Recommendation

#241

Earlier quoted context omitted.

As in, JS development for browser? You'll still need JS to run WebAssembly in the browser. It'll bury JS in the sense that you are able to develop in any other language like C++, and compile your program to JS+WebAssembly, so you don't need to develop in JS anymore. But JS itself (under the hood) is probably to stay for longer.

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?

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

I know nothing about webm beyond the idea that it's supposed to help developers write code in non-Javescript languages which can then be run in a web page via a canvas element. If my scant understanding is correct, then I assume it will be up to those developers to include code (or relevant libraries in each language) that will make the canvas element act responsively, and handle issues like accessibility, user interaction, tracking etc to give the best user experience?

My view is that current Javascript libraries that target the canvas element have largely failed to address canvas-related issues such as accessibility in a decent way - which doesn't give me much hope that future webm libraries which could be used to build user interfaces will do any better ... unless there's strong pressure to make accessibility a core goal for such libraries.

There's no good reason not to include accessibility (and user interaction, tracking etc) into any library - including JS libraries - that target the canvas element. Part of the reason for me recoding my own JS canvas library was to address exactly these issues (results of my work here[1]), and if I can manage to solve a lot of the issues then there's no reason why others library maintainers couldn't do a much better job of it than I did!

[1] - http://scrawl-v8-progress-0919.rikworks.co.uk/

Re: WebAssembly becomes a W3C Recommendation

#242
post #210

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

Not sure if this is what you’re looking for but I’m using it to embed SQLite in an app that’s both desktop (electron) and web-kinda-sorta. I say kinda-sorta because really what we’re doing is embed SQLite (and other dependencies) in an html page so our users can just open it straight up in a browser without having to be online or connected to any other systems, and still able to work (albeit read only for now.) The d…

I never thought of replacing WebSQL like that. Cooool.

Pretty sure Electron provides IndexedDB though.

(Ref: https://nolanlawson.com/2015/09/29/indexeddb-websql-localsto..., vaguely https://nolanlawson.github.io/offlinefirst-2016-03/)

Re: WebAssembly becomes a W3C Recommendation

#243

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 work for Tableau, we've been using it for over a year to handle local map interactions, and soon it'll be powering our animation system on the web.

Is there anywhere I can see this animation system in action?

Re: WebAssembly becomes a W3C Recommendation

#244
post #219

Earlier quoted context omitted.

Emscripten has been able to compile to WASM since before WASM was implemented in browsers. It became the default output earlier this year.

Some more detail: Emscripten has defaulted to emit wasm even earlier, in May 2018. The change this year was to switch how that wasm is emitted, from the old fastcomp+asm2wasm path to the new LLVM wasm backend.

I was actually thinking about the switch from asm.js to WASM (v1.38.1) but apparently that was last year. Whoops!

Re: WebAssembly becomes a W3C Recommendation

#245

Earlier quoted context omitted.

I work for Tableau, we've been using it for over a year to handle local map interactions, and soon it'll be powering our animation system on the web.

Is there anywhere I can see this animation system in action?

https://www.youtube.com/watch?v=wYkP51pO11E

You can jump to 47 minutes in to catch a little bit of the web animation in action, but as it was over conference WiFi, it was a bit wonky.

Re: WebAssembly becomes a W3C Recommendation

#246
post #210

Earlier quoted context omitted.

Not sure if this is what you’re looking for but I’m using it to embed SQLite in an app that’s both desktop (electron) and web-kinda-sorta. I say kinda-sorta because really what we’re doing is embed SQLite (and other dependencies) in an html page so our users can just open it straight up in a browser without having to be online or connected to any other systems, and still able to work (albeit read only for now.) The d…

I never thought of replacing WebSQL like that . Cooool. Pretty sure Electron provides IndexedDB though. (Ref: https://nolanlawson.com/2015/09/29/indexeddb-websql-localsto... , vaguely https://nolanlawson.github.io/offlinefirst-2016-03/ )

The decision to embed SQLite had more to do with query capabilities than storage. We need to expose a query interface that is both flexible and powerful, and ideally it’s not something esoteric. We need something BAs can pick up without much or any additional training. With SQLite we both get the query engine and storage, but really it’s the former that’s important. While it may have started as a “what if” kind of PoC I think it’s gonna stick, unless we can find something that essentially gives us SQL the query language (superset is fine, subset not so much) and whatever storage backend is available, be it IndexedDB or something else. We tried various options, like AlaSQL and others, but embedding SQLite was pretty painless and gives a lot of bang for the buck.

The only downside so far is that the embedded size is quite large, so we do take a small hit in startup latency (sub second still) and if we ever end up having a requirement to work across the internet (I doubt it) it’s going to hurt because we’d be looking at a 3mb+ download (quite cacheable though.)

Anyway, point is our need was mainly SQL the language and not so much the storage, that’s kind of secondary, though SQLite really makes that part easy too.

Re: WebAssembly becomes a W3C Recommendation

#247
post #246

Earlier quoted context omitted.

I never thought of replacing WebSQL like that . Cooool. Pretty sure Electron provides IndexedDB though. (Ref: https://nolanlawson.com/2015/09/29/indexeddb-websql-localsto... , vaguely https://nolanlawson.github.io/offlinefirst-2016-03/ )

The decision to embed SQLite had more to do with query capabilities than storage. We need to expose a query interface that is both flexible and powerful, and ideally it’s not something esoteric. We need something BAs can pick up without much or any additional training. With SQLite we both get the query engine and storage, but really it’s the former that’s important. While it may have started as a “what if” kind of Po…

The thing is, I can't/don't disagree with you, in terms of arguing for SQLite over alternatives. Hearing the practical specifics of your edge case is (depressingly) insightful.

I just realized the links I posted didn't include the article I had in mind when I went link-digging (and didn't properly check the results, woops). I found it: https://nolanlawson.com/2014/04/26/web-sql-database-in-memor...

Potentially interestingly, I re-found the link above via hn.algola.com, which also found me the comments (for the only time the above link was posted), at https://news.ycombinator.com/item?id=7661236. The top comment thread there points to https://github.com/kripken/sql.js, which was started pre-WebAssembly but now builds for WASM, and the network tab in devtools is telling me it's a 497KB download. It says it takes the position of providing a first-class JavaScript API instead of C bindings, and that you have to implement your own save/loadimport/export layer. You may have already discovered and discarded this possibility.

FWIW, if using SQLite does stick, I reckon that an article (even a small one) about the journey/decision process/implementation gotchas/etc - and particularly details about the use cases, and why SQLite shines for your scenario - would probably be received very positively.

Thanks for replying! (My fast response time was due to fun timing: I literally just opened my laptop this morning, checked HN, and saw your comment posted "0 minutes ago" :D)

Post reply on HN