Re: Lisp/Unix impedance [a programming challenge]



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.
.



Relevant Pages

  • Re: Lisp/Unix impedance [a programming challenge]
    ... >> Recent discussions in comp.lang.lisp have centred around why Lisp ... >> demonstrate why Lisp is unsuitable as a glue language for Unix. ... > You might complain that it would work dubiously on binary streams. ... portable target for doing systems programming in Lisp. ...
    (comp.lang.lisp)
  • Re: Is anything easier to do in java than in lisp?
    ... I am fully aware of the cl-modlisp package that depends on ... The basic deal is that I have my own ideas on what a Lisp application ... seems to care about binary streams vs character streams I will do this ... on a full blown HTTP front end that would essentially map URIs to ...
    (comp.lang.lisp)