From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#9118: 23.3.50; Don't seed the RNG in message-unique-id Date: Wed, 20 Jul 2011 10:12:12 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1311128008 14098 80.91.229.12 (20 Jul 2011 02:13:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 20 Jul 2011 02:13:28 +0000 (UTC) Cc: Lars Magne Ingebrigtsen To: 9118@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 20 04:13:24 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QjMHp-0004eD-Pv for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Jul 2011 04:13:22 +0200 Original-Received: from localhost ([::1]:33800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjMHo-000478-Bp for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Jul 2011 22:13:20 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjMHa-00046H-Ak for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2011 22:13:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjMHZ-0001TI-3d for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2011 22:13:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjMHZ-0001TA-0W for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2011 22:13:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QjMHV-0003wG-Ma; Tue, 19 Jul 2011 22:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 20 Jul 2011 02:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9118 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: wontfix Original-Received: via spool by 9118-submit@debbugs.gnu.org id=B9118.131112795415103 (code B ref 9118); Wed, 20 Jul 2011 02:13:01 +0000 Original-Received: (at 9118) by debbugs.gnu.org; 20 Jul 2011 02:12:34 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QjMH3-0003vY-8z for submit@debbugs.gnu.org; Tue, 19 Jul 2011 22:12:33 -0400 Original-Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QjMH1-0003vL-83 for 9118@debbugs.gnu.org; Tue, 19 Jul 2011 22:12:32 -0400 Original-Received: by iwn39 with SMTP id 39so4330766iwn.3 for <9118@debbugs.gnu.org>; Tue, 19 Jul 2011 19:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=WaPhywoVvttHOeCUhCrzJ6dlVaRAeKLj97dfM7HjMk4=; b=Hn5ue9eVjOtgRVhJUojgS0DURcn98wqxzC72kuyldHd6cBtLoWHvL+rJcpq8ehKbuD asjLFBeXsXGJqgFpaSoyEM2jhwIPqDGCvEH7xky//mtn2rgT6mMw/9yRLqgqI99CJBvC 0Luy8r3l8N56swNfeaWjEXwA94q1R4NAq+BQk= Original-Received: by 10.231.119.67 with SMTP id y3mr7306567ibq.155.1311127945494; Tue, 19 Jul 2011 19:12:25 -0700 (PDT) Original-Received: from localhost ([114.247.10.73]) by mx.google.com with ESMTPS id q4sm3979548ibb.49.2011.07.19.19.12.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Jul 2011 19:12:24 -0700 (PDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Tue, 19 Jul 2011 17:49:19 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.8) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 19 Jul 2011 22:13:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49457 Archived-At: On 2011-07-19 23:49 +0800, Lars Magne Ingebrigtsen wrote: > Once per package? That means that it's called many times in a single > Emacs session, so I don't really see the problem. Only at the time of loading a package and only a package or two in the following do I use. After loading the packages, they won't change the rng any more. But calling (random t) every time a function is called just gets in the way, that means I am no longer getting a uniform distribution from the RNG. Also (random t) is much more predictable. ,---- | ChangeLog.6:6494: (life): Do (random t) only once and only when `life' is called. | allout-widgets.el:1351:;; (random t) | calc/calc-comb.el:575: (random t) | gnus/message.el:4788: (format "%x%x%x" (random) (random t) (random)) | gnus/message.el:5494: (% (1+ (or message-unique-id-char (logand (random t) (1- (lsh 1 20))))) | net/sasl.el:186: (% (1+ (or sasl-unique-id-char (logand (random t) (1- (lsh 1 20))))) | org/org-id.el:322: (random t) | play/5x5.el:957:(random t) | play/animate.el:204:(random t) | play/blackbox.el:260: (random t) | play/cookie1.el:57:(random t) | Binary file play/cookie1.elc matches | play/dissociate.el:97:(random t) | play/doctor.el:1620:(random t) | play/dunnet.el:3013:(random t) | play/gomoku.el:1200:(random t) | play/landmark.el:1686:(random t) | play/life.el:125: (random t)) | play/mpuz.el:38:(random t) ; randomize | play/tetris.el:639:(random t) | play/zone.el:683:(random t) | server.el:97: (when val (random t)) | type-break.el:584: (random t) `---- > This should really be fixed by Emacs calling `(random t)' at startup. That should leave for the user to do. Common Lisp also does no seeding at start up. Leo