Deutsch English Français Italiano |
<vqj3si$ei2k$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Rich <rich@example.invalid> Newsgroups: sci.crypt Subject: Re: lun - Lucky Number Date: Sun, 9 Mar 2025 04:02:27 -0000 (UTC) Organization: A noiseless patient Spider Lines: 30 Message-ID: <vqj3si$ei2k$1@dont-email.me> References: <vqg3sj$3q7rg$1@stefan.eternal-september.org> <vqi2io$8r9n$1@dont-email.me> <vqi2qe$90e8$1@stefan.eternal-september.org> <vqi3i4$95dd$1@stefan.eternal-september.org> <vqid0s$arf3$1@dont-email.me> <vqidkl$aqnb$1@dont-email.me> Injection-Date: Sun, 09 Mar 2025 05:02:39 +0100 (CET) Injection-Info: dont-email.me; posting-host="5aa0a10a67ed880b9a8bff36834f0523"; logging-data="477268"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RhWZyc46G4fQeFHBDZjnz" User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.139 (x86_64)) Cancel-Lock: sha1:68jPgOq9xGQBstB7oJ9AM0C5HfY= Bytes: 2047 Richard Heathfield <rjh@cpax.org.uk> wrote: > On 08/03/2025 21:32, Rich wrote: > > <snip> > >> Looking at the source, how does someone with pencil and paper perform >> this magic?: >> >> n, _ := rand.Int(rand.Reader, max) > > Roll some dice. > > d4 give you two bits at a time, d8 give you three, or d16 give > you four. Quick and easy. Or if you prefer decimal, d10s are also > readily available. True, that will work. Die for generating, pencil and paper for 'recording' the result. However, if one had pencil, paper, and no die anywhere? >> As well, with just pencil and paper, obtaining a Unix epoch is quite >> an interesting 'by hand' calculation in order to perform this: >> >> epochTime := time.Now().Unix() > > You can skip that part by pretending it's 1970. Very true. Although then the offset random number is also identical to the non-offset number. Not that the offset is actually doing anything.