[slime-devel] ABCL newline & input/output

Helmut Eller heller at common-lisp.net
Wed Mar 4 07:01:17 UTC 2009


* szergling [2009-03-04 02:34+0100] writes:

> CL-USER(38): (with-open-file (s "c:/home/temp/temp.txt"
>                                          :element-type '(unsigned-byte 8))
>                           (loop for b = (read-byte s nil nil) while b
> collect b))
> (13 10)
>
> It looks like ABCL uses #\Newline internally. Conversion happens on
> print/reading. Doesn't clisp do conversions on prints? Swank's
> encode-message ran afoul of this issue because the encoded message
> length (internal length of string) and what is written out with
> write-string are inconsistent.

Yes, it's possible that SLIME and ABCL disagree on the external
encoding.  SLIME uses Unix-style end-of-line convention; also when
running on Windows.

> From a cursory skim through the Hyperspec, I think ABCL hasn't
> violated any standards, so slime is the one who's wrong here, but I
> don't really know the Hyperspec that well. What does everyone think?

The Spec doesn't apply to socket streams.

> So it's probably not quite the right way to do things. Any suggestions
> or fixes?

It would be better to fix accept-connection in swank-abcl.lisp.  In
particular, it should handle the external-format argument.

Helmut.





More information about the slime-devel mailing list