Saturday, September 11, 2004

debugging lisp

The Conditions System of Common Lisp is something I have not grokked yet. I had a look at some examples and tutorials, but they usually involved too much information and code, more than I thought is neccessary for “simple” things. Sometimes in OpenMCL, when an error occurs it gives you the chance to assign/change a value or define a function and continue. But the debuggers in SBCL and CMUCL never offered such restarts. Because I knew OpenMCL can do it, and that capability ist often praised in Common Lisp, I thought it is “simple”. But the Condition System tutorials were always complex, using CLOS, creating new classes with :keywords and such, not just one, two functions/macros to remember and if one needs more one checks the manual.

So I was very happy when I found Joel R. Holvecks Usenet Post Re: Debugging Lisp code (stupid newbie question). He explains exactly what I want, getting an error, fix it, and restart from a frame rather than using one of the default restarts (abort). No CLOS, just a macro and a special operator, RESTART-CASE and UNWIND-PROTECT.

No comments: