Debugging Lisp

Debugging Lisp Part 1: Recompilation

This post is the start of a series on how to debug Common Lisp code, specifically with Emacs, Slime, and SBCL. If you do not understand Common Lisp, you should still be able to follow along and recognize just how powerful the facilities provided by the Common Lisp debugger are. Nathan Marz asked me to write these posts since he thought many of the tools for debugging Common Lisp were pretty cool…

http://malisper.me/2015/07/07/debugging-lisp-part-1-recompilation/

Debugging Lisp Part 2: Inspecting

In this post I am going to discuss another tool used for debugging Common Lisp – the Slime Inspector. The Slime inspector makes it possible to manipulate objects directly from the repl. You can do many different many different things with it, including clicking on objects to look at their contents and being able to copy and past objects in order to reuse them in future function calls…

http://malisper.me/2015/07/14/debugging-lisp-part-2-inspecting/

Debugging Lisp Part 3: Redefining Classes

The Common Lisp Object System (CLOS) is pretty powerful. It gives you multiple inheritance, multiple dispatch, and many different ways to extend the behavior of methods. Underneath, most implementations use the Metaobject Protocol (MOP), a way of defining CLOS in terms of itself. As part of the MOP, classes are implemented as objects with several instance variables. Among those are variables that hold the class’s name, its superclasses, and a list of the class’s own instance variables. If you don’t believe me, take the point class from the previous post:…

http://malisper.me/2015/07/22/debugging-lisp-part-3-redefining-classes/

Debugging Lisp Part 4: Restarts

Many languages provide error handling as two distinct parts, throw and catch. Throw is the part that detects something has gone wrong and in some way signals that an error has occurred. In the process, throw creates an exception object which contains information about the problem. The other part, catch, takes the exception object signaled by throw and attempts to recover from the error…

http://malisper.me/2015/08/05/debugging-lisp-part-4-restarts/

Advertisements