« first day (3225 days earlier)      last day (1717 days later) » 

user8104581
12:45 AM
Almost exactly 3 years earlier, nationalgeographic.com/news/2016/08/…
 
1:15 AM
Old news on old shark :'(
 
 
2 hours later…
2:59 AM
@TelKitty Carbon dating on a living (recently deceased I suppose) shark? That sounds fishy.
 
3:31 AM
@CaptainGiraffe it's possible but not useful. However, there might not be a better way age an Icelandic shark considering their longevity
 
 
2 hours later…
5:51 AM
Interesting to observe how the Hong Kong protests are affection it's share and property market.
Chinese communist party is pretty sh!tty, but HK protesters are quite delusional too. Who will get hurt more if HK economy crashes and HK plumages into a recession, authority in Beijing or residents of HK?
 
6:08 AM
@TelKitty HK is a super expensive and the quality of life is low irrespective of how well the economy is doing in HK. All of these protests in my opinion is really just a lack of living space and opportunity especially for the demographic protesting.
 
But ruin it's economy will only make it worse.
Hk's stock market is already at the verge of recession, my prediction is that if the protest does not stop in a months time, it's property market will crash too in within 2 years. HK will be a living hell giving its lacking of nature resources to fall back on.
Trade, finance, travelling - most of HK's major industries depend on stability. Causing instability will be as wise as self immolation.
 
HK is no longer the economic hub it once was. China has been able to replicate the model all over China. Objectively it needs to be integrated. This of course this is not to dismiss the grievances and fears people have.
Which are legitimate
 
 
6 hours later…
12:28 PM
@JerryCoffin constinit made its way into the standard
@wilx the language and standard library are more and more complicated because problems have to be solved v0v
Nobody proposes complexity for the sake of complexity, there's always a need or a problem to solve
Except for the 2D Graphics TS x)
 
 
1 hour later…
1:38 PM
Hi guys. Need advice, please help. I have a container class (like vector but mine) that stores objects in the array. I dynamically allocate memory for objects in this array declared as T * data; allocating data with new or malloc, then assigning values as data[0]=newObject; When the instance deleted, I'd like to call destructors for every object in the array, how could it be done? I feel this design is nott good but don't understand how to improve it.
 
You have to call the destructor on any object you constructed, std::allocator_traits<Alloc>::destroy will help with avoiding the ugly syntax. Also keep in mind that you have to actually construct the object, not just assign.
Assigning assumes the existing object is alive
 

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
 
1:57 PM
how can I call the destructor explicitly if I conctructed an object with new? Just call delete(*data[1]) or data[1].~T()?
ok rty
thank you
 
@BbIKTOP just delete is enough
it does both the desctructor call and the free
 
@PeterT not when you allocated with malloc
which he is trying to do by reimplementing std::vector
 
if you allocate with malloc you need to do placement new and placement delete
you're better off not doing that
 
2:44 PM
@ratchetfreak true, I didn't read the context and just took him by his word that if he said "new" he didn't mean "placement new"
 
2:55 PM
I could have sworn we had this question recently where someone was trying to constexpr skip on doing delete on trivially destructible items
 
 
1 hour later…
3:55 PM
@Morwenn mea culpa!
@BbIKTOP If you're using placement new to create items, then you directly invoke the dtor to destroy them. That seems to fit with your second example, but not your first.
@Mgetz ...unless you're implementing a collection on the same general order as vector or deque, in which case you don't really have a choice about doing it.
 
@Morwenn well I wouldn't so much agree with that
The more complexity you add to fix issues the more complexity you're going to add because of the bugs you introduced with the feature that got fixed
 
@LoïcFaure-Lacroix Yes, but the motivation is still to solve some issue (or issues)--even if the actual result is creating more issues than are solved.
 
Imagine if evolution would have increased the view angle of prey animals by adding more eyes around their body
instead view angle was fixed by having eyes on the side to get roughly 300-320 degree (eye balling the view angle) viewangle
 
4:10 PM
@LoïcFaure-Lacroix Then they'd be spiders!
 
spiders aren't prey animals and arachnids are weird
my point being that evolution naturally removes and simplify aggregate that are useless instead of adding more aggregate to make other aggregate useful
So I'm wondering if C++ simply keep things around for the sake of backward compatibility or they're actually making change while simplifying other stuffs
 
