Top
Best
New

Posted by jspdown 2 days ago

Lisette a little language inspired by Rust that compiles to Go(lisette.run)
268 points | 147 commentspage 3
rednafi 2 days ago|
Go syntax and the Go runtime would be the perfect combo for me. Oh well...

I love Rust for what it is, but for most of my projects, I can’t justify the added complexity. Sure, there are a bunch of things I miss from the Rust world when I’m working on large-scale distsys services in Go, but introducing Rust in that space would be a recipe for disaster.

I guess the Go team knows that if they start adding everyone’s favorite Rust features, the language would become unrecognizable. So we’re not getting terser error-handling syntax or enums. Having union types would be nice too.

But I work in platform engineering, so my needs are quite different from someone writing business logic in Go. I understand that having a more expressive syntax is nice when you’re writing complex business code, but in reality, that almost always comes with a complexity/fragility tradeoff. That’s part of the reason no one wants to use Rust to write their business logic, despite it being so much more expressive.

For distsys, programming ergonomics matter far less compared to robustness and introspectability. So the Go runtime with Go syntax is perfect for this. But of course, that’s not true for all use cases.

Sorry for the rant - completely uncalled for. This is a cool project nonetheless :)

phplovesong 1 day ago|
Are you a bot?
rednafi 1 day ago||
Nah made the same comment on r/golang
bluebarbet 1 day ago||
Eats shoots and leaves.
kubb 2 days ago||
Oh look, a better syntax than the Go team could design!
Comma2976 2 days ago|
Nuh uh
bestouff 2 days ago||
For "classic" Rust what's actually nice is that no runtime is needed, so this looks like a step backwards.

What would be actually nice is running async Rust on the Go green threads runtime.

andai 2 days ago||
In my experience, what's actually nice is the correctness. The low-levelness is not helpful for most of the software I write, and imposes a constant burden.

Rust, of course superbly achieves its goals within its niche! But it is a niche, is my meaning here.

What I actually want is code that's correct, but ergonomic to write. So my ideal language (as strange as it sounds) would be Rust with a GC.

I don't want to worry about what string type I'm using. I want it to just work. But I want it to work correctly.

Lisette looks like it's in this exact category! It seems to combine the best aspects of both Rust and Go, which is a very promising endeavour. I'll have to take a proper look :)

mirekrusin 2 days ago|||
MoonBit [0] is the best/future complete/active “rust with gc”.

[0] https://www.moonbitlang.com

bearforcenine 1 day ago||
Did MoonBit add support for some kind of shared memory concurrency like threads? I remember discovering the language, being very excited about it, and then learning it is single-threaded, which makes it a poor replacement for Rust IMHO.
mirekrusin 1 day ago||
I believe it's not as much moonbit's limitation as wasm-gc limitation – shared gc structs will have to be supported at low level in wasm-gc first and I don't think there are any concrete proposals for it yet?

They support native target (as well as js target) but wasm one was always the primary one.

Having said that they have (cooperative) async for native target only currently.

Personally I'm looking forward for them to self host it – not sure why they're still holding to ocaml compiler, the language seems sufficient to have moonbit written in moonbit. Together with it I'm waiting for proper open source – currently what the team is doing is a bit like what Meta sometimes does – internal development, no community development, they just dump updates as snapshots from time to time instead of normal, fully open development.

