Recently I've been working on converting an old CLX-based inspector to
CLOS (meaning replacing some internal structures with CLOS-based ones)
and cleaning it up a bit.

This is a version of the CLX inspector that used to come with CMUCL
before someone did the Motif-based one.  If used in multiprocessing
versions of CMUCL, it will update the inspector windows in the
background (that is, it will update the displayed slots as the
underlying Lisp objects change their values).

Besides this, it has the advantage, in my mind at least, of not
requiring a separate daemon program.  It also seems more reliable than
the Motif inspector in other ways (for example, the Motif inspector
seems to die when I try to inspect long arrays by changing the count
field to a number over, say, 500).

I found it amusing to use the inspector to help me debug the inspector
code.  I'd fall into the debugger because of a bug in the inspector
code and I could do (inspect <some datum>) and a new, fully
functional, inspector window would pop up and everything would work as
long as I didn't tickle the bug again.  The wonders of Lisp!

Anyway I'd like to put this out there for people to try and tell me if
they like it and if they find any bugs.  It can be gotten from

   ftp://ftp.csl.sri.com/pub/users/gilham/clos-inspect.tgz

To install it, just uncompress it in the cmucl/lib directory, compile
the clos-inspect.lisp file and load it.  Then type

  (inspect '(a b c))

or whatever to try it out.  Typing an `h' in any window will bring up
a help window.  To see the background update process at work, click on
one of the "A" "B" or "C" objects in the window, then type "P" in the
new window that pops up.  The Lisp prompt will return.  Then you can
type, for example, (setf a 7) and you'll see that the value slot in
the window will change from "Unbound" to 7.

You can inspect as many Lisp objects as you want (just right-click to
select in a new window) and you can watch them all.

I've tried to get it to work right inspecting CLOS objects --- perhaps
someone can let me know if I've missed anything.

In the back of my mind I'm thinking that this code could serve as the
basis for a general inspection framework, especially now that it's
more CLOSified, the idea being that one could build a low-level Lisp
inspector into whatever environment you are building (Garnet, CLIM,
etc.) by just supplying a specific set of functions.  The code is
still not quite layered well enough for that but it seems clearer now
(at least to me).

-- 
Fred Gilham                                         [EMAIL PROTECTED]
Behold, how good and pleasant it  is when brothers dwell in unity.  It
is like the  precious oil upon the head, running  down upon the beard,
upon the beard of Aaron, running  down on the collar of his robes.  It
is like the dew of Hermon,  which falls on the mountains of Zion.  For
there the LORD has commanded the blessing, life for evermore.  -Ps 133

Reply via email to