loading twitter...

November 2006

Spotlight is full of lies

The documentation for NSMetadataQuery seems wrong. It implies that wildcards can be used along with the equality operator, to match substrings for metadata values. That is, you can do something like kMDItemAlbum == "*Ambient*", and it will match any item whose “album name” contains “Ambient”. The docs also imply that the NSPredicate like operator can’t be used in Spotlight queries.

But, duh, this is wrong. Using kMDItemAlbum like "*Ambient*" works just fine, but using == doesn’t work at all.

Also, the NSPredicate docs say that you can append operators to the end of your search, like c for case insensitive matching (so, kMDItemAlbum == "*Ambient*"c). But + predicateWithFormat: throws a hissy fit if I put operators after the query value.

Uncategorized

Comments (0)

Permalink

Score

I managed to do the following today:

  • Hurt my upper back, and walk around really stiff and in pain all day.
  • Spill a full glass of iced tea on myself.
  • Sit through a pointless meeting, where I guess I was supposed to ask questions, but didn’t, because I didn’t have any questions and did not set up the meeting.
  • Get stuck behind not one, but two people who would neither merge in front of me, nor slow down to let me pass.
  • Have an extremely tasty dinner, with really great wine.

So that’s what, -3 mana? Not doing that hot, I tell you.

Uncategorized

Comments (2)

Permalink

Source

I’ve made a new release of Interaggregate 2, which is a Cocoa reimplementation of the xscreensaver hack. I put the source up on Google’s code hosting, too: http://code.google.com/p/interaggregate2/.

I’ve also put up a preliminary version of my class project this quarter: BirchFS, a metadata search file system.

Google’s code hosting is nice. The set up takes only a few minutes, you don’t need to wait for approval (like Sourceforge) and you get Subversion access (unlike Savannah). The web UI is dead-simple and is yet another crappy Google interface, but it’s good enough for small, open-source projects.

I’m digging coding in Objective-C/Cocoa. The OO model seems a lot nicer than C++, and Cocoa’s run-loop/autorelease mechanism is really a great way to handle memory management for programs with event loops. Objective-C is powerful like C (it is just a superset), but also has great support for OO and even advanced language features — you can practically do duck typing, for example, because of the way messages are passed to objects via selectors.

Uncategorized

Comments (0)

Permalink