TWiR quote of the week

I quite liked TomP's answer:

One major difference is that Ada was created at a time when most military computers were single-core with in-order sequential execution and no cache. Although limited SIMD existed, any other concurrency was very coarse-grained. That’s the underlying execution model for C, Pascal, C++, etc.

Rust was created to address the complexity of multi-core processors with multi-level cache hierarchies where computational efficiency may require much concurrency. In my experience few humans are capable of error-free design and implementation of highly-concurrent systems unless they employ tooling that flags their errors in conceptualization or implementation.

4 Likes

Confusion is a product type.

—/u/casual-cryptarch on explaining traits and references at the same time

1 Like

Yes, Markdown is like Frankenstein's monster before applying electricity, and Org-mode is the monster after applying electricity.

-/u/jimuazu in this thread about a parser for Emacs' Org-Mode format

(not really a quote about Rust, but I found it pretty enjoyable nonetheless)

3 Likes

A compile_fail test that fails to fail to compile is also a failure.

The trybuild README.

17 Likes

Yes, this adds to Rust’s “wierdness budget”, but this is doing it for the right reason: discovering a way to solve a problem that many programming languages have, but few have really tackled.

jcsoo on await syntax (on internals)

9 Likes

The big gorilla 3D game framework. Apparently it actually works.

SimonHeath on Amethyst

1 Like

Never play drinking games with the rust compiler. It will destroy you and show you how sorry of a developer you are!

3 Likes

Just the presence of well integrated Algebraic Data Types (ADTs) makes an incredible amount of difference. They are used to represent errors in a meaningful and easy to understand way (Result<T>), are used to show that a function may or may not return a meaningful value without needing a garbage value (Option<T>), and the optional case can even be used to wrap a null pointer scenario in a safe way (Option<Ref<T>> being the closest to a literal translation I think).

That's just one small feature that permeates the language. Whatever the opposite of a death-of-a-thousand-cuts is, Rust has it.

tomcatfish on "... how (Rust) takes basic concepts from low to high level without bothering me or killing performance..."

8 Likes

Rust attracts people who like challenges.

3 Likes

He's not pointing in the right direction, but the direction itself is calling!

11 Likes

Sure, but isn't it more likely that the person who wrote the Rustonomicon, whoever they are, is just a huge dingus‽

- /u/kibwen in response to the author of the Rustonomicon

Bonus points for the interrobang.

7 Likes

Note that the HTML syntax is a language almost, but not quite, entirely unlike XML.
-- html5ever README

13 Likes

More like "boring is good" kind of people :smiley: no surprises whatsoever

"The cost of zero-cost abstractions". Looks like a title for some sci-fi...

4 Likes

Writing code in Rust makes me feel like I have an obligation to make code as fast as possible in a way other languages don’t, just by surfacing the costs better. Sometimes I need to remind myself that actually it’s fast enough already.

http://thume.ca/2019/04/18/writing-a-compiler-in-rust/

20 Likes

I used to think of programs as execution flowing and think about what the CPU is doing. As I moved to rust I started thinking a lot more about memory: how the data was laid out in memory, and how ownership of different parts of memory is given to [different parts of the program] at run time.

-- Oliver Gould

(slightly edited from spoken to written style)

https://www.youtube.com/watch?v=FYGS2q1bljE

Time of the quote: https://youtu.be/FYGS2q1bljE?t=280

10 Likes

– zeroexcuses
from https://users.rust-lang.org/t/can-a-struct-that-own-an-instance-of-a-struct-also-maintain-a-reference-to-this-instance-without-a-generic-lifetime/28542/9

10 Likes

I like that one since it's in some ways a modern take on a classic:

Show me your flowcharts and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won’t usually need your flowcharts; they’ll be obvious.
– Fred Brooks, The Mythical Man-Month (1975)

18 Likes

why doesn't 'static, the largest lifetime, not simply eat all the others

https://twitter.com/Gankro/status/1133435497806815232?s=09

'static is biggest but actually,, weakest of lifetimes, becuase it is subtype of every lifetime

'static is big soft friend

pls love and protect it

11 Likes

This is also an incredibly important shift when trying to write performant software. See also this great C++ talk: https://youtu.be/rX0ItVEVjHc

3 Likes