From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: random doesn't feel very random Date: Fri, 24 Aug 2012 14:30:53 +0800 Message-ID: References: <876288yh72.fsf@kanis.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1345789874 1267 80.91.229.3 (24 Aug 2012 06:31:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Aug 2012 06:31:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 24 08:31:15 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 1T4nQI-0005yn-Sj for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2012 08:31:15 +0200 Original-Received: from localhost ([::1]:41962 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4nQH-00022J-7m for ged-emacs-devel@m.gmane.org; Fri, 24 Aug 2012 02:31:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4nQE-000221-FS for emacs-devel@gnu.org; Fri, 24 Aug 2012 02:31:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4nQA-0002HU-Lt for emacs-devel@gnu.org; Fri, 24 Aug 2012 02:31:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4nQA-0002Fh-Eo for emacs-devel@gnu.org; Fri, 24 Aug 2012 02:31:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T4nQ7-0005kh-Iz for emacs-devel@gnu.org; Fri, 24 Aug 2012 08:31:03 +0200 Original-Received: from 124.248.202.119 ([124.248.202.119]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2012 08:31:03 +0200 Original-Received: from sdl.web by 124.248.202.119 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2012 08:31:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 20 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 124.248.202.119 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (OS X 10.8) Cancel-Lock: sha1:Dc7mVwSYoIPhvxDqKqRaa8RJ0Z8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:152787 Archived-At: On 2012-08-24 13:47 +0800, Ivan Kanis wrote: > I am using random for generating music play list. I have found that it > is not random enough. It keeps playing the same tracks. > > I have even wrote a cache of recently played tracks so that it tries > harder. Obviously it's a band aid. > > Yes I am just talking about "feeling" here. I don't know how to prove > that random does not work. Is it even possible? > > On a side note are we using /dev/random? That is probably because we have only one global random state and many packages reset it from time to time (see message-unique-id). No we are not using /dev/random and should not be. Ideally we should call (random t) only once or allow multiple random states. Leo