From: Lars Rune Nøstdal
Subject: Re: Remote debugging
Date: 
Message-ID: <1154930481.611044.124940@75g2000cwc.googlegroups.com>
Ken Tilton wrote:
> Lars Rune Nøstdal wrote:
> > Ken Tilton wrote:
> >
> >>Lars Rune Nøstdal wrote:
> >>
> >>>Pierre THIERRY wrote:
> >>>
> >>>
> >>>>I've already read quite some times that one of the wonderful features of
> >>>>Lisp is the ability to debug an application that is running, by changing
> >>>>it's state and even definitions (macros, functions, objects and so on).
> >>>>
> >>>>The questions that burns my lips are: How is it done?
> >>>
> >>>
> >>>You Just Do It. For example:
> >>>
> >>>SW> (defun test ()
> >>>      (write-line "i'm a buggy version of test"))
> >>>test
> >>>SW> (defparameter *test-thread*
> >>>      (withThread "test-thread"
> >>>        (loop
> >>>           (test)
> >>>           (sleep 10))))
> >>>i'm a buggy version of test
> >>>i'm a buggy version of test
> >>>i'm a buggy version of test
> >>>...etc...
> >>>*test-thread*
> >>>SW> (defun test ()
> >>>      (write-line "i'm a non-buggy version of test"))
> >>>style-warning: redefining test in DEFUN
> >>>test
> >>>i'm a non-buggy version of test
> >>>i'm a non-buggy version of test
> >>>i'm a non-buggy version of test
> >>>...etc...
> >>>
> >>
> >>I think you forgot about the bit in which you first get to a Lisp prompt
> >>on a satellite a kabillion miles away.
> >
> >
> > Right:
> >
> > ssh ····@space-station.org
> > ..
> > ····@space-station.org:-$ screen -r
>
> You have longer arms than I do if you can reach the break key from here.
>
> <I think that is part of the OP's confusion>

Hm - well, now I'm confused also. I've got a machine running a
Lisp-instance 100 miles away from here - but I can still "press the
break key" on that machine while at home using any of the methods
mentioned above.

Isn't both the question of changing stuff at runtime and doing it
remotely answered?

-- 
mvh, Lars Rune Nøstdal
http://lars.nostdal.org/

From: Ken Tilton
Subject: Re: Remote debugging
Date: 
Message-ID: <BADBg.2909$9T2.416@fe10.lga>
Lars Rune N�stdal wrote:
> Ken Tilton wrote:
> 
>>Lars Rune N�stdal wrote:
>>
>>>Ken Tilton wrote:
>>>
>>>
>>>>Lars Rune N�stdal wrote:
>>>>
>>>>
>>>>>Pierre THIERRY wrote:
>>>>>
>>>>>
>>>>>
>>>>>>I've already read quite some times that one of the wonderful features of
>>>>>>Lisp is the ability to debug an application that is running, by changing
>>>>>>it's state and even definitions (macros, functions, objects and so on).
>>>>>>
>>>>>>The questions that burns my lips are: How is it done?
>>>>>
>>>>>
>>>>>You Just Do It. For example:
>>>>>
>>>>>SW> (defun test ()
>>>>>     (write-line "i'm a buggy version of test"))
>>>>>test
>>>>>SW> (defparameter *test-thread*
>>>>>     (withThread "test-thread"
>>>>>       (loop
>>>>>          (test)
>>>>>          (sleep 10))))
>>>>>i'm a buggy version of test
>>>>>i'm a buggy version of test
>>>>>i'm a buggy version of test
>>>>>...etc...
>>>>>*test-thread*
>>>>>SW> (defun test ()
>>>>>     (write-line "i'm a non-buggy version of test"))
>>>>>style-warning: redefining test in DEFUN
>>>>>test
>>>>>i'm a non-buggy version of test
>>>>>i'm a non-buggy version of test
>>>>>i'm a non-buggy version of test
>>>>>...etc...
>>>>>
>>>>
>>>>I think you forgot about the bit in which you first get to a Lisp prompt
>>>>on a satellite a kabillion miles away.
>>>
>>>
>>>Right:
>>>
>>>ssh ····@space-station.org
>>>..
>>>····@space-station.org:-$ screen -r
>>
>>You have longer arms than I do if you can reach the break key from here.
>>
>><I think that is part of the OP's confusion>
> 
> 
> Hm - well, now I'm confused also. I've got a machine running a
> Lisp-instance 100 miles away from here - but I can still "press the
> break key" on that machine while at home using any of the methods
> mentioned above.

I (loosely) meant I did not see where you explained to the OP all the 
deets about Lisp being dynamic (so when a function gets entered after a 
new version is compiled the new version gets run), nor that part of the 
trick is getting to a prompt within the running Lisp process. The first 
was implicit but unstated, the second -- well, you just offered a 
console session with a thread spawned on the fly. Someone asking that 
question might be accustomed to the C/C++ model where the compiler is 
not around at runtime, and where a runtime is not malleable. etc etc.

kt

-- 
Cells: http://common-lisp.net/project/cells/

"I'll say I'm losing my grip, and it feels terrific."
    -- Smiling husband to scowling wife, New Yorker cartoon
