3 ms·
In case you are interested I wrote a minimal OOP runtime in wasm-gc (using wasm text format) here: https://marianoguerra.org/posts/bootstrap-post-collapse-oop-t
by marianoguerra 1y ago
In case you are interested I wrote a minimal OOP runtime in wasm-gc (using wasm text format) here: https://marianoguerra.org/posts/bootstrap-post-collapse-oop-technology-with-wasm-gc-part-2/ https://marianoguerra.org/posts/bootstrap-post-collapse-oop-...
I also wrote a forth in wasm by hand here: https://github.com/marianoguerra/ricardo-forth https://github.com/marianoguerra/ricardo-forth
And a wasm compiler that fits in a tweet: https://wasmgroundup.com/blog/wasm-compiler-in-a-tweet/ https://wasmgroundup.com/blog/wasm-compiler-in-a-tweet/
I'm also the co-author of a book that shows you how to write a compiler that targets wasm for a small languaje using js: https://wasmgroundup.com/ https://wasmgroundup.com/
Here's a direct link to the wasm text format for the OOP and forth implementations:
- https://github.com/marianoguerra/mclulang/blob/main/wat/fatt.wat https://github.com/marianoguerra/mclulang/blob/main/wat/fatt...
- https://github.com/marianoguerra/ricardo-forth/blob/master/src/first.wast https://github.com/marianoguerra/ricardo-forth/blob/master/s...
- RodgerTheGreat 1y agoThe Birth & Death of JavaScript wasn't talking about WASM, it was talking about Asm.js, which crucially differs from WASM by being a backwards-compatible subset of JavaScript amenable to JIT compilation. The goals of these standards look similar if all you care about is transpiling c and running it on a browser, but Asm.js worked everywhere from day zero modulo performance; WASM continues to be a moving target.
- bloppe 1y agoWasm has long supported everything you could do with asm.js. But wasm is about much more than C to browser. That's why it's still evolving.
- leptons 1y agoAsm.js runs on the main thread, WASM runs in its own thread.
- alex7o 1y agoNot exactly true WASM compilcation is in a different thread, but the execution happens on the same thread as JS if you don't do any webworker stuff. Edit: https://apryse.com/blog/how-to-enable-webassembly-threads https://apryse.com/blog/how-to-enable-webassembly-threads
- CyberDildonics 1y agoa minimal OOP runtime What does this mean?
- marianoguerra 1y agoin the LISP 1.5 Programmers's Manual there's a single page that defines eval/apply in lisp code. I was exploring something similar for OOP, what's the minimal set of features needed to bootstrap objects and method dispatch.
- _0ffh 1y agoYou might find "Open, Extensible Object Models" by Ian Piumarta and Alessandro Warth interesting. Found a link: https://tinlizzie.org/VPRIPapers/tr2006003a_objmod.pdf https://tinlizzie.org/VPRIPapers/tr2006003a_objmod.pdf