Wed, 5 Dec 2007

Lord Jim

— SjG @ 11:17 am

Joseph Conrad, edition of 1917, read as an eBook from manybooks.net

(I started writing this a month ago, and it’s been languishing in the “finish me!” queue ever since.)

Ah, Lord Jim, the bane of Ms. Vessey’s Junior English class. When I read the book then, it was under protest. The rules were as follows: every sentence would be extracted for symbolic analysis, and an elaborate cross-referencing would ensue. Thus, it came to the point that if Conrad mentioned anything to do with light, weather, color, temperature, etc, he was clearly telling us how to decode the secrets of the next paragraph.

The direct reading of the text was a rewarding experience which was sullied by over-analysis. Sure, Conrad conveyed mood and texture via the “symbols” were were forced to identify, but I didn’t (and don’t) believe that he coded a whole parallel story sub rosa into the text.

Upon re-reading, I was struck by a number of unrelated things that escaped me in my first reading. I was interested in the depictions of Islam in the Indonesian islands, as well as the descriptions of the lawless Straits of Malacca from a hundred years ago. Some things don’t change. Conrad used a very descriptive vocabulary, and had an aptitude for portraying the strange kinds of characters who inhabit the real world — the kind of people we meet frequently, and think “he’s kind of odd, isn’t he?”

Especially with the theme of conformity and individualism, Conrad seems to be pointing out that “normal” is like a mathematical normal, in that any given constituent is not going to be smack dab in the middle of the mainstream. So normal society is made up of people who are by and large similar in attitudes and behavior, but who each have their quirks and eccentricities.

Filed in:Art, Books, General

Wed, 28 Nov 2007

Aperture Import, Continued.

— SjG @ 1:36 pm

I’ve done some more work on the Aperture Importer (background here), and the latest is attached below. It now does some reformatting of keywords that get split (e.g., “San” and “Diego” can be merged to “San Diego” as a keyword.) It’s hacky and ugly. You’ll have to set up your own keywords for this kind of merge.

I’ve found a couple of apparent Aperture bugs.

If I tell Aperture to import an empty directory from Applescript, it’ll stall and lock up Aperture.

Worse, I find that if I do a large import (more than, say, 5,000 images), Aperture grabs a bunch of memory that never gets released. Well, Aperture itself doesn’t grab the memory, but it causes the kernel_task “process” to allocate a big pile of real memory, which it seems to hold on to until reboot.

It’s a cumulative thing: if I import 5,000 images, the memory gets grabbed. Then, if I do another 5,000 image import, the memory usage doubles. Thinking it would be handled by swapping, I didn’t worry, and continued. This was a bad idea. Aperture locked up, but so did the whole OS. The last thing I could see from top was that 100% of my real memory was allocated, that less than 256M of swap was in use. I had at least 50GB of disk free, so that wasn’t the problem.

Anyway, for safety, if you use this import script, I recommend rebooting between import sessions. Yeah, it’s voodoo, but it’s guaranteed to work.

Aperture Importer Update

Linux Security Camera Server on a Dell Vostro 400

— SjG @ 11:17 am

So I’ve been building a new security camera system. The last time I did this, I bought a Dell dual-core box, and spent about a week installing Debian, and building and rebuilding the kernel to support the dual cores, to support the BT878 video capture chipset, compile and configure motion, etc. It took a week of evenings and a weekend or two, because the Dell hardware wasn’t automatically supported, and it required special boot-time parameters to recognize the SATA controller, for example.

So I’m building a new system on a Dell Vostro 400. Right off the bat, I ran into problems with installing the Debian net-install. I was booting off a CD, but the installer couldn’t find an ATA/IDE controller for which it had a driver. Weird. This article showed me the solution to that — set the Dell controller’s SATA mode to “RAID.”

But then I hit a wall with the Intel Gigabit network controller. I couldn’t find any workarounds for it, but, after extensive Googling, found that some of the Ubuntu people may have a patch. The posting was six months old.

So screw it, thought I, and downloaded a shiny new ISO of Ubuntu 7.10 Server Edition to see whether it would work.

