Fixing these, it runs mostly as advertised, but it seems to assume that one-letter types are always generic parameters, so it's impossible to (for example) generate this:
struct X;
enum A {
P(X),
Q
}
Trying this: (struct X)
(enum A (P X) Q)
produces this: struct X;
enum A<P, X> { Q }
while using a multi-letter type like `String`: (enum A (P String) Q)
produces the expected: enum A { P(String), Q }
One way to solve this would be to always require the generic annotation, and let it be empty when there are no generics, but when I tried that it did something weird: (struct X)
(enum A () (P X) Q)
produces: struct X;
enum A {
_ /* List([], Some(Span { start: 54, end: 56 })) */,
P(X),
Q
}
I have no idea where the `_` and the comment came from.[1] https://github.com/ThatXliner/rust-but-lisp/blob/70c51a107b2...
[2] https://github.com/ThatXliner/rust-but-lisp/blob/70c51a107b2...
It's quite weird-looking for someone who's done any amount of lisp programming.
I don't know what this is, but clearly not Lisp...
Can I use the amazing `rust-analyzer` LSP to get cool IDE features?
I suspect the answer is no, but these might be good further prompts to use.
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.
Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
Maybe we should one day include Golang or Rust to it
some pre-processor that "compiles into rust" from less awful syntax?
It reads as No X no Y just slop to me every time.
For everyone who is shaming on the project for being "LLM slop," sure but that's the reason why something like this can exist in the first place. The point isn't to be a finished, production-ready product. The point is to be an interesting work, and just a sly bit silly
Can we please write our own READMEs before posting to HN?
I don't even feel bad saying this because clearly OP is just the front for Claude here.