[Openmcl-devel] weird random problem
p2.edoc at googlemail.com
p2.edoc at googlemail.com
Wed May 21 06:17:11 PDT 2008
I was looking for how to initialize *random-state* at each initial
call to random (per thread) when I was puzzled by:
(ccl::callers 'ccl::initialize-random-state)
((:INTERNAL HEMLOCK-EXT:EDIT-SINGLE-DEFINITION)
#<CCL::STANDARD-KERNEL-METHOD PRINT-OBJECT (RANDOM-STATE T)>)
I can't see how HEMLOCK-EXT:EDIT-SINGLE-DEFINITION calls
ccl::initialize-random-state
and CCL::STANDARD-KERNEL-METHOD PRINT-OBJECT (RANDOM-STATE T) just
seems to use 'ccl::initialize-random-state as a symbol for printing.
Meanwhile (def-standard-initial-binding *random-state* does call
initialize-random-state.
And anyway, shouldn't the above use (make-random-state T) rather than
(initialize-random-state #xFBF1 9) ? (or is this a load dependency
issue)
Anyway I'm muddling 2 issues. The behavior of callers (and m-X show
callers), and trying to see how to make random be more random.
As things stand clean boot (random 100) = 13
clean boot (random 100) = 13
so my app booted to start in a completely random state, is in fact repeatable.
This all seems counter intuitive to me.
Callers sometimes doesn't seem to return callers, and m-X show
callers in CCL Hemlock usually seems to show even less callers if any.
More information about the Openmcl-devel
mailing list