Hi Aleksandar!
Like Paul, I can only speak for LispWorks. While working in the
Listener, the “History Search” command can be invoked with ALT+R. In the
minibuffer you will be able to enter ‘doit-3’ and press enter. The DEFUN for ‘doit-3’
will appear at the prompt.
Perhaps there is something similar in other environments?
Cheers,
Brian Connoy
p.s. Sorry, I didn’t get to meet you at the last meet.
From: Aleksandar Matijaca
[mailto:amatijaca@gmail.com]
Sent: Wednesday, October 06, 2010 10:48 PM
To: toronto-lisp@common-lisp.net
Subject: [toronto-lisp] Fwd: Development helpers
Hi there,
first of all Paul and Dave, thanks for replying!! The
question can perhaps be best explained
with an example:
repl=> (defun doit-3 (x)
(* 3 x))
repl=> '(some more cool stuff)
repl=>'(and more and more)
i keep testing and playing around with functions
more and more
I can certainly run my doit-3 function
repl=>(doit-3 4)
12
repl=>
and now, I say to myself, - how the heck did I write that
doit-3, I forgot, because,
I wrote it 20 minutes ago, it obviously exists inside REPL
because I can execute it...
So, how do I view [dump??] the contents of doit-3 to the
screen, or to a file on the
disk, so I can invoke an editor and modify doit-3 and then
reload it??
I am just interested in learning how to be more productive
in a standard software
development cycle.
Thanks, Alex.
On Wed, Oct 6, 2010 at 4:59 PM, Paul Tarvydas <tarvydas@visualframeworksinc.com>
wrote:
> Hi there,
>
> A bit of a noob question - let's say that I have an interactive Repl
> session that has been going on for about an hour or so, and all of a
> sudden I wish to modify a defun I wrote a while ago. What is the
> easiest way first to show that code on the console, modify it, and
> load it back into Repl ?
>
> I am just trying to come up with a comfortable development environment
> for myself.
There is something called
"(dribble)" which records a transcript of your session. I've
never used it.
With LW, I typically use the editor to type into a file (buffer) and
compile-load the buffer, or ^E one form or defun. Undo can get you back
to an earlier state. I find that if I'm experimenting, I do it a function
at a time, until I'm happy with it, so I never have to go back a full hour.
I take it that most free lisp users use emacs+slime. You split the emacs
window into two, one half shows your edit buffer, the other shows a lisp
interaction. A keystroke sends your current form to the interaction and
you see the result in the interaction buffer.
pt
_______________________________________________
toronto-lisp mailing list
toronto-lisp@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/toronto-lisp