[chuck-users] easy random numbers

Kassen signal.automatique at gmail.com
Tue Nov 20 19:29:25 EST 2007

On 21/11/2007, Scott Wheeler <wheeler at kde.org> wrote:
> This is another one of those where the devil is in the details.  Just
> having a function to pass through the value to C's time() would be
> trivial.  (About 10 lines of code added to ulib_std.cpp)  However, with
> support for time comes time zones, daylight savings time, conversions
> between local time and universal time, addition and subtraction of time,
> etc.  And then it's a big pain in the ass.

Really? this might sound naive but I feel it's up to the OS to keep track of
those. The little clocks at the bottom of the desktop can have the time, why
not some arbitrary program?

Actually, I just remembered that our auto-rec example uses some sort of
trick to time-stamp saved files to quote a filename I just saw;

chuck-session(Mon Jun 25 00h42m33 2007).wav

This (in a format readable without lots of string management) would be fine
with me, if I go across time-zone I have to re-set the system clock anyway.

I once tried to exploit the trick ChucK uses there, I remember now, to tell
the time but never succeeded, it seems hard-wired into the file saving Ugen.
You are right that something like that wouldn't be enough to -say- manage
nuclear reactors across continents but it would be enough for cheep&cheerful
bleeps & booms for fun & profit and that would be enough for me, for now at
least ;¬).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20071121/b2aca13f/attachment-0001.htm 

More information about the chuck-users mailing list