Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.123 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.05; 'importing': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'random': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'fairly': 0.24; 'math': 0.24; 'order.': 0.26; 'header:X-Complaints-To:1': 0.27; 'tried': 0.27; 'function': 0.29; 'array': 0.29; 'sep': 0.31; 'front': 0.32; 'fri,': 0.33; 'implemented': 0.33; 'charset:us- ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'dave': 0.60; 'ago,': 0.61; 'took': 0.61; 'course': 0.61; 'granted': 0.65; 'relatively': 0.65; 'between': 0.67; 'safe': 0.72; 'scheduling': 0.84; 'angel': 0.91; 'processes,': 0.91; 'subject:card': 0.93; '2013': 0.98 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re: card dealer Date: Fri, 27 Sep 2013 21:00:52 +0000 (UTC) References: <0617088e-5aa3-4c5d-b660-22040ee858a1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 174.32.174.35 User-Agent: XPN/1.2.6 (Street Spirit ; Linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380315681 news.xs4all.nl 15909 [2001:888:2000:d::a6]:37751 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54911 On 27/9/2013 12:10, Denis McMahon wrote: > On Fri, 27 Sep 2013 12:08:33 +0000, Dave Angel wrote: > >> i recall >> writing a shuffle function in C decades ago, which took an array of (52) >> unique items and put them in random order. > > Whenever I tried to write shuffles I came up against a fairly fundamental > limit: > > 52! > prng states > > Granted prngs seem to be better on the importing entropy from elsewhere > front these days. > in 1978, I implemented a random number generator that the OS sequenced through between scheduling processes, so that any individual process would be relatively safe from that phenomenon. Of course I was limited to the precision of the math package - 10**13 -- DaveA