[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

a problem with print-functions

Sorry to have caused all the problems with eq (although I learned
quite a bit from the ensueing discussion).  I now have a more
Symbolics specific problem.

Last fall we developed a graphics-intensive scheduling system
on our 3650.  When I wrote the database, there was no talk about
porting it to any other hardware, so, since there are times when
data-structures need rather complex initializations, I wrote it
using flavors (genera 7.1).  Since then we've decided to rewrite
it so that the system is portable, i.e., in pure Common LISP.

Rewriting the database wasn't very hard since replacing 7.1 flavors
with defstructs is rather straightforward.  Rewriting the graphics
turned out to be an interesting project since I had to create my
own window/menu system (no flavors--it's all defstructs--
the bitbltting, draw-string, and draw-line all reside in
a separate machine specific file).  

Now for the problem: I use forward and backpointers a lot.  During
development I spent as much time in the inspector as I did in the
editor.  With flavors this was no problem, since flavors print
as "unprintable "structures.  Pointers from one flavor to another
were no problem, and all I had to do is mouse on the slot to
expand it.  Defstructs are another matter--they want to print
out every slot.  This can be partially solved by using print-functions, 
of course, but  since most of the structures have between 6 and 12
slots (some of which are lists of other structures),
the printouts become long and unwieldy, and the individual
slots are not mouseable in the  inspector.  

It is possible to partially solve the problem in the inspector by
making all the defstructs unnamed vectors, which print out in a
similar manner to flavors.  However, this is unnacceptable since
the slot names don't show in the inspector and since I also need
to do quite a bit of typing in the code and if the structure is
unnamed you lose the ability to test for type (eg, if rts is an
unnamed structure, (rts-p var) won't work.

Is there a solution to this problem, or do I have to give up one
of the best tools the Symbolics machine has to offer, ie, the inspector?
Working with multiple debugging flags and embedded print statements
seems a horribly wasteful solution, although I seem to be reduced
to it.

Thanks for your help.

Barry Smith