[CM] CM random seed
Rick Taube
taube@uiuc.edu
Fri, 20 May 2005 19:25:08 -0500
Hello Joshua, CM just defaults to plain old *random-state* now, or you
can pass a "personal" state to patterns and random functions using the
:state arg.
On May 20, 2005, at 7:06 PM, Joshua Parmenter wrote:
> Hi everyone,
>
> I seem to be having a problem seeding randomness in CM 2.6.0 with
> openmcl 0.14.3 on OS X. This used to work in CM 2.4, but there seems
> to be a problem now setting the seed:
>
> ? (defvar *cm-state*)
> *CM-STATE*
> ? (defun makeseed () (setf c (make-random-state t)) (pprint c))
> ;Compiler warnings :
> ; Undeclared free variable C (2 references), in MAKESEED.
> MAKESEED
> ? (makeseed)
> #.(RANDOM-STATE 64655 21585)
> ? (setf myseed #.(RANDOM-STATE 64655 21585))
> > Error in process listener(4): Undefined function RANDOM-STATE called
> with arguments (41962 21226) .
> > While executing: "Unknown"
> > Type :GO to continue, :POP to abort.
> > If continued: Retry applying RANDOM-STATE to (41962 21226).
> Type :? for other options.
> 1 > (setf *cm-state* (make-random-state myseed))
> > Error in process listener(4): Unbound variable: MYSEED
> > While executing: CCL::CHEAP-EVAL-IN-ENVIRONMENT
> > Type :GO to continue, :POP to abort.
> > If continued: Retry getting the value of MYSEED.
> Type :? for other options.
> 2 >
>
> Thanks for any thoughts.
>
> Josh
>
> ******************************************
> Joshua D. Parmenter
> http://homepage.mac.com/joshpar/
>
> "...Some people think a composer's supposed to please them, but in a
> way a composer is a chronicler... He's supposed to report on what he's
> seen and lived."
> -Charles Mingus
>