[chuck-users] easy random numbers

Michael Heuer heuermh at gmail.com
Mon Nov 19 14:37:27 EST 2007


> > I suppose that you could run some sort of batch script, or say a
> > couple lines of Python, that either gets the current system time, or
> > creates some type of random seed number; then generates a ChucK file
> > with that seed number as a global variable.
>
> Perhaps a script could call the .ck with the system time as a parameter?
> That sounds reasonable enough, I'm no BASH/ batch wizzard but that should be
> quite possible.

The unix command

$ date +%N
479891000
792387000
104883000
339255000
620501000
354854000

gives the nanoseconds for the current time (000000000..999999999),
that should be a good seed.

   michael


More information about the chuck-users mailing list