HNHacker News
TopNewBestAskShowJobs

marianoguerra

1,131 karma · joined January 12, 2010

Co-founder of https://gloodata.com/

Writing https://wasmgroundup.com/

http://marianoguerra.org

Previously https://instadeq.com and https://event-fabric.com/

Me on the internet:

https://github.com/marianoguerra

http://marianoguerra.github.io/

https://twitter.com/warianoguerra

https://hachyderm.io/@marianoguerra

[ my public key: https://keybase.io/marianoguerra; my proof: https://keybase.io/marianoguerra/sigs/GHx0pQDbASzQQ6dXmsgwwlX2c-WTe3qwVHdZvamGdsU ]

submissionscomments
marianoguerra··on WebAssembly from the Ground Up
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.

marianoguerra··on WebAssembly from the Ground Up
Check https://wanix.sh/ you may like it :)
marianoguerra··on WebAssembly from the Ground Up
yes, a nice way to contribute is to add the table instructions to the reference: https://developer.mozilla.org/en-US/docs/WebAssembly/Referen...
marianoguerra··on WebAssembly from the Ground Up
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

marianoguerra··on WebAssembly from the Ground Up
Co-author here.

if you are interested in tail calls you just need to understand the call instruction which we cover in the book and then replace it with either:

- return_call <funcidx>, the tail-call version of call

- return_call_indirect <tableidx> <typeidx>, the tail-call version of call_indirect

More info here: https://github.com/WebAssembly/tail-call/blob/main/proposals...

marianoguerra··on A WebAssembly Interpreter
Author here AMA :)
marianoguerra··on Vibecard: Todo app speedrun using HTML macros [video]
live coding a todo app faster than the previous one with the help of a new vibecard feature: macros
marianoguerra··on VibeCard: Todo list app in 5 minutes and 1 line of JavaScript [video]
you can try it here: https://marianoguerra.github.io/vibecard/

if you want vim keybindings: https://marianoguerra.github.io/vibecard/?vim

marianoguerra··on Scm2wasm: A Scheme to WASM compiler in 600 lines of C, making use of WASM GC
in 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.
marianoguerra··on Scm2wasm: A Scheme to WASM compiler in 600 lines of C, making use of WASM GC
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-...

I also wrote a forth in wasm by hand here: https://github.com/marianoguerra/ricardo-forth

And a wasm compiler that fits 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/

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

- https://github.com/marianoguerra/ricardo-forth/blob/master/s...

marianoguerra··on WASM 2.0
yes:

> WebAssembly provides no ambient access to the computing environment in which code is executed. Any interaction with the environment, such as I/O, access to resources, or operating system calls, can only be performed by invoking functions provided by the embedder and imported into a WebAssembly module.

more info here:

- https://webassembly.org/docs/security/

- https://www.w3.org/TR/wasm-core-1/#design-goals%E2%91%A0

marianoguerra··on WASM 2.0
with the wasm-gc proposal you get access to structs and arrays: https://github.com/WebAssembly/gc/blob/main/proposals/gc/Ove...

with the component model's wit you get higher level types like enums, option, result and generics: https://component-model.bytecodealliance.org/design/wit.html

marianoguerra··on WASM 2.0
in the browser you can compile modules and create instances from arrays of numbers/bytes, here's an obfuscated example: https://wasmgroundup.com/blog/wasm-compiler-in-a-tweet

if the host provides the guest wasm module via imports a function to create and run from an array of bytes then it can be done today (if I understand you correctly).

Here's some related content: https://github.com/pdubroy/til/blob/main/wasm/2024-02-22-Run...

marianoguerra··on Show HN: WebAssembly from the Ground Up – learn WASM by building a compiler
Hi! I'm the book Co-author, here's an experiment that didn't end up (yet?) in the book: an interactive binary operation inspector:

short demo: https://x.com/warianoguerra/status/1759988555869266329

