From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: Which hashtable API to use? Date: Fri, 16 Aug 2013 17:00:17 -0700 Message-ID: <6F416076-292A-4178-BB2F-C1769BBF28FF@alumni.caltech.edu> References: <520E0F3E.8060509@gmx.com> <435D291C-3BE1-4F7C-9A23-E8A803F981C8@alumni.caltech.edu> <520E2A26.90009@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1376697647 25144 80.91.229.3 (17 Aug 2013 00:00:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Aug 2013 00:00:47 +0000 (UTC) Cc: guile-user@gnu.org To: Alexandru Cojocaru Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Aug 17 02:00:49 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VATwm-0007Es-US for guile-user@m.gmane.org; Sat, 17 Aug 2013 02:00:49 +0200 Original-Received: from localhost ([::1]:33581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VATwm-0004Oi-AH for guile-user@m.gmane.org; Fri, 16 Aug 2013 20:00:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VATwX-0004OO-HY for guile-user@gnu.org; Fri, 16 Aug 2013 20:00:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VATwP-0008Vv-T8 for guile-user@gnu.org; Fri, 16 Aug 2013 20:00:33 -0400 Original-Received: from vms173025pub.verizon.net ([206.46.173.25]:33402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VATwP-0008Vd-Mz for guile-user@gnu.org; Fri, 16 Aug 2013 20:00:25 -0400 Original-Received: from [192.168.2.138] ([unknown] [96.247.67.218]) by vms173025.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0MRN00A7BEO8I580@vms173025.mailsrvcs.net> for guile-user@gnu.org; Fri, 16 Aug 2013 19:00:09 -0500 (CDT) In-reply-to: <520E2A26.90009@gmx.com> X-Mailer: Apple Mail (2.1283) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.46.173.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10644 Archived-At: guile> (define ht (make-hash-table 7)) guile> (hash-set! ht "matt" "awesome") "awesome" guile> (hashq-ref ht "matt") #f guile> (hash-ref ht "matt") "awesome" On Aug 16, 2013, at 6:33 AM, Alexandru Cojocaru wrote: > Ok, I got it. Basicaly if I do `(hash '(a) 3)' I'll always get the = same hash because it uses the contents of the list, > while if I do `(hashq '(a) 3)' I may get different hashes because it = uses the list's pointer address. >=20 > On 16.08.2013 14:47, Matt Wette wrote: >> WIth respect to your second question: hash table operations can = compare keys with equal?, eq?, or eqv?. >> Which one do you want to use? >>=20 >> On Aug 16, 2013, at 4:38 AM, Alexandru Cojocaru wrote: >>=20 >>> Hi, >>> currently there are three hashtable APIs: R6RS, SRFI-69 and Guile's = one. >>> Which one to choose? >>>=20 >>> Also what's exactly the difference between hash, hashq and hashv? >>>=20 >>> Best regards, >>> Alexandru Cojocaru >>>=20 >=20