TWiR quote of the week

There should be a huge red warning on Rust's package, saying it is addictive. How am I supposed to use any other language now? :innocent:

@vorner on Gitter: rust-lang/rust - Gitter


#rust-internals 2014-01-17 20:13:31

<@brson> i just rejected a rust-dev post from somebody complaining about the performance of the rust game
<@acrichto> brson: haha
<@acrichto> at some point those posts will start to decline


This tickled me, from @frankmcsherry 's Abomination docs:

Abomonation has no safe methods. [...] If you are concerned about safety, it may be best to avoid Abomonation all together. It does several things that may be undefined behavior, depending on how undefined behavior is defined.


These "entomb", "embalm" and "exhume" method names are gold too :slight_smile:

Whoa. How is Abomonation better than just trying to reuse core dump data?

1 Like

No, I was just wondering, because sometimes boxing values can get a bit tiresome.

Hopefully you’re not boxing all that much in Rust :slight_smile:.

1 Like

From u/Quxxy on r/rust about rules of thumbs for use:

Do I use a specific name many times? use that name.

Do I use many things from a module, but only use them infrequently? use the module.

Do I use something only very rarely? I don't use it, I write the full path out, or I use only within the functions it's actually needed.

I don't wildcard unless I'm being sloppy and writing something I don't care about.

Whether I export a module structure or just flat symbols depends entirely on expected uses. Does the module structure matter to the user? No? pub use to create a flatter API. Does the module structure help with having lots of names? Keep it.


Another one from Aturon about ergonomics initiative RFCs:


you can ask a Future "are we there yet", to which it can answer "yes", "no", or "don't make me come back there"
an Iterator is something you can keep asking "more?" until it gets fed up and stops listening
Display is just a way to say "show me your moves", with the other formatting traits being other dance moves
if something isn't Send, then it's a cursed item you can't give away, it's yours to deal with
if something isn't Sync, then it won't even appear for other people, it's possibly an apparition inside your head
things that are Clone can reproduce asexually, but only on command. things that are Copy won't bother waiting for you

-- @QuietMisdreavus on Twitter


<•mbrubeck> in the US and Canada we have a three-day weekend for watching rustconf videos


When programmers are saying that there are a lot of bicycles in code that means that it contains reimplementations of freely available libraries instead of using them

Presumably the metric for this would be bicyclomatic complexity?

— tomwhoiscontrary


I think it's better to write it as "When [Russian] programmers..." for unfamiliar with the context.

1 Like

Rust did this correctly.

— /u/kpcyrd on being vulnerable to the exploit that affected Equifax


I'd recommend against having the community try and look smug in the face of this.

1 Like

I’d recommend against having the community try and look smug in the face of this.

Agreed. The whole "Rewrite it in Rust" meme already smacks of Martin Shkreli coveting a Wu Tang CD.

1 Like

This is also more of a Struts problem, although Java features (reflection and dynamic class loading specifically) enable this footgun. So it's not Rust vs Java, if that was the implication. Rust doesn't have dynamic class loading and reflection, but someone could build a serde serializable type to do custom remote command/process execution. It would be deliberate and not some oversight though, but still possible given enough will.

Doesn't QtQuick allow dynamically instantiating any class with MOC bindings? And QtQuick is bound to Rust?

Don't know anything about QML really, so can't comment :slight_smile:. However, whatever it has will undoubtedly be some sort of dynamic loading that Qt invented, and is not C++/Rust specific. That's different from Java where dynamic class loading and reflection come out of the box with the language.

The footgun reduction in these latest proposals is seriously impressive. Any more improvements and this won't even feel like C anymore (in a good way!).

@Ixrec on RFC 2137 at

<heycam> one of the best parts about stylo has been how much easier it has been to implement these style system optimizations that we need, because Rust
<heycam> can you imagine if we needed to implement this all in C++ in the timeframe we have
<bholley> heycam: yeah srsly
<bholley> heycam: it's so rare that we get fuzz bugs in rust code
<bholley> heycam: considering all the complex stuff we're doing
* heycam remembers getting a bunch of fuzzer bugs from all kinds of style system stuff in gecko
<bholley> heycam: think about how much time we could save if each one of those annoying compiler errors today was swapped for a fuzz bug tomorrow :-)
<njn> you guys sound like an ad for Rust

Conversation from #servo between some long-time Firefox developers.