Lisp HUG Maillist Archive

Stepper-friendly macros: does anyone need them?

Hi List!
  I think making lispworks stepper configurable with respect to user
defined macros is very useful. Am I the only one who thinks so?
  My previous post on making "iterate" stepper-friendly didn't get any
attention and I'm trying to figure out why.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Stepper-friendly macros: does anyone need them?

Hello -

Hm... I've been using LW for about 3 year right now and I've never ever used the stepper. I tend to break my code into simple functions that I can test in repl to figure out what's going on. If that's impossible to do then it's a sign that the function I've been testing is complicated and I need to break it into simpler functions.

About macros. I don't remember where I read it, but that was a phrase like "In 99% times macros can be replaced with functions". To me the only useful case of using macros are with-* constructs. But at the same time, I'm from the "camp" who thinks loop macro should be avoided as "non-lisp way". :)

In short, I would vote to eliminate the stepper from LW and instead focus on other things, like CAPI and removing, my biggest dislike with LW on Windows, the dependency on  the Microsoft Visual Studio runtime library! (I can't think of reasons why LW guys did it in such way; to me the only explanation is maybe they spend too much time in MacOS X developing LW).

Best,
Art



----- Original Message -----
From: Denis Budyak <budden73@gmail.com>
To: lisp-hug@lispworks.com
Cc: 
Sent: Sunday, March 3, 2013 1:40 PM
Subject: Stepper-friendly macros: does anyone need them?


Hi List!
  I think making lispworks stepper configurable with respect to user
defined macros is very useful. Am I the only one who thinks so?
  My previous post on making "iterate" stepper-friendly didn't get any
attention and I'm trying to figure out why.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Stepper-friendly macros: does anyone need them?

On 3 Mar 2013, at 09:40, Denis Budyak wrote:

>  My previous post on making "iterate" stepper-friendly didn't get any
> attention and I'm trying to figure out why.

I can't speak for other Lisp people, but I don't think I've ever stepped through Lisp code.  If I need to print things at various points in loops I change the code to do that.  I think the whole stepper thing comes from languages where making a tiny change requires some vast recompile/link/restart/restart-debugger process which takes a long time, while for Lisp the time is generally dominated by how long it takes to type whatever it is that recompiles whatever changed.

However this is just my opinion: may be other people debug in completely different ways.

--tim


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Stepper-friendly macros: does anyone need them?

I'm in the "don't use the stepper" camp. I've always had the impression that it is useful, but haven't learned how to use it well enough not to be annoyed by having to step until I hit the problem or condition. I get much better results working back through the stack with the inspector when a condition is signaled. If the code is wrong, but not signaling a condition, I just drop in a BREAK form to print the suspect data, then fall back on the stack and inspector if I didn't get the information I needed.

----------------------------------------------------------------
Thomas M. Hermann
Odonata Research LLC
http://www.odonata-research.com/
http://www.linkedin.com/in/thomasmhermann


On Sun, Mar 3, 2013 at 8:33 AM, Raymond Wiker <rwiker@gmail.com> wrote:
On Mar 3, 2013, at 14:42 , Jochen Schmidt <js@crispylogics.com> wrote:
Hi 

Am 03.03.2013 um 11:31 schrieb Art Obrezan <artobrezan@yahoo.com>:
In short, I would vote to eliminate the stepper from LW and instead focus on other things...


I strongly disagree here. I like the stepper and often use it to step through code. It is actually one of the biggest selling points of the LW IDE over other offerings for me. If all you use is your own clean and well factored code, which can always get used in an active and not reactive way, then just using the listener might be enough. But hey - looking back the last 13 years lisping - I'm a Mac OS X user and I use the LOOP macro so I might still not be "pure"  enough to be a good  "real" lisper - so perhaps my opinion may be not so important.

Seconded. Although the edit-compile cycle is short with modern Lisps, the time it takes to (re-) start a debugging session is not necessarily so. I have some cases where loading data into the image takes a long time, and in that case, judicious use of the stepper (and the inspector) is simply a much more efficient way to figure out what's going on.



Re: Stepper-friendly macros: does anyone need them?

I rarely have a need for the stepper, but I think that's mostly due to coding more FP and having very few side effects in code. However, when I have needed it, it's been invaluable. 

I would say this: I'd very much like the LW team to improve the stepper.. When broken there are 8 options to choose from for stepping through code and I consistently have to re-read all the mouse-hover tooltips to remember which is which, and quite often none of them do what I'd actually expect.

For example:

(defun foo () (+ 1 2 3))

Put a breakpoint on + and run (foo) in the listener. I can't see any functional difference between "Step To Call", "Step Through Call", "Step To Value", or "Next". They all do *exactly* the same thing. Someone can correct my thinking, but what I'd expect is:

Step To Value should first evaluate 1, then I click it again to eval 2, then again to eval 3, at which point it should disable (no more values to debug before the call).

Step To Call should evaluate all the value arguments (1, 2, 3) and stop at the Call - before it's made. Again, at this point Step To Value should be disabled.

Step Through Call to me means exactly the same thing as Next: evaluate the arguments (values), execute the call, although the toolbar icon makes it look like it should really be "Step Into Call" instead of Through.

TL;DR

I wish the stepper was more intuitive, or that I understood what it's going to do at any given moment more clearly. ;-)

Jeff M.


On Sun, Mar 3, 2013 at 8:33 AM, David McClain <dbm@refined-audiometrics.com> wrote:
I'm in Jochen's camp... I use the stepper from time to time, even on my own code. When I write code, my main goal is to solve a particular problem, and side issues like source purity are of tangential concern to me. I just learn, and appreciate to see, the macro expansions taking place during stepping.

I haven't ever tried using an alternative debugger on Lisp code, like GDB or VisualStudio. Has anyone else? Is it even possible? The Lisp stepper usually shows me what I need to see.

- DM

On Mar 3, 2013, at 06:42 AM, Jochen Schmidt <js@crispylogics.com> wrote:


Hi

Am 03.03.2013 um 11:31 schrieb Art Obrezan <artobrezan@yahoo.com>:
In short, I would vote to eliminate the stepper from LW and instead focus on other things...


I strongly disagree here. I like the stepper and often use it to step through code. It is actually one of the biggest selling points of the LW IDE over other offerings for me. If all you use is your own clean and well factored code, which can always get used in an active and not reactive way, then just using the listener might be enough. But hey - looking back the last 13 years lisping - I'm a Mac OS X user and I use the LOOP macro so I might still not be "pure"  enough to be a good  "real" lisper - so perhaps my opinion may be not so important.

ciao,
Jochen



----- Original Message -----
From: Denis Budyak <budden73@gmail.com>
To: lisp-hug@lispworks.com
Cc:
Sent: Sunday, March 3, 2013 1:40 PM
Subject: Stepper-friendly macros: does anyone need them?


Hi List!
I think making lispworks stepper configurable with respect to user
defined macros is very useful. Am I the only one who thinks so?
My previous post on making "iterate" stepper-friendly didn't get any
attention and I'm trying to figure out why.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html



_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html



Dr. David McClain
dbm@refined-audiometrics.com




Re: Stepper-friendly macros: does anyone need them?

Unable to parse email body. Email id is 12184

Re: Stepper-friendly macros: does anyone need them?

Martin,

Thanks for the information and the link. Out of all that, the most surprising bit of info to me was that I could put a breakpoint on the open paren. I had no idea. ;-)

