3 ms·
TIL that there's a format called wat, which means "WebAssembly text format" and it can be converted to wasm (and back to wat). This format uses S-expressions l
by fouc 6y ago
TIL that there's a format called wat, which means "WebAssembly text format" and it can be converted to wasm (and back to wat).
This format uses S-expressions like lisp, and it's got a stack machine like forth. [1] [2]
I'm a bit surprised something so mainstream ended up being a lispy forth.
[1] https://ph1lter.bitbucket.io/blog/2020-12-03-webasm-forth-with-lisp-syntax.html https://ph1lter.bitbucket.io/blog/2020-12-03-webasm-forth-wi...
[2] https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format https://developer.mozilla.org/en-US/docs/WebAssembly/Underst...
- marksmillibend 6y agoTIL that TIL means "Today I Learned". Thanks for reading the post :) Update 2020-12-07: There was a bug in the macro expansion logic. I've backported the fix to the linked source and explained the bug in the 'mistakes' section.
- foota 6y agoIn case you're not aware, I believe that web assembly is a stack based language. You may be interested to read this, which talks about a proposal to add additional stack instructions: https://github.com/WebAssembly/design/issues/1381 https://github.com/WebAssembly/design/issues/1381