From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gregory Marton Newsgroups: gmane.lisp.guile.bugs Subject: Re: [bug #22022] hashx-set! and -ref Date: Thu, 17 Jan 2008 16:54:53 -0500 (EST) Message-ID: References: <20080114-224004.sv59778.71865@savannah.gnu.org> <20080117-215218.sv185.60269@savannah.gnu.org> Reply-To: Gregory Marton NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: ger.gmane.org 1200670637 16295 80.91.229.12 (18 Jan 2008 15:37:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2008 15:37:17 +0000 (UTC) Cc: bug-guile@gnu.org, Neil Jerram To: Neil Jerram Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jan 18 16:37:35 2008 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JFtHT-00073U-R7 for guile-bugs@m.gmane.org; Fri, 18 Jan 2008 16:37:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFtH4-0004nZ-PN for guile-bugs@m.gmane.org; Fri, 18 Jan 2008 10:36:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFckn-0000P1-41 for bug-guile@gnu.org; Thu, 17 Jan 2008 16:58:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFckl-0000OZ-HB for bug-guile@gnu.org; Thu, 17 Jan 2008 16:58:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFckl-0000OV-CU for bug-guile@gnu.org; Thu, 17 Jan 2008 16:58:27 -0500 Original-Received: from outgoing.csail.mit.edu ([128.30.2.149]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFchf-00047B-2Z; Thu, 17 Jan 2008 16:55:15 -0500 Original-Received: from ashmore.csail.mit.edu ([128.30.44.32]) by outgoing.csail.mit.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JFchK-00047W-3E; Thu, 17 Jan 2008 16:54:54 -0500 Original-Received: from gremio (helo=localhost) by ashmore.csail.mit.edu with local-esmtp (Exim 4.50) id 1JFchJ-0002pP-Ut; Thu, 17 Jan 2008 16:54:53 -0500 In-Reply-To: <20080117-215218.sv185.60269@savannah.gnu.org> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-Mailman-Approved-At: Fri, 18 Jan 2008 10:36:45 -0500 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3707 Archived-At: Ack. I think I meant to replace assoc as well, with something like (lambda (k alist) (cdar alist)). My intention was to get it to give me back 'bar because the hash functions would accept anything, rather than because it was "right" in any sense. Sorry, Grem > Follow-up Comment #1, bug #22022 (project guile): > > I think I have a fix for the segfault, but now I'm seeing several other test > failures. Here's one... > > (pass-if (let ((table (make-hash-table))) > (hashx-set! (lambda (k v) 1) assoc table 'foo 'bar) > (equal? > 'bar (hashx-ref (lambda (k v) 1) assoc table 'baz)))) > > This one is wrong, isn't it? It sets an entry with key 'foo, then queries > the entry with key 'baz. So the result, correctly, is #f. What was your > intention here? > > > _______________________________________________________ > > Reply to this item at: > > > > _______________________________________________ > Message sent via/by Savannah > http://savannah.gnu.org/ > > -- ------ __@ Gregory A. Marton http://csail.mit.edu/~gremio/ --- _`\<,_ . -- (*)/ (*) A closed mouth gathers no foot. ~~~~~~~~~~~~~~~~-~~~~~~~~_~~~_~~~~~v~~~~^^^^~~~~~--~~~~~~~~~~~~~~~++~~~~~~~