Damn, am I impressed! Not only did it recognize the ATA/IDE controller and the network controller, it happily recognized the BT878-based card and loaded the kernel modules. It even has motion installed as a package for easy installation. I was able to copy over all my support scripts and motion configuration files, and was up an running in less than two hours (and that includes setting up the web server, motd, special sshd tweaks, and all)!

Now, all I have to do is deal with my crisis of faith. Do I leave the Church of Debian for the radical new Ubuntuist movement?

Tue, 20 Nov 2007

Cat Mysteries

— SjG @ 10:24 am

Every day, as I walk to work, I pass several houses with cats. As anyone who has walked with me knows, I have a predilection for talking to (at?) animals. Some cats come over to be petted, others run away.

One particular cat, a handsome Siamese, always retreated to a safe distance, but maintained a tense, ambivalent posture — he seemed like he wanted to come over, but at the same time he wanted to run.

Right about the time my cat died last year, this Siamese seemed to undergo a change. He’d venture over, each day a little closer. And one day he came close enough that I could pet him. After that, all his ambivalence dissolved. He’d happily rub against my legs, meow, and wait for me to pet him.

I’ve nicknamed him “Buddy,” and now he’ll run all the way down the driveway (or even across the street) when he sees me coming. After I pet him, and continue on my way to work, he’ll follow me for a while.

But today, the whole story as I understand it shifted back into the realm of a Cat Mystery.

I walked by the house where Buddy lives, and out he ran. I leaned down, had my usual morning conversation with him, and was getting back up to continue my walk, when our history was cast into doubt. There, sitting just far enough to be safe, was a handsome Siamese — a virtual twin of Buddy’s — maintaining a tense, ambivalent posture that made him seem like he wanted to come over, but at the same time he wanted to run away.

So… was the Buddy who kept his distance the same Buddy who happily greets me?

Filed in:General

Sat, 17 Nov 2007

Aperture Import Script

— SjG @ 7:14 pm

So, after the demise/µsoftification of iView Media Pro, the time came to switch to Aperture.

However, while Aperture is mighty powerful, its limitation of 10,000 images in a project makes import of my photos difficult. What’s more, my … er … unique system of “organization” doesn’t natively work well with Aperture. My attempt at organization, which predates such things as iView, Aperture, or even a usable Bridge, is predicated on the idea of the filesystem as a hierarchical database of sorts.

For example, I start with a directory called “photos” and within it are directories for “animals,” “events,” “people,” “places,” “things,” “projects,” etc. Within “events” are “political,” “work,” “family,” etc. With each of these are either further taxonomic directories, or what might be equivalent to rolls-of-film directories, e.g., “MothersDay-2007-05-13” or “CocktailsAtBerris-2000-06-14.” Directories are all Unix-friendly (no spaces or crazy punctuation) and are generally CamelCase for multiple words.

So I went through a frustrating attempt to write a good Applescript importer. The problem with languages like Applescript (or Javascript implementations embedded in Adobe products) is that they promise more than they can deliver. They’re designed to interact with Applications, but generally don’t have rich access to application functionality. Why can’t I create a folder in my Aperture library in Applescript? Why can’t I get/set a single pixel in Photoshop with Javascript. Yes, I know both are possible through some crazy GUI-script calls or cryptic Event IDs, but why give me the equivalent of object-oriented access and then leave out all the important methods?

Well, enough ranting. With a lot of help from others who have gone before me and posted comments and, even better, code, I hacked together something that will read in my hierarchy, create a new Aperture Project for each leaf node on my tree, and convert the path to that node into a set of keywords which it will apply.

So “photos/events/family/MothersDay-2007-05-13” will become a project named “MothersDay-2007-05-13” and the images within it will all be tagged with the keywords: Events, Family, Mothers, Day, 2007-05-13. It’l also throw in copyright notices and author name.

There’re provisions for excluding words from becoming tags (e.g., “and”) as well as special case code for directories named “misc,” which I often use as catchalls for a taxonomical branch — these get named for the parent directory plus the “misc” (e.g. “ArthopodsMisc”).

Perfect? No. Better than doing it manually? Yes.

In any case, here it is:
Aperture Importer