I'm also clinging on my last intel purchase (macbook pro) and unfortunatelly they don't provide intel builds for macOS just arm ones (even though they do for linux), which is a bit of a pain – but I think I'll just buy arm macbook before they'll support intel on macOS (and maybe they'll never do, which is fair). It's a small thing from moonbit perspective, but annoying and limiting a bit for me personally to work remotely only with it.

akkad33 2 days ago||||
You can use Ocaml today and achieve all the correctness
IshKebab 2 days ago|||
OCaml has a lot of other cons though that Rust doesn't have. I would definitely pick Rust over OCaml even for projects that can tolerate a runtime with GC pauses. (And clearly most people agree.)
amelius 2 days ago||
What cons?
jech 1 day ago|||
The ecosystem. The language is lovely, but dune/opam is not up to the standard of the Go or Rust build systems, and the set of useful libraries is somewhat skewed. Whenever I write a program in Caml, I gain an hour thanks to the nice language, and then lose two fighting with dune/opam.

There's also the support for concurrency and parallelism, which has started to improve recently, but is still years behind what is available in Go (but still better in my opinion than what is available in Rust).

zorobo 2 days ago||||
For example, multicore OCaml is not free of race conditions. The GC, while super efficient (pauses are in the milliseconds), is not suitable for hard realtime.

Still, where absolute max performance or realtime are not required, I'd choose OCaml as it is elegant & a pleasure to code in (personal opinion, ymmv).

IshKebab 1 day ago|||
Poor windows support, confusing and buggy tooling (yeah really), mediocre documentation, global type inference, weird obsession with linked lists leading to performance gotchas, difficult syntax (yeah really), small community.

I can expand on any of those if you disagree with them.

masklinn 2 days ago|||
> all the correctness

When did OCaml get affine types? Or unique references?

zozbot234 1 day ago||
https://oxcaml.org/
gf000 2 days ago|||
There are an endless number of modern MLs that do the same thing. That's not a novelty - Rust was novel in making it part of a low-level language.
tux3 2 days ago||
I don't think being low level is the main innovation, really. There are several things Rust did right over traditional ML. Explicitly caring about learnability and the "weirdness budget". Having great error messages that don't require a course in category theory (many ML) or 800kB of scrollback buffer (C++) to understand.

Having great tools. Excellent documentation. Being friendly to new users.

Yes, it's also a systems language without a runtime. But that's not the novel part. You could write horrors in C++ that approximate ML even without language support. There are eldritch libraries where some kind of pattern matching is done via generic lambdas.

The main difference is developper UX. Good tools, good error messages, quality of life. The novelty is making ML not painful.

masklinn 2 days ago|||
> Yes, it's also a systems language without a runtime. But that's not the novel part.

Low level strong correctness was absolutely a novel part. In fact it’s exactly why many people glommed onto early rust, and why it was lowered on the stack.

Although learnability and weirdness budgets were also extremely novel in low level contexts which had been subsumed by C and C++.

> horrors in C++

Yes, horrors in C++. Half baked jerry-rigged and barely usable nonsense. Not an industrial strength langage with a reliable type system and a strong focus on safety through types.

uecker 1 day ago||
Memory safety is not the same a scorrectness and more advanced type is also not the same thing as correctness.
masklinn 1 day ago||
50 years of computing have proved pretty conclusively that less than that is wishful thinking at best. Large C++ programs, even with massive amounts of resources and tooling, can’t even get memory management correct.
uecker 1 day ago||
That Rust gives you correctness is very misleading claim.
gf000 1 day ago|||
These are all great qualities of rust, but they would not have been enough to make a dent.

Being memory safe without being managed is what makes rust a truly novel and interesting language for which it rightfully gets the hype.

Imustaskforhelp 2 days ago|||
No, this is actually nice to be honest. It's not a step backwards imo.

if I can incorporate Lisette into my golang projects for example, (Invoking rust code within Golang to me feels like a larger problem and Invoking C might be easier from my tinkering experiments) I feel like you are viewing this from a pure performance metric but to be honest, most things aren't necessary to be the fastest, the type system of rust/rust-alike languages can be beneficial to people as-it-is

Check out gleam, its based on erlang so it has a runtime involved, people love gleam because it gives them a bit more expressiveness in the type system from what I've heard.

I feel like these experiments are genuinely nice, Also perhaps a project like this can then slowly also invoke tinyGo (there was a recent discussion about it too) and could be compiled into tinyGo in future iterations to have no runtime essentially as well. People who love rust, love it, but most people really find it hard to get-into as compared to golang, I really love golang for its simplicity but I wish to tinker with rust too, so if Lisette combines both of these things and atleast makes me familiar with more rust without having to jump into too many hoops

furyofantares 2 days ago|||
It looks like more of a Rust-y way to write Go rather than a Go-ish way to run Rust. So I think the question is more about if you would choose it for something you're choosing Go for today, rather than for something you're choosing Rust for today.
GandalfHN 1 day ago|||
[dead]
GandalfHN 1 day ago||
[dead]
emehex 2 days ago||
Looks a lot like Swift! Awesome!
tempaccount420 1 day ago||
Please commit your CLAUDE.md
gethly 1 day ago||
Go is epitome of simplicity. Why on earth would you want to put another abstraction on top of it?

There is Solod project that is Go subset that compiles into C that is more interesting https://github.com/solod-dev/solod

KaiLetov 1 day ago||
[dead]
weiyong1024 2 days ago||
[flagged]
onlyjanand 1 day ago|
[dead]