[plt-scheme] interleaving the I and O in I/O

From: Noel Welsh (noelwelsh at gmail.com)
Date: Fri Feb 1 12:16:29 EST 2008

On Feb 1, 2008 4:54 PM, Prabhakar Ragde <plragde at uwaterloo.ca> wrote:
> But perhaps I was not clear in my expectation. I would like students to
> be able to write code which reads from standard input and writes to
> standard output, knowing that they will test their code using file
> redirection and that we will test it in the same fashion. I would like
> them to not have to pay the penalty of having the current output port
> flushed every time there is a read, so that they can interleave reads
> and printfs (= writes) in their program and not make it slower. Is there
> a simple way of achieving this goal? --PR

Maybe playing with file-stream-buffer-mode will do the trick.

N.


Posted on the users mailing list.