Subject: [clisp-list] Re: sequence-[input|output]-stream?

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Fri Apr 4 06:36:22 2003

Hi,

FWIW, the simple-streams topic came up again in comp.lang.lisp. I responded:
Message-ID: <[email-masked]>

Duane Rettig <[email-masked]> writes:
> Peter Seibel <[email-masked]> writes:
> > Peter Seibel <[email-masked]> writes:
> > > Is there any way to make a stream like a string-input-stream except on
> > > top of a sequence of bytes (octets) rather than a string? I.e. I want

> > To answer my own question, I take it from the fact that ACL has an
> > extension, make-buffer-output-tream and make-buffer-input-tream, which
> > seems to be exactly what I'm looking for that such a thing is not part
> > of standard Common Lisp. Do other Lisps have equivalent functionality?

> They would if they implemented simple-streams.  I've been hoping that
> people would start to adopt simple-streams for their implementations,
> but so far the only bites I've gotten have been nibbles,

I'd wish CLISP would have them as well, because I feel (never actually
tried out) that they solve quite some problems[*], but that means yet
another rewrite of CLISP's huge streams stuff.

A faster solution for the OP's wish may be to make CLISP's
EXT:MAKE-STRING-INPUT-STREAM and output sibling accept (SETF
STREAM-ELEMENT-TYPE) like CLISP's file/pipe streams and use that, or
just provide the equivalent for octet streams under distinct names, or
just have READ-CHAR/BYTE check ARRAY-ELEMENT-TYPE of the underlying
buffer array: that would be much less new/changed code in CLISP and
IMHO easy to add.

So best wishes to simple-streams (although I did not understand the
lower-layer simple-stream description on Allegro's site, last time I
looked at it - hint, hint).

Regards,
	Jorg Hohle
Telekom/T-Systems Technology Center

[*] E.g. typical CRLF translations issues, well-defined availability
of something to read vs. a full-character to read, turning bytes into
characters and other issues discussed here now and then.