Hacker News new | comments | ask | show | jobs | submit login
Debugging Lisp Part 1: Recompilation (2015) (malisper.me)
68 points by tosh 9 months ago | hide | past | web | favorite | 5 comments



Is this really all I needed to start getting better error messages? (declaim (optimize (debug 3))) I'd come to the point after a project or two where I gave up thinking there's just no way to get good error messages on basic syntax errors in generic SLIME usage.


I use (sb-ext:restrict-compiler-policy 'debug 3) in my ~/.sbclrc file to ensure debug is always at least 3.


I think the best way to debug macro-related problems in SLIME is to use the macrostepper (C-x M-e, I think) to incrementally expand the problematic form.


Declaim is a bad idea, I think. What I generally do is (declare (optimize (debug 3))) in the scope of the function I’m interested in.

I think it’s main effect is that it preserves some things, like local variable bindings, that might otherwise get optimized away.





Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: