From ln at bk.ru Tue Dec 18 03:38:40 2007 From: ln at bk.ru (=?koi8-r?Q?=EC=C5=CF=CE=C9=C4_=EE=CF=D7=C9=CB=CF=D7?=) Date: Tue, 18 Dec 2007 06:38:40 +0300 Subject: [rucksack-devel] (no subject) Message-ID: I play with Rucksak and get this error: CL-USER> (defvar *tmp-rucksack* #p"/tmp/tmp-rs/") *TMP-RUCKSACK* CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*) (rucksack:with-transaction () (defclass plan-of-acc2 () ((name :initform "1" :accessor name :index :string-index) (accs :accessor accs)) (:metaclass rucksack:persistent-class) (:index t)))) # T CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*) (rucksack:with-transaction () (make-instance 'plan-of-acc2) (rucksack:rucksack-map-class rs 'plan-of-acc2 (lambda (x) (print (name x)))))) "1" NIL T CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*) (rucksack:with-transaction () (rucksack:rucksack-map-class rs 'plan-of-acc2 (lambda (x) (setf (name x) "w"))))) Argument X is not a NUMBER: NIL [Condition of type SIMPLE-TYPE-ERROR] Restarts: 0: [ABORT] Abort # 1: [RETRY] Retry # 2: [ABORT] Return to SLIME's top level. 3: [CLOSE-CONNECTION] Close SLIME connection 4: [ABORT] Exit debugger, returning to top level. Backtrace: 0: (SB-KERNEL:TWO-ARG-= NIL 0) 1: (RUCKSACK::LEAF-DELETE-KEY #> # (# NIL) "1" :IGNORE) 2: ((SB-PCL::FAST-METHOD RUCKSACK:BTREE-DELETE (RUCKSACK:BTREE #1="#<...>" . #1#)) (#(NIL) . #()) # #> "1" 34) 3: ((SB-PCL::FAST-METHOD RUCKSACK:RUCKSACK-MAYBE-INDEX-CHANGED-SLOT (RUCKSACK:STANDARD-RUCKSACK T T T T T T T)) # # # # #> # "1" "w" ..) 4: ((SB-PCL::FAST-METHOD (SETF SB-MOP:SLOT-VALUE-USING-CLASS) :AROUND (T RUCKSACK:PERSISTENT-CLASS T T)) # # "w" # #> #) 5: (SB-PCL::SET-SLOT-VALUE #> NAME "w") 6: ((SB-PCL::FAST-METHOD RUCKSACK::MAP-BTREE-KEYS-FOR-NODE (RUCKSACK:BTREE RUCKSACK:BTREE-NODE T T T T T T)) # # #> # # NIL NIL NIL ..) 7: ((SB-PCL::FAST-METHOD RUCKSACK::MAP-BTREE-KEYS-FOR-NODE (RUCKSACK:BTREE RUCKSACK:BTREE-NODE T T T T T T)) # # #> # # NIL NIL NIL ..) 8: ((LABELS RUCKSACK::MAP-INSTANCES) PLAN-OF-ACC2) 9: ((SB-PCL::FAST-METHOD RUCKSACK:RUCKSACK-MAP-CLASS (RUCKSACK:STANDARD-RUCKSACK #1="#<...>" . #1#)) # # # PLAN-OF-ACC2 #) This patch will possible allow to avoid such behaviours. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch URL: From alemmens at xs4all.nl Thu Dec 20 10:41:27 2007 From: alemmens at xs4all.nl (Arthur Lemmens) Date: Thu, 20 Dec 2007 11:41:27 +0100 Subject: [rucksack-devel] (no subject) In-Reply-To: References: Message-ID: Leonid Novikov wrote: > CL-USER> (rucksack:with-rucksack (rs *tmp-rucksack*) > (rucksack:with-transaction () > (rucksack:rucksack-map-class rs 'plan-of-acc2 > (lambda (x) > (setf (name x) "w"))))) > > Argument X is not a NUMBER: NIL > [Condition of type SIMPLE-TYPE-ERROR] Thanks for the bug report and the patch. I hope I'll find some time to look into this (and the report and patch from Sean Ross) during the holiday period. Arthur