Subject: [clisp-list] ext:make-buffered-input- and -output-stream are undocumented

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Thu Jan 23 08:02:03 2003

Hi,

I just realized that these two functions - which have been in CLISP for a decade - are missing from impnotes.html.

They come in very handy when writing custom streams.

MAKE-BUFFERED-INPUT-STREAM can make a stream take input from a function, lazily!

MAKE-BUFFERED-OUTPUT-STREAM does line buffering on output. This enhances tiny write() pretty much.

I prefer to report this here instead of filing a bug-report, so people can start using them!

For example, MAKE-BUFFERED-INPUT-STREAM might work nicely together with non-blocking or single calls to read() on sockets and pipes(might need enhancement to return ls_wait status to the listen function).

A nice extension to the output behaviour would be to allow any kind of buffering, e.g. in 4KB chunks.

Both are limited to character streams. But see the cookbook on how to do arbitrary 8bit output using character streams.
http://cl-cookbook.sourceforge.net/io.html#faith

Regards,
	Jörg Höhle.