January 2009
27 posts
3 tags
NSFileHandle Considered Harmful [Updated]
Update 20090627: This bug has been fixed in 10.6. I’d still only recommend using it for very simple cases, but at least it works now! NSFileHandle has a bug where the calling thread will lock up indefinitely if a data of size >4096 is requested. Reduced case: #import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; ...
Jan 28th
Jan 28th
80 notes
2 tags
[Cocoa] Less code when working with delegates
The usual pattern is to do this in your class that has a delegate: -(void)frobnicate; { ... BOOL extraJuicy = NO; if(delegate && [delegate respondsToSelector:@selector(frobnicatorShouldAddJuice:)]) extraJuicy = [delegate frobnicatorShouldAddJuice:self]; if(extraJuicy) ... ... } for every delegation method, which gets old, fast. With DelegationHelper, you can do...
Jan 22nd
11 notes
1 tag
Hey, cool! I updated SoundApp Reborn this weekend with a tiny tiny 0.1.1 update, and already over one thousand people have downloaded it on macupdate and versiontracker! Pretty sweet for such a small app, and makes me feel even worse for not updating it in two years…
Jan 19th
1 tag
Woah, nice. Just noticed that even if an app has no windows open (in this case, Live Messenger), it still has an icon in the dock— err, taskbar. Application-centric FTW! (Usually the approach is to add a systray icon, which I always thought was a horrible hack)
Jan 19th
1 tag
Jan 18th
1 tag
Jan 18th
1 tag
Things 10.6 should steal from Win 7
Like Jobs and Picasso before him said, “Good artists copy, great artists steal”. Microsoft seems to have realized that there really is something to the application centric model that Mac OS has been using all these years (as opposed to Windows’ long running window centric model, where each window is a separate process), and that the Dock might have some potential. Thus, they made...
Jan 18th
Accelerating Template-Based Matching on the GPU... →
Very cool, ARToolkit ported to GPGPU code. Doesn’t seem like they’ve released code nor binaries, though :( Which is weird, since ARToolkit is GPL.
Jan 18th
Wikipedia: Lagom →
tristanjay7: “Lagom is a Swedish word with no direct English equivalent, meaning “just the right amount”….In a single word, lagom is said to describe the basis of the Swedish national psyche, one of consensus and equality.” Thanks to the Sweden episode of No Reservations. Hah! Didn’t know it’d be so fun to watch a travel show about your own country. (Also, youtube ftw.)
Jan 18th
“I’m convinced that most people only spend 1-2 hours a day actually working. Of that time spent, a lot of it is “meta work”, endless emails, scheduling, and such. When you go to work and sit in your cube you’re behaving pretty much like a CPU. Most of the time you’re at 99% idle, but you need to be there and “on” just in case someone needs some processing done.” — Nathan Bowers <...
Jan 17th
139 notes
Jan 16th
54 notes
1 tag
WatchWatch
Star Wars: Retold (by someone who hasn’t seen it). Han. S. Solo.
Jan 15th
2 tags
Jan 14th
4 tags
Jan 11th
Last.fm
tristanjay7: kapi: Please reblog with your usernames. Mine is kapi80 mahr I’m nevyn. Tangentially, I noticed yesterday that last.fm has a nice iPhone version of their site, and I used it to settle an argument with my girlfriend whether I had listened to Jim Noir’s My patch one or five times that day, because she couldn’t get it out of her head. Turns out I had listened to...
Jan 11th
38 notes
Bio-Bak →
Need to link this again. Most awesome portfolio site on the web.
Jan 10th
The Dial Up Kid →
maniacalrage (via marco): I still occasionally have nightmares that feature these sounds. The faces in this animation are dead on. BioBak has a face animated to the modem sound in the lower left corner of his site (which is the most awesome portfolio site on the internets) which is much, much better. I wonder which was first…
Jan 10th
53 notes
3 tags
Jan 10th
Jan 4th
How to fix a syslogd that uses >100% CPU →
Other symptoms: malloc errors in the syslog.
Jan 2nd
GetBundles →
Al3x: GetBundles is totally sweet. It goes out and checks not just the official TextMate bundle repositories but GitHub as well. Once it’s got an authoritative list of all the bundles out there, it lets you install them with a click. You don’t even need to restart TextMate to make use of newly installed bundles. GetBundles is how you should get bundles. It’s really weird that GetBundles...
Jan 2nd
Jan 2nd
2 tags
National Consumer Agency of Denmark: iBook Lab... →
Okay, so back in 2006, the consumer agency of Denmark did some research on why the iBook G4’s logic board seems to break after 12-18 months. Turns out it’s almost always the same fault: a ISL 6225CA chip where the pins 1 and 28 are badly solded to the board, which makes the solder crack. This is why clamping or shimming the iBook makes it work, it rejoins the solder temporarily....
Jan 1st
Jan 1st
13 notes
Jan 1st
23 notes
The code that allegedly broke the Zune →
marco < jstn: while (days > 365) { if (IsLeapYear(year)) { if (days > 366) { days -= 366; year += 1; } /* nevyn's note: this is where there should be an else { break; } */ } else { days -= 365; year += 1; } } (Also, this is very ugly C style in many places. I expected better from Microsoft.) The code...
Jan 1st
52 notes