From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: expose XHASH [patch] Date: Fri, 8 Apr 2016 18:08:41 +0200 Message-ID: References: <56FDA815.2090801@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1460131741 28414 80.91.229.3 (8 Apr 2016 16:09:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2016 16:09:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 08 18:09:00 2016 Return-path: Envelope-to: ged-emacs-devel@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 1aoYxt-0006fP-V0 for ged-emacs-devel@m.gmane.org; Fri, 08 Apr 2016 18:08:58 +0200 Original-Received: from localhost ([::1]:56991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoYxt-00021k-9i for ged-emacs-devel@m.gmane.org; Fri, 08 Apr 2016 12:08:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoYxf-00020O-2J for emacs-devel@gnu.org; Fri, 08 Apr 2016 12:08:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoYxe-0001DD-6g for emacs-devel@gnu.org; Fri, 08 Apr 2016 12:08:43 -0400 Original-Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:33582) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoYxe-0001Cy-1q for emacs-devel@gnu.org; Fri, 08 Apr 2016 12:08:42 -0400 Original-Received: by mail-oi0-x22b.google.com with SMTP id w85so141644382oiw.0 for ; Fri, 08 Apr 2016 09:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=Ham4VCYY6fUZOn5xHJEkSTzf9qUx98Yg1+ITqDCDEqM=; b=E665qVv88hj32Q/MEXegHiaPnPsfMgUb54gM+nz5su2ns9gRX5m9zWZ7hMawX5qyMr DAkXNEkn1HYIAFzIHkevBoyuRi02zDcXUTdi1TxYDqJgt09xA/c39xP+OTfLtbbRsms5 7aVCIxhZlujYTVcQpGYlZvWdUHeo/KcEQbMBJX97ct3yU/s64LAoFTUHhyiFXCeBZNkY cFkKZp4y/1tP4ulaWmYiIZxEpE2FV3JmLq6wS77zWqsyAyKtXbYqR7op/FH2JQ4a4oDc 7BpkNdN4oep53ND8d6bnX+btCki4fpjBPRz8Umn7k+NuUyTNTPEoFWKALt7DqtDVFt/b hv2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=Ham4VCYY6fUZOn5xHJEkSTzf9qUx98Yg1+ITqDCDEqM=; b=lMF2UI5b/WyRsgPJtHbd09JbkR3hguEyelb2n+737PFQe9qzLbazu1qhl7u9dB1ovf daHQwTvTbhfrfhVhzkRDRe68Ngo3uUNdPBgUs+QZbWDPRuB/QZv1r2ve7OU41yTKHIXo AVqplfxUf/9ubb0oCwWOakiZ3pqdNDCB2DPNU/U/WdMbSbUf7R0/TJzYyfGN7H+wUj5V z06am/Z8qCcraULszTikjLczavRd+WDofAHK+A/sHUfOejLC0OM1vnxOakoTNCqIhe4W uzrLq7dxKw/jm6dbpnkq1ua/BRmh7Gqj0A0xBIcqZHnXfS4CgrTXvJ72SSA1y0y9lkMG bLwA== X-Gm-Message-State: AD7BkJIb06XhKfKnghIbgj4XE13bUfcaFVGtVZUyB7B4bJQPLT1s8eEixV3g8ucJu1Ux00h5ppuk413JaVNp2A== X-Received: by 10.157.20.161 with SMTP id d30mr4940558ote.165.1460131721481; Fri, 08 Apr 2016 09:08:41 -0700 (PDT) Original-Received: by 10.202.197.148 with HTTP; Fri, 8 Apr 2016 09:08:41 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:202814 Archived-At: Ping about the patch. I have no write access to the repository, so I cannot install it myself. Also, would be nice if someone installed maphash documentation patch. Paul On 2 April 2016 at 13:52, Paul Pogonyshev wrote: > Second patch iteration, taking into account all comments by Paul Eggert. > > Paul > > > > > * src/fns.c (Fsxhash_eq, Fsxhash_eql): New functions. > > * doc/lispref/hash.texi (Defining Hash): Document 'sxhash-eq' and 'sxhash-eql'. > > * etc/NEWS: Mention 'sxhash-eq' and 'sxhash-eql'. > > On 1 April 2016 at 11:44, Paul Pogonyshev wrote: >> Paul Eggert wrote: >>> The documentation for the new function should be next to the documentation for sxhash. >> >> I just skipped all the examples related to 'sxhash'. But I don't mind. >> >>> Shouldn't we expose hashfn_eq, not XHASH? After all, (make-hash-table :test 'eq ...) uses hashfn_eq, not XHASH. >> >> Probably you are right. I don't know the internal details well enough >> to comment on this. >> >>> Should we also expose hashfn_eql, which is what make-hash-table uses by default? Or is that a waste of time since hashfn_eql is the default? >> >> I'd say expose it too, at least for the cases of composite hashing as >> in my example. >> >>> Not sure I like the name xhash. Maybe sxhash-eq instead? That would let us use the name sxhash-eql for hashfn_eql. >> >> I tried to keep familiar names (at least for those who work on C >> code), but if we change that to 'hashfn_eq' and additionally expose >> something for 'eql', I guess your idea is better. >> >> I'll wait if more comments on these points appear before creating next >> patch iteration. >> >> Paul