@LoïcFaure-Lacroix More seriously, in some cases it has. For example, some shell fish (e.g., scallops) have many eyes--can easily be 50 to 100 from what I've read.
 
That is 48 to 98 more eyes than they need in a three dimensional world!
 
4:27 PM
@ScarletAmaranth Well, more than they need specifically to provide stereoscopic vision anyway. Apparently, there's more to life than stereoscopic vision.
 
No. ::grumpycat::
Who needs so many eyes dude, it's scaaaaaary.
 
@ScarletAmaranth Some, on the other hand, find Sauron's single eye scary. Others are a bit put off by the Graeae...
 
I prefer whatever I meet had two or fewer eyes, along with no more than 4 legs.
 
@JerryCoffin std::make_unique? Or an allocator? I've done it before with a hack pointer to support struct hack I know that much.
 
@ScarletAmaranth The Graeae had only one eye (shared between three sisters).
 
4:34 PM
You can't always fix shit simply v0v
constinit for example is actually extremely simple and not complex, its only issue is that it's rather unelegant and that you need it in the first place
 
@Mgetz Well, it's certainly true that vector and deque use an allocator to handle the creation and destruction, but at least in the normal case, those end up being a placement new and a direct invocation of the dtor respectively.
 
But since not everybody uses idioms sufficient to fix initialization order fiasco, you still have to introduce more obvious tools
 
@JerryCoffin That's what I had to do for the array portion of the hack pointer I made
 
@Morwenn When I was younger and went to bars and clubs, I was introduced to quite a few people I thought were obvious tools...
 
more obvious doesn't mean obvious :p
 
4:37 PM
@JerryCoffin of course it happens.. but without looking in history we could be in that moment where they have multiple eyes but will gradually change shape to become like a torpedo with only one big eye
 
@Morwenn Some were obvious tools, and others were even more obvious tools. :-)
 
Proposals are required to have motivating examples and evolutions are required to solve several problems nowadays, so the complexity clearly isn't added for free
But not everybody agrees that problems are worth solving, so the more problems you solve the more people complain about useless complexity
 
@Morwenn In the case of constinit, I have a hard time arguing much. Helping people create globals more predictably and portably doesn't seem like a huge win (but, as I said originally, it's also pretty easy for most of us to just ignore).
 
yup
On the other hand it's merely a patch since it doesn't totally fix initialization order fiasco as well as Meyers singletons do
consteval is partly there to pave the road for reflection
 
It's a long weekend :)
Btw, I installed GCC 9.2 on Coliru yesterday.
4
 
4:44 PM
@Morwenn Yeah--and even if reflection ends up somewhat complex, it should certainly provide utility to justify the complexity.
 
Last version was 8.2.
 
Use cases for reflection are not lacking :p
For example I feel like Deducing this totally nails the motivation part
And I actually need it to cut down on boilerplate and SFINAE explosion that killed my compiler
 
The typical use case for reflection seems to be serialization/rpc.
 
I just updated to GCC 9.1 and I have segfaults, except when I write logs to try to locate the issue
 
Are there any other interesting ways to use it?
 
4:46 PM
@StackedCrooked Certainly the most obvious case.
 
Code generation
 
serialization is cool especially if you want to bind something like Json to a Struct
 
@StackedCrooked I'm going to go on record as predicting that it'll be used for serialization about like templates are used for containers of T. Yeah, that's the first and most obvious case, but there will be a lot more.
 
It might be useful if you want to create a way to introspect the state of a server program. Like a web view that shows the state of the queues etc.
 
Need some help, how do you get people in your team to use a tool designed to save people's time but people seems to lazy to get onboard
also how to tell people to start deving with demo data instead of requesting production data
 
4:52 PM
@LoïcFaure-Lacroix Start by flipping tables?
 
I work remotely I will only break my glass desk by doing that
 
Go to their office and start flipping tables?
 
@LoïcFaure-Lacroix Often useful to start with a tool that can/will generate valid test data.
 
I setup a docker environment that deploy all the damn dev branch online and I have this person asking to deploy manually a full fledging server because "whatever"
@JerryCoffin the software we have already has demo data when setup so it is valid data to test on, and you can also write your own demo data to run tests on instead of manually creating it
 
I Googled for "flipping tables" and the first hit is a bunch of emojis.
 
