TWiR quote of the week

Rust: spend your lifetime thinking about lifetimes.

– /u/heysaturdaysun

Source: Reddit - Dive into anything

3 Likes

Failure is not an OPTION<T>.
It's a Result<T, E>.

14 Likes
4 Likes

winapi is big. Really big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist, but that's just peanuts to winapi.

When cargo doc was designed, they did not forsee winapi. They did not believe the legends. The warnings.

But now, like the Cygnus, caught in the pull of a black hole, all we can do is fall. Fall into darkness.

https://www.reddit.com/r/rust/comments/7td9yq/cargo_doc_takes_forever_anyone_know_why/dtbmt39

u/Quxxy on r/rust (suggested by u/jswrenn)

14 Likes

Seeing this just after a now-deleted-for-inappropriate-tone example in the discussion around RFC 2308 (which mentioned a 330-variant enum in SPIR-V) made a half-formed draft of the following come to mind:

Rust: The Murphy's Law language for programmers tasked with works both subtle and powerful.

(I had to ad-lib the "tasked with works both subtle and powerful" part because I couldn't google up whatever reference was tickling my brain.)

1 Like

Rust has a very high friction coefficient.

We call it grip and it lets us drive fearlessly around hard corners very fast.

/u/asmx85
https://www.reddit.com/r/programming/comments/7ugm8e/c2_c_with_cleaner_syntax_a_module_system_no/dtkde2s/

26 Likes

Even though it's an obvious typo, I must nominate @droundy's statement about eternal love:

If a panic or exit happened in the loop, then the variable would not love forever.

From: Passing a borrowed variable to a thread from an endless loop - #2 by droundy

I'm very happy that Rust saves us from such dire consequences.

9 Likes

Rust's standard regex library isn't the fastest in the world, and the lack of backtracking can be limiting, but it is highly optimised for Rust's main use case of posting showoff comments on Hacker News.

From Regular Expression Matching Can Be Simple and Fast

4 Likes

QuietMisdreavous on removing hoedown from rustdoc (link):

Begone, demon of the foul C! Your presence is no longer wanted here! With this strike, I commit you to the depths of history, never to torment our fair land again!

5 Likes

As found in the commit (cur 5bd5bc3):

Is it really time? Have our months, no, years of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long?

2 Likes

(By the way &mut T and &T should be called exclusive and shared references, rather than mutable and immutable, since that’s what they’re really about.)

rust-arenas-vs-dropck

2 Likes

I sea what you did there

3 Likes

This was rather a highly upvoted comment on r/rust I made so I thought I'd share.
The comment was made by sleepy-me and nominated by middle-of-day-me, so it's not self-promotion, right?

<bad joke>
No, I don't have Dissociative Identity Disorder.
At least, that's what I tell myself when I ask myself that question.
</bad joke>

As an ugly workaround: change the file format, compile it with GCC and link the resulting .o, accessing it via an extern "C"? -- u/bestouff

eww. eww.

Eww.

That would work though.

-- u/CAD1997

1 Like

If you actually had Dissociative Identity Disorder (DID), or knew someone who did, you would have written that joke as follows:

<bad joke>
No, we don’t have Dissociative Identity Disorder.
At least, that’s what we tell ourselves when we ask ourselves that question.
</bad joke>

2 Likes

This is a known issue which will probably get fixed at some point. For now, don't do impossible things; the restaurant at the end of the universe is overrated, anyway.

Quxxy in Reddit - Dive into anything

5 Likes
<mbrubeck> 'cause I'm so Into::<You>::into(you)

(on #rust-beginners)

11 Likes

I'd like to nominate @Bors this week, for its reply to previous candidate @QuietMisdreavus:

Bors replied: (emphasis mine)

Rust is so intelligent, even the build bots have a sense of humour! :smiley:

9 Likes

...Well there are some places go[lang] can't go, but Rust can!.. ~ Rust Nairobi Meetup Attendee

1 Like

Imagine going back in time and telling the reporter "this bug will get fixed 16 years from now, and the code will be written in a systems programming language that doesn't exist yet".

https://blog.mozilla.org/nnethercote/2018/03/09/a-new-preferences-parser-for-firefox/

16 Likes

If Rust is martial arts teacher, Perl is a pub brawler. If you survive either, you’re likely to be good at defending yourself, though both can be painful at times.

(Via Should You Learn Rust | Vorner’s random stuff)

7 Likes