Live data from Hacker News

WebAssembly

developer.mozilla.org

61–70 of 98 posts

Re: WebAssembly

#61

Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…

How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?

Some of the data layouts are optimized for web compatibility rather than (purely) ease of hardware implementation.

Re: WebAssembly

#62

Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…

How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?

Its not web specific. For example, there are projects to run WebAssembly instead of containers on Kubernetes:

https://krustlet.dev/

Re: WebAssembly

#63
post #44
post #37

My 2c about wasm so far: I've tried go, rust, c/cpp, webassembly. go - big bundle sizes because of gc I am guessing, idk. c/cpp - I haven't touched c/cpp in a really really long time, but probably the other really good fit. rust - I see rust as the successor to what I would've used c/cpp for, but not sure if rust ecosystem is still fully there. Last time, I had some weird issues with wasm-bindgen. AssemblyScript(AS)…

The rust+wasm story is quite nice these days. I've been working on a rust+wasm SPA for a few months and I have yet to run into issues with the tooling (wasm-pack, wasm-bindgen, etc).

Fromy past experience working woth wasm-bindgen, it seems that you cannot get auto-completion for web APIs due to the fact that they are generated dynamically. Is this issue resolved now? What IDE/editor do you use to enable that?

Re: WebAssembly

#64

Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…

How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?

Maybe in a few years, WASM is going to be retconned or backronymed to "World Assembly".

Re: WebAssembly

#65
post #24

Earlier quoted context omitted.

Is it? Can you provide some links to examples?

It is! Beware the lure of MDX/equivalents. If you want to provide structure to your content and maintain it colocated to where you use it (or imported and type checked for where you have that kind of reusability), components in Markdown is an awful experience. Inverting that and writing Markdown within posts is my current solution. It’s not as nice as a plain .md file but it lets me mix writing and structure without…

Realizing I should add a little more context: it’s very common to use Markdown for content and even for generating routes or subpages. But when those pages/posts/sections are expected to provide a certain data/content structure it’s generally provided by “front matter” metadata or mixed-source data like MDX which mixes JS/TS and JSX into Markdown. That experience doesn’t have any real editor safeguards, though it has some linting tools. But it has basically no dependency checks on what would be rendered. You just have to cross your fingers and hope. And if your content is expected to have any particular metadata, good luck refactoring.

Re: WebAssembly

#66

One thing that's really great about wasm is how it enables lots of native libraries to be usable in the browser. Recently I ran into performance issues due to limitations in the WebAudio API and was able to workaround it by compiling FFmpeg to wasm and using it instead. Being able to use FFmpeg in the browser is very powerful and brings a huge suite of encoding/decoding capabilities that browsers currently lack right…

> I struggled a lot using Emscripten to port FFmpeg to wasm - you have to compile EVERY dependency to wasm This is a scenario where the Bazel model is a good fit IMHO. Bazel rebuilds all of your dependencies from source. This makes it easy to compile all of your dependencies with an extra flag (eg -fsanitize=address for ASAN) or using a different compiler (eg Emscripten). While it can be annoying to wait for the worl…

Do you have an example of getting bazel to work with emscripten?

I’ll share mine if you share yours:

https://github.com/sorbet/sorbet/tree/master/tools/toolchain...

When we set this up to compile Sorbet (C++ codebase) for https://sorbet.run, it involved what I considered an inordinate amount of boilerplate and arcana.

To be fair since we set it up it’s hardly ever needed to be touched, and I could probably cargo cult this into future projects where I wanted to use it, but I wouldn’t exactly say that bazel magically makes the pain of emscripten go away.

Curious to hear otherwise.

Re: WebAssembly

#67

One thing that's really great about wasm is how it enables lots of native libraries to be usable in the browser. Recently I ran into performance issues due to limitations in the WebAudio API and was able to workaround it by compiling FFmpeg to wasm and using it instead. Being able to use FFmpeg in the browser is very powerful and brings a huge suite of encoding/decoding capabilities that browsers currently lack right…

PNaCL and CrossBridge already allowed it in 2011, but alas politics, and yes Emscripten sucks.

Why do I need to have a mix? of Python, Java and JS based tools in addition to the C and C++ compilers?

With no option to skip downloading them.

Re: WebAssembly

#68

Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…

And yet,

"Usenix Security '20-Everything Old Is New Again: Binary Security of WebAssembly"

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

Re: WebAssembly

#69
post #4
post #3

i am not looking forward to having ads delivered by binary blobs. say farewell to the age of client-side scripting.

How is this any different than getting ads from minified blobs of javascript?

You cannot disable wasm.

Re: WebAssembly

#70
post #69
post #4

Earlier quoted context omitted.

How is this any different than getting ads from minified blobs of javascript?

You cannot disable wasm.

This isn't true. If you block javascript from running, then that will include blocking WebAssembly. WebAssembly is only started through javascript, and if things ever changes so that webpages can include WebAssembly directly, presumably it will also be controlled by the same browser settings that control whether javascript is executed.
Post reply on HN