4:56 PM
(╯°□°)╯︵ ┻━┻
there
 
@LoïcFaure-Lacroix In that case, you're mostly into managing people, an area where I have little advice to give.
 
my best method to manage people is to not manage them
 
One way to manage people is:
(╯°Д°)╯︵ /(.□ . )
 
You can also flip birds :D
 
@LoïcFaure-Lacroix I generally don't either. Especially as you get to be more "senior", people routinely try to push you toward management, but I've worked really hard at continuing to write code. The extent of may "management" tends to be reviewing code and making suggestions about how to write it (in ways I think are) better. But I mostly treat that as a "fire and forget" situation--I give some advice, and people can take it or ignore it as they see fit.
 
5:08 PM
@LoïcFaure-Lacroix what @JerryCoffin said also get legal to give them the GDPR talk
 
there are legal issues with production data but also technical issue, the larger our client gets, I can't setup a dev server with 1terabyte of data. Just doing the backup takes a lot of time when dev server is literally up in less than a minute
 
5:26 PM
@JerryCoffin What's the best strategy for accomplishing this? I am assuming when you apply for a new job they are always trying to put you into a management role.
 
That flag is hilarious.
 
5:46 PM
Chat bugs:
 
@Mysticial what's the context, what room is this?
 
@Rick Room where flags were flying: chat.stackoverflow.com/transcript/197999
 
lol, all these random people joining a room about such a specific conversation.
 
6:19 PM
That guy is hilarious.. for some reason it feels like he's trolling them because I can't seriously believe he really felt that critism to his code his bullying
Then also wanting to make complaints against Jon Clements
 
inorite?
it's great
 
@Mysticial do I even want to know?
 
@Mgetz yes you do
hahahaha, it did end up on meta:
0
Q: Is it rudeness with polite disclaimer?

Mr_GreenI am not good with English but this seems to me as a person trying to thrash the other but with cherry on top (to avoid flags?) Sorry, I don't mean to be rude, but IMHO this hardly "gets rid of the inessentials", and does not answer the question. What the OP posted is standard code, with the ...

But by someone else instead.
 
@I-was-a-Ki If you want to see a nice pythonic pyqt version of your program post your question over here forum.qt.io/category/58/qt-for-python and I will share it with you there stackoveflow is not a friendly place — Dennis Jensen 15 mins ago
I would kindly suggest they just answer the question... but I don't want to get involved other than flagging that comment for the mods
 
@Rick My basic strategy when applying for a job is pretty straightforward: tell them I want a job writing code, and I'm fine with doing technical mentoring, but not doing management.
 
6:29 PM
@JerryCoffin Oh, it's not (╯'□')╯︵ ┻━┻ at the interview?
 
@JerryCoffin will that reflect badly if one is that blunt about it at the outset?
 
@Rick in my experience no, it's actually a relief for them in most cases as they don't have to worry about that in the future. If they are looking for a manager they'll look elsewhere
 
@Mgetz cool, what happens when they ask you a management question?
 
@Rick you've already told them clearly that's not your forte and not a success area
 
@Mysticial I pulled this shit at Accenture when they kept asking me which clubs and fraternies I was part of. I told them my hobby was orgonizing international outsourcing (at the time it was) and left before the other two interviews could start.
 
6:37 PM
you're free to decline to answer
 
Or you nut jobs could embrace the higher pay and ambigious responsibilities that come with a management job.
 
@Mikhail lolwut. Why the hell do they care about your clubs and frats?
Trying to see if you're a drunkard?
 
@Mgetz if they ask you what technology would you use to build something, would that be considered a management question?
 
@Rick no it's a hypothetical
and the answer is usually whatever the team is comfortable with
 
@Mgetz should you do interviews where they have some sort of stupid coding challenge? Some told me not to.
 
6:46 PM
@Mysticial they did business consulting, which really means nobody is sure what you do but you look cool giving your opinions. As you know, the only way to look cool is to be in a frat. At the pre interview dinner, some dude said he liked sky diving because it let's him see the big picture. My audible laughter was not well received.
But I had been operating int he exact same proffesional capacity (since I was like 19) as them for a few years, and made a bunch of money, so whatever
 
