scsh-users
[Top] [All Lists]

greenspunning in reverse -- part of scsh in common lisp -- or part of cl

To: scsh-users@scsh.net
Subject: greenspunning in reverse -- part of scsh in common lisp -- or part of cl in scheme
From: "t takahashi" <gambarimasu@gmail.com>
Date: Mon, 19 Feb 2007 18:23:01 -0700
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DLjrRq+MMo5agBz67lw5L1CFFZg8eac+Tkwsx27aVr1cygMdFDFh/NOuMIfYcM1pgOJGDKfKNcNMXgFvgbJEU4p4Fddunzp6WrTGJ4fbUEN8TTsrwTBuaHUcK4VsZB2Yx/NVszcWf3ZT71w7/Yj6xt250rQtlxWhUaGqb/cMlNI=
List-id: <scsh-users.list-id.scsh.net>
hi, new member here.

i am driven to scsh because it seems to rationalize shell scripting in
a computing world that seems poorly designed (i write this as firefox
blinks at me despite my telling it not to, and it will probably
crash).

BUT (for reasons explained below) here is what i want:

 1.  an ad-hoc, informally-specified non-bug-ridden slow implementation of
      half of scsh in Common Lisp.  i.e. a cobbled together scsh-like entity.
      i speak cl (or used to) but not scheme.

or possibly:

 2.  a good cl emulation library for scsh (or for whatever scheme scsh uses).

what i want from you discerning folks is how *relatively* hard 1 and 2
will be.  i use debian, so i have packages like cl-awk and cl-interpol
available for 1.  but i am not aware of a good emulation for scheme,
on the order of how good (require 'cl) is for emacs (which i think is
pretty good).

some of you, with my best interests at heart, might want to persuade
me to just use vanilla scsh, and i would [1] except for dealbreakers.
these include:

 o i hate multiplying code sets even among lisps.  i want my decision
on this to last
    at least 10 years.  if i have old cl (or even el) code, i want to
be able to use it in
    my scsh-like scripts and vice-versa without much difficulty.
 o i am severely disabled.  everything i do on a computer is physically very
    painful and stamina-consuming and usually requires days of
recovery afterwards
    (including this thread,
    though i will try to reply to your questions because this
decision might make future scripting easier).  i do limited things for
just a few
    minutes at a time, which means that extremely small scripts can
take months.
    but
    i don't want to give up my preference for lisp.  so i want to
minimize startup costs
    and ongoing "how do you do this in scsh?" and "where was i?"
issues.  having an
    extended loop and ordinary defmacro and all the ugly powerful
features of cl
    would do that.  having to look up named-let idioms in scheme would not, no
    matter how elegant and no matter how much i would want to.

for reduced overall typing, i am likely to intersperse bash/zsh with
lisp no matter what solution i choose.  this means, e.g.:

myfunc () { ... | cut ... | join ... | myscript | myscsh '(...)' |
myotherscript | myscsh '(...)' ;}

your comments are welcome.  if you think both 1 and 2 are infeasible,
just say so and i might continue putting up with bash/zsh for several
more years until what i want is possible.  or maybe even use emacs
-batch.

p.s.  the reference is to greenspun's 10th law: "Any sufficiently
complicated C or Fortran program contains an ad-hoc,
informally-specified bug-ridden slow implementation of half of Common
Lisp".

footnote:

1.  in favor of scheme, i really like functional programming, i think
that cl is somewhat nonorthogonal (and format actually grotesque), and
i think that a lisp-1 can be elegant.  in favor of cl, i like
portability among implementations, i think that linear traversal need
not be recursive (i like extended loop despite its drawbacks), and i
like defmacro.

<Prev in Thread] Current Thread [Next in Thread>