« first day (3632 days earlier)      last day (1299 days later) » 

7:27 AM
Also have you guys ever thought it weird that string.size() is 64 bit rather than 32 bit (Are we really going to have such large strings?)
 
it's just size_t isn't it?
 
Yep, so its 64 bit
 
seems alright, especially if you implement it as start_ptr and end_ptr, you don't need to narrow-cast the difference :P
 
But sizeof(std::string) is 32 bits on x64 but only 24 on 32 bit!
 
don't you mean bytes?
 
7:44 AM
yes
Time to _sleep
I also might be wrong about the sizeof operators (they're mostly pulled from memory)
 
Good morning everyone <3
 
 
5 hours later…
12:30 PM
Still a work-in-progress since I've got more special cases to address, but it's looking good compared to what it used to be
 
12:41 PM
How to convert std::filesystem::file_time_type to std::chrono::time_point? Preferably without going through time_t - there is such a solution on SO, but I assume there is a shorter way. C++ 17.
 
nwp
@VioletGiraffe Wrong room. Ask here.
 
@nwp: Thanks, I did not realize that room exists!
 
12:59 PM
AAAAAAAAAAHHHHH
I've got to write another benchmark T_T
 
nwp
> quick_merge_sort does a honorable job for an algorithm that doesn't allocate any extra heap memory.
Found the Frenchy :P
 
1:20 PM
Is it improper English?
 
nwp
It's supposed to be "an honorable" because the h is silent.
And French natives tend to add or remove "h"s seemingly randomly.
 
unless you meant horrible of course
 
1:36 PM
Silent h seem to be pretty much random tbh
Whether they're implicitly or explicitly silent in French is pretty random
For example we pronounce "un humain" as if there was no h, but we take the h into account for "un haricot"
I don't think there is a rule, it seems close from 100% habits
 
nwp
I remember a guy who managed to add a leading h in "arrow".
 
I learnt only recently that the h in "an hour" was silent
Now the thing is since you mostly don't pronounce h at all in French, when you switch to English you overthink it and end up accidentally adding or removing h everywhere :/
 
nwp
Switch to native German and become unable to pronounce "r" properly and mix up "west" and "vest".
Asians being bad at "l" and "r" is commonly known, Germans being bad at "west" vs "vest" less so.
 
 
2 hours later…
3:22 PM
@Morwenn I got bored an found some typos: pastebin.com/shWWduUU
Gotta memorize tree crap for an interview in a few minutes
 
I'm surprised there aren't more, I don't think I've actually reread what I typed
Good luck with that
Thanks for the fixes :)
 
 
2 hours later…
5:47 PM
@Morwenn Well, I failed a simple interview because I kept talking instead of thinking. After the interview I wrote the answer within 5 minutes. Part of the reason I normally don't code and talk, or chew gum and walk :-)
fuck, I need to practice this interview performance stuff because I'm failing like 50% of the interviews on stuff I've been doing for years.
 
@Mikhail I hate coding interviews
 
git commit -m "seppuku"
 
Have you applied to NVidia yet?
;p
 
Not really, but my friends are by now managers there, fortunately nobody reads this chat :-)
Actually, I used a zombie object during an interview with the excuse "if its good enough for nvidia its good enough for us" :-)
 
@Mikhail I literally had to solve an issue with that in some coroutines code today. Did a shared_from_this trick
tbf the issue only happened if you closed the app while it was still doing a DNS query... but still bad news
more fun is the fact that it's basically unnecessary at that point because you're already tearing down the memory space.
 
6:01 PM
Yeah isn't the normal way to make a shared_pointer factory?
 
not really necessary? the DNS task just needed to keep it's owner alive until it returns
so shared_from_this is good enough
 
Oh yeah for your problem. I'm just saying the shared_from_this fixed a wacky problem where you can't quite return shared pointers.
 
if the thing was cancelable It wouldn't even be necessary, but the issue is I can't tell if the owning object is dead
true, honestly the best use of it is stuff like what I was doing
because all you're doing is keeping the object alive until a callback returns
 
Yep, I had to junk like that with Qt because the lifetimes were too confusing :-)
Oh another interview I might have failed involved a diamond hierarchy problem. I proposed a few way to solve it including explicitly selecting the base class. They wanted me to use virtual inheritance...
 
eh... not the stupidest thing I'm doing. I probably should be waiting for the cancellation to complete
@Mikhail CRTP?
 
6:06 PM
Not sure how that helps. I mean if you have a diamond inheritance structure you either have a naming conflict or you should be using composition because you're holding multiple copies of the same kind of thing.
 
:50545973 that technically should be safe?
if you have members that's not
 
Yeah
 
otherwise COM would be completely screwed ;p
 
Yeah I had a typo
 
TIL I learned about virtual in inheritance modifiers
fun
 
6:13 PM
Better now than during an interview :-(
also congratulations, now you don't get the job
 
why?
 
didn't propose that as a solution to a diamond hierarchy problem ;-)
 
well the best solution is to not use diamonds
 
Yep, so that among the things I said. Ugg, I'm getting PTSD from this stuff :-)
Whats important to note is that virtual inheritance can often produce complete garbage because it smashes the objects together. For example, class left_wheel : speed class wheels : virtual left_wheel, virtual right_wheel. Now both wheels have the same speeds?
 
6:20 PM
@Mikhail well yes... you need to use it correctly. You also need to understand when you need to upcast to access one of the parent class' members
 
 
2 hours later…
8:31 PM
Virtual inheritance is super ugly. Using it is a declaration of defeat.
 
9:14 PM
I don't think I've ever seen it in the wild...
 
It's among the few things I haven't seen directly either
 
I'm still butt hurt about messing up that interview question :-(
I have another 2 pre-screening things in an hour, then I can go and complain more
 
 
2 hours later…
11:18 PM
@Mikhail That's tough
I'd probably stress too if I had a technical interview, I haven't had a proper one since my very first internship
 
11:51 PM
Yeah, it was a pretty easy question. Basically you have an interface that reads 16 bits no matter what, now write a wrapper around it.
fuck
pre-screening 1 went well : "We have a tough interview process, so you'll do a bunch of timed tests with me". There is a good chance I'll fail one of the tests. pre-screening 2 was "We have these positions but we're looking at people for the next few months before we make the decision"
 

« first day (3632 days earlier)      last day (1299 days later) »