[cl-containers-devel] error when using CMUCL

Gary King gwking at metabang.com
Wed Nov 29 05:45:20 UTC 2006


Hi Pedro,

Hmmm. Interesting but it doesn't give me any sudden brilliant insights.

Looking at the code some more, I do notice that the test slot comes  
from test-container-mixin via key-value-iteratable-container-mixin  
and that the latter isn't loaded yet. My understanding of Lisp is  
that this should _not_ be an error but you could try two more other  
things:

1. Move the defclass below from basic-operations.lisp to  
containers.lisp (which is, actually, probably a better logical place  
for it in any case...)

> (defclass* key-value-iteratable-container-mixin (iteratable- 
> container-mixin)
>   ())

2. and / or, try something like:

> (defmethod initialize-instance :after ((object stable-associative- 
> container)
>                                        &rest args &key
>                                        container-type &allow-other- 
> keys)
>   (let ((test  (test object)))
>     (setf (slot-value object 'associative-container)
> 	  (apply #'make-container container-type :test test args)
> 	  (slot-value object 'numbered-container)
> 	  (make-container container-type :test test))))

or

> (defmethod initialize-instance :after ((object stable-associative- 
> container)
>                                        &rest args &key
>                                        container-type &allow-other- 
> keys)
>   (let ((test  (test object)))
>     (setf (slot-value object 'associative-container)
> 	  (apply #'make-container container-type args)
> 	  (slot-value (slot-value object 'associative-container) 'test)
> 	  test
> 	  (slot-value object 'numbered-container)
> 	  (make-container container-type)
> 	  (slot-value (slot-value object 'numbered-container) 'test)
> 	  test)))

(Both of which are pure superstition on my part. Thanks for bearing  
with this and please let me know if any of these stabs in the dark help.

thanks,

On Nov 28, 2006, at 5:06 PM, Pedro Kröger wrote:

> Gary King <gwking at metabang.com> writes:
>
>> Hmm, can you keep the form but comment out the innards? Or comment
>> out one part of the innards to see what CMUCL likes and dislikes?
>
> I commented different things in the form. CMUCL doesn't like the
> expressions marked with => below:
>
> (defmethod initialize-instance :after ((object stable-associative- 
> container)
>                                        &rest args &key container- 
> type &allow-other-keys)
>   (setf
>    (slot-value object 'associative-container)
>    => (apply #'make-container container-type :test (test object) args)
>    (slot-value object 'numbered-container)
>    => (make-container container-type :test (test object))
>    ))
>
> actually it seems not to like the "object" in (test object):
>
> (make-container container-type :test (test object))
>                                      --------------
>
> If I replace foo for object it works (but gives a warning, of course)
>
> Does it help?
>
> Pedro Kroger

--
Gary Warren King, metabang.com
Cell: (413) 885 9127
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the cl-containers-devel mailing list