Re: LISP & "The Art of Unix Programming"

From: Thomas F. Burdick (tfb_at_famine.OCF.Berkeley.EDU)
Date: 11/04/03


Date: 04 Nov 2003 09:45:58 -0800

Daniel Barlow <dan@telent.net> writes:

> mygenericemailaccount@yahoo.com (Conrad Barski) writes:
>
> > After reading Raymond's new book, TAOUP, I've been thinking about how
> > some of the concepts in the book could be applied to LISP programming.
>
> After reading TAOUP, I was left thinking that it said more about ESR
> and less about Unix. I particularly admired the sleight of hand that
> let him claim Emacs as an example of the Unix Philosophy(sic) - I
> doubt that many real unix fans (Al Viro comes to mind, for some
> reason) would agree, and I don't think RMS would either.

Wow, that *is* an impressive sleight! Makes me curious about the
book, actually.

> Anyway, the Lisp "equivalent", I think, would be
>
> - the repl is the user interface
> - functions should do one thing each
> - everything is an object
> - functions can be composed by passing parameters and return values

I agree. If you design your domain-specific language (that your app
is written in) with interactivity in mind, you can use the repl as
your cli. Developing the GUI on top of such a cli is better than
doing it on top of a unix-like cli, because objects keep their
identity and type between the layers.

> There's no _need_ to serialise everything down to a stream of bytes,
> if you have standard and fairly pervasive support (inspector,
> debugger, etc) for looking at the objects as they cross interfaces.

When I first realized that I could cause my gui to call CL:BREAK
whenever I wanted, I flipped.

> Of course, it's when you have binary protocols _without_ this
> support that you start wishing for unix-style design.
>
> (And it's when you have the typical unix utility's approach to error
> reporting that you start offering sacrifice to the authors of strace
> or truss or par or whatever system call tracer your platform uses, but
> while it doesn't help that unix's policy is to return sentinel values
> on error instead of signalling an exception, I think that it's still
> at least partly the fault of the programs concerned for not checking
> said sentinels)

I think a lot of Unix/C programmers are scared of just writing their
own, reasonably behaving, functions around libc because they're
worried they'd be working against the philosophy of the system. And
besides, they're encouraged to return nonsense in their own libraries
:-(

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               


Relevant Pages

  • Re: LISP & "The Art of Unix Programming"
    ... > After reading TAOUP, I was left thinking that it said more about ESR ... > let him claim Emacs as an example of the Unix Philosophy- I ... I think the unix philosophy is adequately explored ...
    (comp.lang.lisp)
  • Re: Review: Art of Unix Programming by Eric S. Raymond
    ... But in reading, some things strike me as odd. ... Raymond writes serious work and he has a track record at it. ... I think Raymond's Art of Unix... ...
    (comp.unix.programmer)
  • Re: [9fans] libbio and large files
    ... I'm seeking a little clarification about Bopen and reading through ... Other host systems where p9p works ... Plan 9 and Unix use many similarly-named functions for dif- ... file offsets, I'd like to hear about it. ...
    (comp.os.plan9)
  • Re: Keyboard Problem
    ... suited for a CLI than a GUI, ... we deployed in the Unix environment. ... I think it's great that underlying the Apple Mac OS is Unix. ...
    (alt.sys.pc-clone.dell)
  • Re: newbie trouble reading long floating point
    ... The Unix "od" command with the specified arguments reads 10 8-byte ... Are you reading floats or double? ... The sizes of float and double are ... to the first element of the array. ...
    (comp.lang.c)