Rust but Lisp
47 points by thatxliner 3 hours ago | 21 comments
vermilingua 49 minutes ago
Claims to have all the syntax covered, but not a single example of specifying lifetimes or the turbofish, some of the trickiest rust syntax
replykibwen 25 minutes ago
If you already have the ability to express the grammar productions in Rust that allow for optionally-specified types (e.g. variable declaration), then you have the ability to express lifetimes and the turbofish (which is just a curious way to call a generic function with a specific type parameter). The only weird thing would be that Lisp uses the apostrophe character for something very different than Rust, but you could just pick any other way to denote lifetimes.
replyvermilingua 18 minutes ago
Could!
reply> Everything Rust has … expressed as s-expressions. No semantic gap.
hawkice 2 hours ago
I think some comments are missing the upside of it being precisely Rust, without any new semantics. If you want lisp that compiles to machine code, Common Lisp can get reasonably efficient. The purpose of bringing Rust into it is to surface Rust-specific semantics -- which many people quite like!
replyGalaxyNova 2 hours ago
It seems like this is more like writing Rust in an s-expression syntax instead of having a proper lisp dialect that compiles to Rust, which is cool I guess but not very interesting.
replyIt's quite weird-looking for someone who's done any amount of lisp programming.
noosphr 49 minutes ago
>Rust semantics with LISP syntax. A transparent s-expression frontend that compiles directly to Rust — no runtime, no GC
replyThe first paragraph says literally that.
amelius 14 minutes ago
This is probably what Rust's internal ASTs look like. But why would you want to input programs as ASTs?
replyphysPop 12 minutes ago
so you can do the transformations (see the rlisp macro section)
replyamelius 7 minutes ago
Yes, but you could do the same by transforming Rust's ASTs. The only downside is that your input format is different from the format you are transforming. But the upside is that readability is much improved, which matters because code is typically read far more often than it is written.
replystuaxo 2 hours ago
"no runtime, no GC, just" I am BEGGING every project to not have this LLMism in their docs.
replyIt reads as No X no Y just slop to me every time.
FrankWilhoit 3 hours ago
And for why?
replymacmac 3 hours ago
To get proper macros.
replyfao_ 2 hours ago
Scheme already has hygenic macros, I don't get why you'd vibecode a worse (less battle tested, llm-generated) replacement. I'm not sure why this hit the front-page, to be honest, because it doesn't seem noteworthy or interesting (Anyone and their mother can vibecode something like this in eight hours)
reply
Much better to give them something more M-expr styled, I think a grammar that is LL(1) is probably helpful in that regard.
Basically the more you can piggyback on the training data depth for algol-style and pythonic languages the better.