Conversation

I wonder if anyone has made a low-level #Lisp that is specifically designed to be semantically close to #WASM code, so that it compiles to be very very efficient (kinda like how Lua is really fast because it’s very semantically similar to C code, which is what its interpreter is written in)

like WASM already reads kinda like a Lisp to me, and I bet that would run crazy fast

(I’ve been tempted to do this several times I’m ngl. I think I want to learn WASM one of these days. sadly most of the “learn WASM” tutorials are more like “learn how to compile some shitty language like C++ to WASM”)

6
1
4
@kasdeya apart from WAT being a sex pest, it really doesn't read anything like a lisp, it being a stack machine and all, just shares the serialization
0
0
0

@kasdeya textual wasm is a formal specification of a wasm syntax using s-expressions. WASM *is* a lisp

0
0
1

@kasdeya take a look at Guile Hoot Scheme and Wastrel work by Andy Wingo and Spritely Institute. May be somewhat related to your search.

1
0
1

@kasdeya This probably isn't what you're looking for: it's an implementation of 1.5 -- the oldest published version of Lisp -- which compiles to .

It might interest you anyway ;-)

https://github.com/zick/IchigoLisp

1
0
1

@kasdeya If you like low-level languages, the official WebAssembly text format (.wat) is actually already an S-expression language.

1
0
1

@kasdeya You might also find this project interesting: https://github.com/schism-lang/schism/

1
0
1

@simon_brooke ooh - thank you! this sounds interesting tbh. I kinda like the idea of using a really simple, minimal Lisp like this. I might play with this a bit

0
0
1

@leobm yess - that’s actually exactly why I’m interested in WASM in the first place. it really makes me want to make my own Lisp that compiles to it, just because of how cool it would be to write Lisp S-expressions that turn into WASM S-expressions

0
0
1

@leobm oohh - thank you! I definitely do

0
0
0