« first day (2651 days earlier)      last day (825 days later) » 

7:21 AM
I've pushed an open-source thing with rust-version = "1.58". I wonder how many issues this will lead to
 
 
2 hours later…
9:38 AM
One of those frustrating situations when answering SO questions: stackoverflow.com/questions/70719073/…
writing (and explaining) a correct answer takes a lot of time and effort, which the asker is utterly dissatisfied with.
...and they accuse everyone else of having a bad attitude.
"I want my raw pointer with no lifetime info to be converted to a &str, and I want the conversion to be 100% safe and 100% zero-cost."
 
 
2 hours later…
11:15 AM
Yeah, that one reeked of either entitlement or Dunning-Krueger. Neither of which are nice to have here.
A more defensive stance is to be more selective on what to answer.
 
11:59 AM
you're of course right - but it was also a nice technical challenge.
regardless of the attitude of the asker, the question made me _think_ about how I'd approach the problem (or if the problem is even solvable in safe Rust) and present what I think is a good answer.
 
12:16 PM
part of the problem is that some C and C++ programmers think of Rust as just another _syntax_ for doing systems programming, and don't care about the guarantees that make Rust what it is.
for people like that, my answer is just unnecessary complication, a ceremony for the inherently "simple" task of casting `*const u8` to `&str`.
 
 
1 hour later…
1:30 PM
It's not just my eyes. The font-size is 12px for messages and a mere 11px for those starred!
 
 
1 hour later…
2:56 PM
@DenysSéguret Thanks! My sisters did a great job, it was a good party. Now, a lot of finding places for things to do
 
 
3 hours later…
5:42 PM
oh wow, Rust can optimize Vecs into arrays? I was trying something out on Compiler Explorer and I wrote vec! out of habit, but the vec has a fixed number of literal values; the compiler apparently turned it into a static array
So, if one wants to slice a sequence given an offset and a length, the natural approach would be to write seq[offset..(offset + length)], right? But what about seq[offset..][..length]?
 
@FrancisGagné you want alternative syntax ?
 
@Stargateur no, I just want to see how the room responds to the sight of seq[offset..][..length]. like, is it too "clever"?
 
I'm more thinking you drunk
 
aren't you both french? saying "you're drunk" is like saying "it's past noon"
runs away
 
5:58 PM
@FélixAdriyelGagnon-Grenier I'm not French, I'm Canadian
 
oh heyyyyyy!!!! hugs
 
clearly you haven't looked at my profile, otherwise you would've known hugs back
@FélixAdriyelGagnon-Grenier hmm, either my memory is playing tricks on me or your profile used to mention your location
 
@FrancisGagné I did just now and got a semblant of déjà vu, but I don't know :)
@FrancisGagné it did
still in the province, moved to sherbrooke
 
 
1 hour later…
7:15 PM
This is an interesting point: github.com/Canop/lazy-regex/issues/10
 
 
3 hours later…
10:33 PM
@DenysSéguret it is and I ended up reading rust-lang/rust, " Tracking Issue for once_cell #74465" wondering what its current state is.
 
10:45 PM
@DenysSéguret uh, Lazy::new() should infer F from the closure type, no? IIRC default values for type parameters don't do much (unless that changed recently)
I asked rust-analyzer to extract some code that contained a continue; to a method. I expected broken code, but rust-analyzer actually used ControlFlow instead. Now the weird thing is it used ControlFlow::Break for continue and ControlFlow::Continue for the end of the selection. A bit confusing at first. :P
 
11:38 PM
hmm, would it be intuitive for std::cmp::Ordering to support the ? operator (Try trait)? my thinking is that ? would propagate Less and Greater and let Equal pass through (possibly converting it into () because there's no "information" left)
 

« first day (2651 days earlier)      last day (825 days later) »