20:15 UTC:

Literary find of the day: Out of Old Books, by Helen Sawyer Hogg. It's a bunch of old quotes about the discovery of Uranus and how it went from Herschel thinking it was a nebulous star or comet to being accepted as the first planet to be discovered in modern times. Includes a page from Herschel's journal where he first discovered it.

20:18 UTC:

I've been rewriting phenny so that Noah Slater can package her up for debian. One irritating little computer science problem that I've come across is that when a command outputs multiple lines, they all get sent through a simple message transfer method that makes sure the messages don't get sent out too fast as to flood her off of the network. Now, since all of the commands are threaded, this means that I have to make sure that the message transfer method uses a lock otherwise you might have the method being called more or less simultaneously which'll mean its flood protections become useless.

Now this works fine except when you have lots of commands activated so that their outputs overlap. In that case, what happens is that you get a queue of loads of commands trying to output things at the same time. This is part of why it's a good idea to thread the commands, to make sure that someone doesn't issue a command whose output takes ages and hence blocks all the other commands meanwhile. But in fact because of the locking semantics, this blocking happens anyway. It doesn't happen when I run it on OS X, because there when the lock is released it allocates it to the next thread shared evenly between all of the waiting commands. When I run it on debian, it strictly orders the threads for some reason, so it acts almost as if the threading weren't available.

I've thought of some tentative ways around it, but none that require less than a few lines of code. It seems that there ought to be an elegant or at least simple way around it, but it's too much of a side case to get into it too much so I'll probably just ignore it unless it becomes a practical problem.

Sean B. Palmer, 18th February 2008