From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: random doesn't feel very random Date: Sun, 02 Sep 2012 09:08:13 -0400 Message-ID: References: <876288yh72.fsf@kanis.fr> <87wr0livd4.fsf@Rainer.invalid> <83k3wfqtyx.fsf@gnu.org> <83vcfzosri.fsf@gnu.org> <5041626B.6080608@cs.ucla.edu> <87harirz13.fsf@Rainer.invalid> <87627wsj83.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346591301 26648 80.91.229.3 (2 Sep 2012 13:08:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2012 13:08:21 +0000 (UTC) Cc: Achim Gratz , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 02 15:08:23 2012 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 1T89uY-0005L8-QQ for ged-emacs-devel@m.gmane.org; Sun, 02 Sep 2012 15:08:22 +0200 Original-Received: from localhost ([::1]:48506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T89uV-0000Ie-I0 for ged-emacs-devel@m.gmane.org; Sun, 02 Sep 2012 09:08:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T89uT-0000IX-6x for emacs-devel@gnu.org; Sun, 02 Sep 2012 09:08:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T89uS-0001Ml-Br for emacs-devel@gnu.org; Sun, 02 Sep 2012 09:08:17 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:42871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T89uS-0001MU-7O; Sun, 02 Sep 2012 09:08:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxKEe/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="197298722" Original-Received: from 69-196-161-30.dsl.teksavvy.com (HELO pastel.home) ([69.196.161.30]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 02 Sep 2012 09:08:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 946DF59407; Sun, 2 Sep 2012 09:08:13 -0400 (EDT) In-Reply-To: <87627wsj83.fsf@gnu.org> (Jason Rumney's message of "Sun, 02 Sep 2012 20:27:24 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152949 Archived-At: >>> One thing that wasn't discussed was how to set the >>> seed, for people who want to do debugging and who want >>> repeatable random sequences. >> I don't think it's a good idea to be able to change the global PRNG >> state in general. > For some uses of pseudo-random numbers, repeatability is desirable. Other than debugging, such repeatability needs generally imply the need to use a separate PRNG, rather than the global one. > Not every problem that requires randomness involves security. Lack of repeatability is a feature that's not only needed by security, but by the need to behave differently each time, otherwise the user gets bored. And AFAICT, all uses of `random' in Elisp currently fall in this camp. Stefan