I have been having problems with TIME off and on for several months
now. When attempting to TIME a form, I would sometimes get an
error along the lines of:
"<foo> is not of type (UNSIGNED-BYTE 32)"
danb suggested this might be due to some wackiness of the clock on
my computer. But TIME would sometimes work on my computer and
sometimes would not. Yesterday I figured out what the problem was.
What happens is this: GET-INTERNAL-REAL-TIME initializes
*INTERNAL-REAL-TIME-BASE-SECONDS* the first time it is called and
bases subsequent calculations off of *I-R-T-B-S*. But if *I-R-T-B-S*
has not been updated in some time (either by an extremely long-running
computation using TIME or a core being saved after G-I-R-T is called
and used for a while), then G-I-R-T's internal calculations will
overflow their declared (UNSIGNED-BYTE 32)-ness and cause errors.
Problems could also occur with long-running Lisp sessions (on the
order of 50 days or more).
My initial thought was to add a hook on startup which sets *I-R-T-B-S*
to nil, which eliminates the more likely of the two scenarios listed
above. But *AFTER-SAVE-INITIALIZATIONS* have been renamed and
apparently declared off limits for system code (was there a replacement
for system code's usage?). And I'm not entirely convinced this is
the best solution. Thoughts?
Nathan | From Man's effeminate slackness it begins. --Paradise Lost
On Thu, 16 Sep 2004, Nathan Froyd wrote:
> above. But *AFTER-SAVE-INITIALIZATIONS* have been renamed and
> apparently declared off limits for system code (was there a replacement
> for system code's usage?).
REINIT now includes the actions that used to be in
*AFTER-SAVE-INITIALIZATION*, and is imo the place where any new ones
should be added.
Ditto for DEINIT and *B-S-I*.
-- Nikodemus Schemer: "Buddha is small, clean, and serious."
Lispnik: "Buddha is big, has hairy armpits, and laughs."