Email or username:

Password:

Forgot your password?
Devil Lu Linvega

I got wondering how much work it would be to compile s-expressions to #uxn, it turns out, not a lot.

As a test, I've only implemented `let`, but it's shockingly easy to map lisp-like syntax to the uxn assembly, I might push this further still.

git.sr.ht/~rabbits/qzil/tree/m

13 comments
DELETED

@neauoire After all, a Lisp machine is just a stack machine with extra steps. :)

ferunando

@neauoire @spnw 🤔 to me it feels... sideways? a dual approach kinda thing... like in quantum mechanics where you can write the same system in more than one basis but the underlying dynamics is the same? and i don't mean in the sense that both are programming abstractions.

sorry, got rambly. haven't studied programming languages development theory, but yeah, i love this kinda shared thing between both styles.

Forth Computer

@neauoire
webassembly is also based on sexperssions.

Luci ‘O Lantern

@neauoire a stack based vm is often the easiest way to implement a lisp, as you have noticed, converting from one to the other is not at all complicated

Devil Lu Linvega

@zens yup, the first time I did it was for the SECD stack machine which had a lot more convenient operations for hosting a functional language.
wiki.xxiivv.com/site/secd.html

DELETED

@neauoire what are you planning on implementing next in qzil?

WimⓂ️

@neauoire That is essentially what Funktal does, except that I didn't implement the let-syntax yet, because it's only syntactic sugar for lambdas. I'll do it eventually as it is very convenient.

Devil Lu Linvega

@wim_v12e I should have gone straight for lambdas but I didn't think I'd get very far. I'll do defines today and maybe make let on top of lambda.

Go Up