Hi,
Here's a patch containing the changes I made to get Cells to compile
on a current OpenMCL (just Cells, none of the GUI stuff). Also, the
files in the UTILS-KT defsystem had no dependencies, so I added
:serial t to compile them in the order they appear.
I added a paragraph to the documentation about calling CELL-RESET
after errors occur and accessors just print ".". This drove me crazy
for awhile---I was restarting my Lisp image once I got in this state
because I couldn't figure out what to do!
What about doing something like this in MD-SLOT-VALUE (untested, and
assuming I haven't completely misunderstood what's going on):
(defun md-slot-value (...)
(tagbody
retry
(when *stop*
(restart-case
(error "Cells is stopped due to a prior error.")
(continue ()
:report "Return a slot value of nil."
(return-from md-slot-value nil))
(reset-cells ()
:report "Reset cells and retry getting the slot value."
(cell-reset)
(go retry))))
; rest of MD-SLOT-VALUE here
...))
Also, let me second the need for an ASDF-INSTALL'able recent version
of Cells without checking out all the GUI stuff---I couldn't get the
version that's up there now to work.
With respect to documentation, I was thinking of adding documentation
strings for exported symbols as I learn what they do---watch this
space for future patches!
James
Index: cells/doc/01-Cell-basics.lisp
===================================================================
RCS file: /project/cells/cvsroot/cell-cultures/cells/doc/01-Cell-basics.lisp,v
retrieving revision 1.1
diff -u -r1.1 01-Cell-basics.lisp
--- cells/doc/01-Cell-basics.lisp 26 Jun 2004 18:38:38 -0000 1.1
+++ cells/doc/01-Cell-basics.lisp 22 Apr 2005 19:34:13 -0000
@@ -319,6 +319,10 @@
c-setting-debug > ruled distance in stone may not be setf'ed
0> error is #<simple-error @ #x2123e392>
+when errors like this occur, cells may enter a "stopped" state,
+in which propagation does not occur and accessing model slot values
+will print ".". to restart cells use the CELL-RESET function.
+
;-----------------------------------------------------------
aside from c?, cv, and def-c-output, another thing you will see
in cello code is how complex views are constructed using
Index: utils-kt/defpackage.lisp
===================================================================
RCS file: /project/cells/cvsroot/cell-cultures/utils-kt/defpackage.lisp,v
retrieving revision 1.7
diff -u -r1.7 defpackage.lisp
--- utils-kt/defpackage.lisp 17 Nov 2004 12:32:01 -0000 1.7
+++ utils-kt/defpackage.lisp 22 Apr 2005 19:34:14 -0000
@@ -25,7 +25,7 @@
(defpackage :utils-kt
(:nicknames #:ukt)
(:use #:common-lisp
- #-(or cormanlisp cmu sbcl) #:clos
+ #-(or cormanlisp cmu sbcl mcl) #:clos
#+sbcl #:sb-mop
#+mcl #:ccl)
(:export #:utils-kt-reset
Index: utils-kt/detritus.lisp
===================================================================
RCS file: /project/cells/cvsroot/cell-cultures/utils-kt/detritus.lisp,v
retrieving revision 1.3
diff -u -r1.3 detritus.lisp
--- utils-kt/detritus.lisp 17 Nov 2004 12:32:01 -0000 1.3
+++ utils-kt/detritus.lisp 22 Apr 2005 19:34:14 -0000
@@ -36,15 +36,11 @@
;;;(defmethod class-slot-named (class slotname)
;;; (find slotname (class-slots class) :key #'slot-definition-name))
-#+mcl
-(defun class-slots (c)
- (nconc (copy-list (class-class-slots c))
- (copy-list (class-instance-slots c))))
-
-
#-(or lispworks mcl)
(defun true (it) (declare (ignore it)) t)
+#-(or lispworks mcl)
(defun false (it) (declare (ignore it)))
+
(defun xor (c1 c2)
(if c1 (not c2) c2))
Index: utils-kt/utils-kt.asd
===================================================================
RCS file: /project/cells/cvsroot/cell-cultures/utils-kt/utils-kt.asd,v
retrieving revision 1.2
diff -u -r1.2 utils-kt.asd
--- utils-kt/utils-kt.asd 5 Dec 2004 04:51:02 -0000 1.2
+++ utils-kt/utils-kt.asd 22 Apr 2005 19:34:14 -0000
@@ -16,6 +16,7 @@
:licence "MIT Style"
:description "Kenny's Utilities"
:long-description "Low-level utilities used by all of Kenny's projects"
+ :serial t
:components ((:file "defpackage")
(:file "debug")
(:file "detritus")