QDB: Quote #311570
About / Browse / Latest / Random / Queue / Prefs / Submit Quote / Search

This quote has been fermenting for 4 months and has been voted on 18 times.
Based on preliminary voting, this quote has a 62.6% chance of being approved.

#311570* (?/18) ⚐Flag
<DEATH> Aaaahahahaha just had the best coding WTF moment ever
<DEATH> Better than cat-on-keyboard ones
<DEATH> Macbook suddenly started forcibly going to sleep in mid-work
<DEATH> Turns out, I was writing a debug routine with a thread sleeping + polling for a condition every 1 second, used Sleep(1000) which I *do* have declared somewhere as doing the same thing as on Windows, but forgot that the module I was doing this shit in was .m and therefore Obj-C without C++, which was calling some fucking implicitly declared C function instead of my thing, and putting the machine
<DEATH> to sleep.
<Case> nice
<zao> :D
<DEATH> So, if you accidentally copy Windows style Sleep(somenumber) to mac, in pure C mode rather than C++, it's going to put the machine to sleep.
<DEATH> And I thought I just broke the mac for a moment.
<DEATH> As amusing as a goatse sighting at 5 AM.
About / Browse / Latest / Random / Queue / Prefs / Submit Quote / Search
14,770 quotes approved; 8,800 fermenting; karma: 189.3582