Arthur Carcano

@krtab
17 Followers
8 Following
22 Posts
The culprit is the vertical tab! Which is of course unicode whitespace but not ascii whitespace! 🙃

Pop quizz!

Do you think that in Rust, `c.is_ascii() && c.is_white_space()` => `c.is_ascii_whitespace()`?

Or put differently, is there an input for which this function will not panic (without using unsafe)?

```rust
fn foo(c: char) {
assert!(c.is_whitespace());
assert!(c.is_ascii());
// Mind the negation below
assert!(!c.is_ascii_whitespace());
}
```

Yes, the implication holds, and I am at peace 😌
0%
Well if you ask, I guess the answer is no?
100%
Of cours this implication if false! RTFM you noob.
0%
Poll ended at .
Arthur @krtab Carcano's "Rust, Unicode gotchas, and the eight different string types" is on stage. He learned to stop worriying and trust UTF-8.
#RustLang #RustInParis
J'ai fait ça https://ngr.yt/bonnestetes/ et j'y ai même inclus un pâques-œuf de saison.
Des bonnes têtes de

Playing in the Creek — LessWrong

When I was a really small kid, one of my favorite activities was to try and dam up the creek in my backyard. I would carefully move rocks into high w…

Ok, I think making a nest out of anti-bird spikes is a level of punk which should inspire all of us.
Amazing picture by @jastrow

#CorneillesParis #crows

Scheduling Internals

Wait, but how does async even work? (Animated)

@krtab from the telecoms bubble through the dotcom bubble into the kim dotcom bubble

In a single day, I have seen articles explaining "for the younger ones" what a fax machine and megaupload were.

I am now officially old.

"Unfortunately, most people seem to have taken the wrong lesson from Rust. They see all of this business with lifetimes and ownership as a dirty mess that Rust has had to adopt because it wanted to avoid garbage collection. But this is completely backwards! Rust adopted rules around shared mutable state and this enabled it to avoid garbage collection. These rules are a good idea regardless."