[chuck-users] Chout flush & manipulators

Hans Aberg haberg at math.su.se
Tue Nov 24 09:57:58 EST 2009


On 24 Nov 2009, at 15:35, Kassen wrote:
>> chout.flush() does the trick. cherr is flushed constantly, right?
>
> Maybe you are on the cvs build? There was/is a bug with  
> chout.flush() (which crashed) and IO.newline() didn't correctly  
> force a flush. Ge was working on a fix which I would expect to be in  
> cvs right now as the cause had been pinpointed.
>
> Good thing I kept notes here; http://wiki.cs.princeton.edu/index.php/ChucK/Bugs/Release 
>  as I had forgotten the exact details.

Yes, chout.flush() hangs for a while, and then reports bus error. "\n"  
seems to flush, but for the VT100 terminal 2D display I mentioned  
before I want to avoid unnecessary newlines.

It would also be nice if one could do C++ style manipulators. Like
   std::ostream& f(std::ostream& os) {
     ...
     return os;
   }

And then
   chout <= ... <= f <= ...;

   Hans




More information about the chuck-users mailing list