[drakma-devel] Re: New release 0.11.5 (Was: CLISP problem with READ-SEQUENCE; patch)

Anton Vodonosov avodonosov at yandex.ru
Fri Mar 21 23:31:55 UTC 2008


On Sat, 22 Mar 2008 0:42:37 Edi Weitz wrote:

> On Sat, 22 Mar 2008 00:12:26 +0200, Anton Vodonosov <avodonosov at yandex.ru> wrote:

>> This is because CLISP doesn't support READ-SEQUENCE on a stream
>> having STREAM-ELEMENT-TYPE == 'CHARACTER.

> Isn't that a bug which should be reported to the CLISP maintainers?

Strictly speaking it's not a bug. CLHS even says that READ-SEQUENCE
"Might signal an error of type type-error if an element read from
the stream is not a member of the element type of the sequence."

For WRITE-STREAM event worse, it explicitly mention stream element
type: "Might signal an error of type type-error if an element of
the bounded sequence is not a member of the stream element type
of the stream."

Drakma relies on FLEXI-STREAMS in hope that
FLEXI-STREAMS:STREAM-READ-SEQUENCE will handle it gracefully,
but the problem is that it is not called at all. Function
STREAM-READ-SEQUENCE is not included into Gray streams proposal
(I guess because READ-SEQUENCE itself wasn't part of the standard
draft at the time when the proposal was made, at least it's absent
in CLTL2).

trivial-gray-streams tries to emulate STREAM-READ-SEQUENCE based on
more limited CLISP's STREAM-READ-BYTE-SEQUENCE, but this doesn't work
in all situations.

>From my personal point of view it would be better to just implement
generic STREAM-READ-SEQUENCE in CLISP, as it is done in most of
other CL implementations; I event suggested a patch (which is
trivial). But CLISP maintainers weren't too enthusiastic about
that. Maybe I must pressurize them, to the coming generations good.

Regards,
-- Anton




More information about the Drakma-devel mailing list