From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.bugs Subject: bug#58472: [PATCH] Make `message-unique-id' less prone to collisions Date: Sun, 16 Oct 2022 23:17:28 -0700 Message-ID: <87wn8zas93.fsf@rfc20.org> References: <871qr794o2.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11355"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58472@debbugs.gnu.org To: Stefan Kangas , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 17 08:19:31 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1okJTH-0002kt-OU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Oct 2022 08:19:31 +0200 Original-Received: from localhost ([::1]:46224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okJTG-0003A6-GJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 17 Oct 2022 02:19:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okJRr-00037j-1H for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:18:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okJRq-00080j-OL for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okJRq-0006hd-9N for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 02:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Oct 2022 06:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58472 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 58472-submit@debbugs.gnu.org id=B58472.166598746425740 (code B ref 58472); Mon, 17 Oct 2022 06:18:02 +0000 Original-Received: (at 58472) by debbugs.gnu.org; 17 Oct 2022 06:17:44 +0000 Original-Received: from localhost ([127.0.0.1]:46928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okJRX-0006h5-OR for submit@debbugs.gnu.org; Mon, 17 Oct 2022 02:17:43 -0400 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:57397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okJRU-0006gp-KV for 58472@debbugs.gnu.org; Mon, 17 Oct 2022 02:17:41 -0400 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 05FC01BF207; Mon, 17 Oct 2022 06:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1665987454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IkhJmGuJuaYduBOztOC/SCunJx8ihKMQqISmvznp2oU=; b=XcmsZ8At6KV8Sbwxpm6aeypi+byc+Ddkqw45qzqcWf9wCBiTekGvSWQ4JX5/RHGBziq4mS +0IbGAdBgm5QVJrxwPquFlhsQCRPpjoO8cLxALRtqnWIwnOoZdONFbUNeZDAaGriX5+sAK xxDTiM1Y6HwT4QdpmvlMCJMCUCmdR+Vlj9lAEmwshy/F2yDMPCUOXOCCzVp+02ZUj1MMI1 L9GYI5lcg6L2vGpciha2G68JhIqQ1CaU9BdGkYk5F+tduCpvrXsnh3MnBd0FaYu6ks9nyl UJeTXqHhGIFYom6nKMo9rnFJmsyI28g7sw39VXYBM2AmR99wt9vezjqVvBq9Ng== Original-Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1okJRI-000tRi-2X; Sun, 16 Oct 2022 23:17:28 -0700 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245688 Archived-At: Stefan Kangas writes: > Matt Armstrong writes: > >> Can a string be turned into a non-negative bignum integer in >> (simple) elisp? > > Does this look reasonable? > > (seq-reduce (lambda (a i) (+ (ash a 8) i)) > (secure-hash 'md5 'iv-auto 128 nil t) 0) Yep, not too bad, thanks. -- matt (sent from an Emacs running the feature/noverlay branch)