Live data from Hacker News

Lisette a little language inspired by Rust that compiles to Go

lisette.run

121–130 of 168 posts

Re: Lisette a little language inspired by Rust that compiles to Go

#121
post #75
post #7

There are several languages that compile to Go, trying to be a better a Go. Off the top of my head: XGo ( https://github.com/goplus ), Borgo ( https://github.com/borgo-lang/borgo ), Soppo ( https://github.com/halcyonnouveau/soppo )...

Both Borgo and now Lisette seem to act as though (T, error) returns are equivalent to a Result sum type, but this is not semantically valid in all cases. The io.Reader interface's Read method, for example, specifies not only that (n!=0, io.EOF) is a valid return pattern, but moreover that it is not even an error condition, just a terminal condition. If you treat the two return values as mutually exclusive, you either…

To be honest you could easily mark this as an additional (adt) type if that suits you better. Its a halting situation no matter how you twist it.

Re: Lisette a little language inspired by Rust that compiles to Go

#122

Looks great. But I can't help wondering: If it is similar to Rust why not make it the the same as Rust where it feature-matches? Why import "foo.bar" instead of use foo::bar? Why Bar.Baz => instead of Bar::Baz =>? What are you achieving here? Why make it subtlety different so someone who knows Rust has to learn yet another language? And someone who doesn't know Rust learns a language that is different enough that the…

Its rust like. There is no borrow checking etc. Rust syntax is verbose so why copy it nilly willy when you dont need to.

Look at gleam, its a fresh take on nice dxp

Re: Lisette a little language inspired by Rust that compiles to Go

#123
post #71

Earlier quoted context omitted.

From your blog entry: > Go was not satisfied with one billion dollar mistake, so they decided to have two flavors of NULL Thanks for raising this kind of things in such a comprehensible way. Now what I don't understand is that TypeScript, even if it was something to make JavaScript more bearable, didn't fix this! TS is even worse in this regard. And yet no one seems to care in the NodeJS ecosystem. That's why I creat…

ReasonML / Melange / Rescript are a wholistic approach to this: The issue with stapling an option or result type into Typescript is that your colleagues and LLMs won't used it (ask me how I know).

how do you know?

Re: Lisette a little language inspired by Rust that compiles to Go

#124
post #66

Earlier quoted context omitted.

> Basically, why try to make Go more like Rust when Rust is right there? The avg developer moves a lot faster in a GC language. I recently tried making a chatbot in both Rust and Python, and even with some experience in Rust I was much faster in Python. Go is also great for making quick lil CLI things like this https://github.com/sa-/wordle-tui

No doubt a chatbot would be built faster if using a less strict language. It wasn't until I started working on larger Python codebases (written by good programmers) that I went "oh no, now I see how this is not an appropriate language". Similar to how even smaller problems are better suited for just writing a bash script. When you can have the whole program basically in your head, you don't need the guardrails that p…

I've also found that traversing a third-party codebase in Python is extremely frustrating and requires lots of manual work (with PyCharm) whereas with Rust, it's just 'Go to definition/implementation' every time from the IDE (RustRover). The strong typing is a huge plus when trying to understand code you didn't write (and I'm not talking LLM-generated).

Re: Lisette a little language inspired by Rust that compiles to Go

#125
post #71

I've chatted a bit with the author, but not actually tried the language. It looks very interesting, and a clear improvement. I'm not particularly quiet about not liking Go[1]. I do think there may be a limit to how far it can be improved, though. Like typed nil means that a variable of an interface type (say coming from pure Go code) should enter Lisette as Option >. Sure, one can match on Some(Some(h)) to not requir…

From your blog entry: > Go was not satisfied with one billion dollar mistake, so they decided to have two flavors of NULL Thanks for raising this kind of things in such a comprehensible way. Now what I don't understand is that TypeScript, even if it was something to make JavaScript more bearable, didn't fix this! TS is even worse in this regard. And yet no one seems to care in the NodeJS ecosystem. That's why I creat…

TypeScript tried to accurately model (and expose to language services) the actual behavior of JS with regards to null/undefined. In its early days, TypeScript got a lot of reflexive grief for attempting to make JS not JS. Had the TS team attempted to pave over null/undefined rather than modeling it with the best fidelity they could at the time, I think these criticisms would have been more on the mark.

Re: Lisette a little language inspired by Rust that compiles to Go

#126

Looks great. But I can't help wondering: If it is similar to Rust why not make it the the same as Rust where it feature-matches? Why import "foo.bar" instead of use foo::bar? Why Bar.Baz => instead of Bar::Baz =>? What are you achieving here? Why make it subtlety different so someone who knows Rust has to learn yet another language? And someone who doesn't know Rust learns a language that is different enough that the…

Writing actual Rust for any GC language (including Golang) would ultimately be quite weird. You'd have to entirely change the way memory is modeled, to account for the restrictions GC introduces. It's similar to the restrictions introduced by having multiple address spaces, except even weirder because every object is its own tiny address space and a reference is just an address space descriptor.

[deleted]

Re: Lisette a little language inspired by Rust that compiles to Go

#127

Something that I don't understand about Rust, or these rustylangs, is the insistence of separating structs and methods. Don't get me wrong, I like named-impl blocks, but why are they the only option? Why can't I put an unnamed-impl block inside the struct? Or better yet just define methods on the struct? What's the point of this and why do these rustylangs never seem to change this?

[deleted]

Re: Lisette a little language inspired by Rust that compiles to Go

#128
This seems awesome. Seems to address many of my armchair complaints about both Go (inexpensive) and Rust (bloated/complex).

I'm curious what compilation times are like? Are there theoretical reasons it'd be order of magnitude slower than Go? I assume it does much less than the rust compiler...

Relatedly, I'd be curious to see some of the things from Rust this doesn't include, ideally in the docs. Eg I assume borrow checking, various data types, maybe async etc are intentionally omitted?

Re: Lisette a little language inspired by Rust that compiles to Go

#130

Earlier quoted context omitted.

Thanks for asking! The core of the compiler should be close to 50k LoC, with most of the rest being tests. The project is much older than git history suggests - I started a fresh repository for the initial release after several months of experiments and false starts to find the right direction. LLMs certainly helped e.g. with mechanical tasks like generating tests and refactors where changes cascaded throughout the p…

Thanks for the response but I'm sorry to say it's not reassuring, but does more to worry me because you didn't answer the question. Like I said, these LLM-driven language projects have proliferated recently, and they follow a common pattern: - Dump hundreds of thousands of lines of lines into a blank repo with a new repo. - Throw up a polished-looking LLM generated website (they all look the same). - Post about the p…

Abandoned open-source projects with poor code quality are nothing new.

The merits of any project are yours to evaluate.

To me, I see some encouraging thoughtfulness here. However, again, it's true most projects like this don't achieve liftoff.

Post reply on HN