TWiR quote of the week

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

4 Likes

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 https://github.com/rust-lang/rfcs/pull/2137#issuecomment-328956519

2 Likes
<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.

12 Likes

@Havvy in #rust-offtopic:

<Havvy> unsafe impl !Send for MyType // Don't thread on me
14 Likes

“The compiler is grumpy for you so you don’t have to be” – Élisabeth Henry @RustFest Zürich

17 Likes
<pnkfelix> what is our formatting style for a boolean `a && b && c` where I need to break the line in the middle? 
<pnkfelix> in particular, do I do the break after one of the `&&`, or before it?
<WindowsBunny> pnkfelix: I personally put && after the newline, but I'm also apparently several standard deviations away from normal
<pnkfelix> WindowsBunny: clearly the answer is to support breaking the line between `&` and `&`; that would make everyone happy, right? ;)

https://botbot.me/mozilla/rust-internals/2017-10-11/?msg=92169028&page=2

8 Likes

Rust is like English, just with more turbofish.

Xion_ on the #rust irc channel. (https://botbot.me/mozilla/rust/2017-10-19/?msg=92498115&page=13)

7 Likes

from #rust-offtopic:

 <kiwi> So how did Rust's borrow checker get invented and was it there since the very beginning?
 <kiwi> Because it's a really good idea
 <panicbit> We just unsafely borrowed it from the future
15 Likes

And that is actually supported :open_mouth: https://play.rust-lang.org/?gist=23ebc666f4ab8b7b2ce9a2fcdf4abf13&version=stable

4 Likes

Clippy catches it:

warning: taken reference of right operand
  --> src/main.rs:14:5
   |
14 |     a() & & b();
   |     ^^^^^^-----
   |           |
   |           help: use the right value directly: `b()`
5 Likes

From this AMA :

I guess I would say that, it’s not only important that it be possible to do a good design in a given language, but that the language actively encourage it by making the bad design painful. I think rust does a FANTASTIC job of this.

9 Likes

#rust:

<m4b> i’m writing generic code so generic right now i don’t know how its working, but it does

Referring to this code.

5 Likes

https://github.com/rust-lang/rust/pull/45501#issuecomment-340159627:

assume is dark magic of the higher schools, so I’m not surprised there are sparks. I think it’s best to not use it unless absolutely necessary.

@bluss

3 Likes

Is something wrong with me if that description actually made me want to look up this assume thing? :stuck_out_tongue:

1 Like