Hi,

I'd like to second the suggestion of Richard and Daniel (in
the other thread): use a file.

It solves almost all problems with immediate effect.

Here is my workflow for your example. I added some
annotations. (as a note: I use VimClojure for development)

Am 08.07.2009 um 16:39 schrieb Mike:

(use :reload-all 'some-more-stable-thing-im-working-on)

In REPL.

(defn foobar [...] ...)

In file. Send expression to the REPL via \et.

; play with stuff, oops

In REPL.

(defn foobar [...] ...) ; fixed foobar

In file. Send expression to the REPL.

; play with stuff, oops

In REPL.

(Repeat as necessary with:

(defn foobaz [...] ...) ; etc.
(defn foobar [...] ...) ; fixed foobar again

)

;; now I want to take the new stuff I've experimented with in the REPL
and
;; put it in some-more-stable-thing-im-working-on, but what is it?

Add suitable (ns) clause a the top of the file and put it
into the right directory structure...

This solves almost all problems:
 * you always have the latest version available
 * if unsure, just load the whole file to get a clean state
 * you can comment your functions easily
 * you have them syntax highlighted
 * you have them properly indented
* you don't clutter your REPL history with multiline function definitions
 * you can easily restart with a fresh REPL (just load the file)
 * you can easily move the stuff to a proper namespace
* whether to paste a REPL history or the file in some etherpaste thingy should not make a difference...

In the REPL just play with your functions.

Hope this helps.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to