Re: Lisp/Unix impedance [a programming challenge]
- From: Matthias Buelow <mkb@xxxxxxxxxx>
- Date: Fri, 29 Apr 2005 18:08:23 +0200
Pascal Bourguignon <pjb@xxxxxxxxxxxxxxxxx> writes:
>You might complain that it would work dubiously on binary streams.
>Then try:
>
>------------------------------------------------------------------------
>#!/usr/local/bin/clisp -q -ansi -norc
>(with-open-file (stdin "/dev/stdin" :element-type '(unsigned-byte 8)
> :direction :input)
>(with-open-file (stdout "/dev/stdout" :element-type '(unsigned-byte 8)
> :direction :output)
I think that's exactly the "problem". Lisp here makes the
unsubstantiated difference between binary streams and character
streams, and this leads to problems like you have to explicitly open a
binary stream on standard input (even though a *standard-input* stream
exists). As we all know, on Unix, there's no difference between
binary and other-typed streams, all files are binary. IMHO the Lisp
implementation should adapt itself to the conventions used by the
underlying OS. Having non-binary, and hence non-standard
stdin/out/error is just a major PITA in a Unix "glue" language.
mkb.
.
- References:
- Lisp/Unix impedance [a programming challenge]
- From: Adam Warner
- Re: Lisp/Unix impedance [a programming challenge]
- From: Pascal Bourguignon
- Lisp/Unix impedance [a programming challenge]
- Prev by Date: Re: Practical Common Lisp reviewed on /.
- Next by Date: Re: Lisp/Unix impedance [a programming challenge]
- Previous by thread: Re: Lisp/Unix impedance [a programming challenge]
- Next by thread: Re: Lisp/Unix impedance [a programming challenge]
- Index(es):
Relevant Pages
|