Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92291

Re: Python Random vs. Cython C Rand for Dice Rolls

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@cdreimer.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.078
X-Spam-Evidence '*H*': 0.84; '*S*': 0.00; 'subject:Python': 0.05; 'python.': 0.11; 'decent': 0.16; 'remembered': 0.16; 'subject:Cython': 0.16; 'wrote:': 0.16; 'processor': 0.18; 'meant': 0.22; 'from:addr:chris': 0.22; 'am,': 0.23; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'chris': 0.26; 'converting': 0.27; 'received:dreamhost.com': 0.29; 'received:g.dreamhost.com': 0.29; 'received:10.0.0': 0.32; "d'aprano": 0.33; 'limitations': 0.33; 'steven': 0.33; 'received:10.0': 0.34; 'needed': 0.34; 'to:addr:python-list': 0.35; 'done': 0.35; 'basic': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'stuff': 0.38; 'to:addr:python.org': 0.39; 'term': 0.60; 'back': 0.61; 'even': 0.61; 'close': 0.61; 'day.': 0.63; 'charset:windows-1252': 0.65; 'subject:. ': 0.66; 'book,': 0.72; 'computers.': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed; d=cdreimer.com; h=message-id :date:from:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; s=cdreimer.com; bh=YRZ1 kwyX8wyIi6KSmV0TBJeQ5vc=; b=kUXtaT7MUfF90ehfHjp2HgViLQoVecKXLmks PWTks/LhEeYAn13FuS/exgGt9Cve/v+K33SrfQl1UZO9F5BsemXien+UpOySKN+O aBZXQLHd2IEjUEcmCdwSzB0B+eq6xUkGlgN2dPqG9RKvCquOaJd9ExJkN1TdAyvJ fEPUId0=
Date Sun, 07 Jun 2015 11:56:16 -0700
From "C.D. Reimer" <chris@cdreimer.com>
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Python Random vs. Cython C Rand for Dice Rolls
References <mailman.262.1433697446.13271.python-list@python.org> <55748e6d$0$13008$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <55748e6d$0$13008$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.273.1433703386.13271.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433703386 news.xs4all.nl 2832 [2001:888:2000:d::a6]:54955
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92291

Show key headers only | View raw


On 6/7/2015 11:33 AM, Steven D'Aprano wrote:
> C rand is not even close to random. The technical term for it is "shite".

Looking through the BASIC book, I remembered all the tricks needed to 
get a half-way decent number generator on a 1MHz processor back in the 
day. Either the numbers start repeating after a while or get stuck on a 
particular number. That's one of the challenges of converting these old 
games from BASIC to Python. A lot of the stuff done in BASIC was meant 
to get around the hardware limitations of the early computers.

Chris R.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python Random vs. Cython C Rand for Dice Rolls "C.D. Reimer" <chris@cdreimer.com> - 2015-06-07 10:17 -0700
  Re: Python Random vs. Cython C Rand for Dice Rolls Steven D'Aprano <steve@pearwood.info> - 2015-06-08 04:33 +1000
    Re: Python Random vs. Cython C Rand for Dice Rolls "C.D. Reimer" <chris@cdreimer.com> - 2015-06-07 11:56 -0700
    Re: Python Random vs. Cython C Rand for Dice Rolls Laura Creighton <lac@openend.se> - 2015-06-08 19:33 +0200
    Re: Python Random vs. Cython C Rand for Dice Rolls Sturla Molden <sturla.molden@gmail.com> - 2015-06-08 23:44 +0200

csiph-web