SpotMeta (by )

My friend Ben Summers has been busy developing SpotMeta, which is a nifty tool for Mac OS X (Tiger).

The hole that SpotMeta fills is a basic omission in how Apple have implemented Spotlight, their system for indexing files for rapid searching.

Spotlight works by being notified whenever a file is modified. It then looks at the file type and invokes an appropriate "importer plugin" for that file type, which extracts relevant searchable information from the file. For example, the PDF importer extracts the page count and page size from the file. The result of the importer is a bunch of key=value pairs, plus a summary of the plain text content. Spotlight merges this with basic information from the filesystem - file size, last modified timestamp, creation timestamp, file name, that sort of thing - and indexes the result.

You can either do a quick search for any given string, which will be looked for in the indexed content as well as in all the indexed key=value pairs, or you can set up a structured search query - telling the system to find files with a modified date in the last week and whose content contains a certain phrase, for example.

However, this is rather limited in some ways. For a start, only one importer is applied to a given file. That's a problem, since many file formats have support for optional extra application-specific information within them. A PNG file, for example, might have an importer that extracts the standard comments field inside a PNG, but a scientific visualisation application that extends PNG files with extra information about the units of the axes will either need to write a whole new importer that provides the standard PNG fields as well as their own - or just live with their users not being able to find images that show a time axis with an accuracy better than 3ms.

On the other hand, Tiger's file system allows you to store arbitrary key-value pairs for any file - "extended attributes", in computing parlance. Yet Spotlight doesn't bother indexing these attributes, and it's not easy for a normal user to view or edit them.

SpotMeta does three things that, together, rather neatly solve these problems.

  1. It provides a nice user interface to edit extended attributes. A metadata schema editor is included, which lets you define your own keys - you might have a choice field with a given list of options, a multi-choice field with a specified list of checkboxes, and plain text, date, or numeric fields, as well as a few other options. Then you can use the Finder context menu or a keyboard shortcut (from within the finder or an application) to edit the attributes of the selected file, according to your definitions.
  2. It provides a framework for extending the Spotlight importing process. Basically, it allows other importers to run as well as the "native" importer for a file, and merges their results with what the native importer proides. So the author of the PNG-based sci vis package could write an importer that just reports on their extensions to PNG files, and have it run as well as the native PNG importer.
  3. It provides an extension importer that reads the user-defined extended attributes and indexes them, so they can be searched for with Spotlight.

The net result is that you can define (and subsequently refine as you wish) a tagging system for your files - I already organise my directory structure by client and project, so tag my files with the project lifecycle stage they relate to (legal, requirements, specification, implementation, documentation, ...) and whether they still require action. Then you can search for files based on your requirements - I can find all legal documents I've not dealt with, and what's more, I can create a 'smart folder' that will always show the result of the search (changing in real time as I alter my files).

Neat stuff!

Religion (by )

A friend visited over the weekend, and we got chatting about religion, which got me bringing out my copy of the Tao Te Ching.

I liked the philosophy of the Tao Te Ching; my translation tried to preserve the translator's interpretation of the meaning of the text into modern English, which makes it pretty approachable; I know that I'm going to be missing some of the 'original meaning', but I won't get that unless I learn ancient Chinese, so so be it. But either way, it was pretty close to the philosophy of life I'd developed myself.

And yet, I can see how people can turn it into a religion. The Tao Te Ching, as I read it, is about the fact that the universe is a large complex system full of interrelationships and feedback loops and so on; that attempts to take control of it aggressively will tend to lead to failure, since it is not something you can master, and that success is to be had in seeing yourself as a part of this complex system (ecosystem, economy, society, ...) and striking a balance between letting it carry you around in its eddies and gently guiding yourself in the way you want, while accepting that your guidance is merely guidance and not absolute control, and that the gentler your guidance is the more effective it is likely to be - and the less extreme the side effects.

However, somebody with a different mindset could read the text and see "the Tao" as meaning "an omnipresent sentient God". My interpretation of "the Tao" is something more akin to "chaos theory".

My visiting friend had heard from somewhere that Taoism was a 'bit scary', and I confessed that despite having avidly enjoyed the Tao Te Ching, I really had no idea how "modern Taoism" worked as a religion, so I did a bit of research.

Rotten.com's writeup on Taoism seems quite good - as I had suspected, some folks had gone and converted a philosophy into a religion. Sigh. There are Taoist temples?

A state may be ruled by (measures of) correction; weapons of war may be used with crafty dexterity; (but) the kingdom is made one's own (only) by freedom from action and purpose. How do I know that it is so? By these facts:--In the kingdom the multiplication of prohibitive enactments increases the poverty of the people; the more implements to add to their profit that the people have, the greater disorder is there in the state and clan; the more acts of crafty dexterity that men possess, the more do strange contrivances appear; the more display there is of legislation, the more thieves and robbers there are.

The Tao Te Ching, verse 57

Amen, brother!

Nostalgia (by )

This morning, I went downstairs. It was chilly, and the light outside was slightly grey. I lit the fire.

This brought about intense nostalgia!

My mother's house was mainly heated by fireplaces, so this is the kind of thing I would have been doing on non-school days during late autumn and winter when I was a kid. And for some reason, I've always liked this time of year more than the summer. It's a time for staying indoors, looking out into the twilight, as I worked on exciting projects, alone or with my friend Lorenz.

It also reminds me of a time when computer games were more fun. Indeed, I was struck by a strong desire to play StarGoose.

Looks like I'll have to resurrect my 486 and install DOS, though...

No more CPU fans (by )

Mmmm, my fanless mini-ITX motherboard is now running.

NetBSD is happy with it - had to deal with fxp0 turning into vr0 and the UPS being on tty00 rather than tty01 (it only has one serial port), but apart from that, all is now fine.

So all my files are back!

Right, now to resume the backup job I was in the middle of when the server died... always a nasty time to have a server death...

In the meantime, for the BSD geeks out there, here's my dmesg: Read more »

Spiderweb Shawl (by )

A friend of my mother's (who I have never met), upon hearing my mother was going to become a grandmother, decided to make the baby a rather special spiderweb shawl.

Make no mistake, this is a massive undertaking - something between knitting and lacemaking, as far as I can tell. It certainly looks ornate.

Anyway, since we now have unpacked the camera and the photo printer, and got hold of more photo printer paper, we were waiting for a nice day to take a good picture to send to the maker of the shawl, showing it in action, as a thankyou. And today that weather came, so here's the picture:

Here's a close-up:

Just imagine how long it must have taken to carefully make that delicate thing. Yes, I know, Jean took 9 months - I was talking about the shawl 🙂

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales