Search
Thursday, 22nd of July 2021, 16:58:35 UTC
16:59:42
pve
lisp123: maybe "trace" would help?
16:59:53
_death
you can insert (break) where you want it to enter the debugger
17:00:23
lisp123
pve: how does that work?
17:01:11
pve
lisp123: (trace my-function), then call it
17:01:33
pve
and then later (untrace my-function)C
17:02:50
lisp123
pve: thanks, that also is very helpful, will experiment with it more now
17:03:27
pve
lisp123: I believe SBCL also allows (trace "MY-PACKAGE")
17:03:58
Bike
if you (declare (optimize debug)) appropriately you will probably get more complete call stacks, e.g. by preventing tail call optimization
17:04:47
lisp123
pve: thanks, let me try that too
17:04:59
lisp123
Bike: thanks, I'll add that to my file
17:05:07
pve
lisp123: you might get a lot of output
17:07:25
lisp123
pve: I got this https://plaster.tymoon.eu/view/2559#2559
17:07:42
lisp123
is there a way to step into any of the lines? the numbers seem to suggest so
17:08:24
pve
lisp123: you'll want to use (break) for that
17:08:59
pve
and then hit 0 until you get to the one you want
17:09:39
pve
or break only when some condition is true
17:21:09
pve
lisp123: are you aware that you can do all kinds of cool stuff in the slime debugger? (you probably are, just checking)
19:02:50
dieggsy
is there a manual way of checking a list of arguments against the acceptable parameter list of a function without actually calling it?
19:03:26
dieggsy
basically check if an apply will succeed (based on num args, keywords, etc.) before actually applying it
19:11:36
Bike
dieggsy: no, for several reasons, first of which is that the implementation doesn't actually have to save the lambda list of a function
19:12:43
dieggsy
fair. a manual check it is then i suppose
20:08:06
aeth
dieggsy: there should be a way to do it because swank/slime displays the arguments in the minibuffer in emacs
20:08:20
aeth
I guess it's part of swank?
20:08:49
Bike
swank uses the introspection interfaces of some implementations
20:09:02
aeth
and worst case scenario, it's unparsed, but (alexandria:parse-ordinary-lambda-list '(x y &key z))
20:09:08
Bike
which, besides behing extensions, are intended for human use rather than anything programmatic so they can have inaccuracies
20:09:23
Bike
and on high optimization that information can be removed even on implementations that do sometimes save it
20:09:47
aeth
having high optimization disable some safety is almost a feature in and of itself
20:10:02
aeth
you can check to see if it exists before entering this part of the code
20:10:32
Bike
you can try it on sbcl for example by declaring (debug 0)
20:11:13
Bike
might vary in some complicated way based on other qualities
20:27:37
Bike
doesn't look like sbcl's introspection distinguishes between a lambda list of () and not having the lambda list
20:39:54
scymtym
Bike: if i remember correctly, SB-INTROSPECT:FUNCTION-LAMBDA-LIST was changed about two months ago to return a second value which indicates exactly that
20:40:09
Bike
ah. my version is older than that probably
3:02:08
beach
Good morning everyone!
4:36:26
susam
Good morning, everyone!
Friday, 23rd of July 2021, 4:58:35 UTC