TWiR quote of the week

When you compile with optimizations, you pay the cost for all of Rust's abstractions at compile time. When you compile in debug mode, you play the cost for Rust's abstractions at run time.

@ArifRoktim in Noob: Why is the performance of release build so much better?

10 Likes

Engineering is not about "not doing mistakes". Engineering is about designing systems that ensure fewer mistakes occur .

Rust is such a system.

~ Amos, Aiming for correctness with types

17 Likes

It took me sometime to let go and embrace getting things working before optimizing. It was a major breakthrough on that journey when I realized that ALL my python variables are Rc<RefCell<_>> , so any chance I had to make a variable that was less complicated than that was already a big optimization. If 1/10 Rust variables had to be that complicated it would not feel good, but it would already be 90% better. So if 1/50 make the code ezere to read and maintain then do it!

-- Eh2406 @ Reddit - Dive into anything

13 Likes

-- @ZiCog in Can we trust libc?

2 Likes

I guess it's worth mentioning that Reddit's markdown parser is written in Rust, based on comrak, and Reddit is running a bunch of Rust every single page request. By CPU cycles, Reddit has got to be one of the biggest users of Rust there is.

-- brson @ Reddit - Dive into anything

6 Likes

In why const fn:

9 Likes

@mirashii on the community discord:

Think of "it works" when you have UB like this: You've flipped a coin 1 time and it's come up heads and you've concluded it's never tails.

22 Likes

What people do with Rust, specifically, is they tell you that once you "figure out" the borrow checker, it's never a problem again and your code design just automatically "improves" (by what metric?). But that's not really true. The borrow checker definitely hamstrings certain things. It's okay to admit that.

ragnese on reddit

3 Likes

@nitred on Hacker News:

As a Python programmer with limited experience with compiled languages, Rust code was more intimidating to read or look at than C++, Java or Go. After only an hour, I am overwhelmed by the sheer beauty and mature design of this language - it almost reads like Python or as well as any compiled language can. I cannot believe that I am smitten by Rust within an hour. Its features seem, obvious.

11 Likes

From @Yandros , a funny meme challenging your understanding of Rust.
-> Passing self to callback returning future vs lifetimes - #5 by Yandros

15 Likes

The config server is currently the most stable, reliable, well-tested and idempotent part of the entire system! I have not had a single hiccup or performance issue out of Calloop + ZMQ + signals + etc. and 99% of my dev time is on the actual config logic, not event loop stuff.

comment on reddit

6 Likes

Rust favours security over convenience. Rust does not want you to make silly little mistakes than can waste so much of your time debugging, which in the end makes it more convenient.

from @Joe232 on URLO

11 Likes

Maybe:

»Incidentally, this leads to the following also being valid code:

fn foo() -> i32 {
    return return return return return!!!!!!!!!!111;
}

«

from Reddit user PatchMixolydic which cited it from Reddit user pczarn.

16 Likes

Congratulations, you have confused the Discourse Rust parser :laughing: that snippet is highlighted incorrectly.

13 Likes

Well, it's just one space apart from being treated correctly:

fn foo() -> i32 {
    return return return return return !!!!!!!!!!111;
}
2 Likes

Incoming proposal to rename return keyword developers

5 Likes

Why do I use the letter ‘o’ for my generic closure param name? [...] I recently realized that since Rust uses pipes to enclose a param block, using ‘o’ makes the block look like a TIE fighter. I am not a terribly serious person.

-- @MrTact, Polishing Rust

11 Likes

Rust is Fast, Mutable ML with a compiler that gives you grief.

@sycration on Discord

(The rest of the quote is really good too, go read it :stuck_out_tongue: )

1 Like

Describing Rust as a systems programming language in 2021 is like describing Microsoft as Windows or Google as search. Yes, Rust is equipped for systems programming, but its applicability is much wider.

Tim McNamara on Twitter

17 Likes

Rust is so easy even neurosurgeons can understand it

/u/baseball2020 on reddit

10 Likes