I'll read through the documentation there as well.

Cheers!

Jeff M.


On Fri, Mar 8, 2013 at 12:08 PM, Martin Simmons <martin@lispworks.com> wrote:

>>>>> On Mon, 4 Mar 2013 09:59:34 -0600, Jeff Massung said:
>
> I would say this: I'd very much like the LW team to improve the stepper.
> When broken there are 8 options to choose from for stepping through code
> and I consistently have to re-read all the mouse-hover tooltips to remember
> which is which, and quite often none of them do what I'd actually expect.

Sorry if it is confusing.


> For example:
>
> (defun foo () (+ 1 2 3))
>
> Put a breakpoint on + and run (foo) in the listener.

I need to clarify what you mean by "Put a breakpoint on +", because there are
two possibilities, indicated by >><<:

1) The breakpoint is on the symbol +:

(>>+<< 1 2 3)

In that case, it will stop just before + is called, i.e. after evaluating the
arguments 1, 2 and 3.

2) The breakpoint is on the open paren of the call to +:

>>(<<+ 1 2 3)

In that case, it will stop before the form is evaluated, i.e. before evaluating the
arguments 1, 2 and 3.


>                                                      I can't see any
> functional difference between "Step To Call", "Step Through Call", "Step To
> Value", or "Next". They all do *exactly* the same thing.. Someone can
> correct my thinking, but what I'd expect is:
>
> Step To Value should first evaluate 1, then I click it again to eval 2,
> then again to eval 3, at which point it should disable (no more values to
> debug before the call).

No, "Value" here means the value of a form, i.e. when (+ 1 2 3) returns.


> Step To Call should evaluate all the value arguments (1, 2, 3) and stop at
> the Call - before it's made. Again, at this point Step To Value should be
> disabled.

Yes, that is what Step To Call will do assuming possibility 2 above.  In
possibility 1, it would step to the call of the parent form (there isn't one
here).


> Step Through Call to me means exactly the same thing as Next: evaluate the
> arguments (values), execute the call, although the toolbar icon makes it
> look like it should really be "Step Into Call" instead of Through.

The icon is correct -- "Step Through Call" does what you describe as "Step
Into Call".  The reason you can't see the difference with + is that the source
code is not available.


> I wish the stepper was more intuitive, or that I understood what it's going
> to do at any given moment more clearly. ;-)

All of the operations are documented here:

http://www.lispworks.com/documentation/lw61/IDE-M/html/ide-m-455.htm

--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Updated at: 2020-12-10 08:35 UTC