Live data from Hacker News

Show HN: Rust but Lisp

github.com

31–40 of 79 posts

Re: Show HN: Rust but Lisp

#31

Unfortunately, given the clear LLM basis of this project, s-expressions aren't a great choice. I've found coding agents struggle really hard with s-expression parentheses matching. 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.

[deleted]

Re: Show HN: Rust but Lisp

#34

I don't understand why this had to be LLM generated. S-expression syntax parsers are not hard to write. That's rather much the point of S-expressions.

>S-expression syntax parsers are not hard to write.

I'm not sure I quite understand the point of your comment.

Are you implying that LLMs should be used for very hard to write code? I feel like the best use of LLMs is to automate the easy stuff so that I can focus on the hard to write stuff.

Re: Show HN: Rust but Lisp

#36

Claims to have all the syntax covered, but not a single example of specifying lifetimes or the turbofish, some of the trickiest rust syntax

The HRTB is probably the trickiest syntax for specifying lifetimes. It looks like `for F: Fn(&'a (u8, u16)) -> &'a u8`.

Re: Show HN: Rust but Lisp

#37
post #36

Claims to have all the syntax covered, but not a single example of specifying lifetimes or the turbofish, some of the trickiest rust syntax

The HRTB is probably the trickiest syntax for specifying lifetimes. It looks like `for F: Fn(&'a (u8, u16)) -> &'a u8`.

Can you translate this for those of us who don't speak rust?

Re: Show HN: Rust but Lisp

#38
post #36

Earlier quoted context omitted.

The HRTB is probably the trickiest syntax for specifying lifetimes. It looks like `for F: Fn(&'a (u8, u16)) -> &'a u8`.

Can you translate this for those of us who don't speak rust?

Type F must be a function that's generic over any possible lifetime 'a, with a single argument that's a reference with lifetime 'a to a tuple of two numbers, and returns a reference with the same lifetime 'a to an 8-bit number.

The full code is usually something like:

fn foo(callback: F) where for F: ...

Which is a generic function foo that takes the argument of type F, where F must be...

Re: Show HN: Rust but Lisp

#39
So if I wanted to actually use this and I write some rust-but-lisp code and there's a compile error, will it show me a nice error message with an arrow pointing to where the error happened in my lisp code?

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.

Post reply on HN