The real time is passing, and I'm not in bed

Here's a hint: Twisted (in SVN trunk) now makes it much easier to write (and test) time-using code in a way that doesn't waste time waiting for real time to pass, and remains deterministic.

Anything which uses the reactor to schedule timed calls (with reactor.callLater) should parameterize it. Probably the only method you'll be calling on it is callLater (and then perhaps calling methods on the resultant DelayedCall), but maybe you'll also use the seconds method. The point is, you can pass an instance of twisted.internet.task.Clock instead of the real reactor, and then you have a super-easy way to test your scheduling code reliably. Just call clock.advance(numberOfSeconds) in your test to pass simulated time (thus calling any scheduled calls scheduled for that time), or you can also access the .calls attribute which has a list of all pending DelayedCalls.

Clock has been around for a while and has been in use in many tests, but the biggest new benefit is that you can now use this technique to simulate the passing of time for code which uses LoopingCall; just set your LoopingCall's .clock attribute to your Clock instance, and it'll use that for all scheduling.

Guards, Guards

Pandemonium Books put on a play performance of Guards, Guards, the novel by Terry Pratchett (adapted by Stephen Briggs). It was neat. While I was there I discovered that Pandemonium Books may be a cool place to geek out, so I'll probably be visiting again.

Speaking of geeking out, I hear Tenth is moving up to Boston this weekend, and I've heard that he's threatening to run a role-playing game of some sort. Bring it on, I say.

By the way, did you know PyPy can run Twisted-based Internet servers and clients now? Our conviction is like an arrow already in flight.

It's over

My three-month marathon of 50% travel at Canonical sprints around the world is finally over. I spent two weeks in Dallas in February, two weeks in Montreal in March, and two weeks in London in April. Fortunately we didn't go too overboard in London, so I'm only somewhat totally exhausted. Now to *really* kick up the work.

I'll be in Cambridge for at least a short while, hopefully. I may even be able to get back to Japanese classes; I had to cancel my previous semester for all of that travel.

Oh yeah, I started that thing again. This is, like, number eight or something. Or eighteen, depending on how you count.

I finished Jonathan Strange and Mr. Norrell. It's good. I reread The Witches by Roald Dahl. That man is a genius. I also recently read a good portion of The Cyberiad. It is not science fiction, don't believe what they say. It's about two demigods who can create machines that can do anything. The subtitle on the title page is accurate — Fables for the Cybernetic Age. The style is amazing, especially for a translation. The Fifth Sally (A) or Trurl's Prescription would be brilliant as a beat poetry performance.

Braindump over, peace out.