Personal technology notes: email management edition

March 1st, 2005  |  Tags: ,  |  Leave a comment

Merlin Mann linked to this post by Jason Clarke, which has the mildly provocative title “If your inbox has more than a screenful of messages in it, you’re rude.” Clarke distinguishes between e-mail “filers” and “pilers.” Here’s a choice quote:

The problem with the system that Pilers use is that email never stops arriving. For many of us, it arrives at a faster rate than we believe we can handle it (another excuse for piling). What this means is that as new mail comes in, important mail gets pushed down, off the first screen of messages, and out of the piler’s consciousness. That message that they’ve read 8 times and thought “oh, I need to get back to her about that” eventually gets pushed off the screen, and is never thought of again, unless the piler specifically remembers that message, which is unlikely

My goal is to stop being rude, so I’ve adopted a GTD-like approach to my inbox. I have stopped using Mail.appetizer, which helpfully interrupted me every time I got a non-urgent message from some mailing list that I read casually. ( really needs a “next unread message in any mailbox” command. For Pete’s sake, Pine has this feature!) As a result, I have to make time to read mailing list mails, which are automatically filed into other folders, but I am able to survey them in a more useful manner, and on my own time, as a result.

I took 4000+ unfiled inbox messages and filed them into IMAP folders, archiving them by academic year and term. Ideally, in the future, I’ll be able to keep all of my messages in one monster archive location and simply have smart searches that act like folders, but it’s pretty easy to do a quick grep of the archive when necessary now. (I’m not using Zoë anymore because it doesn’t play nicely with the one or two applications I use that need most of the CPU, like Logic.) Now, I file messages away as soon as I’ve dealt with them, using Aaron Swartz’s keystroke-triggered mail-archiving AppleScript.

I currently have 2 messages in my inbox; both are there to remind me that they must be replied to. When I cons up some to-do list manager that can link to mail messages, the count will come closer to 0.

I’m currently listening to Schmücke dich, o liebe Seele, Op. 67.36 from the album “Sämtliche Orgelwerke Vol. 11” by Max Reger (1873-1916)

A tale of three harpsichords becomes a tale of twenty samples

January 26th, 2005  |  Tags: ,  |  1 Comment

In which: A brief distraction last night turns into a fun experiment (with downloadable musical artifact), and some extreme frustration with the state of my sampler software. If you’re just interested in the music, feel free to skim the technical details and download the mp3.

One of my main home-recording distractions hobbies is recording myself singing with sampled instruments in Logic’s EXSP24 as an accompanist. It’s nice to have decent piano, harpsichord, and organ samples, to at least keep up appearances. (Harpsichord and organ are especially useful for Bach repertoire.)

I came across the Post Musical Instruments Organ Toolkit last night and was amazed by the demos; it’s something I’ll have to pick up some day. (Listen to the swellbox in the second Meistersinger demo!) Their harpsichord disc, while also quite impressive, is more expensive and slightly less sonically versatile.

I decided, harpsichord-wise, that it would be wisest to plan on making do with what I had: the $10 SampleTekk harpsichord (which EXS24P converted from GigaSampler format) and the free Campbell’s harpsichords from I thought I’d throw together a quick demo to see how well each worked.

My first frustration came quickly: the EXSP24 that comes with Logic Express does not handle “release samples,” which the SampleTekk set includes. As a result, the harpsichord sound is less realistic. (A harpsichord makes a sound when you release the key; most good samplers allow you to specify that a sound will be played when a note is released.) This is a horrible oversight, Apple — if you’re marketing something as an EXS player, it should support all of the features of the EXS sample format and any sample format that it purports to import.

I took a sequence of Couperin’s Baricades Misterieuses (which has been a favorite piece since childhood) and split it into four-bar segments, alternating each between three harpsichord sounds to get an easy comparison. (The Couperin is not the best piece for putting a sample set through its paces — there’s little rhythmic or dynamic variation — but it’s an acceptable start.) You can judge for yourself in a minute, but the harpsichords all have strengths and weaknesses.

