logoalt Hacker News

Gossamer: a Rust-flavoured language with real goroutines and pause-free memory

47 pointsby mwheelertoday at 6:32 PM38 commentsview on HN

Comments

rsyringtoday at 8:47 PM

If you are interested in Gossamer, you may also be interested in Lis, which is Rust flavored and compiles to go: https://github.com/ivov/lisette

From their readme:

  Safe and expressive:

    - Hindley-Milner type system
    - Algebraic data types, pattern matching
    - Expression-oriented, immutable by default
    - Rust-like syntax plus |> operator and try blocks
    - Go-style interfaces, channels, goroutines

  Quietly practical:

    - Interop with Go ecosystem (WIP)
    - Linter, formatter, 250+ diagnostics
    - Fast incremental compiler, readable Go
    - LSP for VSCode, Neovim, Zed, Helix, GoLand
show 1 reply
pantsforbirdstoday at 9:13 PM

I'm fairly sure the code snippets aren't equal in the last python example:

```python names = sorted({name.lower() for name in users if name}) ```

vs.

```gossamer let names = users |> iter::filter(|n: String| n.len() > 0) |> iter::map(|n: String| n.to_lower()) |> iter::sort_by_key(|n: String| n.len()) ```

Python is sorting a set (unique values only), but I'm not seeing a unique or set approach for gossamer.

IshKebabtoday at 9:41 PM

It's only 2 months old. Clearly vibe coded. Still, kind of crazy what you can vibe code now.

Also the actual language design seems quite nice. I'd love something like this that was embeddable (and not vibe coded). There are basically no good easily embeddable languages. Everyone used Lua but it sucks.

throwrioawfotoday at 7:57 PM

There was once a time when I'd see a page like this and think "wow, must be a great project with such a polished website".

Now, it's just a neutral or perhaps even very slightly negative signal (especially the em-dash in the very first line of the page).

Anyone able to tell me if this is a project actually worth paying attention to, or just another raindrop in the current monsoon of slop?

show 5 replies
samuelltoday at 8:02 PM

Glad to see more languages adopt true goroutines [edit: lightweight threads or fibers] with M:N scheduling. Surprised more haven't. Among compiled language I'm only aware of Go and Crystal off the top of my mind.

show 2 replies
poulpy123today at 7:53 PM

Sorry but the name means bitterkid in french, I can't get over it :D

show 1 reply
quotemstrtoday at 7:42 PM

Gossamer has a cycle collector and eager reference counting. Good luck dropping the last reference to a 10,000-node graph, especially if cyclic. That means it doesn't have "pause free" memory. If you want pause freedom, go use ZGC or another modern GC on a modern VM.

I just can't take seriously this spate of languages that ignore the past 30 years of research into automatic memory management. We have multiple open-source pauseless miracles GCs right there before our eyes, yet it's the trendy thing in language design to foist memory management on users.

You don't even have to use a big VM if you want good GC. Go use MPS. Lots of options out there, even if you want to implement your own VM.

show 3 replies
rohitsriramtoday at 7:58 PM

[flagged]

lstoddtoday at 8:20 PM

IDK what's the fuss. m:n scheduled by io is .. 2000s-era. The implementation was so obvious in like 2005, that even I patched then Python 2.6 in, so we at my then company could get rid of Twisted.

Also let you remind that M:N scheduling was the FreeBSD's pthread implementation for quite a bit too long. No, it didn't play well with MySQL at the time.