From gracin at tel.fer.hr Mon Jul 9 09:36:06 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Mon, 09 Jul 2007 11:36:06 +0200 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> Message-ID: <46920186.4070802@tel.fer.hr> Hi! Is the version of cl-containers available to asdf-install up to date? I ask because the following doesn't work in the version I get from asdf-install: (let ((c (make-container 'priority-queue-on-container))) (insert-item c 2) (insert-item c 1) (insert-item c 3) (delete-element c 2)) I get: debugger invoked on a SIMPLE-ERROR in thread #: There is no applicable method for the generic function # when called with arguments (3). 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) # # #) 1: ((SB-PCL::FAST-METHOD DELETE-NODE (BINARY-SEARCH-TREE BST-NODE)) # # # #) 2: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET ((C (MAKE-CONTAINER 'PRIORITY-QUEUE-ON-CONTAINER))) (INSERT-ITEM C 2) (INSERT-ITEM C 1) (INSERT-ITEM C 3) (DELETE-ELEMENT C 2)) #) From gwking at metabang.com Tue Jul 10 21:31:18 2007 From: gwking at metabang.com (Gary King) Date: Tue, 10 Jul 2007 17:31:18 -0400 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: <46920186.4070802@tel.fer.hr> References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> <46920186.4070802@tel.fer.hr> Message-ID: <7B6FFE18-8D41-4AF1-B9DB-D344B3E988E1@metabang.com> Hi Josip, Thanks for reporting this. I will look into it this evening. regards, On Jul 9, 2007, at 5:36 AM, Josip Gracin wrote: > Hi! > > Is the version of cl-containers available to asdf-install up to > date? I ask because the following doesn't work in the version I > get from asdf-install: > > (let ((c (make-container 'priority-queue-on-container))) > (insert-item c 2) > (insert-item c 1) > (insert-item c 3) > (delete-element c 2)) > > > I get: > > debugger invoked on a SIMPLE-ERROR in thread # thread" {A69C6E9}>: > There is no applicable method for the generic function > # > when called with arguments > (3). > > 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) > # > # > #) > 1: ((SB-PCL::FAST-METHOD DELETE-NODE (BINARY-SEARCH-TREE BST-NODE)) > # > # > # > #) > 2: ((LAMBDA > (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. > SB-PCL::.ARG1.)) > # > # > # > #) > 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV > (LET ((C (MAKE-CONTAINER 'PRIORITY-QUEUE-ON-CONTAINER))) > (INSERT-ITEM C 2) > (INSERT-ITEM C 1) > (INSERT-ITEM C 3) > (DELETE-ELEMENT C 2)) > #) > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From gwking at metabang.com Tue Jul 10 22:24:53 2007 From: gwking at metabang.com (Gary King) Date: Tue, 10 Jul 2007 18:24:53 -0400 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: <46920186.4070802@tel.fer.hr> References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> <46920186.4070802@tel.fer.hr> Message-ID: <0A186E42-94EF-452D-9ED7-C3698B4DCA40@metabang.com> Hi Josip, The good news is that the version on the web is the same as the version I have here. The bad news is that this means there is a bug. This is such an obvious problem that I'm guessing it's bit-rot -- CL- Containers has next to no testsuite. I'll continue to look at this and try to get a fix out tonight. thanks again for pointing it out to me and the list! On Jul 9, 2007, at 5:36 AM, Josip Gracin wrote: > Hi! > > Is the version of cl-containers available to asdf-install up to > date? I ask because the following doesn't work in the version I > get from asdf-install: > > (let ((c (make-container 'priority-queue-on-container))) > (insert-item c 2) > (insert-item c 1) > (insert-item c 3) > (delete-element c 2)) > > > I get: > > debugger invoked on a SIMPLE-ERROR in thread # thread" {A69C6E9}>: > There is no applicable method for the generic function > # > when called with arguments > (3). > > 0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) > # > # > #) > 1: ((SB-PCL::FAST-METHOD DELETE-NODE (BINARY-SEARCH-TREE BST-NODE)) > # > # > # > #) > 2: ((LAMBDA > (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. > SB-PCL::.ARG1.)) > # > # > # > #) > 3: (SB-INT:SIMPLE-EVAL-IN-LEXENV > (LET ((C (MAKE-CONTAINER 'PRIORITY-QUEUE-ON-CONTAINER))) > (INSERT-ITEM C 2) > (INSERT-ITEM C 1) > (INSERT-ITEM C 3) > (DELETE-ELEMENT C 2)) > #) > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From gwking at metabang.com Wed Jul 11 17:54:20 2007 From: gwking at metabang.com (Gary King) Date: Wed, 11 Jul 2007 13:54:20 -0400 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: <46920186.4070802@tel.fer.hr> References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> <46920186.4070802@tel.fer.hr> Message-ID: <3EB5674E-BD77-4275-81E2-FA393CD2FB83@metabang.com> Hi Josip, I found several glitches in sources for binary-search-trees and have corrected most of them. A new version of CL-containers is now up on the web (and asdf-installable). On Jul 9, 2007, at 5:36 AM, Josip Gracin wrote: > (let ((c (make-container 'priority-queue-on-container))) > (insert-item c 2) > (insert-item c 1) > (insert-item c 3) > (delete-element c 2)) -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From gracin at tel.fer.hr Wed Jul 18 20:51:29 2007 From: gracin at tel.fer.hr (Josip Gracin) Date: Wed, 18 Jul 2007 22:51:29 +0200 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: <0A186E42-94EF-452D-9ED7-C3698B4DCA40@metabang.com> References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> <46920186.4070802@tel.fer.hr> <0A186E42-94EF-452D-9ED7-C3698B4DCA40@metabang.com> Message-ID: <469E7D51.8040104@tel.fer.hr> Hi! Hate to be the one who always carries bad news, but... :-) Here's a test that fails with an exception in delete-first. Cl-containers fresh from asdf-install, SBCL 1.0.7.19. (addtest (test-priority-queue-on-container) add-and-delete-first (let ((c (make-container 'priority-queue-on-container))) (insert-item c 2) (insert-item c 1) (insert-item c 3) (delete-first c) (ensure-same (size c) 2 :test '=) (ensure-same (first-element c) 2))) Cheers! From gwking at metabang.com Thu Jul 19 12:03:11 2007 From: gwking at metabang.com (Gary King) Date: Thu, 19 Jul 2007 08:03:11 -0400 Subject: [cl-containers-devel] Problems with priority queues In-Reply-To: <469E7D51.8040104@tel.fer.hr> References: <463105B8.5000806@tel.fer.hr> <3CFB2150-4BD2-470B-853C-F67C3C7EFF68@metabang.com> <4631813E.30001@tel.fer.hr> <46920186.4070802@tel.fer.hr> <0A186E42-94EF-452D-9ED7-C3698B4DCA40@metabang.com> <469E7D51.8040104@tel.fer.hr> Message-ID: <5E98EB76-8402-4B56-A90A-922A587C3498@metabang.com> > Hate to be the one who always carries bad news, but... :-) All news is good news! Thanks for the report (and the test case!); I sort of figured that there remained some underlying gunk. I'll try to take care of this by the weekend. > Here's a test that fails with an exception in delete-first. Cl- > containers fresh from asdf-install, SBCL 1.0.7.19. > > > (addtest (test-priority-queue-on-container) > add-and-delete-first > (let ((c (make-container 'priority-queue-on-container))) > (insert-item c 2) > (insert-item c 1) > (insert-item c 3) > (delete-first c) > (ensure-same (size c) 2 :test '=) > (ensure-same (first-element c) 2))) > > > Cheers! > > _______________________________________________ > cl-containers-devel mailing list > cl-containers-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-containers-devel -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM