Subject: Re: a [hopefully] easy question
From: rpw3@rpw3.org (Rob Warnock)
Date: Fri, 09 Jun 2006 20:11:09 -0500
Newsgroups: comp.lang.lisp
Message-ID: <3-qdnb3DrJGwgRfZnZ2dnUVZ_tKdnZ2d@speakeasy.net>
BobF <no@thanks.net> wrote:
+---------------
| I think I've discovered The Big Disconnect.  You're using a well
| designed IDE/environment that helps you manage your projects.
| 
| As I'm not yet sure how far my lisp journey is taking me, I'm
| using the rather archaic emacs/slime environment.
+---------------

Careful! You're about to make the mistake of assuming that Lisp
isn't usable/preferable without "the perfect environment"! NOT SO!

Due to personal ergonomics issues, I've found myself unable to make
the transition from Vi[1] to Emacs [yes, I've tried several times!],
and thus to Emacs+SLIME. So what? Big deal. It doesn't seem to have
impaired me in any way that *I* can see from using Common Lisp to
great advantage over C & friends. I seem to use pretty much the same
cycle of "think, code, compile, load into a persistent Lisp image,
test" that everyone else does, albeit perhaps with a *small* number
of extra (lower-case!) keystrokes compared to a power Emacs/SLIME
user.[2]

Part of that is that nowadays everything has some sort of window
system, so keeping multiple XTerms (or other apps) up is trivial:
one or more Vi sessions [usually on a single file each, but sometimes
with split windows on multiple files]; a Lisp REPL window [well,
sometimes that one's an "attachtty" session to a listener socket,
but same thing]; if I'm doing web work, one or more browser windows;
plus the obligatory browser window(s) open on a local copy of the CLHS.

If you arrange your web code to do an ASDF:LOAD-OP every time
[at least during debugging], then updating the server is as
easy as writing out the edited source files and hitting "Reload"
on the browser! "The right thing" [compile, load, whatever]
"just happens".

And for tiny "one off"s, I do the same as Kenny mentioned before:
type the code into whichever source window is conveniently at hand
[protected with a leading "#-(AND);XXX REPL" so it won't accidentally
be included in the next file-compile] and copy/paste into the REPL
window with the mouse. So maybe it takes a moment longer than typing
CNTL-BUCKY-META-whatever in Emacs/SLIME, but it's still well under
that mythical two-second response time needed to avoid frustration.

As Kenny's always saying [paraphrased], "It's all about the code!
Quit arguing and start writing!" And guess what? If you focus your
efforts on the end result you're trying to accomplish and on writing
*code*, no matter how bad the environment is [and mine is *not* all
that bad!] you *still* win from using Common Lisp!!


-Rob

[1] Actually, any of a large class of "moded" editors, in which
    editing commands are (mostly) single lower-case letters when
    in editing mode, and (almost) no "chording" is ever needed.
    "nvi-1.79" is my current preference, but at work I use "vim"
    (in "vi mode"), and previously I have used Xerox Bravo and,
    before that, TECO. [Ironic, since the first Emacs was written
    as a huge TECO macro!]

[2] The wonder of Lisp is its self-reflexiveness: you can use it
    to make using it easier!! E.g., the number of keystrokes to
    refresh your environment can be lowered a lot by defining a
    (say) REDO symbol macro that calls a REDO function that calls
    ASDF or LOAD* or whatever that particular session needs to
    re-establish its runtime invariants. It can even be automated
    by running a little background monitor process that watches
    all the source files and does a (REDO) whenever one of them
    changes [although I usually don't do that much any more, since
    it can be a bit intrusive].

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607