[chuck-users] ChucK and STDIN

DANIEL MAGNUSZEWSKI dmagnuszewski at mandtbank.com
Wed Jul 12 17:30:29 EDT 2006


I'd be interested in playing with the Skot object. If you could post
compiled version of this, I'd love to check it out.

Thanks.

-Dan

>>> gewang at CS.Princeton.EDU 07/12/06 4:58 PM >>>
Greetings!

stdin (and file i/o in general) is on the way.

Right now, there are a few hacked/experimental objects we've use 
internally:

The Skot object: a event-based stdin reader
The PRC object: string tokenizer

They are not in the standard build - you'd have to enable them by
adding a 
compiler flag: -DAJAY.  Which platform are you using?  We can post an 
executable with these compiled in, if you like.

They will allow one to write code like:

     Skot skot;

     // infinite event loop
     while( true )
     {
         // prompt and wait
         skot.prompt("enter data:") => now;
         // get the results
         while( skot.more() )
         {
             <<< skot.getLine() >>>;
         }
     }

and you can use PRC to tokenize the text.

The actual stdin and file I/O is definitely on the way (thanks to
Martin 
Robinson), we just haven't integrated/fully tested it yet.





More information about the chuck-users mailing list