Three things stick out to me on https://gossamer-lang.org/docs/migration/rust/ * No user macros at all. Six fixed format! / println!-family macros expand at parse time. - Meta programming is incredibly important in rust. * (unsafe is) Forbidden at the language level. No unsafe keyword in Gossamer source. std is safe-Rust too. - No low level programming then. * No move semantics. Non-trivial values are heap-allocated,…
Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
81–90 of 98 posts
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#82If 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: - Inter…
I would also like to toss my project into the ring, which also allows mixing most real-world Rust & Go packages together, on runtime & syntax compatible level. https://github.com/deepai-org/omnivm Pardon the sloppy readme - it actually does work :)
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#83Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#84Earlier quoted context omitted.
Haskell does too. And it predates Go by a large margin, such that calling it goroutine is weird. And within Google, the C++ implementation fiber also predated goroutines. It really shows that this is more of a library feature rather than a language feature.
I agree with your objection to treating goroutines as the baseline implementation of fibers. However, I would disagree with categorizing the feature as a library feature vs a language level feature. In “low-level” languages (C, Rust, Zig, C++, etc) the ability and option exists for having ‘green threads’ with most of their commonly assumed characteristics be library based constructs (although see [1] for why that’s n…
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#85Earlier quoted context omitted.
Java and Crystal are not equivalent - neither have preemptible threads. Lots of other languages have co-routines or other cooperative systems - async/await are really just variants of that. I didn't check if Gossamer is actually preemptible. I believe the short list of production languages with preemptible M:N schedulers are limited to: Erlang/Elixir Haskell Go
Java threads including Virtual Threads (JDK 21+) are preemptive.
This paragraph is the only one containing the word "preempt" in JEP 444:
"The scheduler does not currently implement time sharing for virtual threads. Time sharing is the forceful preemption of a thread that has consumed an allotted quantity of CPU time. While time sharing can be effective at reducing the latency of some tasks when there are a relatively small number of platform threads and CPU utilization is at 100%, it is not clear that time sharing would be as effective with a million virtual threads."
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#86Earlier quoted context omitted.
Totally agree, misleading. The syntax looks like rust, but esp w/the memory management model (reference counting), it’s going to have more overhead than rust when it’s running, more like Swift or at worse, Python.
Originally I replied here that I thought you were both missing the point (but I was wrong). I wrote: It has a garbage collector and goroutines, so clearly it is not trying to be a systems programming language. Then ... I saw that it does indeed pitch itself as a systems programming language. So, I guess you both are right. If Gossamer were to drop that claim, then I'd say it looks impressive to me. I have often wante…
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#87Three things stick out to me on https://gossamer-lang.org/docs/migration/rust/ * No user macros at all. Six fixed format! / println!-family macros expand at parse time. - Meta programming is incredibly important in rust. * (unsafe is) Forbidden at the language level. No unsafe keyword in Gossamer source. std is safe-Rust too. - No low level programming then. * No move semantics. Non-trivial values are heap-allocated,…
It’s not a bad approach, in that for most general programming one doesn’t need those things. Granted, macros can be convenient.
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#88Three things stick out to me on https://gossamer-lang.org/docs/migration/rust/ * No user macros at all. Six fixed format! / println!-family macros expand at parse time. - Meta programming is incredibly important in rust. * (unsafe is) Forbidden at the language level. No unsafe keyword in Gossamer source. std is safe-Rust too. - No low level programming then. * No move semantics. Non-trivial values are heap-allocated,…
Google called Go a "systems language". I agree its not the right term, but people do use it to describe a language used in infrastructure software like Docker or Kubernetes. To me it makes a lot of sense as a starting point. The world does not need another Rust since we have a perfectly good one. People who like Rust's type system but don't care to think about ownership when writing application code, and who apprecia…
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#89Earlier quoted context omitted.
Google called Go a "systems language". I agree its not the right term, but people do use it to describe a language used in infrastructure software like Docker or Kubernetes. To me it makes a lot of sense as a starting point. The world does not need another Rust since we have a perfectly good one. People who like Rust's type system but don't care to think about ownership when writing application code, and who apprecia…
does rust have FFI, then? (aka stable ABI)
What I was talking about though, was calling into C APIs through FFI, which pretty much every language except Gossamer can do.
Re: Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
#90Earlier quoted context omitted.
The entire concept of a pauseless GC is that you have no uncontrollable latency. The GC can run on a background thread with zero stop-the-world. Of course, this assumes you're in a preemptive environment with access to other threads, etc.
@LoganDark You're right, as long as there is an object graph to scan, 'uncontrollable' latency is an inherent trade-off in GC-based systems. I’ve taken a different route with a C++20 execution engine that eliminates the object graph scan entirely by using pre-allocated, static memory pools and lock-free SPSC structures. It's essentially moving from 'managing GC pauses' to 'deterministic, zero-allocation execution'. H…