Hi all, While preparing some sample code for the Cybernetic Orchestra, I hit upon a strange idea I thought I would share with this list. What if there were an instruction/built-in function in ChucK that yielded control forever? A lot of sample code has something like this in it: while(1::minute=>now){} It would be elegant if this could be written like this: forever => now; Or something like that! eternity => now; // ? eternity; // ? eternity(); // ? I fully realize that this is violating the perfectly valid principle of "if it ain't broke don't fix it"! Yours truly, David ------------------------------------------------------------------- Dr. David Ogborn, Assistant Professor Communication Studies & Multimedia Director, Cybernetic Orchestra & ESP Studio McMaster University, Hamilton, Canada ogbornd --at-- mcmaster.ca http://davidogborn.net http://twitter.com/ogbornd http://esp.mcmaster.ca (Cybernetic Orchestra) 1-905-525-9140 ext 27603
David Ogborn
While preparing some sample code for the Cybernetic Orchestra, I hit upon a strange idea I thought I would share with this list. What if there were an instruction/built-in function in ChucK that yielded control forever?
A lot of sample code has something like this in it: while(1::minute=>now){}
It would be elegant if this could be written like this: forever => now;
Or something like that!
eternity => now; // ?
1::week => now; is pretty long. :) michael
Yeah, I know... but it's still not eternity! :) When I read 1::week => now, there is a little part of my brain that fast forwards to the moment one week from now when the code is supposed to end, and is bugged by the, admittedly completely hypothetical (at least in most cases), articulation of that moment... Yours truly, David On 2012-10-23, at 11:14 PM, Michael Heuer wrote:
David Ogborn
wrote: While preparing some sample code for the Cybernetic Orchestra, I hit upon a strange idea I thought I would share with this list. What if there were an instruction/built-in function in ChucK that yielded control forever?
A lot of sample code has something like this in it: while(1::minute=>now){}
It would be elegant if this could be written like this: forever => now;
Or something like that!
eternity => now; // ?
1::week => now;
is pretty long. :)
michael _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
--------------------------------------------------------------------------------
Dr. David Ogborn,
On Tue, Oct 23, 2012 at 11:52:36PM -0400, David Ogborn wrote:
Yeah, I know...
but it's still not eternity! :)
How about; Event eternity; //see the Mayas for documentation eternity => now; You could also look for where "week" and so on get defined in the source and add some huge constant named "eternity". That would work. You might be able to get infinity from the floating point numbers, that way it should even work when comparing huge time-spans if your compositions call for that. ;-) Kas.
participants (3)
-
David Ogborn
-
Kassen
-
Michael Heuer