@Rick When I do interviews, I usually spend the first 10-15 min. asking questions about their background. Based on that I'll choose from one of several different interview questions.
I try to pick one that's somewhat relevant to their background.
So I'm not gonna make an intern who only knows Java implement a lockless queue. And I'm not gonna make a low-level programming expert implement a factorial.
 
When I do interviews I spend the first 10-15 minutes asking about their background, and then time is up.
 
Hello everyone.
 
@Rick I tend to be upfront I hate coding on a whiteboard during interviews. If that doesn't work for them then TFB
 
@Mysticial yeah but you can do things on the fly, I doubt many can pivot or know what to look for.
 
6:54 PM
@Rick I was forced to.
I started out interviewing only specialized HPC candidates.
With only one question prepared.
 
@Mysticial and I've gotten every question in between
 
But they other people started stealing my interview question. And the candidates I got gradually became less HPC-oriented and more generic.
So I had to come up with new questions.
So I basically have two sets of questions. Inten vs. full-time.
I only have one intern question. But I have 4 questions for the direct hires. These range from general to very specialized HPC.
And each one can be tweaked a bit in either direction. So if I fuck up the initial judgement, I can change the specs a half-way through.
 
@Mysticial how about if someone can implement a lockless queue, but might not know what it is?
 
@Rick I find it hard to imagine anyone being able to do that.
 
Lol, what if they forgot to add locks?
 
