Subject: Re: Getting Started in Lisp.
From: (Rob Warnock)
Date: Wed, 03 Jan 2007 04:06:27 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Pascal Bourguignon  <> wrote:
| (Rob Warnock) writes:
| > I just want people to know that *not* having a "Lisp IDE" is
| > no excuse for not being productive with Lisp anyway.
| More over, it's quite feasable, with very little custom job, to work
| exclusively from the REPL, while gathering edited code into a source
| file.
| You can use your favorite editor thru CL:ED to edit the functions, and
| let your CL code collect them in a source file.

Interesting, thanks. I'll take a look at it.

Since I do tend to keep one or more editor windows open on source
files which are in flux, I have a little function "LOAD*" that
maintains a list of files I'm currently working on, sort of like
an interactive, ultra-simple ASDF [or "make", for any newbies
following this], except with no inter-file dependencies:

    (LOAD* files...) Adds the filenames to an internal saved list,
		     then does a recursive (LOAD*).
    (LOAD*)          Examines the saved list of files, and recompiles
		     and/or reloads them if the source has changed since
		     the last LOAD* [using the CMUCL ":IF-SOURCE-NEWER
		     :COMPILE" extension to CL:LOAD].
    (LOAD* :SHOW)    Shows the saved list of files.
    (LOAD* :CLEAR)   Clears the saved list of files.

As long as changes are small, it's quicker to copy/paste functions
from the editor window(s) to the REPL. For larger changes, it's easier
to write out changed editor buffers and then (LOAD*) in the REPL.

The REDO function I mentioned before is often defined in the REPL
as just "(defun redo () (progn (load*) (current-regression-test)))".


p.s. Once upon a time I tried automating this even further, by 
starting up a background CMUCL thread that polled to see if any
of the files in the LOAD* list had changed, and if so, automatically
run a (LOAD*) -- that is, any write from an editor would trigger a
recompile/reload. But I quickly found that that was just a little bit
*too* eager, since if I made interdependent changes in multiple files
then the first write would trigger a recompile before a consistent
state had been reached on disk. So I stopped doing that.  ;-}

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607