Oops

    mysql> delete from tag;
    Query OK, 346 rows affected (0.00 sec)
    mysql> delete from tagging;
    Query OK, 2905 rows affected (0.00 sec)
    mysql> delete from thing;
    ERROR 1146: Table 'memories.thing' doesn't exist

"Wait, memories.thing? Oops. Wrong database"

OK, so I was playing around with a new toy and I trashed all the Memories tags. I've recovered most of mine, but now I have to work on recovering all the others.

The new toy was something I was working on just for a bit of fun. I just wanted to spend the afternoon coding, really. So I have started writing soemthing which aggregates tags from all of my tag databases: at the moment, I'm using tags for delicious, Memories and this very blog. It knows about all these. Hopefully I shall also teach it about other things which have tags, when I think of them. So, at last, you can see both what I was blogging and what photos I was taking on 19th March 2004 at the same time. Similarly, all my thoughts on Japan and on mission on the same page.

It's pretty raw and ready at the moment, but the eventual aim is to work backwards and have Memories, Glob and some URL-remembering-thing all writing their tag information to a common source, and, really eventually, querying the common tag database instead of having all the "find all Xs with tag Y and Z" code reimplemented for everything which uses tagging.

Incidentally, though it looks simple, the guts of it are beautiful. Each "thing" has a class, which is a privileged tag telling it where to find methods to, for instance, display itself as HTML. Tags have two components, a value and a style, allowing a use mention distinction. So a class tag class:memories would have a value of memories and a style - which is itself a tag - of meta:class.

meta:class's style is, of course, the recursive tag meta:meta. Did I just say "recursive tag"? Urgh.


Full version - 3 Comments