6:58 PM
We used to really only interview other finance candidates. So everyone that I was given would suit my really hard question. (I'm known in the firm for being a one of the more ridiculous interviewers.)
But now we've broadened our search a lot. So we try to hire tech people.
And now 90% of the candidates I get will land the "easy/generic" question that I give. And yet they still fail miserably.
 
@Mysticial so I am assuming many people don't surprise you.
 
The problem I've found with people from big tech companies (like Google) are that they can't do basic programming and they don't (really) know C++. They're so used to using their company's built-in frameworks that they don't know std::thread or std::mutex.
 
@Rick if you don't know what it is and you implement one on accident it's because the framework you're working on already had that guarantee
@Mysticial google forbids using those
 
Really question is how to get a job at a financial tech company but skip the tech interview?
 
It's almost as if the companies are intentionally trying to lock in their employees by forcing in-house stuff. At least it makes them a lot less poachable.
 
7:02 PM
@Mikhail be a quant and make your own money?
@Mysticial This is actually the case it seems
They aren't allowed to collude to not poach, so they make it hard to do it
 
@Mysticial I am not really impressed by engineers that work at Google. I think its mostly hype that the best work there.
 
I've had candidates (experienced at big companies) that had trouble implementing a basic hash table. FFS.
That's usually a thing that happens with managers who haven't coded in a long time. But I've seen it with actual coders.
 
@Mysticial I would be in that category...
 
Idk. I probably couldn't, without some refreshing. My hash funciton would really suck.
 
most people don't have to anymore
 
7:07 PM
@Mikhail I'll give them a hash function that can be assumed to be "good enough".
 
Idk. I probably couldn't, without some refreshing. My hash funciton would really suck. Shits in knuths book, see the double hashing chapter
 
It's just the data structure I care about.
 
That sounds like the typical bullshit interview question
 
:47055074k I think this is the only thing that really matters too. Can you take an abstraction and turn it into code. However, this is a very hard skill to master.
 
There's more to it. Without giving it away, it's to design, then implement a hash function with certain properties. If they can't even design the damn thing, then I'll reduce the problem to implementing a basic hash table. At this point 90% they're gonna fail. And if they can't even implement a basic hash table or they don't know what it is, they're gonna get walked out if I'm not the last person.
 
7:11 PM
@Mysticial note to self... don't interview there
 
@Mgetz Or just know how to design a goddamn hash table.
 
First time I interviewed at Citadel circa 2011, I got a single question. It was about some error that can happen with object slicing. Even today I don't quiet know wtf it was. I thought I bombed and ended up working for cray. A week after I took the other offer, they made theirs.
 
It's just a fucking array + a linked list.
And you're allowed to use std::list.
 
Meh, sounds like the generic data structure stuff that kids memorize by reading cracking the coding interview or leet coder. You're part of the problem.
 
@Mysticial why not just an array and a hashing function
 
7:12 PM
@Mysticial again, never had to implement one so I've never really cared or bothered to know.
 
@Rick That's basically what it reduces to if the candidate can't implement the "additional properties" aspect of it.
@Mgetz That's basically the problem with all the Google people I interview. We're trying to hire people to build + work-with infrastructure. And people who can design systems. Unfortunately the vast majority of the Google people I interview can't do either because it's just "use that library, I don't care or want to care how it works".
 
@Mysticial well the additional properties does seem like it might be a hassle, you would have to use a struct and pre allow allocate the array. Would you be impressed if they used reserve and emplace
 
@Rick One of the additional properties is performant thread safety.
 
@Mysticial I'm currently Devops, so 99.9% of my job is doing infrastructure on things. Just not always that low level. I would deal with it if it's a performance issue that is overriding everything else. Otherwise I'l deal with the other critical items first. In most cases failures or performance issues I deal with are related to other things I can't necessarily speed up.
 
Our devops track will have different requirements. (which I'm not sure of) I'm just on the software dev side.
I hear a lot of stories on the quant side since I regularly work with them.
 
7:25 PM
@Mysticial but hashes are sorta multi-threaded data structure as is. O you mean locking again. But someone has to really go out of their way to study that kind of thing, that almost seem like a nitch skill.
 
@Mysticial it's not that I'm not interested in the stuff you do, it's that I know I'll fail the interview
 
Basically, like entire departments which we automatically throw out because they claim to teach both math and CS, but 100% of their students can do neither with any level of competency.
 
tbf I've trended into tooling for ages
pretty sure you'd throw out my Alma Mater
 
@Rick The thread-safe hash table is something I only give to candidates with async programming experience or who had done/implemented databases and such.
 
@Mysticial Do you ever get candidates who are coding competition enthusiasts?
 
7:27 PM
@Rick Those are rare. I haven't, but I've heard of a few of them.
They also tend to have very strange coding practices which we'll overlook if it's clear it's just a competitive programming thing.
 
yeah, they are rare. I asked one of them about a graph problem. The broke down the answer with mathematical proof and then coded something up in less than a min.
yeah, they have quick coding strategies. The coding part is almost like an afterthought.
 
Other questions which we typically ask (though I don't since I focus more on algorithms) would how various C++ features work underneath.
How are virtual methods implemented.
How does shared_ptr work.
 
I got asked that te second time I interviewed with Citadel and also the CME group (circa 2013). You're supposed to memorize the answer.
 
@Mikhail I've been asked both when I was interviewing 3+ years ago. Virtual methods I already knew because I implemented them some stupid compiler in a class back in school. shared_ptr I didn't know, but I did derive it on the spot. So I passed.
 
@Mysticial that crap I can answer... mostly
 
7:37 PM
@Mysticial funny enough I look these things up out of curiosity, but I never use them enough to remember
 
Anyways I would like to voice again, that the interview you're conducting is bullshit and you should feel bad.
 
@Mikhail That's fine, we're not hiring you.
 
lol
 
@Rick There was one candidate (I didn't personally interview, but heard about) which one guy gave "thumbs down" because he had no idea how std::vector worked underneath and couldn't derive it.
 
Well std:: vector is so important that they should probably not be hired.
 
7:41 PM
@Mysticial actually you guys made me an offer twice (although before your time). I just memorized a bunch of interview questions.
 
@Mysticial like... didn't even assume a list? or couldn't derive it even when told it was continuous?
 
at the same time, I doubt most people know that a vector is a dynamic array.
 
@Mgetz From what I heard, the guy literally had no clue. He's been using it his entire life, but never bothered to peak inside it or understand it at all.
 
@Mikhail and yet soooo many places give that interview
@Mysticial how.. I don't.. ok... whatever
 
@Mgetz Yeah. Same thing with most Google candidates, but not that bad.
One side question that I'll often ask (I won't fail them if they don't get it) is how does std::mutex work?
Not necessarily how it's actually implemented, but anything that sounds reasonable will do.
 
7:44 PM
@Mysticial most people are like that, the go through the system they don't care enough about their craft. They mostly just want a regular job, wife, house. But I don't know if it's reasonable to expect more out of people.
 
@Mysticial depends on OS? the windows one is currently implemented in terms of a slim reader writer lock IIRC, and the linux one is a wrapper around pthreads IIRC
 
@Mgetz the real tragedy is that some of these places pay a lot. It's kinda like gatekeeping because not everybody has the leisure to memorize stuff, or do leet coder instead of working a job. At the end of the day when the revolution comes I'm pretty sure the financial tech companies will get some too.
 
I look at one point
 
@Mikhail I'm absolutely sure we pass on qualified candidates. But we'd rather do that than have to fire people.
 
And other statements I made during an unsuccesful interview at Goldman Sachs.
 
7:45 PM
@Mikhail honestly I wouldn't work at most of those places unless they met my 'walk away no questions asked money' level
and they won't do that
 
@Mikhail not everyone can do leet code, even if they tried.
 
They might.
 
tbf I never thought I'd be working at my current employer either... but they bought the company I was working for
 
They might, meet that money level. Certainly the offer they made for full-time, bachelors was on the high side. Only nvidia topped it, but nviida was in Palo alto.
 
Occasionally we'll run into a candidate that is really good at something (that we're interested in), but kinda sucks at everything else. We special-track those candidates and make specific people from the relevant team interview them.
 
7:48 PM
@Mikhail also leet code ist where the challenging stuff is even at. You would have to go to Euler for that.
 
I did that recently with an HPC candidate who blew through my two hardest low-level questions, but couldn't do C++ for his life.
 
@Mysticial FORTRAN?
 
@Mgetz "C++" as in C with classes.
No RAII, tons of new/delete, etc...
 
@Mysticial that is sadly horrifically common? I had to reteach myself C++ after I started hanging out here
 
@Mgetz Generally speaking, if the candidate has nothing special, he/she will need to be pretty good at everything. If the candidate does have a specialty (especially rare ones), we'll lower the bar for everything else and will be willing to train the person in those areas.
 
7:55 PM
@Mysticial did that make him unhirable?
 
@Rick Don't know. He's coming in a few weeks for an onsite.
 
@Rick I'm not sure. There have certainly been times I've been interviewed but not offered a job, but they don't usually say exactly why they didn't make an offer.
 
@JerryCoffin They don't say why because it opens up to whining and potential legal issues.
 
@JerryCoffin I usually know why. I don't really need an explanation. I might impress the shit of them but fuck up on something really stupid. Usually, it's usually that one person you can't make happy no matter what you do.
 
8:10 PM
Tons of reasons. Candidate is technically strong, but
- Poor communication skills.
- Poor people skills.
- Dude's a jerk.
- Can't find a suitable team.
- Out of price range.
- Too much training needed.
- Poor culture fit.
- Has legal strings attached.
- Doesn't want to relocate.
 
However, if they can't recognize the value proposition then it's their loss anyway.
 
8:26 PM
@Mysticial so one thing I think companies underestimate is that my price goes up the more annoying their work environment is
 
which is fair
 
@Rick Many years ago I took a class that was supposed to teach about interviewing skills and such. Among other things, we did some fake interviews, where you did an interview, then wrote down how you thought it went, what you thought you'd done poorly/well, and so on--and the interviewer did the same. I quickly found that my idea of how I'd done, what I'd done well, and so on matched poorly with their evaluation. I'm not at all sure my guesses now would be much better than they were then.
@Mysticial ...among other things. Also the simple fact that they've already put in a lot of time and effort, and they're not getting anything in return. In most cases, the last thing they want is to put even more effort into something that's clearly a compete loss for them.
 
9:19 PM
@Mysticial how does one know if they are a jerk, I'm afraid I might be a jerk and not know it. Also, can't you just offer them something lower? You might be looking for this, but we only think you are worth this much.
Also is talking too much considered a bad thing, because I can talk the shit out of people on theology
 
@Rick It's very subjective. Don't piss off the interviewers if you actually want the job.
 
Seems like https coliru has much more compilation requests than the old http coliru.
 
I wonder how much of the https traffic comes from cppreference.
 
@StackedCrooked That's because I tell everyone to use your site. Would you be willing to share a portion of your donations if I am able to get you more visitors?
like 5 referrals for 20 dollars?
 
9:31 PM
@Rick Pure Speculation: It's less about the money then it is about whether the person will be able to contribute positively. Sure you can lower the bar and pay them less. But if the person sucks, they become a burden to everyone around them. IOW - negative productivity. This is always the case for new hires since they need to get up to speed. So it's a necessary investment. But if the person sucks, and shows no interested or potential in learning, then it's not going to work.
 
@Rick Donations has been zero probably for over a year now. Sure you can get a portion of that :)
 
@Mysticial I'm just assuming the price point is the only barrier to entry.
 
FYI, "out of price range" is the most common problem we have
 
@Mikhail that's because you want people to work for free.
 
It's a very different problem, because it's not immediately apparent if its the interviewers fault.
 
9:36 PM
I've assisted in a few job interviews with my boss and, yeah I have to agree personality is a huge factor.
Also none of the candidates was able to spot a violation of the good old rule-of-three in a small piece of code I showed them.
 
@StackedCrooked I don't see how you can put such a huge weight on personality. Like I never show this side of my personality at interviews.
 
Yeah pretty much.
Me: Guy is pretty good. But...
Boss: Would you want to hang out with him?
Me: No, he's kinda weird.
Boss: No hire.
 
@Mysticial "No, he's kinda weird" lol
 
"doesn't watch the same animes"
 
@StackedCrooked The idea here is that if you're not comfortable with the candidate being around you 8 hours a day. It's probably not gonna work.
@Mikhail I unintentionally got one my colleagues into Anime. No I feel no guilt over it.
 
9:45 PM
But really, its obvious you guys are able to have much higher screening standards than most people. I feel our hiring processes are much more compromise driven.
 
@Mikhail That is definitely true. I couldn't possibly give any of my current interview questions if I was still at Google.
 
weird flex but okay :-)
 
At Google the candidates you fail at the ones who don't know what a linked list is. And the ones you pass are the ones that do and can kinda implement one.

Here, the candidates you fail know what a hash table is, but can't implement one. The ones you pass are the ones that can implement a fast lockless queue in C++11 blindfolded. :D
 
So Google interview questions are for noobs?
I could do a spsc queue probably. MPMC is harder.
 
@Mysticial Fuck, I had one of these kids who only knew how to do the lockless queue because it was in some book he was reading. No C++, just lockless programing. Guy was an ivy league graduate, who wanted $$$. This makes me angry because my mind understands how to game the system :-(
Anyways, I think for many of us the hiring process is a very big point of pain. I've found showing people bad code and having them talk about defects is a very, effective way to weed out good and bad engineers. I'm proud to say we've never hired a bad engineer, although interns are somewhat clueless because they start from zero...
 
@Mysticial I had an interview with a big "security company", where one of the engineers thought traversing a linked list in linear time was brute force. When I asked how you would beat linear time, I knew that this wasn't going to work out.
 
There's no slower way than linear either. Maybe he hinted at skip lists or something?
 
@StackedCrooked Pick random pointers to dereference. Catch the exception and try again until hit all the nodes in the correct order?
 
no, one of the other engineers seized the moment and used it to make him look like an idiot.
 
I've been asked many times how to take the average of a series of numbers in better than O(N), the desired answer is to sample. Might be a good question for a data scientist.
 
9:59 PM
@Mikhail With the proviso that unless you're very careful in how you phrase the question to actually allow the desired answer (without, of course, giving it away).
 
I once read about this technique where one thread is prefetching list nodes to help its sibling hypercore. (people.freebsd.org/~lstewart/articles/cpumemory.pdf )
@Mikhail quantum computing :P
 
@StackedCrooked So, on the GPU you get that strategy without all the wacky code. When you have a global memory miss, the next thread is queued. The future is barrel processors.
I fucking hate CPU memory micro optimization (really x86)
 
@Mikhail You can always implement your own caching policy.
 
Also in quantum computing, if you want to search something its typically destructive. So if you want to implement a search engine, every client would need to deep copy the internet :-)
@Rick Its not caching, I've written codes like this for de brujin graph walking, there are just random lines to prefetch shit, and time out threads.
THIS SHIT SHOULD BE IMPLEMENTED IN HARDWARE (PTSD INTENSIFIES)
You'll notice that it relies on the hyper threads being yielded, while the global memory is being loaded.
then you have cache ping pong, if you did it wrong
ahhhhh
 
There are actually a lot of cool caching algorithms out there, I have implemented LRU and another one which I forget
 
10:09 PM
that's a slave mentality, you should say "algorithms enable a lot of cool applications"
But then you realize micro optimization is bullshit, because you can just buy more computers :-)
 