From: Lars Rune Nøstdal
Subject: Re: Remote debugging
Date: 
Message-ID: <1155026905.818301.242440@i3g2000cwc.googlegroups.com>
Ken Tilton wrote:
> Lars Rune Nøstdal wrote:
> > Ken Tilton wrote:
> >
> >>Lars Rune Nøstdal wrote:
> >>
> >>>Ken Tilton wrote:
> >>>
> >>>
> >>>>Lars Rune Nøstdal wrote:
> >>>>
> >>>>
> >>>>>Pierre THIERRY wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>>>I've already read quite some times that one of the wonderful features of
> >>>>>>Lisp is the ability to debug an application that is running, by changing
> >>>>>>it's state and even definitions (macros, functions, objects and so on).
> >>>>>>
> >>>>>>The questions that burns my lips are: How is it done?
> >>>>>
> >>>>>
> >>>>>You Just Do It. For example:
> >>>>>
> >>>>>SW> (defun test ()
> >>>>>     (write-line "i'm a buggy version of test"))
> >>>>>test
> >>>>>SW> (defparameter *test-thread*
> >>>>>     (withThread "test-thread"
> >>>>>       (loop
> >>>>>          (test)
> >>>>>          (sleep 10))))
> >>>>>i'm a buggy version of test
> >>>>>i'm a buggy version of test
> >>>>>i'm a buggy version of test
> >>>>>...etc...
> >>>>>*test-thread*
> >>>>>SW> (defun test ()
> >>>>>     (write-line "i'm a non-buggy version of test"))
> >>>>>style-warning: redefining test in DEFUN
> >>>>>test
> >>>>>i'm a non-buggy version of test
> >>>>>i'm a non-buggy version of test
> >>>>>i'm a non-buggy version of test
> >>>>>...etc...
> >>>>>
> >>>>
> >>>>I think you forgot about the bit in which you first get to a Lisp prompt
> >>>>on a satellite a kabillion miles away.
> >>>
> >>>
> >>>Right:
> >>>
> >>>ssh ····@space-station.org
> >>>..
> >>>····@space-station.org:-$ screen -r
> >>
> >>You have longer arms than I do if you can reach the break key from here.
> >>
> >><I think that is part of the OP's confusion>
> >
> >
> > Hm - well, now I'm confused also. I've got a machine running a
> > Lisp-instance 100 miles away from here - but I can still "press the
> > break key" on that machine while at home using any of the methods
> > mentioned above.
>
> I (loosely) meant I did not see where you explained to the OP all the
> deets about Lisp being dynamic (so when a function gets entered after a
> new version is compiled the new version gets run), nor that part of the
> trick is getting to a prompt within the running Lisp process. The first
> was implicit but unstated, the second -- well, you just offered a
> console session with a thread spawned on the fly.

Yeah, I forgot to mention the remote-part; thanks for pointing that
out.

Both how people interpret and explain something is full of seemingly
random holes and missing parts that exists implicitly or obviously for
others; you never know either way around. But instead of guessing what
the OP is really after by filling in every possible single combination,
the OP will later just re-request like he does below or you did for him
then steer the discussion in the right direction and arrive at the goal
much faster. Somewhere at, in-between or beyond what Petter Gustad,
Brian Downing and I mention about screen, slime, swank, ssh and
possibly something that hasn't been mentioned yet - he will find what
he's looking for either in it or a direction to follow (docs and
man-pages) based on it.

I'm just lazy hoping c.l.l. will fill in the blanks. :)

-- 
mvh, Lars Rune Nøstdal
http://lars.nostdal.org/
From: Pierre THIERRY
Subject: Re: Remote debugging
Date: 
Message-ID: <pan.2006.08.08.11.20.17.883271@levallois.eu.org>
Le Tue, 08 Aug 2006 01:48:25 -0700, Lars Rune Nøstdal a écrit :
> I'm just lazy hoping c.l.l. will fill in the blanks. :)

Which it perfectly did, BTW...

Remotely,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: Pierre THIERRY
Subject: Re: Remote debugging
Date: 
Message-ID: <pan.2006.08.08.20.59.53.733859@levallois.eu.org>
Le Tue, 08 Aug 2006 01:48:25 -0700, Lars Rune Nøstdal a écrit :
> I'm just lazy hoping c.l.l. will fill in the blanks. :)

Silly question, may be last blank: how do you do if the Lisp image is
running under Windows?

I'm fighting with Swank but I didn't manage to connect to it from a
Linux box to a Windows one. As there's nothing like SSH toward Windows
(XP, for what matters), I connect with Putty to the Linux box from
Windows, creating a remote port forwarding, and then start a swank
server. With Lispbox CLisp and ACL flavours, it didn't work (connection
closed unexpectedly, returned abnormally with error 256, IIRC).

So how are you guys doing to connect to a Lisp image on Windows?

Locally,
Nowhere man
-- 
···········@levallois.eu.org
OpenPGP 0xD9D50D8A
From: Pascal Bourguignon
Subject: Re: Remote debugging
Date: 
Message-ID: <87vep2anpw.fsf@thalassa.informatimago.com>
Pierre THIERRY <···········@levallois.eu.org> writes:

> Le Tue, 08 Aug 2006 01:48:25 -0700, Lars Rune N�stdal a �crit�:
>> I'm just lazy hoping c.l.l. will fill in the blanks. :)
>
> Silly question, may be last blank: how do you do if the Lisp image is
> running under Windows?
>
> I'm fighting with Swank but I didn't manage to connect to it from a
> Linux box to a Windows one. As there's nothing like SSH toward Windows

Install cygwin and launch sshd in cygwin.

> (XP, for what matters), I connect with Putty to the Linux box from
> Windows, creating a remote port forwarding, and then start a swank
> server. 

The swank server could listen on a normal TCP/IP port. Insecure, but
you could protect it on a LAN not connected to the Internet (which you
should already have if you're running a Microsoft OS anyways).


> With Lispbox CLisp and ACL flavours, it didn't work (connection
> closed unexpectedly, returned abnormally with error 256, IIRC).
>
> So how are you guys doing to connect to a Lisp image on Windows?
>
> Locally,
> Nowhere man
> -- 
> ···········@levallois.eu.org
> OpenPGP 0xD9D50D8A
>

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"Logiciels libres : nourris au code source sans farine animale."