this post was submitted on 21 Feb 2025
97 points (98.0% liked)

Linux

8895 readers
194 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 54 points 1 day ago

From Linus's reply:

Honestly, what you have been doing is basically saying "as a DMA maintainer I control what the DMA code is used for".
And that is not how any of this works.
What's next? Saying that particular drivers can't do DMA, because you don't like that device, and as a DMA maintainer you control who can use the DMA code?
That's literally exactly what you are trying to do with the Rust code.
You are saying that you disagree with Rust - which is fine, nobody has ever required you to write or read Rust code.
But then you take that stance to mean that the Rust code cannot even use or interface to code you maintain.
So let me be very clear: if you as a maintainer feel that you control who or what can use your code, YOU ARE WRONG.

and

So this email is not about some "Rust policy". This email is about a much bigger issue: as a maintainer you are in charge of your code, sure - but you are not in charge of who uses the end result and how.

100% agree. No one should think they're entitled to be doing that.

[–] 9point6 37 points 1 day ago

Nice bit of spicy Linus to start the day.

Good though, these dinosaur maintainers really need to wind their necks in. From what I've seen so far, Rust is the best tool for the job in the situations where it's been used. I struggle to see anything more from the detractors than a toddler tantrum about having to learn a new language—particularly given the current situation where they've been treated with kid gloves and are allowed to ignore it entirely.

[–] [email protected] 21 points 1 day ago

I like it that Linus stands his ground here. Hope that rust brings in more developers.

[–] [email protected] 13 points 1 day ago (2 children)

For those who failed to read TA, Linus appears to finally have read the PR and decided that what was indeed submitted was client code. No, he's not forcing subsystem maintainers to adopt Rust; he's saying they can't object to clients using Rust.

The fact is, the pull request you objected to DID NOT TOUCH THE DMA LAYER AT ALL.

"The document claims no subsystem is forced to take Rust"

that is very much true.

but as a result they also won't have any say on what goes on on the Rust side.

there's that "wall of protection" around C developers that don't want to deal with Rust issues in the promise that they don't have to deal with Rust.

If you don't want to deal with the Rust code, you get no say on the Rust code.

I didn't read the patches, but what I see is that Linus believes that the original objection to the PR was wrong. He's asserting that subsystem maintainers who choose to not interact with client code get no say in whether the code is merged or not.

What he's not saying is that subsystem maintainers have to start including Rust in the subsystems; this isn't Linus forcing people to adopt Rust.

What I find most interesting about this is the whole premise of allowing Rust into the main tree. I'm sure there was a process, but does that mean now the wedge is in the door and people can start arguing about including Haskell? It would seem to me that once you make an exception, your argument for rejecting other languages becomes weaker. Why not Ada? It's at least as memory safe - if not more - than Rust. Haskell programs can be provably correct, and there are tools for these proofs. This is an even more powerful argument for Haskell over Rust - it's as memory safe, but also provide Curry-Howard correspondence, which Rust doesn't. Is it a popularity contest? What about Zig, which is in the Rust ballpark for safety, but vastly superior compile times (and, arguably a more simple mental model)? Odin? These are all type-safe, compiled languages without a runtime (hence, no Go).

[–] AnyOldName3 12 points 1 day ago (1 children)

Most of the languages you've mentioned aren't systems languages, so don't make being a good language to write an OS in a high priority. More languages might be accepted in the future, but if they are, it'll be ones that are a natural fit for the problems they're solving.

[–] [email protected] 2 points 16 hours ago (2 children)

I don't know about Ada, except in jokes about how hard it is to write code that satisfies the compiler, which gives it something in common with Rust. Haskell is a horrible systems language. OCaml might be better. But I don't think it's justified to claim Zig isn't suitably for systems programming, or for writing OSes. Maybe even Odin, but I'm only peripherally aware of it, and don't know its strengths. Both are young and immature compared to Rust.

What will be hilarious is when, a little down the road, something like Zig will be mature; I'd bet money the loudest gate-keepers objecting to letting it in will be Rustaceans saying some shit like, "Rust already satisfies the safety needs of the kernel; there's no need to add another language."

[–] [email protected] 3 points 8 hours ago* (last edited 7 hours ago)

I'm very firmly in the Rust for Linux camp because I am in the "make Linux better" camp, and I don't see why eventually getting Zig in the kernel would be a problem. If Zig solves problems that C and Rust don't, by all means, it should be brought in.

However, one of the primary reasons Rust was chosen is that it is memory-safe by default. Zig, on the other hand, has opt-in safety. So unsafe Zig should probably only go in very specific places where C and Rust can't do the job. And ideally, there would be some rules that require the usage of safe Zig everywhere else.

Ignoring Zig, the language, Zig's compiler toolchain is hands-down, the best I've ever seen, and I think introducing Zig to the kernel by making "Zig-built Linux" a thing, would be a really natural way to get that process going.

[–] [email protected] 3 points 13 hours ago

I don't believe, Zig provides much in terms of safety? To my knowledge, it uses manual memory management à la C, just being less horrid in some aspects, like using an option type instead of null pointers.

[–] [email protected] 2 points 1 day ago (1 children)

I really don't see why they should feel obliged to include another language, just because they included Rust. There is no fairness guarantee or whatever. If anything, Rust now fills the memory safety and modern language gap, so there is much less of a need to include another language.

[–] semperverus -5 points 23 hours ago* (last edited 23 hours ago) (2 children)

This is cult-like shut-out tactics plain and simple. Get your foot in the door, keep everyone else out. Rust is superior! All code must be Rust! All other languages get the Axe!

This behavior is heavily agenda-driven and needs to stop.

[–] [email protected] 4 points 15 hours ago

You might want to ease up on the conspiracy theories. I'm not part of some irustinati that wants to force everyone to use Rust and nothing else. I was merely describing what I believe to be reality. In fact, I expect the strongest opposition to a third language will come again from those who've been coding nothing but C for the past decades.

[–] abruptly8951 4 points 23 hours ago

Feeding the troll 🤷‍♂️ "agenda driven" what does that even mean 😆

No one said other languages aren't allowed. Submit a patch and prepare yourself for years of painstaking effort.