Hacker News new | past | comments | ask | show | jobs | submit | marianoguerra's comments login

https://spawnedshelter.com/ is a great list of resources to get started



Thanks for your great work!


author here, let me know if you have any questions :)


I have a rather tricky time reading the guest language syntax. Is there a good reason you didn't use "normal" dot+parens method call syntax? Can you do more with yours?


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


Author here, AMA :)


A brief summary or conclusion would be helpful.

Did you also have a look at CLOS and MOP?


If you would like to learn how to build your own then check https://wasmgroundup.com/

Disclaimer: I'm the co-author


How is this project related to the work you do? e.g. instadeq, gloodata

Why do you need WASM?


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.


In-browser data analysis is a great place to use Wasm. Javascript is great, but larger datasets really benefit from SIMD + tighter memory control/controlled memory layouts.

Some interesting data-related Wasm projects:

- DuckDB Wasm | https://github.com/duckdb/duckdb-wasm

- Row Zero | https://news.ycombinator.com/item?id=39551064

- PGLite | https://github.com/electric-sql/pglite


Thanks for this answer


For a full list of proposals you can check https://github.com/WebAssembly/proposals


There's a proposal for effect handlers that allows for continuatios, coroutines and others.

> effect handlers as a unifying mechanism to enable efficient compilation of control idioms, such as async/await, generators/iterators, first-class continuations, etc.

https://wasmfx.dev/


So a coroutine would be a “stack” one frame deep?



You can parse many things from this file, what are you trying to extract?

https://github.com/WebAssembly/spec/blob/main/document/core/...


If you are interested in learning about wasm instructions you may like https://wasmgroundup.com/

> This book takes a hands-on, bottoms-up approach: you'll go from hand crafting bytecodes to writing a real compiler for a simple programming language.

disclaimer: I'm the co-author


If we’re doing self promo, I’ve got something similar but significantly smaller in scope:

https://github.com/EmNudge/watlings


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


Look interesting.

From the linked page.

> This book takes a hands-on, bottoms-up approach

I think you mean "bottom-up". "bottoms-up" is a toast.


Perhaps it's a pun?


I worked through the chapters which were out when I bought late last year, and really enjoyed them! Haven't had the time to get deeper into it, but I really appreciated the examples of writing raw WASM binary with byte arrays. It really is from the ground up!


Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: