Subject: Re: format to nil?
From: (Rob Warnock)
Date: Sat, 16 Apr 2005 07:40:01 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Kent M Pitman  <> wrote:
| For a bit-bucket of output going nowhere (i.e, like writing to
| /dev/null on unix/linux), use (make-broadcast-stream), that is,
| call that function with no arguments, meaning "broadcast to no one".  
| On a related note, for an empty input stream, use
|  (make-concatenated-stream)
| meaning "concatenate no inputs".  You'll get an immediate
| eof when you try to read from this.  But it is trivially a stream.
| (I think this corresponds to reading from /dev/null, though I've
| got less experience doing that.)

Very close, actually. And so if one *really* likes the /dev/null
analogy, one might like this:    ;-}  ;-}

    (make-two-way-stream (make-concatenated-stream)


p.s. For some reason, CMUCL-19a barfs if you try to write
to such a stream, though writing to this one works fine:

    (make-two-way-stream (make-string-input-stream "")

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607