Sun 09 Jan 2005

Integer arithmetic

Slava Pestov has a great post on the pitfalls of twos-complement integer arithmetic. Great mindbenders; I understood the principles behind the questions (I couldn't pull 2147483648 out of my hat!), but there's no way that anyone would get all of them right.

The conclusion is obvious: using Java, C, &c to do integer arithmetic will go wrong at some point, thanks largely to overflow. As Slava says, “1986 is over”.

Posted at 2005-01-09 16:06:49 by RichardLink to Integer arithmetic
Comments, trackbacks.

I hate AppleScript

… great in principle, but working with files or text is just awkward. In fact, doing anything is awkward. If I could get Python's appscript module to work, I'd be much happier.

In fact, if I could only access iPhoto's scripting capabilities from Cocoa itself, that would be awesome. I'll investigate that avenue, I think.

(What I'm doing: converting iPhoto keywords to RDF. Makes sense to me!)

Posted at 2005-01-09 13:19:44 by RichardLink to I hate AppleScript
Comments, trackbacks.

Beach

Today, rather than going to work (ahem), I went with Anthony, Susie, Chris, and James to the beach at West Wittering.

It was windy, but very nice; we played frisbee (hilariously, thanks to the aforementioned wind!) for a while, walked, had a desperately overpriced lunch, and went to the pub for a little while. The drive was excellent, both ways — winding country lanes, hills and A-roads, and decent music from Bek's iPod mini and my iPod.

Tomorrow we're actually going swimming, which is nuts. Still, nice to get fit!

I'll put some pictures up soon. The ones of Chris, Anthony, and I doing catalogue model poses are priceless.

Posted at 2005-01-09 12:03:24 by RichardLink to Beach
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: