Re: Changing source on the fly



On 08 May 2005 13:51:10 +0200, <maksr@xxxxxx> wrote:
> GP lisper <spambait@xxxxxxxxxxxxxxx> says that he "updates running
> source...in cmucl", so I just wanted to know a bit more, how he does
> it. It seems he didn't see my late follow-up.

I did see it, but Barry answered it.

> I'm comparing Visual Basic to Lisp and I want to see, how everything
> that can be done in Visual Basic, can be done in Lisp, concretely in
> the cmucl+slime environment.
>
> Until now I've not found out, how I can elegantly play with the
> s-expressions in some source buffer that I evalute in the context of a
> breakpoint in slime+cmucl debugger. The most I've found out is
> evaluating expressions with e in sldb prompt, but I have to enter the
> expression. I would like to just show it in the source buffer, like
> the C-x e command. I will actually try to adapt C-x e command to
> evalute in debug context.

Barry already answered this query. I don't use the debugger, "print"
statement debugging is much faster and rarely leads you down the wrong
path due to cascading errors. If you enjoy Visual Basic a lot, you
should probably not use CMUCL, but try Allegro instead, as some claim
it to be very much like VB.


Updating running source is simply done with two REPLs. CMUCL will
give you a second REPL via telnet for:

(setf mp::*idle-process* mp::*initial-process*)
(mp::start-lisp-connection-listener :port 6789 :password "fred")

NOTE: include the quotes for the password string in your telnet

In the mentioned case, one REPL on a remote computer was parsing a 6.5
hour long datastream, the second REPL received updated source via X
'cut-n-paste', after some quick testing (or not ;-) in a local slime.
Note that you can always test any part of Lisp at any time, if you
have followed the guidelines that Paul Graham lays down for such an
ability...i.e. definately worth doing! Thus some of the reasons you
might employ a debugger no longer exist.

--
Everyman has three hearts;
one to show the world, one to show friends, and one only he knows.
.



Relevant Pages

  • Re: Own REPL in CMUCL debugger
    ... How can this be done in CMUCL? ... > about the condition system and debugger related material in the ... Since we use our own debugger ... The interface defininition file is at: ...
    (comp.lang.lisp)
  • Changing source on the fly (Was: Lisp Book(s) in the K&R Style)
    ... Is it possible in CMUCL to change the source when stepping through the ... the source of the very function or loop you are ... curious when I will find it in any lisp debugger. ...
    (comp.lang.lisp)
  • debugger
    ... we're trying to do some web project with cmucl, already made server doing ... but not yet found handy development environment.. ... so, is it hard to hack into cmucl debugger, so instead of printing something ...
    (comp.lang.lisp)