[chuck-users] forever => now;

Perry Cook prc at CS.Princeton.EDU
Wed Oct 24 13:08:17 EDT 2012


Yep, hack the chuck source, or...

As with so many of use do with quarter, eighth, etc., 

Just add a one line definition at the top of your ChucK file(s):

100000000 * week => dur forever;  // effectively forever

or another alternative:

Event forever;  // if this is ChucKed to now, but never thrown, then it's truly forever



Yer pal,

PRC


On Oct 24, 2012, at 9:00 AM, chuck-users-request at lists.cs.princeton.edu wrote:

> Send chuck-users mailing list submissions to
> 	chuck-users at lists.cs.princeton.edu
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> or, via email, send a message with subject or body 'help' to
> 	chuck-users-request at lists.cs.princeton.edu
> 
> You can reach the person managing the list at
> 	chuck-users-owner at lists.cs.princeton.edu
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of chuck-users digest..."
> 
> 
> Today's Topics:
> 
>   1. a strange idea (David Ogborn)
>   2. Re: a strange idea (Michael Heuer)
>   3. Re: a strange idea (David Ogborn)
>   4. Re: a strange idea (Kassen)
>   5. ChucK code search, an experiment! (Tom Lieber)
>   6. Re: ChucK code search, an experiment! (Thomas McColgan)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 23 Oct 2012 22:55:37 -0400
> From: David Ogborn <ogbornd at mcmaster.ca>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: [chuck-users] a strange idea
> Message-ID: <A92D7A9B-E808-41B6-85D3-EA4958A8D85D at mcmaster.ca>
> Content-Type: text/plain; charset=us-ascii
> 
> 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
> 
> 
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 23 Oct 2012 22:14:39 -0500
> From: Michael Heuer <heuermh at gmail.com>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: Re: [chuck-users] a strange idea
> Message-ID:
> 	<CAOjYwMycaawVNzcXJmKCk-0R4AfB8t6-A=4pvC6kmT6njZ5Cvw at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> David Ogborn <ogbornd at mcmaster.ca> 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
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 23 Oct 2012 23:52:36 -0400
> From: David Ogborn <ogbornd at mcmaster.ca>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: Re: [chuck-users] a strange idea
> Message-ID: <E309F49F-A96E-4466-AB93-5167E3B3A765 at mcmaster.ca>
> Content-Type: text/plain; charset="us-ascii"
> 
> 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 <ogbornd at mcmaster.ca> 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 at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> 
> 
> --------------------------------------------------------------------------------
> Dr. David Ogborn, <ogbornd at mcmaster.ca>
> Communication Studies & Multimedia, McMaster University
> Director, Cybernetic Orchestra & ESP Studio
> 
> http://soundcloud.com/cyberneticorchestra
> http://esp.mcmaster.ca
> http://davidogborn.net
> http://twitter.com/ogbornd
> 1-905-525-9140 ext 27603
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20121023/6d8fa808/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 24 Oct 2012 06:07:26 +0200
> From: Kassen <signal.automatique at gmail.com>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: Re: [chuck-users] a strange idea
> Message-ID: <20121024040725.GE22141 at gmail.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 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.
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Wed, 24 Oct 2012 09:47:25 -0400
> From: Tom Lieber <tom at alltom.com>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: [chuck-users] ChucK code search, an experiment!
> Message-ID:
> 	<CAProexsxh7HqDtRUP72Q9ba22oU4NtLB1ehs9VsmSLefyytXUg at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> I'm interested in experimenting with some code search algorithms on
> ChucK code, but I need a lot of ChucK code to test them on! How might
> I go about obtaining such a collection?
> 
> GitHub doesn't seem to recognize ChucK as a language, nor does
> SourceForge (why did I check there).
> 
> Seems like my best hope is to spider the wiki, mailing list, and forum
> for .ck files, but it'd be great to hear about other options. :)
> 
> -- 
> Tom Lieber
> http://AllTom.com/
> http://infinite-sketchpad.com/
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Wed, 24 Oct 2012 16:14:11 +0200
> From: Thomas McColgan <thomas.mccolgan at gmail.com>
> To: ChucK Users Mailing List <chuck-users at lists.cs.princeton.edu>
> Subject: Re: [chuck-users] ChucK code search, an experiment!
> Message-ID:
> 	<CAEFj9pN9t9FxBFEddnHVJk+fc0NNEaWqmEYnVb0A5suTBU28vQ at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Github does recognize ChucK as far as I know. I have only figured out
> how to search for specific terms though.
> https://github.com/search?langOverride=&language=&q=language%3Achuck+test&repo=&start_value=1&type=Code
> 
> On Wed, Oct 24, 2012 at 3:47 PM, Tom Lieber <tom at alltom.com> wrote:
>> I'm interested in experimenting with some code search algorithms on
>> ChucK code, but I need a lot of ChucK code to test them on! How might
>> I go about obtaining such a collection?
>> 
>> GitHub doesn't seem to recognize ChucK as a language, nor does
>> SourceForge (why did I check there).
>> 
>> Seems like my best hope is to spider the wiki, mailing list, and forum
>> for .ck files, but it'd be great to hear about other options. :)
>> 
>> --
>> Tom Lieber
>> http://AllTom.com/
>> http://infinite-sketchpad.com/
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> 
> 
> ------------------------------
> 
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> 
> 
> End of chuck-users Digest, Vol 87, Issue 17
> *******************************************



More information about the chuck-users mailing list