[chuck-users] Mac OS X on-the-fly issue
Joe McMahon
mcmahon at ibiblio.org
Sat Jan 26 23:04:35 EST 2008
On Jan 26, 2008, at 7:09 PM, David Posey wrote:
> I'm unable to get the on-the-fly features of ChucK working. I can
> do one thing at a time from the command line, i.e.
>
> %> chuck foo.ck
> or
> %> chuck --loop
>
> But I cannot do, say, "--loop" followed by "--add bar.ck" to add a
> shred. The problem is that once I do "--loop" no prompt reappears
> for me to type in "--add bar.ck", unless I ctrl-C out of it first,
> which kills the first process anyways. What's the catch? How do I
> run a second shred from the command line?
>
> (I'm running Chuck 1.2.1.1 on Mac OS X 10.4 using the command-line
> interface.)
Hi, David - everyone else has given you excellent advice, which may
be all you wanted, but I'll chip in with an explanation.
What "chuck --loop" does is start a virtual machine that runs
continuously (therefore you never get a prompt again). You need
either to tell OS X to move that process out of the way, so to speak,
so you can have your prompt back. All of the suggestions do this in
different ways:
1) Following the command with '&' tells the shell (the thing that
interprets the commands you type in) to run the command, but to "put
it in the background"; that is, it runs without being in control of
the terminal.
2) If you open a second window, you've essentially let Terminal.app
do the same thing for you: the chuck --loop has its own virtual
terminal it's in control of, and the second window has a new shell
command interpreter that can read the "chuck +" command, which tells
the "--loop" process to add a new shred, and then exits back to the
command prompt.
3) A third alternative is to type a control-Z in the "chuck --loop"
window. This forces ChucK into a wait, and lets the shell prompt you
again. To get ChucK running again in the background, type "bg". This
will do the same thing as option 1, except that you get to decide
when the backgrounding happens.
I personally prefer the second window approach, but everyone has
their own preference.
--- Joe M.
More information about the chuck-users
mailing list