@Mikhail That's all right. DRAM reads are destructive too. We just tack sense amps on the side that do the destructive read into registers, then write the data back out when we're done with it.
 
caching strategies are an order of scale improvement, you wouldn't be able to buy enough computers
 
@Rick Go the original Cray route: forget caching, and just use SRAM for the entire main memory.
 
@JerryCoffin Is that true? From a class I used to teach, every certain number of clocks it would top of the electrons for all the filled states.
DRAM refreshes? I think on the old FPGAs we used, the refresh time was like 1 out of 20 clocks.
 
SRAM, that might not be a bad idea.
 
10:18 PM
@Mikhail Yes, it does that too (memory refresh). But yes, reads are destructive, so a read gets data from the capacitors into the sense amps, then you play with data in the sense amps. When you're done, you write back from the sense amps to the cells. That's also why DRAMs mostly use burst reads, with timing like 10-1-1-1-1-1-1-1. The slow initial read is getting data from cells to sense amps. Then it sends out another word every clock.
@Mikhail Refresh timing varies widely. Embedded DRAM (i.e., DRAM in a logic chip) usually needs refreshing a lot more often than when the entire chip is dedicated to DRAM.
 
Is the refresh performed each read? I don't think it is, or only when the sense amp detects the voltage is running low?
 
