Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Fair, truly random random number generator Date: Fri, 04 Nov 2016 11:55:58 -0700 Organization: None to speak of Lines: 32 Message-ID: References: <37481339-6cc2-4bef-b550-4c868b3159d2@googlegroups.com> <01bf1ea3-23bf-4c46-8d1e-506ad6dbfa81@googlegroups.com> <581ccbda.4974046@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="6f57f3023f7434c61f7dba030433622e"; logging-data="7575"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tZSl0jOdC2SQLZos/BQtu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:9oJ2suDiwNiLY0pj46uypt9k3q4= sha1:UC7GXKjEo/P1wjL3l8ToZ9kCWHs= Xref: csiph.com comp.lang.c:95787 raltbos@xs4all.nl (Richard Bos) writes: > Keith Thompson wrote: >> "Chris M. Thomasson" writes: >> [...] >> > This is why I think race-conditions in multi-threaded programs can be >> > considered random in the sense that its damn near impossible to hit a >> > defined period of repetition. >> >> That's not all that "random" means. It might be very difficult to >> predict the next -- well, whatever numeric value you might derive from a >> race condition. But if it's possible to make *some* prediction at rates >> better than chance, it's not random. > > That would mean that a stochastic, but bell-shaped distribution isn't > random. I don't think you're entirely wrong, but you're not entirely > right, either. Agreed. What I should have said is that multithreaded timings might be difficult to predict, but that doesn't make them *usefully* random. There might be ways to generate, say, linearly distributed pseudo-random numbers from the timings, but I'd be afraid that someone might find a way to predict the results. The word "random" is too often used as a synonym for "arbitrary". [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"