Live data from Hacker News

WebAssembly from the Ground Up

wasmgroundup.com

51–60 of 61 posts

Re: WebAssembly from the Ground Up

#51
post #37

Wasm is such a cool technology. The spec though for me leaves a lot to be desired. Oh, the first few chapters are fine, but when you get to the binary and text formats that's when it all breaks down for me. For whatever reason, Wasm loves OCaml. This wouldn't really be a bad thing if they didn't come up with their own custom language to denote syntactic elements of both formats instead of using EBNF or similar. I dis…

Despite not being an ML programmer, I found the spec pretty easy to read for the most part. One of the least intimidating specifications I have ever read, surprisingly.

I wish I could say the same. I don't know what wall I'm hitting which causes it not to click for me, otherwise I'd go off and write my own Wasm interpreter just for the fun of it lol

Re: WebAssembly from the Ground Up

#52
WebAssembly seems like a big workaround for JavaScript only supporting doubles, strings, and objects/arrays. Its big features are to allow using a byte array as stack/heap storage memory, and having actual integer types, along with allowing C code to be compiled to WebAssembly.

Oddly enough, Zig is the nicest C to WebAssembly compiler I've used so far.

Re: WebAssembly from the Ground Up

#55
post #37

Wasm is such a cool technology. The spec though for me leaves a lot to be desired. Oh, the first few chapters are fine, but when you get to the binary and text formats that's when it all breaks down for me. For whatever reason, Wasm loves OCaml. This wouldn't really be a bad thing if they didn't come up with their own custom language to denote syntactic elements of both formats instead of using EBNF or similar. I dis…

Yes, I have had the same experience with the specification. It really is quite difficult to follow :c

Their SpecTec system is fancy and neat but I don't think that auto-generated specifications produce something worth reading. Perhaps in the future when there's less churn, there might be a hand-written specification? In the mean time I've needed to jump into their Discord to ask clarification questions about the high-level stuff. Once understanding that and the grammar conventions and the like, the specification becomes much more readable, though still not great.

Certainly nothing like an RFC. But maybe I have too high standards...

Re: WebAssembly from the Ground Up

#56
post #55
post #37

Wasm is such a cool technology. The spec though for me leaves a lot to be desired. Oh, the first few chapters are fine, but when you get to the binary and text formats that's when it all breaks down for me. For whatever reason, Wasm loves OCaml. This wouldn't really be a bad thing if they didn't come up with their own custom language to denote syntactic elements of both formats instead of using EBNF or similar. I dis…

Yes, I have had the same experience with the specification. It really is quite difficult to follow :c Their SpecTec system is fancy and neat but I don't think that auto-generated specifications produce something worth reading. Perhaps in the future when there's less churn, there might be a hand-written specification? In the mean time I've needed to jump into their Discord to ask clarification questions about the high…

(It doesn't help that the syntax is *weird*. You've got your choice of an S-expression Scheme syntax or a stack-oriented ML syntax, *and* you can use both together. And there's at least one undocumented de facto syntax floating around AFAIK, though I believe the standard merged support for the main features it was used for, so hopefully test suites and the like will switch away from it at some point.)

Re: WebAssembly from the Ground Up

#57
post #54

Is it possible yet to write a high performance concurrent garbage collector in WebAssembly?

Until wasm-gc was standardized in wasm 3.0 all garbage collected languages compiled their own garbage collector to wasm, so in a sense you always could.

Unless by high performance you mean something more specific.

With wasm-gc you get the GC "for free" (from the host), you can still write your own if you want but you loose the interoperability that wasm-gc solves.

Re: WebAssembly from the Ground Up

#58
post #52

WebAssembly seems like a big workaround for JavaScript only supporting doubles, strings, and objects/arrays. Its big features are to allow using a byte array as stack/heap storage memory, and having actual integer types, along with allowing C code to be compiled to WebAssembly. Oddly enough, Zig is the nicest C to WebAssembly compiler I've used so far.

[deleted]

Re: WebAssembly from the Ground Up

#59
post #22

What's the state of wasm for porting multi-process code? I want to run something that execs a command line tool, both in the browser. Doable yet?

most of that is happening above the WebAssembly spec: https://wasi.dev/ More specifically for command line tools: - https://wasi.dev/interfaces#presentation - https://github.com/WebAssembly/wasi-cli

See also https://wasix.org/

Re: WebAssembly from the Ground Up

#60

Just went and bought it! I'm in a process where application-level programming isn't cutting it anymore (I still have a lot to learn, but it's in the diminishing returns). I've been looking to understand the entire stack at a deeper level (from how requests are made to how they're parsed), and this seems like the next natural step! Thanks a bunch!

You might also want to look at this thread - https://news.ycombinator.com/item?id=45862591
Post reply on HN