longer writing: https://marianoguerra.org/msite/binary-tetris/

marianoguerra··on Extensible WASM Applications with Go
not sure what's the current status of Go so there are two alternatives:

if they are targeting Wasm pre Wasm-GC then they have to ship their GC in the Wasm module and it can't interoperate with "the outside world"

if they use Wasm-GC then they use the host's GC and values can be shared with the host and other guests.

marianoguerra··on A WebAssembly compiler that fits in a tweet
yes, it has always been an influence for me, in fact 9 years ago I implemented a Forth interpreter in plain WAT[2] by de-obfuscating a IOCCC Forth implementation[3] and reimplementing it in Wasm and JS[4]

[1] https://github.com/marianoguerra/ricardo-forth

[2] https://github.com/marianoguerra/ricardo-forth/blob/master/s...

[3] https://www.ioccc.org/1992/buzzard.2/

[4] https://github.com/marianoguerra/ricardo-forth/blob/master/s...

marianoguerra··on A WebAssembly compiler that fits in a tweet
this one started pretty obfuscated :)

https://x.com/warianoguerra/status/1576166873296941056

marianoguerra··on A WebAssembly compiler that fits in a tweet
post co-author here, let me know if you have any questions :)
marianoguerra··on Reverse Engineering a 218-Byte WASM Compiler in JavaScript [video]
Author of the video here, ask me anything :)
marianoguerra··on Ask HN: What is the best way to learn Erlang?
https://spawnedshelter.com/ is a great list of resources to get started
marianoguerra··on Visualizing Vector Embeddings in 3D with transformers.js and t-SNE/UMAP [video]
The code is here: https://github.com/marianoguerra/webvectors/
marianoguerra··on Code Hike 1.0: Turn Markdown into rich interactive experiences
Thanks for your great work!
marianoguerra··on Bootstrap post-collapse OOP technology (Part 1)
yes, everything is an infix operator :)

`1 + 2` sends the message `\ + 2` to `1`

`a foo ()` sends the message `\ foo () ` to `a` (the parenthesis are the nil value)

`1 + 2 - 3` sends the message `\ + 2` to `1` and then the message `- 3` to the result of the previous message send

marianoguerra··on Bootstrap post-collapse OOP technology (Part 1)
author here, let me know if you have any questions :)
marianoguerra··on Make Your Self: In Search for Maxwell's Equations of OOP
Author here, AMA :)
marianoguerra··on LO – simple WASM native language
it's not that related, I like to create compilers/transpilers/weird languages, see the "Language Projects" section here: https://marianoguerra.github.io/

But there's a relation, two years ago I prototyped a thing that tried to make a headless version of instadeq that could run in the browser and the server, the idea was a dataflow language where the data was represented as apache arrow tables where filters and transformation expressions where compiled to wasm. The prototype kind of worked and I had a lot of fun, I thought about sharing the fun by writing a small book about creating 10 toy languages that compiled to Wasm, I shared the idea with Patrick, he said he was thinking about something similar and the idea evolved into the current book.

marianoguerra··on LO – simple WASM native language
If you would like to learn how to build your own then check https://wasmgroundup.com/

Disclaimer: I'm the co-author

marianoguerra··on WASM Instructions
Here's a good explanation: https://github.com/WebAssembly/stack-switching/blob/main/pro...
marianoguerra··on WASM Instructions
For a full list of proposals you can check https://github.com/WebAssembly/proposals
marianoguerra··on WASM Instructions
Let's keep it going :D

Writing a Minimum Viable Cartridge for WASM4 (https://wasm4.org/) using WAT:

https://twitter.com/warianoguerra/status/1748382204508410149

Wasm compilers in a tweet:

https://twitter.com/warianoguerra/status/1576166873296941056

A WebAssembly compiler for a reverse polish notation calculator in 269 bytes of JavaScript:

https://twitter.com/warianoguerra/status/1677271664009138177

Page 1 of 6Next →