There's also quite a bit of variation due to temperature--more heat gives more leakage, so you have to refresh more often.
 
The sense amplifier operation in DRAM is quite similar to the SRAM, but it performs an additional function. The data in DRAM chips is stored as electric charge in tiny capacitors in the memory cells. The read operation depletes the charge in a cell, destroying the data, so after the data is read out the sense amplifier must immediately write it back in the cell by applying a voltage to it, recharging the capacitor. This is called memory refresh.
 
@Mikhail Anytime you do a read, the part you read is refreshed, yes. But you have refresh cycles to automatically maintain data that isn't being read often enough to be maintained by the reads.
 
Appel devotes more and more space on its chips for locality caching.
 
10:27 PM
DRAM is also designed to keep costs low: instead of sending an entire address at once, it breaks an address into a row address and a column address. So, you put an address on the lines, then assert a strobe (RAS or CAS) to tell it which you're sending. To minimize signal count, they use a convention where RAS then CAS signals a normal read/write, and CAS then RAS signals a refresh cycle.
@Rick Apple and everybody else. On a typical modern CPU, the majority (and often a large majority, like 75-80%) of the chip area will be devoted to cache, leaving (at most) 25% that's actually devoted to computation and such.
 
One of the unexplored avenues (or things I haven';t researched) for sense amplifiers is to use them as a cache, or integrate them into a cache.
 
10:49 PM
@Mikhail Pretty difficult to get information necessary to do that well in most cases. When you do a read, you don't usually know how much data has been read into the sense amps, and what data hasn't been.
 
Alos it would need to be in the cpu
 
@Mikhail Even with it off-board, you could theoretically use knowledge of it to help decide on more efficient data layouts and such, especially for data that wasn't cached--either by being marked non-cacheable in the MTRRs or by being written with non-temporal stores. But I think it's almost purely theoretical, at least for now.
 
11:15 PM
I really impressed myself today, I was talking while I was coding an algorithm I was unfamiliar with. I felt like a tour guide, I was like saying witty things along the way, like "I would never do this in production code" and then went back and undid it because the joke didn't illicit any laughter. I really impressed myself.
 
11:29 PM
@Rick Any laughter your joke elicited would have been illicit anyway.
 
That's actually a good point.
elicit*
 
@Rick See how subtle I am? :-)
Almost as subtle as a horse head in your bed.
 
your wordplay provides an opportunity for many insight
 
@Rick If only I could somehow parlay my wordplay into wordpay!
 
11:55 PM
Another interesting thing this week. Someone was telling me about the elevators in their building, and how would one write an algorithm to manage them. The first thing that came into my mind was that this was a caching problem. They were really impressed when I said that, I don't think it ever occurred to them the entire time they were thinking about elevators, that, that was the category of problem they represented.
 
@Rick Years ago on comp.lang.asm.x86, one guy's tagline was something to the effect that from the right viewpoint, nearly all problems in computing come down to exercises in caching.
 

« first day (3225 days earlier)      last day (1717 days later) »