Monday, October 25 2010 @ 00:00 +0200
First, is it possible to get something as simple as RESOLVE-BATTLE
wrong? Apparently, yes. That's what one gets for trying to port Python
code that's pretty foreign in the sense of being far from the way I'd
write it.
More importantly, I found out the hard way that sbcl 1.0.11 that's
still on the official servers has a number of bugs in its timer
implementation making WITH-TIMEOUT unreliable. Also, it can trigger
timeouts recursively eventually exceeding the maximum interrupt
nesting depth. Well, "found out" is not the right way to put it as we
did fix most of these bugs ages ago.
In the new starter package (v0.8 in git, latest tarball), you'll find timer.lisp that's simply backported almost verbatim from sbcl 1.0.41 to sbcl 1.0.11. Seems to work for me, but I also had to lower the timeout to 0.8 from 0.98 because the main server is extremely slow.
Read more