[chuck-users] ChucK article(s)

robin.escalation robin.escalation at acm.org
Mon Sep 3 05:42:48 EDT 2007

> I'm not sure what those are or why we need them, could you kindly
> explain?

I'll explain using Python, which I am the most familiar with. Each
file of code is a module, which can contain an arbitrary number of
functions or classes. Each of these has their own addressable
namespace, but the key thing is that the module itself has its own
namespace too.

So in a new file I am working on I can say:
import MyNiceLibrary
newInstance = MyNiceLibrary.MyNiceClass()
newInstance.someProperty = 'hi there'

This shows the power of namespaces. All the names are distinct and
cleanly separated.

(You can do even more than this with different forms of "import",
packages etc., but this illustrates the ideas.)

As I understand it, in ChucK there is nothing similar to an import.
Files do not have explicit namespaces, though one is created if a
file is sporked as a shred. But this is not addressable, it merely
keeps private data in each process from colliding. A further
limitation is there can be only one public class in a file.

> At this stage I suspect I need to point something out to you;
> http://audicle.cs.princeton.edu/

Oh yes, I know about the audicle and have tried it. Someday this
might rule the world. But it's still not a word. :-)

> SuperCollider has a very cool name, I admit. Future writers might
> engage in
> long articles interperting the act of chucking something in
> comparision to
> the effect of it colliding against something else *ducks*.

This would be good fun and is not totally a joke. As a poet I would
argue that how we name things and what language we choose to describe
them affects how we work with them in an intimate way.

One of the reasons I like ChucK is that the expressive use of the
language, especially the chuck operator, makes good sense to me for
the domain of audio operations.

-- robin

More information about the chuck-users mailing list