TWiR quote of the week

I don’t think it’s unexpected that a repr attribute changes the memory representation.

By SimonSapin

1 Like

Rust iterators are the best thing since [Bread]

[Yaniel on Rust (lang) Matrix channel] (You're invited to talk on Matrix)

Everything old is new again. :rocket:

11 Likes

/u/Gankro's "hacking generativity onto Rust" (section 6.3 here) and bluss's implementation. This is some of the most horrifying code I've ever seen, up there with Duff's device in C and partitioning lists in Python.

Basically, you can use lifetime-based black magic fuckery to move bound checks to compile-time.

Rust: you had my curiosity, but now you have my attention.

From this Reddit comment responding to "What is your favorite Rust code snippet?". It's full of links that I'm too lazy to copy over, but those links make it very informative (and funny).

4 Likes

[byteorder] is like the left-pad of unsafe code.

From @Manishearth on HN.

3 Likes

K900_ on /r/rust, responding to someone that asked for help for playing Rust, the game.

https://www.reddit.com/r/rust/comments/5g2ih2/planning_to_start_playing_rust_with_three_other/daoxzz6/

Such large. Very 128. Much bits.

@nagisa in his commit adding 128-bit integers to Rust.

5 Likes

But aren't we all just objects in a global scope?

Not in Rustland. We only have good Traits.

/u/FFX01 and /u/rustcvswvj getting philosophical on reddit

1 Like

I would like to nominate leftoversalads wonderful drawing of Rust as an armored person with 3 Shields.

22 Likes

"The 'S' in 'IoT' stands for 'Security'!"

-- Ms2Ger

17 Likes

You can't post that and leave off the rest of the comic!

steveklabnik has spoken, the directions are clear:

3 Likes

fmtq: I'm ridiculously good at the borrow checker though
fmtq: in Rust.
bstrie: once you've mastered borrow checkers, you may move on to borrow chess

-- #rust-offtopic 22:42 PDT Dec 10 2016

20 Likes

scott: see, at christmas, if I unwrap() my present and I find that it's empty, I immediately have a panic attack and everyone gets really freaked out. if I expect() a present, at least I can send a stern message before I start panicking in the living room.
scott: sometimes I decide ahead of time that if I start having a panic attack, I'm just going to abort the whole christmas thing entirely and leave
scott: but it's easier to unwind if I don't abort and stick around

-- #rust-offtopic 22:03 PDT Dec 18 2016

9 Likes

If you've seen the if programming languages were people cartoon, you'll remember Rust being portrayed as a knight with three shields and a witty message. I like to think of error_chain as a squire loyal to the Rust knight.

-- 24 days of Rust - error_chain

2 Likes

Once again, “Keep calm and add more 'lifetimes” proves to be an effective approach :wink:

-- Karol Kuczmarski in Simulating exceptions in Rust with IIFE

6 Likes

I would argue that if the Rust project would have just one mission statement, it wouldn't be "create a safe systems programming language". It would be "move towards a world where safe systems programming is the norm".

— GolDDranks in reply to steveklabnik in this HN comments thread

15 Likes

This is the first version to have Rust code in it. The public API
remains unchanged. Apologies in advance to distros who will have to
adjust their build systems for Rust - it's like taking a one-time
vaccine; you'll be better off in the end for it.

-- Federico Mena Quintero announcing librsvg 2.41.0

11 Likes

One of the core tenets of C++ is "trust the programmer". One of the core tenets of Rust is "the programmer is a complete numpty; don't trust them unless they sign a contract in blood, in triplicate, promising they know what they're doing."
People make mistakes; Rust asks if you're sure you want to walk into the minefield, C++ enthusiastically runs ahead and blows all its limbs off while screaming "I don't know why you asked me to do this, but anything to make you happy!"

Quxxy on reddit in response to «is most of rust's features only due to a good compiler?»

16 Likes

On Reddit:

cars10k: Why is the newsletter always so late? I still did not get mine.
rustcvswvj: It first had to pass the borrow checker.

3 Likes

On Reddit:

Mh I'd like a sarcastic-dissapointed compiler like

use of moved value: 'val'. Again. There goes my hope you learned that by now. Serously. It's not that hard...
(...)
error: could not compile 'foo'. Maybe try a garbage-collected language?

From /u/ebrythil:

https://www.reddit.com/r/rust/comments/5mlxps/rust_makes_implicit_invariants_explicit/dc57wd3

6 Likes