From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#39634: All keyowrds hash to the same value Date: Thu, 20 Feb 2020 17:19:18 +0100 Message-ID: <875zg19qpl.fsf@gnu.org> References: <87wo8mcs1j.fsf@trouble.defaultvalue.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="13610"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 39634@debbugs.gnu.org, Andy Wingo To: Rob Browning Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Feb 20 17:22:40 2020 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4ob2-0003SH-Aj for guile-bugs@m.gmane-mx.org; Thu, 20 Feb 2020 17:22:40 +0100 Original-Received: from localhost ([::1]:45438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4ob1-0001DU-C0 for guile-bugs@m.gmane-mx.org; Thu, 20 Feb 2020 11:22:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56225) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4oYV-0006QV-Vd for bug-guile@gnu.org; Thu, 20 Feb 2020 11:20:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4oYU-0000Wn-Rh for bug-guile@gnu.org; Thu, 20 Feb 2020 11:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39712) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4oYU-0000Wi-Ni for bug-guile@gnu.org; Thu, 20 Feb 2020 11:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4oYU-0004E2-Jo for bug-guile@gnu.org; Thu, 20 Feb 2020 11:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 20 Feb 2020 16:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39634 X-GNU-PR-Package: guile Original-Received: via spool by 39634-submit@debbugs.gnu.org id=B39634.158221556916193 (code B ref 39634); Thu, 20 Feb 2020 16:20:02 +0000 Original-Received: (at 39634) by debbugs.gnu.org; 20 Feb 2020 16:19:29 +0000 Original-Received: from localhost ([127.0.0.1]:45685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4oXx-0004D7-4u for submit@debbugs.gnu.org; Thu, 20 Feb 2020 11:19:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4oXv-0004Ck-4f for 39634@debbugs.gnu.org; Thu, 20 Feb 2020 11:19:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j4oXp-0000Jr-H2; Thu, 20 Feb 2020 11:19:21 -0500 Original-Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47690 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j4oXo-0001zK-Ps; Thu, 20 Feb 2020 11:19:21 -0500 In-Reply-To: <87wo8mcs1j.fsf@trouble.defaultvalue.org> (Rob Browning's message of "Sun, 16 Feb 2020 12:20:56 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.io gmane.lisp.guile.bugs:9594 Archived-At: Hi Rob, Rob Browning skribis: >>>From b380102564aad053f22586eb404e99c82635a3b0 Mon Sep 17 00:00:00 2001 > From: Rob Browning > Date: Sun, 16 Feb 2020 12:12:08 -0600 > Subject: [PATCH 1/1] Implement hashing for keywords, i.e. (hash #:x ...) > > Add keyword handling to (hash ...). Previously it would just return the > same value for all keywords. > > * libguile/hash.c (scm_raw_ihash): Add scm_tc7_keyword case. > > * libguile/keywords.h (SCM_I_KEYWORD_HASH): New macro. LGTM, please push! Andy and I discussed it on IRC and despite the fact that it=E2=80=99s an ABI change, we thought including the fix in 3.0.1 was probably the better option. Of all the scm_tc7_ values listed in =E2=80=98scm.h=E2=80=99, the following= are not explicitly listed (so they go to the default case that hashes the first word): variable, hashtable, fluid, stringbuf, dynamic_state, frame, atomic_box, values, program, vm_cont, bytevector, weak_set, weak_table, array, bitvector, port So for example all input file ports hash to the same value, all 3-element bytevectors hash to the same value, etc. We can probably omit stringbuf, dynamic_state, and values, but the rest should probably be fixed. WDYT, Andy? Thanks, Ludo=E2=80=99.