I figured that I may as well not stop at just three different samples, so I used the Couperin piece to audition twenty more-or-less appropriate samples, including keyboard instruments, mallet percussion, and guitars. You can hear the results in this 3.5 mb mp3 file; in order, the samples used are:

  1. SampleTekk Harpsichord (from
  2. Campbell Harpsichord Upper Manual (from
  3. Campbell Harpsichord Main Manual (from
  4. AKAI Splendid Grand Piano (a Steinway; available from Sound Creations)
  5. Yamaha Grand Piano (the GarageBand piano preset, dry)
  6. “Carnegie Hall” Piano (the Logic Express channel strip preset, with inserts disabled)
  7. Clavinova (from Güray Dere)
  8. Honky-tonk piano (from Pete Thomas)
  9. Jeux d’orgues flôtes 4′ 2′ (from
  10. English organ flute 4′ (from
  11. English organ Diapason 8′ 4′ 2′ (from
  12. Jeux d’orgues principaux 8′ 4′ 2′ (from
  13. Marimba (Logic Express factory sample)
  14. Eli Krantzberg Vibraphone (from
  15. Yamaha Grand Piano (Logic Express factory sample)
  16. Rougin nylon guitar (from — site appears to be down; link goes to copy)
  17. Epiphone Broadway jazz guitar (from naturalstudio)
  18. Classical guitar (Logic Express factory sample)
  19. Nylon-string guitar harmonics (Logic Express factory sample)
  20. Steel-string acoustic guitar (Logic Express factory sample)

At the end of the file, you can hear the sustained terminal chord played by each sampled instrument. This exposes the release envelope of each sample (some are more realistic than others!) and also exposes some terrible loop artifacts in the otherwise-excellent Jeux d’orgues sample set. This is frustration number two: the looping artifacts are not present in the Soundfont versions; it appears that the EXSP24 introduced them upon import.

EXSP24 seems to be largely useless for high-end sample libraries (including most purchased content or samples of “art music” instruments) due to poor support for advanced features, is frustrating for free samples due to an occasionally-bungling data import feature, and has been crippled further in Logic Express 7 due to removal of the rudimentary instrument editor that was included in LE6. (This means that I can’t make my own sampler instruments, no matter how simple they might be. Redmatica will introduce a standalone instrument editor soon, but it won’t overcome the limitations of EXSP24 vis-a-vis the full playback capabilities of EXS, like release samples.) Add to this the general impression that EXS as a sampler has been left behind by progress in the industry — making it senseless to upgrade to Logic Pro just for the full version of EXS — and it looks like I’ll be saving my pennies for the soon-to-be-released version of Native Instruments Kontakt (hopefully, academic pricing will still be available).

Keynote 2

January 13th, 2005  |  Tags:  |  Leave a comment

I’ve used Apple’s Keynote software for a variety of tasks: short talks in the department, course presentations, Sunday school lessons, and my Ph.D. preliminary exam. I like it better than PowerPoint (it certainly beats up on my previous presentation software), but it is not quite as fully-featured (more on this shortly). The new version, Keynote 2, looks quite nice. There’s a lot of fluff that isn’t useful for computer scientists or academics (snazzy motion-graphics headline builds suitable for a sales pitch, more “themes,” etc.), but Flash export is useful and the new presentation mode (in which the contents of the notebook display are completely configurable) looks absolutely essential.

Unfortunately, it appears that Apple has not fixed the greatest shortcoming of Keynote vis-a-vis PowerPoint: flexible animations. In Keynote, you can “build” an object “in” and “out;” that is, you can animate it on to the slide and off of the slide. There’s no provision for moving objects from one location on the slide to another on the slide, as there is in recent versions of PowerPoint, so one must resort to various kludges in order to create the appearance of intraslide movement. I’d like it if this were addressed, but I’ll probably be upgrading anyway.

Text editor notes

January 12th, 2005  |  Tags:  |  Leave a comment

Bare Bones Software has reclassified TextWrangler (née BBEdit Lite) as gratis software. Nice. Although I was not a regular Mac user in the Classic era, I recall that the full BBEdit was well-regarded, and it seems to have made the transition to OS X well. I’ve downloaded TextWrangler and am checking it out.

I’m in sort of a text editor limbo right now, since there’s no really good native Emacs on OS X. You can run it in a terminal window, or you can run Andrew Choi’s long-since abandoned Carbon port (as I do), or you can use XEmacs (which, notably, Choi is also porting to Carbon). I hate XEmacs, though — GNU Emacs is my preferred editor.

I’m torn — I have a lot of elisp and custom macros that I want to keep, and I’m quite fond of JDE and tex-mode. However, I find other editors “nicer” on the Mac. SubEthaEdit is light and fast, TextWrangler appears quite scriptable, and so on. Almost all Mac editors besides Emacs are written in Cocoa or otherwise support OS X System Services; that can be extremely useful. (As an aside, my notes on writing system services in Python may be of interest if you’re still reading this, but it seems that the most recent PyObjC release has made this process more painless.) Best of all would be a Cocoa Emacs, but that would probably be prohibitively difficult to develop.

I suppose that after I’m done moping about editing text I’ll have some time to write some more. Foodblogging (à la Tiffany) shall ensue sometime tomorrow.

taking a leak from Apple

January 6th, 2005  |  Tags:  |  2 Comments

John Gruber patiently explains to the Apple-speculation set why product leaks and rumor-mongering raise ire in Cupertino. Even given the Internet’s vast capacity to facilitate discussion among groups of people who seriously entertain ridiculous ideas (e.g. here and here), I am flat-out shocked at the amount of negative commentary directed at Apple over this. Apparently, there are a very large number of people who don’t understand contract law, don’t recognize that a company might well pursue civil action against entities encouraging breach of contract — indeed, it seems many don’t even realize that anyone with enough “inside information” to engage in product release information leaking is liable to be NDA-ed to the gills!

Some experiences developing an Audio Unit effect

December 20th, 2004  |  Tags:  |  1 Comment

This fall, I set out to develop a DSP audio effect.

This document describes my experiences developing an Audio Unit effect and provides pointers for other programmers who are interested in developing AU plugins. My short writeup is most notable for clearing up a couple of minor ambiguities in the documentation, but there’s also a cute diagram showing how to implement an FFT-based effect as an Audio Unit. Comments and corrections are welcome.

Google partnering with libraries

December 15th, 2004  |  Tags:  |  Leave a comment

Very good news in the NYT: Google is digitizing 15 million volumes from several university and public libraries. The public-domain works will be available for public viewing and download over the internet; works that are still protected by copyright will be available to browse online

iPod battery

November 22nd, 2004  |  Tags:  |  Leave a comment

Pål Børsting has written up a nice little HOWTO on keeping your iPod battery performance up. Børsting doesn’t address battery conditioning; rather, he talks about avoiding usage patterns that drain the battery more than necessary. The short version: don’t tax the disk by allowing file fragmentation or letting the filesystem get too full. (The latter point is no news to iPod users who’ve read the FFS paper!)

iPodder tip

November 7th, 2004  |  Tags:  |  Leave a comment

I’ve been using iPodder to download “podcasts,” or audio files contained in RSS feeds. iPodder checks feeds, downloads audio enclosures, and imports the audio files into iTunes (or some other player) so that they can be transferred to your iPod (or whatever you use) automatically. (iPodder is what I’ve used to listen to the Public Radio Exchange, which I wrote about earlier.)

The (minor) complaint I have is that, while iPodder creates a playlist for each channel, there’s no way to specify a playlist prefix. That is, it would be nice if I could call all of my podcast playlists something like “Podcast X,” so that they would be easy to find on my iPod. Fortunately, a fix is simple, since iPodder is written in Python. The following instructions will work for OS X; it should be straightforward to adapt them to the Windows or Linux versions.

  1. Get the latest version of iPodder (1.1.1 as of this writing). I used this technique with an older version, too, but these instructions are for 1.1.1.
  2. Make sure you have permissions to modify the files in the iPodder application bundle. (You can do this by typing
      sudo chown -R `whoami`:staff /Applications/iPodder/

    in a Terminal window.)

  3. The application bundle contains a file called; it is the file that contains the code for interfacing with media players, and you’re going to modify it. Open the file /Applications/iPodder/ in your favorite text editor.
  4. Find the method named append_and_create_darwin. (You’ll need to adjust these instructions if you’re not using iTunes on OS X.)
  5. Modify the first line of this method (after the documentation string). Before you make the change, it will say:
      playlistname = sanitize(playlistname, self.safeplaylistchars)

    You are going to change this line to two lines like this:

      prefixedname = "%s %s" % ("ZZZ iPodder", playlistname)
      playlistname = sanitize(prefixedname, self.safeplaylistchars)

    Of course, you can change “ZZZ iPodder” to anything you like — I just prefer to have my podcasts at the end of my playlist catalog.

Beautiful font list

October 15th, 2004  |  Tags: ,  |  Leave a comment

If you’re a type nerdery dilettante like me, you’ll be interested in Twenty Faces, a beautifully opinionated look at book typefaces from Dean Allen of Textile fame.

McCarthy t-shirt

October 15th, 2004  |  Tags: ,  |  Leave a comment

OK, this t-shirt rules. It has a picture of John McCarthy — inventor of Lisp and (more importantly) the conditional expression — on one side and a picture of a cons cell on the other. I would say that I can’t imagine programming without conditional expressions, but that’s not true. However, I can imagine how unpleasant it would be! (link via lemonodor)

Reblogging (made pathologically easy)

September 29th, 2004  |  Tags:  |  1 Comment

“Reblogging” is yet another scrap on the pile of trendy weblog-related neologisms (cf. “bleg,” “photolog,” “moblog,” etc.), but — unlike most of its siblings — the concept behind “reblogging” probably deserves a name. One who is using weblog software to republish content available elsewhere, typically in a semi-automated fashion, is “reblogging.” (A similar concept is the “linker” side of the “thinker/linker” dichotomy that some people draw, but reblogging seems to imply special tool support.)

After I read this article about “reblogging” at Weblog Tools Collection, I had a bit of a Eureka moment. One could reblog anything! Fanciful visions of RSS-enabled academic bibliographies all merged together danced in my head. I thought about making a “personal portal” with my calendar, to-do lists, and recent articles from favorite authors. Anything that could have metadata tacked on to it could be aggregated. I then floated down to earth and came up with a use for reblogging that’s more likey to see implementation: my b-side.

I’ve been interested in displaying the b-side links inline (like Jason Kottke’s unified treatment of all posts) for some time. However, I am loathe to abandon using Markku Seguerra’s excellent wp-recent-links plugin (for a variety of reasons), and hacking together some one-off script to munge data from the “recent links” table to the “posts” table seemed fairly trivial but woefully mundane. I then realized that wp-recent-links included an RSS 2.0 feed, and I started to get wise.

WordPress, which runs this site, supports a number of XML-RPC interfaces. Notably, it supports the MetaWeblog API, which is cool because its “post entry” format is basically the same as that of an RSS 2.0 item. So, if you can get the data you want to reblog in RSS 2.0 item format, you can post them to a MetaWeblog API-enabled weblog with very little effort.

This happy capability isn’t the half of it, though. With Mark Pilgrim’s legendary Universal Feed Parser and Python’s XML-RPC support, you can implement mass-scale automated reblogging as a list comprehension. (Check it out:; note that it will repost everything whether it has already or not, and doesn’t do muchany error checking.) There is a lot of potential here, and the fact that such high-quality software components are available and composable is really inspiring.

Amiga emulation for the Dreamcast

September 24th, 2004  |  Tags:  |  Leave a comment

Here’s a nostalgia-inducing item: some enterprising hacker has produced a Sega Dreamcast port of the UAE Amiga emulator. Apparently, it supports the Dreamcast keyboard and can emulate both an analog mouse and a digital joystick with a standard Dreamcast controller. If I had one of those Amiga floppy drive controllers that were all the rage in the late-90s, I could transfer all of my old Amiga discs onto CD-ROM and waste some serious time. (Sadly, the Dreamcast doesn’t have a DB-25 port for my Amiga MIDI interface.)

iTunes, Python, and OS X System Services

September 21st, 2004  |  Tags:  |  1 Comment

I just consed up a little OS X system service that appends some information about the currently-playing track in iTunes to any selected text. By itself, that’s not so notable; however, I did it in Python, using the very cool PyObjC bridge. (I’ll probably clean it up and put it on the web later; right now, it’s only suitable for appending iTunes information to weblog posts!)

Writing system services is pretty straightforward in Objective C, but there are a few pitfalls to look out for when doing so in Python.

  1. The Python bridge has a special mechanism to handle output parameters; this is important because the method that implements a system
    service uses such a parameter. The ordinary ObjC signature of such a method is

      - (void)service:(NSPasteboard *)pboard
      userData:(NSString *)userData
      error:(NSString **)error

    error is an output parameter; if there is an error, then the service method will assign a pointer to a descriptive string to the referent of error, thus placing a reference to the error message in a pointer accessible to the caller. Python doesn’t support this kind of parameter passing, so you’ll need to explicitly route the parameters with the objc.selector method:

      class MyService(NSObject):
         def service_userData_error(self, pboard, data):
            # method implementation here
            return None # this method is supposed to return void; 
               # here we return the error "parameter"
         service_userData_error = 
      objc.selector(service_userData_error, signature="v@:@@o^@")
  2. Although I haven’t had this problem with Objective C services, the python services I implemented really wanted to add an application icon to the Dock. I was able to get around this by editing the Info.plist file of my application bundle and setting the LSUIElement key to 1.

PyObjC is very cool. The problem, of course, is that since Python is even more “dynamic” (for any reasonable definition of the term) than Objective C, you don’t get any errors until you run your application. This problem is exacerbated because most of the errors you get are related to behind-the-scenes runtime type mangling and thus aren’t very close to the actual line of your code that caused them. However, this minor inconvenience is probably worth it in exchange for the mixture of Python and Cocoa.

I’m currently listening to Blitzkreig Bop from the album “Ramones Mania” by Ramones


  1. A helpful pyobjc-dev thread
  2. Information about using python to control iTunes through the python→applescript interface
  3. CocoaDev node on LSUIElement

RSS as bidirectional (!) e-mail

September 3rd, 2004  |  Tags:  |  Leave a comment

Hep is an extremely cute program that promises to improve the way I read RSS feeds: it provides an RSS-to-email gateway so I can read my feeds in a mailreader. (Combine this with Mail.appetizer, and you’re really cooking.) I think there are other RSS-to-email gateways. The cool thing about HEP, though, is that Hep treats metaweblog urls as writable IMAP folders — one could read and post from within a mail client!

Hep is written in Python, is licensed under the GPL, and is supported on Mac, Windows, and Linux.

I’m currently listening to A huge evergrowing pulsating brain that rules from the center of the ultraworld from the album “The Orb’s Adventures Beyond the Ultraworld” by The Orb


July 20th, 2004  |  Tags:  |  Leave a comment

The junk mail filter on Apple’s is pretty good, but it’s a little overzealous sometimes — even for things it should be able to identify as false positives:

In other news, I should be getting Logic Express some time today. Brief review and (hopefully) composition to follow.

Scheme: not hard to understand, not inefficient; nerd news

April 22nd, 2004  |  Tags: ,  |  Leave a comment

My colleague Kent records an amusing exchange that transpired yesterday in the programming languages reading group. Kent, of course, is right on at least several levels: (about CPS) because a good compiler will translate code into CPS for you, so you never have to deal with it, and (about Scheme) because it is always easier to match parentheses than to remember which of 19 levels of operator precedence each scrap of line noise falls under in a given line of code. I am right because CPS enables a bevy of absurd interprocedural optimizations that are impossible in (for example) C and because — especially in recent years — having a high-level language that is closer to the hardware is more of a performance liability than an asset. If you have any doubts that this is the case, try comparing Duff’s Device to a loop unrolled by a compiler (or by a trace cache) on modern hardware: Duff is worse!

note to non-CS-savvy readers: Duff’s Device is an expression of loop unrolling in the language C. It is the sort of hideous hackery that people resorted to in the bad old days before good compilers; now, writing such code will usually result in slower performance.

More ammunition is here: check out this great post describing a collaborative Usenet optimization effort. My contention in the whole debate is that greater opportunities for optimization will present the farther away one is from the hardware, and that exposing hardware-specific tricks at the language level is asking for trouble, even if it is done with the (relative) portability of C. I have little else to add to Kent’s account except that, yes, it was quite funny.

Those of you who pay entirely too much attention will notice that (most) external links in my posts and on the b-side are now of the form This is for a few reasons, including maintenance ease, sinister link-popularity tracking, &c. However, there is a “cool” (in the sense that a lawn-mowing robot is “cool,” only far, far less so) side effect of this: I have developed a small amount of XML-RPC voodoo. I put an XML-RPC interface on top of my “link database finder/generator” code, primarily so I could avoid the unpleasantness of quoting and unquoting URLs submitted to HTML forms. That’s not the “cool” part, though. The cool part is that I wrote an OS X system service that calls my XML-RPC method, so that I can select text of a URL in any application and automatically put it in my database, replacing it with a link to the redirection code. I plan to clean this code up and generalize it so that one could select any text and ship it off to any XML-RPC method, replacing it with the result; then I’ll distribute it.

In any case, it is amazing how a bunch of unwashed web nerds managed to popularize remote procedure call, something that every operating systems researcher in the 80s and 90s put together couldn’t do.

I’m currently listening to M.T.A. from the album “Capitol Collectors Series: The Kingston Trio” by The Kingston Trio. (If this makes no sense, read the paper that we were discussing in pl-reading.)

22 April, 1:20 PM: Updated to clarify (somewhat) and separate out Scheme-is-good arguments from CPS-is-good arguments.

rad free labyrinth-like game

April 14th, 2004  |  Tags: ,  |  Leave a comment

You really ought to download Neverball, a free game similar in concept to the old labyrinth game where one guided a marble through a maze by controlling the plane of the maze with knobs. (Recently, the “Super Monkey Ball” series of games for the Nintendo have had a similar gameplay dynamic.) Neverball is available for Linux, Windows, and OS X, and will probably destroy a few afternoons for you.

I’m currently listening to Heinrich Isaac – Tota pulchra es from the album “Silver – The Best of the Tallis Scholars” by The Tallis Scholars

potrace, rad image vectorizer

March 31st, 2004  |  Tags:  |  4 Comments

A colleague pointed me to potrace as a potential way to tame some ridiculous scatter plots that I’d made. (They had ca. 30,000+ points — a paper with five of them took 45 minutes to print!) However, I soon found other applications.

The other day, I’d taken a lot of notes on my office whiteboard. I didn’t feel like copying them down, so I took a picture of the board with my digital camera, and used potrace to generate an efficient, readable PDF, suitable for framing (or, at least, printing). After all, what is technology for if not to facilitate laziness?

I decided to get “artistic” next — you know, scare-quotes artistic means “I did something cute and cheap with some image processing hack.” I applied potrace to the infamous waterskiing photo, with mildly pleasant results:



potrace is available on Linux, Mac, and Windows (for those of you who lead a benighted computing existence). I bet you can come up with even better uses for it. In any case, I’m so impressed that I’m considering re-doing the friendly logo with potrace (a small version of that logo is the “favicon” on this site; the original was done by hand).

I’m currently listening to We Know Something You Don’t Know from the album “Deep Concentration, Vol. 4: Wreckin’ the Floor” by DJ Format, Chali 2na & Akil

rapid serial visual presentation, software patents

March 25th, 2004  |  Tags:  |  6 Comments

After seeing Trevor Smith’s rad speed reader remix of a novel, I thought it would be cool to see how well the speed-reading concept works more generally. So I read a couple of papers, including this one on rapid serial visual presentation. I then spent about ten minutes writing a python script to “read” a document to a user with controllable variable speed. The end results are incredibly impressive: in general, I either read very quickly and miss some details or read extremely slowly and get distracted before I can finish, but with this technique, I can read over 1000 words per minute, remembering everything. (My reading practice is probably indicative of a severe learning disability.)

I thought it would be nice to share this script with other people who read the same way I do, even though it’s under 100 lines of python and would be trivial to write for an even remotely-experienced programmer. I uploaded it to my web server and started writing this entry. I was then plagued with a terrible thought: What if this technique is patented?

As it turns out, it is. I spent about an hour reading various patents describing speed-reading techniques, incremental refinements to speed-reading techniques, and cute interfaces for incrementally-refined speed-reading techniques. I’m not a lawyer, but it seems to me that any of these patents are so broad as to include any possible computer-aided speed reading “device”. One choice quote from a patent confirmed my suspicion that anyone distributing speed-reading software would get subpoenaed in short order:

While the invention has been described with reference to at least one preferred embodiment, it is to be clearly understood by those skilled in the art that the invention is not limited thereto.

Wow. The oldest patent describing some variant of this technique is 4,845,645; it appears to expire sometime in July, 2006. So, unless I unexpectedly move to Scandinavia, it looks like I won’t be sharing the link to my script anytime soon.

How stupid is it that a piece of software that is almost too trivial to be copyrightable could possibly infringe upon a patent? I always knew that software patents were a bad idea, and that software patents lead to ludicrous, arbitrary restrictions, but I guess one doesn’t know how bad things are until ten minutes worth of one’s own typing is potentially legally actionable. I’m going to have to join the arms race myself, patenting every idea I’ve ever had.

I’m currently listening to Act 1 Scene 1 – Da zu dir der Heiland kam from the album “Wagner – Die Meistersinger von Nürnberg (Karajan, Dresdener Staatskapelle)” by Herbert von Karajan & Staatskapelle Dresden

saving screens with Scribbla

December 31st, 2003  |  Tags:  |  Leave a comment

I hacked together a simple screen saver (download the 86 kb disk image) while watching a movie this week. It’s nothing too mind-boggling, but I think it produces some pretty cute effects. Let me know if you like it (or if you don’t). Below is a image grabbed from the preview panel in System Preferences, which may or may not give you a good idea of what it looks like.

The programming model for OS X screen savers really is as easy as MarkD asserts (also see here). I’m already thinking about throwing together something cooler.

I’m currently listening to Choral: Durch dein Gefängnis, Gottes Sohn from the album “J.S. Bach: Johannes Passion (Disc 2 von 2)” by Philippe Herreweghe / Collegium Vocale, Gent

Apple and microarchitectural performance evaluation; nerd news

December 11th, 2003  |  Tags:  |  Leave a comment

Apple provides a pretty thorough set of tools for inspecting the microarchitectural performance of a program. The CHUD (Computer Hardware Understanding Development) tools include applications to access hardware event counters, to ascribe hardware events to source code, to generate and analyze dynamic instruction traces from a program execution, and cycle-accurate simulators for the G4 and G5 processors.

In other nerd news, I’m checking out Kung-Log for posting. It has a feature to yank whatever you’re currently listening to in iTunes; therefore, I can let you know that…

I’m currently listening to Cantata BWV 126 ‘Erhalt uns, Herr, bei deinem Wort’: 4 Aria from the album “Cantatas 181, 216, 127” by Bach-Ensemble Helmuth Rilling

OS X Audio Toolbox programming tip of the day

December 4th, 2003  |  Tags:  |  Leave a comment

Let’s say you want to write an application that creates a virtual source and plays a MusicSequence to any application that’s reading events from that virtual source. (Maybe this is a stupid thing to do, but I wanted to do it, and it’s sort of unclear how to do it from the documentation.) The MusicSequence functions assume that, if you want to associate a MusicSequence or MusicTrack with a MIDIEndpoint, that you’ll find a preexisting MIDIDestination and send it there, which (obviously) doesn’t help you if you want to communicate with an application that expects a MIDISource, like SynthTest.

Here’s an easy way to take care of that (you’ll have to fill in code to set up MusicTrack objects yourself). This is C code, but — of course — will compile in a .m file as well.

MIDIEndpointRef midiSource;
MIDIEndpointRef midiDestination;
MusicSequence mySeq;
MusicPlayer myPlayer;

static void MIDIPassThru(const MIDIPacketList *pktlist,
void *refCon, void *connRefCon) {
MIDIReceived(midiSource, pktlist);

void setupMIDIandPlay() {

// add any MusicTracks here

verify_noerr(MIDIClientCreate(CFSTR("Example MIDI client"),
NULL, NULL, &midiClient));

verify_noerr(MIDISourceCreate(midiClient, CFSTR("Example MIDI source"),
CFSTR("Example MIDI destination"),
MIDIPassThru, 0, &midiDestination));

verify_noerr(MusicSequenceSetMIDIEndpoint(mySeq, midiDestination));


verify_noerr(MusicPlayerSetSequence(myPlayer, mySeq));


Thanks to Bill Stewart at Apple for clearing up the ambiguities in the documentation, which did not indicate that MusicSequenceSetMIDIEndpoint expected a MIDIDestination.

Random computer nerd note

November 4th, 2003  |  Tags:  |  Leave a comment

I’ve been using PHP iCalendar to put my schedule on the web, to make it easier to schedule important meetings with colleagues. I threw together a little script to upload my calendar data from iCal, and was pretty happy. However, I wasn’t pleased that PHP iCalendar’s default behavior is to display your to-do items on your calendar — as most of my to-do items are for me to read and not really for the public internet. You can disable this behavior, but the .ics file still has to be in a publically accessible web directory. I tried to get sneaky — naming my .ics files as a hash of their contents, so people wouldn’t be able to read the raw data by guessing filenames. Since the “calendar name” is contained in the .ics file and not just in the filename, I figured this would solve my problem. It didn’t, and I got displayed calendars called things like 170b1ed8bb44e6a893d56d0a24e71f7e Calendar. Back (but not for long) to the drawing board. Here’s a cheesy little script (probably overkill to not do it in sed or something) to strip out to-do items from ICS files, and then I modified my upload script in order to strip to-do items before uploading. Try it out — the scripts aren’t even complicated enough to be copyrightable (I think), but they may prove handy if you want to do something similar.


October 29th, 2003  |  Tags:  |  Leave a comment

I installed the new Mac OS last night. Absolutely the least painful operating system upgrade ever. It’s really nice — the new Preview, Exposé, and Finder are worth the price of admission alone. I have yet to play with the new developer tools, but if they come close to living up to the hype they should be rad. This reinforces my powerbook’s position as “best computer since the Amiga 1000”.

Also, I’ve produced some binaries for emacs with a Carbon GUI.

unfortunate web searches

October 13th, 2003  |  Tags:  |  2 Comments

In the fall of 1996, I was a freshman in college. I listened to modern jazz, thought I was a lot smarter than I was, and used commercial software despite finding it viscerally distasteful.

One day, a catastrophic software failure damaged the partition table of my hard disk, requiring me to go to work on it with a pair of pliers, a blowtorch, and a hex editor. (For the nontechnical: that basically means “ones-and-zeroes”.) The whole ordeal was pretty much the last straw for my rapidly-diminishing tolerance of Windows NT’s seeming inability to avoid screwing me. I backed up all of my stuff, removed NT, and enlarged my Linux partition to fill the whole disk. This was still a fairly rough time for Linux, back when getting a graphical display to work still required an oscilloscope and every release of every distribution seemed to have some absurd, critical bugs, like “your printer port doesn’t work, no matter what”, or “the ‘h’ key isn’t supported by this release”, etc.

I also had to learn new tools to do my schoolwork — I started writing papers in LaTeX right away, which was sort of a leap away from WordPerfect 5.1, which I was most used to. I found out rather quickly that searching the web (altavista, then) for “latex faq” resulted in a lot of documents that I wasn’t interested in seeing. Actually, judging by the page summaries, most of the things that turned up were repositories of information about a universe of discourse that I’d rather not know existed. I mean, if to imagine a language is to imagine a form of life (sorry, LW), then there was some pretty horrific imagination that could be inspired by some of that language.

This brings us to the point of this post: I’ve just now — today, even — had an even more awful experience with search results. I tried searching for “hydra”, looking for this — but I got this. I think that the fact that there are recreational Derrida and Lacan “users” is even more disturbing to me than the world explained in the “latex faq” that I found so long ago.