[streams-standard-discuss] General stream-like objects (GSLO)

Daniel Barlow dan at telent.net
Thu Sep 16 18:04:24 UTC 2004


David Lichteblau <david at lichteblau.com> writes:

> Well, no.  I see the following kinds of streams:
[nice sumamry deleted]
                                        
>   - more general stream-like objects which don't involve such a buffer
>
>     An example would be CLIM, which takes the Common Lisp API for
>     streams with similar purposes but a completely different
>     implementation.  A buffer of bytes would not help for such streams
>     at all, yet re-using the existing stream API appears better than
>     reinventing it.

I suspect that a credible GSLO extension interface has to have
significantly more hookage into the pretty printer than Gray streams
do, simpy to allow things like pretty printing with proportional
fonts.  Note that this would probably break the
"write-to-string/render" equivalence that user of monospaced Lisps
have grown to expect.  For example,

(format stream format-specifier arg ...)

and 

(write-sequence (format nil format-specifier arg ...) stream)

would, when sufficiently complicated tabulation/indentation/logical
block constructs are in use, line up differently: in a sane world, the
"current font" would be a per-stream attribute, so there's no way for
(format nil ...) to know what the font metrics are.

(That's leaving aside the infelicities of the stream interface for
non-English applications (e.g. l->r rendering assumptions, format ~p,
~@p directives) about which I'm mostly not qualified to speculate.)

-dan

-- 
"please make sure that the person is your friend before you confirm"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/streams-standard-discuss/attachments/20040916/c8f0a9e9/attachment.sig>


More information about the Streams-standard-discuss mailing list