TWiR quote of the week

Another good quote from the same article:

We assumed Rust would be lower productivity than a language like Java, but that turned out to be an illusion. There was definitely a learning curve, but once the team was ramped up, they moved just as fast as they ever had.

9 Likes

Invoking undefined behaviour turns a tower of abstractions into a matryoshka doll of landmines.

-- Something I just came up with a few minutes ago in an e-mail to sum up an explanation of how, because a call to *_unchecked is probably going to call *_unchecked methods on whatever types are being wrapped, you have to understand every layer of abstraction to understand why breaking an invariant may invoke undefined behaviour.

6 Likes

Our experience is that no matter how many safeguards you put on code, there’s no cure-all that prevents bad programming. Of course, to take the contrary argument, seat belts don’t stop all traffic fatalities, but you could just choose not to have accidents. So we do have seat belts. If Rust can prevent some mistakes or malicious intent, maybe it’s worth it even if it isn’t perfect.

9 Likes

You might be asking: why did you rewrite [...] in Rust? And yeah, I don’t really have a good reason. It’s a hobby project. Like gardening, but with more segfaults.

By Collin Richards in Introducing tmux-rs

4 Likes

Great. He translated all of tmux from C to Crust: Introducing Crust. Like C/C++ but C/Rust

1 Like

In this discussion about the size of non-inhabited types.

4 Likes

It does fit in floats, though!

1 Like

C has to deal with the lifetimes of pointers too. The fact that the C compiler doesn't help you find problems doesn't make the underlying problem go away

Remo Senekowitsch, describing A Newbie's First Contribution to (Rust for) Linux

11 Likes

Coming soon, fn size_of_f32<T>() -> f32. You can even make dynamically sized types NaN!

4 Likes
9 Likes

In addition to rewriting the tools in Rust, a safer language, some little-used features of sudo were not implemented in order to reduce vulnerability surface area. This turned out to be meaningful in July of 2025 when two vulnerabilities (..) were discovered in sudo features not implemented in sudo-rs. In response to one of those, sudo has deprecated and will remove the feature hosting the vulnerability.

– Josh Aas on the prossimo blog

I like the quote because it shows that a) Rust doesn’t solve every problem (though it does solve a few), and b) it can be a very good idea not to implement all features.

9 Likes

I clone() everything now. The Borrow Checker permits this small rebellion, this inefficiency. It knows I suffer more knowing my code is not idiomatic. Every .clone() is a confession of my failure. Every Arc<Mutex> a monument to my inadequacy.

– TheEldenLorrdd on Reddit, excerpt from "I Have No Mut and I Must Borrow". Reddit - The heart of the internet

The whole thing is good if it's not too long for the TWiR quote.

5 Likes

Many programmers dream of working on a farm or living in the woods, but when I retire, I’ll just be coding Java in Intellij all day, because that was good and nothing else is really there.

~ matklad in their Lobste.rs interview

(Quote not Rust-related, but the person who uttered it sure is)

2 Likes