freenode/#lisp - IRC Chatlog
Search
0:47:54
fengshaun
I've heard of common lisp's superior debuggability, and I've seen sbcl dropping me to a debugger to poke around. where should I go to learn things I don't know that I don't know. i.e. how to be super effective in debugging cl
0:48:19
fengshaun
I feel like there is a lot of stuff in CL's debug-land that I don't know is possible
0:52:30
pjb
fengshaun: there are different debuggers. Each implementation has its own. And there are debuggers that work with a lot of different implementations (eg. slime).
0:52:56
pjb
fengshaun: the best way would be to read the user manual of both the implementation and of slime (since I would advise you to use slime when possible).
0:53:37
fengshaun
any resources to give a quick overview of what's possible so I can go deep later as need arises?
0:53:38
pjb
fengshaun: also good, is to write your own debugging facilities. For example, I wrote a stepper (cl-stepper), since some implementation don't provide cl:step, and most do a crude job at it.
0:54:12
Xach
fengshaun: i think i use v and t on frames the most in the slime debugger. v jumps to the location of the error (if there is high enough debug at compile time) and t shows the value of local variables (ditto)
0:54:26
Xach
fengshaun: i haven't tried the stepper lately. i don't know if it works nicely for sbcl.
0:55:37
Xach
sly has a feature that looks neat called stickers but i didn't stick with it long enough to really get a feel for them
0:56:27
fengshaun
I was hoping for a shorter read than the user manual to get a feel for all features before diving deep
0:57:48
pjb
fengshaun: then just enter into the debugger (evaluate (break) in the slime REPL), and type C-h m
1:31:03
copec
dtrace allows an arbitrary level of inspection, it allows you to group cross-cutting concerns arbitrarily
1:34:00
p_l
I'm not sure about equivalent of dtrace helpers for dynamic generated code that isn't represented in binary's DWARF data
1:34:31
p_l
most of the time it's "dump a file named according to template X in /tmp that contains symbol data in this format"
2:23:43
pjb
p_l: you could patch a CL compiler to generate DWARF at the same time it generates code dynamically.
2:29:01
mister_m
i find myself wanting to traverse a list and use those list values to populate a hash table. My first instinct is to define a hash table in a let statement, and in the body of that statement have a dolist expression where i modify the hash table. Is there a better way to do this?
2:30:29
mister_m
I'd use a reduce perhaps in JS but I'm having a bit of trouble with CL's reduce in doing this
4:56:07
pjb
mister_m: if you like reduce go ahead! (reduce (lambda (h e) (setf (gethash (car e) h) (cdr e)) h) '((a . 1) (b . 2) (c . 3)) :initial-value (make-hash-table))
6:35:10
p_l
pjb: the linux perftools format is essentially "drop a file named after PID with table of `address:symbol name`". DWARF is only used for static data. DTrace OTOH had essentially a callback interface that you could implement top return the data