[chuck] a toast

Joe McMahon mcmahon at ibiblio.org
Sat Jan 22 19:49:27 EST 2005


On Jan 21, 2005, at 9:44 PM, Ge Wang wrote:
> On Jan 21, 2005, at 8:51 PM, qbxk wrote:
>> chuck & perl what a beautiful couple.  yeah, perlish things like 
>> @arrays &  %hashes i need to throw at music. and map, grep, dothis if 
>> something, and the bajillion perl modules that might create a barrage 
>> of audio somehow.   good idea/bad idea?
>
> Maybe both good and bad?  arrays + hashes are good things - going to 
> appear shortly
> (see below) - and extensive string handling is coming soon.  the 
> bajillion Perl modules
> are tempting.  Perhaps someone with more expertise in Perl (i.e. Alex 
> and many
> other Perl-enthusiasts who are on this list) can give a better answer.
Good but, as Ge says.

> As you can tell, ChucK syntax is glued together from syntax and ideas 
> of many existing
> languages, ranging from C, Java, to Max/MSP, ML, to ChucK itself (some 
> stuff had to
> be "invented").  An advantage of building the language from the 
> "ground-up" and not
> necessarily committing the design to any one existing school of 
> language design frees
> ChucK from obligations and focuses on the design of the language to 
> reason about
> and control audio - we include what is useful, and leave out the rest. 
>  (It also means
> we have to re-invent some wheels, but that can be good because 
> sometimes a round
> wheel isn't always we need)
And this is why I find ChucK to be the first "sensible" music 
programming language. It has what it needs to express its ideas (okay, 
arrays would be nice). and nothing more. It's clean and functional.

> As for arrays in the next release:
>
> - there are arrays
> - arrays are strongly-typed like the rest of ChucK
> - arrays can be multi-dimensional
> - all arrays are, by default, both integer-indexed and associative:
> - more to come...
>
> // basic example
> { 1, 2, 3, 4 } => int foo[ ];
> // assign to element 0
> 10 => foo[0];
> // assign to value mapped from key: "bar", on same array
> 24 => foo["bar"];
This is *good*. ChucK will benefit from having essentially one type of 
structure - an indexed aggregate. Not tying it specifically to "it's an 
array"/"it's a hash" and hiding the complexitiy elsewhere fits with the 
spirit of ChucK, for me.

>
>> if good how? run script thru perl interpreter which emits chuck code 
>> fed into chuck?  line by line for speed?
>
> This is an interesting idea to try, even for the sheer spectacle alone.
>
This would be my strong suggestion. A whole new set of ChucK:: modules 
would be a happy happy thing.

  --- Joe M.



More information about the chuck mailing list