Re: Problems loading cells on cygwin
- From: Ken Tilton <kennytilton@xxxxxxxxxxxxx>
- Date: Tue, 27 Nov 2007 22:55:04 -0500
Mirko.Vukovic@xxxxxxxxx wrote:
On Nov 27, 7:10 pm, Ken Tilton <kennytil...@xxxxxxxxxxxxx> wrote:
Mirko.Vuko...@xxxxxxxxx wrote:stuff deleted ...
On Nov 26, 9:57 pm, Ken Tilton <kennytil...@xxxxxxxxxxxxx> wrote:
Ken wrote
I hope I have not misdirected anyone, I just offered ASD as one
/possible/ issue to be kept in mind.
The first thing I would do is take the first form that warns or produces
an error and try evaluating that directly... doh! Some distant bells
just started ringing...bingo. I just forwarded to you a patch for Clisp
for Cells 2.0. Not sure if that is what you found, but it does involved
"slotdef-name".
sorry for not thinking of that sooner.
kt
--------------
John Thingstad
--http://www.theoryyalgebra.com/
"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
The patch that Ken mentions modifies (comments out) a few lines in the
detritus.lisp and defpackage.lisp files:
In detritus.lisp the following are commented out:
;#+clisp
;(defun slot-definition-name (slot)
; (clos::slotdef-name slot))
and in defpackage.lisp this line is commented out:
; #+clisp #:slot-definition-name
In my case (windows XP, cygwin), I needed to comment out only the
lines in detritus.lisp. The cells package then loaded just fine with
asdf.
I can even (load "01-Cell-basics") demo. It looks like it is running
-- well it is not crashing, but I am not getting the echo after I
change the values of *S2*.
You might need to be more specific. That tutorial has two consecutive:
(setf (time-elapsed *s2*) 1)
...steps, the second demonstrating that Cells does not propagate
(including echo) on non-changing changes.
> During the load, I get the following
> message:
Strange. The "action" is all featured out, the only thing that should
happen during a load should be definitions. I just compiled and loaded
my 01-cells-basics.lisp without a problem, fwiw being that our code is
not the same. :)
C-STOP> stopping because
((setf md-slot-value)> cellular slot ~a of ~a cannot be setf unless
initialized as inputp
ACCEL #<STONE #x10212F7D>)c-break > stopping >
((setf md-slot-value)> cellular slot ~a of ~a cannot be setf unless
initialized as inputp
ACCEL #<STONE #x10212F7D>)
0> error is | #<SIMPLE-ERROR #x10441CC5>
That might be OK. The tutorial at that point is making a deliberate
error for pedagogic purposes. I use AllegroCL which is non-conforming: a
handler-case can trap BREAK which is supposed to land one ineluctably in
the debugger. I think you can see the error is producing the same
information the tutorial is trying to trap and then present to you.
Possibly CLisp handles BREAK correctly?
Unfortunately, the requisite post-goof call to cells-reset is part of
the error handling being bypassed, so before continuing the tutorial you
should evaluate (cells-reset) yourself.
WARNING: The generic function #<STANDARD-GENERIC-FUNCTION C-OUTPUT-
SLOT-NAME>
is being modified, but has already been called.
Whoa. No clue. What led to that? Were all those messages together? ie,
you /were/ loading the file and got all those? Did you take out the
#+evaluatethis's? If so, put 'em back, you have voided the warranty. :)
kt
--http://www.theoryyalgebra.com/
"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
OK, I cleaned things up, and they go exactly as you say ... except :-)
I focused on the stone model in 01-Cells-basic. I don't think that
the value distance slot changes:
- when I change time, I am informed about the change in time, but not
in distance
- If I examine the values of time-elapsed and distance (using (slot-
value *s2* 'distance), the first one has the correct value, while the
second one is nil
Inconceivable. Well, if you did not do (cells-reset) Cells can look to be completely non-functional, but you say other things do happen.
I just sent you my version. This tutorial does not get into any of the edge cases addressed by recent work on Cells, so I am hopeful it will work with the version you have.
I suggest not loading the file, because definitions lower down may conflict with those above. (I think I intended this to be evaluated form by form, maybe not, but let's play it safe. Of course if it won't work this way, do the load first.)
Then just follow the tutorial and stop at the first problem and send me the REPL output top to bottom. Tilton's Law: Always fix the first problem. Corrollary: there is only ever one problem.
- If I don't set the error handlers, I do get an error if I try to
set a value to accel, but not if I try to set a value to distance.
I tried changing the definition of distance :initform from 0 to (c-in
0) (following the examples of time-elapsed and accel, but that did
only allowed me to set distance, and not to calculate it (although
when setting it, I would get the correct echo message).
I suspect that some of our files our out of sync. Here is the
definition of stone that I downloaded yesterday from the web site.
(defmodel stone ()
((accel :cell t :initarg :accel :initform 0 :accessor accel)
(time-elapsed :cell t :initarg :time-elapsed
:initform (c-in 0)
:accessor time-elapsed)
(distance :cell t :initarg :distance :initform 0 :accessor
distance))
(:default-initargs
:distance (c? (/ (* (accel self)
(expt (time-elapsed self) 2))
2))))
I note that you reported having cleaned things up, vs having re-downloaded the original. We have discussed voided warranties, yes? :) Tell you what, I sent you mine, you send me yours.
kt
--
http://www.theoryyalgebra.com/
"In the morning, hear the Way;
in the evening, die content!"
-- Confucius
.
- References:
- Problems loading cells on cygwin
- From: Mirko . Vukovic
- Re: Problems loading cells on cygwin
- From: Mirko . Vukovic
- Re: Problems loading cells on cygwin
- From: Ken Tilton
- Re: Problems loading cells on cygwin
- From: John Thingstad
- Re: Problems loading cells on cygwin
- From: Mirko . Vukovic
- Re: Problems loading cells on cygwin
- From: John Thingstad
- Re: Problems loading cells on cygwin
- From: Ken Tilton
- Re: Problems loading cells on cygwin
- From: Mirko . Vukovic
- Re: Problems loading cells on cygwin
- From: Ken Tilton
- Re: Problems loading cells on cygwin
- From: Mirko . Vukovic
- Problems loading cells on cygwin
- Prev by Date: Re: Problems loading cells on cygwin
- Next by Date: Re: NYC LOCAL: Thursday 29 November 2007 UNIGROUP: Heow Eide-Goodman on Ruby on Rails
- Previous by thread: Re: Problems loading cells on cygwin
- Next by thread: Re: Problems loading cells on cygwin
- Index(es):
Relevant Pages
|