WTF Bites



  • @Medinoc said in WTF Bites:

    inode is the file table entry itself.

    I agree that the inode is the entry itself. However, there are still no system calls that would return it, because it is a private kernel object describing everything about the filesystem object including methods to access it and links to other related kernel objects. The most any system call "returns" is a suitably normalized subset of the attributes. So the Google guy was not right either.

    Or we can talk about on-disk inode, but that is specific to filesystem. E.g. vfat does not have anything like that. So stat again only "returns" normalized set of attributes, not the inode.



  • My hair has been various shades of purple since April. My DBA just said to me today:

    Oh, you changed your hair color again?

    He did mention it when I first bleached it (but that was pretty shocking).



  • @Karla said in WTF Bites:

    Oh, you changed your hair color again?

    He did mention it when I first bleached it (but that was pretty shocking).

    A man noticed you changed hair color, he must have a thing for you ;)


  • Considered Harmful

    I just noticed my tasks.json file has a syntax error...
    0_1476476185356_upload-0be8d3ac-3a78-4f81-add7-fed3733fe445

    ...but VS Code is still using the data from it! The tasks still run! I even tried making a change with the error still in place, and it used the new value!

    What black magic is this?



  • @TimeBandit said in WTF Bites:

    @Karla said in WTF Bites:

    Oh, you changed your hair color again?

    He did mention it when I first bleached it (but that was pretty shocking).

    A man noticed you changed hair color, he must have a thing for you ;)

    LOL

    This time it took several months but yeah mostly women have commented on the various colors.

    Women are funny too...I know when it was first bleached it was awful but no one says anything bad (even when I say I know it is bad) but when the purple was good and flattering to my coloring they said oh this is way better.

    One other guy complimented the blond when I had toned down the brassiness so it wasn't awful but didn't flatter my coloring. Plus he is someone I have very little interaction with, so I think he might have had a thing for me.

    The lesbian didn't mention it (is it weird that I want her to have a thing for me) but she always says "Hi Karla" when passing me which usually catches me off guard (as an introvert I almost never initiate greetings in passing, and we've never worked together).



  • So @royal_poet just installed Win10 AU. Spare us the idiot comments, we know, it's AU.

    And Cortana re-established herself, the condescending intrusive cow that she is.

    I got to observe @royal_poet yelling a little at Cortana, with the final line of 'Cortana, fuck off', which not removed Cortana from the taskbar but also opened an Edge window, to Bing for the search phase, and I quote, Cortana, f*** o**.

    Not sure if good idea, bad idea, quixotic idea or simply WTF, but it seemed like a small bit of :wtf: that we can all enjoy, especially as values of :wtf: will vary.


  • Fake News


  • Trolleybus Mechanic

    @Arantor said in WTF Bites:

    So @royal_poet just installed Win10 AU. Spare us the idiot comments, we know, it's AU.

    You're an idiot if you think I'm not going to call you an idiot.

    Idiot.


  • BINNED

    :wtf: C++ numeric_limits<T>::max() is what you would expect:

    returns the largest finite value of the given type

    Now you may rationally assume numeric_limits<T>::min() would be the counterpart:

    Returns the minimum finite value representable by the numeric type T.

    BUTT there is a gotcha:

    For floating-point types with denormalization, min returns the minimum positive normalized value. Note that this behavior may be unexpected, especially when compared to the behavior of min for integral types. To find the value that has no values less than it, use numeric_limits::lowest.

    Yup, the opposite of max is lowest which is BTW added in C++11. Luddites sticking to pre-C++11, please die, stop bundling boost because you want to support that crap, do please die.

    FILED UNDER: C++17 will be the first sane C++


  • Winner of the 2016 Presidential Election

    @cartman82 said in WTF Bites:

    Google interview experience

    9. There's an array of 10,000 16-bit values, how do you count the bits most efficiently?

    Me: you shift the bits right on all the 64-bit words, the Kernighan way.
    Recruiter: no.
    Me: there are faster methods processing 64-bit words with masks but I can't explain it over the phone, I must write code.
    Recruiter: the correct answer is to use a lookup table and then sum the results.
    Me: on which kind of CPU? Why not let me compare my code to yours in a benchmark?
    Recruiter: that's not the point of this test.
    Me: what's the point of this test?
    Recruiter: I have to check that you know the right answers.

    I'm lost. Apparently the answer is not 10000 * 16, so what is this question even asking?



  • @Dreikin I think it's asking to count how many bits are set


  • Java Dev

    @LB_ I think so too. I also think the lookup table solution may have been efficient on some historic (probably 16-bit) hardware, but on modern hardware with the CPU much faster than memory you want to do it the math way on 64bit words. Probably trying for an algorithm you can vectorize.

    There's probably more suitable places in the larger program to be squeezing out cycles at too. Like whatever is generating that array.


  • BINNED



  • @PleegWat I'd either try one of the __popcnt*() intrinsics (that compile to a single POPCNT) instruction, or go for some unrolled/interleaved version of sideways addition. That is probably vectorizable, so as you say, it could perform quite well in this case. (The lookup table is fairly easy to implement, so it might be worth measuring just to be sure, though.)



  • 0_1476779643119_upload-319846b4-d1a4-4b13-b560-7100e559a8e4

    Last night, Boss did a bad UPDATE on our main table, and paved over a nice chunk of very important data.

    He didn't do a backup first.

    He also didn't know there are other tables that are tracking the same data, so now they were out of sync.

    So I had to write some more queries and smooth over all data to match Boss's screwup.

    Except, Boss didn't think the new data looked "realistic" enough, so then I had to go back and manually fuzz some numbers, so that dashboard looks the same as screenshots he had from before.

    Of course, this once again puts tables out of sync. Will reports look consistent? Will calculations work? Who knows!?

    So how was your evening?


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    it might be worth measuring just to be sure

    This. Let's stop making an ASS out of U and ME and get some data. ;)



  • @dkf Ok, then. 10000 iterations with 10000 16 bit values each:

    • LUT: 46673µs
    • as 16-bit integers with POPCNT: 43270µs
    • as 64-bit integers with POPCNT: 10786µs
    • with the generalized popcount here: 15063µs
    • with the generalized popcount on 64 bit integers: 16093µs

    CBA to do a manual SSE version. Notes: uses _mm_popcnt*() for POPCNT, of which there is no 16-bit version. Therefore the 16-bit version uses _mm_popcnt32() already, albeit on each 16-bit integer separately. Despite this, it already wins over the LUT [on my CPU]. The 64-bit version additionally peels the head/tail to ensure proper alignment etc.


  • Discourse touched me in a no-no place

    @cvi said in WTF Bites:

    it already wins over the LUT [on my CPU].

    Good results. 👍



  • @Arantor said in WTF Bites:

    So @royal_poet just installed Win10 AU. Spare us the idiot comments, we know, it's AU.

    And Cortana re-established herself, the condescending intrusive cow that she is.

    I got to observe @royal_poet yelling a little at Cortana, with the final line of 'Cortana, fuck off', which not removed Cortana from the taskbar but also opened an Edge window, to Bing for the search phase, and I quote, Cortana, f*** o**.

    Not sure if good idea, bad idea, quixotic idea or simply WTF, but it seemed like a small bit of :wtf: that we can all enjoy, especially as values of :wtf: will vary.

    I scrolled a bit through the twitter feed of the https://twitter.com/internetofshit and I found these ones hilarious:


  • Considered Harmful

    0_1476827072531_upload-e6324542-80af-4ada-ad12-1019f74ea372

    22GB seems like an appropriate size for a Resharper solution cache.

    (I don't know how big it would have gotten, I killed the process when I saw it was writing 6Mbps to disk continually.)


  • Notification Spam Recipient

    @error said in WTF Bites:

    0_1476827072531_upload-e6324542-80af-4ada-ad12-1019f74ea372

    22GB seems like an appropriate size for a Resharper solution cache.

    (I don't know how big it would have gotten, I killed the process when I saw it was writing 6Mbps to disk continually.)

    SpaceMonger!



  • @error said in WTF Bites:

    0_1476827072531_upload-e6324542-80af-4ada-ad12-1019f74ea372

    22GB seems like an appropriate size for a Resharper solution cache.

    (I don't know how big it would have gotten, I killed the process when I saw it was writing 6Mbps to disk continually.)

    0_1476842530669_upload-1c1a1e30-55b9-4a8b-8f7c-63659f066ba3

    TL;DR: ReSharper was downloading Guild Wars 2.


  • Discourse touched me in a no-no place

    @error said in WTF Bites:

    (I don't know how big it would have gotten, I killed the process when I saw it was writing 6Mbps to disk continually.)

    Building a large full-text-search index of all the cases it could use for its suggestions?



  • 0_1476874384409_upload-a49ca871-eb74-481e-88b1-d0393bdd6c93

    Still doing react native development for an outsourcing partner. Vance is the guy who is responsible for most of the abortion-quality code I've been fixing.

    Me: Vance, why are you saving cached images in document storage instead of cache storage?
    Vance: No idea, I just copied it from some example.

    This is typical of the sort of crap he produces. It works, but not really, and someone has to go behind him and fix it up.

    Oh, and lets not forget that this whole caching mechanism is being coordinated directly from components, instead of some service class. So as components go in and out of the screen, you're getting half-completed downloads, leftovers, duplicates, etc. And all of that permanently stuck inside app's document storage bucket.



  • @cartman82 said in WTF Bites:

    It works, but not really, and someone has to go behind him and fix it up.

    Really sounds like it would be more efficient to fire Vance...



  • 0_1477031961330_upload-33d489f5-dcb5-455f-a14c-39cfb9b47f1a

    PROBLEM: Our legacy api is messy and difficult to fix.

    SOLUTION: Create an importer that periodically dumps everything from the old API into elastic search, then make a new API that will serve data from elastic search.

    PROBLEM: Our new api is messy and difficult to fix.

    SOLUTION: ... sigh.



  • @cartman82 Is the problem:

    1. our problem domain is complex,
    2. we don't really understand it,
    3. our requirements specification is a mess, or
    4. all of the above?


  • @Bulb As far as I understand, the problem with old API is that it's a crusty legacy beast that a lot of legacy customers depend on, so no one is brave enough to touch it.

    The problem with new API is that it was written by Vance (see above). So it was written hastily, just to push the turd out the door as quickly as possible. And now that who knows how many devices depend on it, it's too late to refactor properly.


  • Dupa

    @error said in WTF Bites:

    0_1476827072531_upload-e6324542-80af-4ada-ad12-1019f74ea372

    22GB seems like an appropriate size for a Resharper solution cache.

    (I don't know how big it would have gotten, I killed the process when I saw it was writing 6Mbps to disk continually.)

    Stop lying and admit you're keeping your porn there.



  • Had to do a triple take on the registration number whilst my brain was screaming :wtf: before things settled down

    0_1477169243918_wtf.png

    UK SWAT - You saw it here first


  • area_can

    Vetting Halloween costumes isn’t a matter of telling people what to wear. It’s a matter of paying respect to the stories and experiences of marginalized groups who are depicted in these costumes: their culture, history and lives should never be desecrated, but understood and celebrated.

    Other prohibited costumes include (but are not limited too): ...(suicide, rape-related)...Costumes that represent a cultures’ traditional dress.


  • Winner of the 2016 Presidential Election

    @bb36e said in WTF Bites:

    Vetting Halloween costumes isn’t a matter of telling people what to wear. It’s a matter of paying respect to the stories and experiences of marginalized groups who are depicted in these costumes: their culture, history and lives should never be desecrated, but understood and celebrated.

    Other prohibited costumes include (but are not limited too): ...(suicide, rape-related)...Costumes that represent a cultures’ traditional dress.

    It makes no exceptions for people from that culture/ethnicity (Except for the flow chart, which seems to be a separate check). Good job on diversity!

    They're also oddly specific about Caitlyn Jenner. So I guess a costume mocking transgender people is okay, but a woman happening to wear the same dress as Caitlyn Jenner once did isn't.


  • I survived the hour long Uno hand

    @Dreikin said in WTF Bites:

    It makes no exceptions for people from that culture/ethnicity

    Why would it? If I put on blackface, it's no less offensive for my being black. Something's either an offensive stereotype or it's not.


  • Discourse touched me in a no-no place

    @loose Also note the side of the vehicle that the driver sits on (as indicated by the steering wheel). It seems that Chevrolet does do some small trucks in the UK, though they're not a huge seller.



  • @Yamikuronue said in WTF Bites:

    If I put on blackface

    What if you're dressed as a coal miner?


  • Dupa

    @ben_lubar said in WTF Bites:

    @Yamikuronue said in WTF Bites:

    If I put on blackface

    What if you're dressed as a coal miner?

    Or what if you undressed altogether?


  • Winner of the 2016 Presidential Election

    @Yamikuronue said in WTF Bites:

    @Dreikin said in WTF Bites:

    It makes no exceptions for people from that culture/ethnicity

    Why would it? If I put on blackface, it's no less offensive for my being black. Something's either an offensive stereotype or it's not.

    I'll grant that one, but if a Japanese woman wants to wear an authentic(-ish) Geisha costume, why shouldn't she be able to? Or a Native American wear traditional Native American dress?

    Or what if a muslim woman doesn't dress up and wears a hijab?

    The top section doesn't make any allowances for that. It just flat-out states they're prohibited.


  • I survived the hour long Uno hand

    @Dreikin It's probably just simpler to ban it all than it is to try and police the nuances. Let's be honest, nobody's going to that much trouble for keggers on campus, you know?



  • Judging from that flowchart, they also banned St. Patrick's Day.


  • BINNED

    @Rhywden said in WTF Bites:

    they also banned St. Patrick's Day.

    There is always a silver lining



  • @Luhmann said in WTF Bites:

    @Rhywden said in WTF Bites:

    they also banned St. Patrick's Day.

    There is always a silver liningpot o' gold at the end of the rainbow

    LTFY



  • On the way to work today, I drove alongside a pickup truck for a local auto repair shop that had a lot of broken body parts. The rear fenders in particular were quite smashed up, and obviously "repaired" with little dabs of the gray body repair stuff (I forget what it's called) in rows so that it looks like it was stitched back together.
    (It did not appear to be trying to go for a "Frankenstein's Monster" look.)
    (I should have taken a picture, but didn't think of that until too late. And I was driving.)



  • @djls45 that would actually be interesting self promotion. "we keep this piece of shit running"



  • @fwd said in WTF Bites:

    @djls45 that would actually be interesting self promotion. "we keep this piece of shit running"

    But it was a new(-ish) truck!



  • @loose it has a UK number plate from 2002 on it.


  • 🚽 Regular

    @djls45 said in WTF Bites:

    But it was a new(-ish) truck!

    @Arantor said in WTF Bites:

    @loose it has a UK number plate from 2002 on it.

    Holy context switch.



  • @Zecc YMBNH.


  • 🚽 Regular

    @Arantor I meant how it was an underhanded context switch.

    To the naked eye, those comments could be read in sequence and still make sense, but they are talking about different things.



  • @Arantor Hmmm, no :trollface: marker...
    ...
    ...
    OK 😄 , buttume :whoosh:

    Here's how it works: I click a UK news item expecting a UK news item. I get confronted with an image that would not be out of place in any US cop show. Brain freaks out and provides me with the only possible explanation (as it does because it is incredibly lazy and will hand out the first answer in the hope it is accepted - this is true!) and tells me that this is "OK" because there is a Northolt in America - probably New England. You haven't read it right; you clicked the wrong link; they probably screwed the link up; etc.

    Meanwhile: I'm desperately trying to find confirmation; re-reading the headline; considering going "back" to check / try again; etc. Finally I notice the UK number plate and try to wedge it into my brain with a crowbar and sledgehammer (Yeah, I know. A contradiction but we are dealing with a very stubborn "thing").

    Eventually things settle down and, after deciding to share this with you guys, move on with my life.

    @dfk You have to look really hard to see the steering wheel :)


  • Discourse touched me in a no-no place

    @loose said in WTF Bites:

    @dfk You have to look really hard to see the steering wheel

    I saw it straight away. I'm guessing I look for am different things.


Log in to reply