From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: rigorously predictable random numbers
Date: Thu, 2 May 2024 20:48:20 -0700 [thread overview]
Message-ID: <91cc2797-db97-41d4-a06b-207532ec13f4@eastlink.ca> (raw)
In-Reply-To: <3a1ecefa-b0f9-4e63-bbf2-bf4dc2822090@app.fastmail.com>
[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]
On 2024-05-02 20:09, Lawrence Velázquez wrote:
> The values of RANDOM form an intentionally-repeatable
> pseudo-random sequence; subshells that reference RANDOM
> will result in identical pseudo-random values unless the
> value of RANDOM is referenced or seeded in the parent shell
> in between subshell invocations.
Ok then at least this is intentional. How does one obtain a genuinely
random number then? TBH, for my particular needs right now the standard
behavior is perfect, but as a matter of principle I'd like to know how
to get 'real' random numbers. There will be a way.
> There are no other shells, other than the $(...) subshells. You
> are using the "." command, which sources the given script in the
> current shell.
Yes, pardon. I get it mixed up with $( ) and with piping.
> https://www.zsh.org/mla/workers/2015/msg00549.html
> https://www.zsh.org/mla/workers/2017/msg00586.html
> https://www.zsh.org/mla/users/2017/msg00618.html
> https://www.zsh.org/mla/workers/2019/msg00887.html
> https://www.zsh.org/mla/workers/2023/msg00012.html
> https://www.zsh.org/mla/workers/2023/msg00208.html
> https://www.zsh.org/mla/users/2023/msg00475.html
>
How do you do that? It would save a lot of repetition if I could
research the archives myself. Such a resource, but inaccessible --
tho you seem to know how. It bothers me to ask a question that I know
has been asked before.
[-- Attachment #2: Type: text/html, Size: 3125 bytes --]
next prev parent reply other threads:[~2024-05-03 3:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-03 1:23 Ray Andrews
2024-05-03 3:09 ` Lawrence Velázquez
2024-05-03 3:48 ` Ray Andrews [this message]
2024-05-03 4:58 ` Roman Perepelitsa
2024-05-03 13:14 ` Ray Andrews
2024-05-20 17:41 ` Kannan Varadhan
2024-05-20 18:01 ` Roman Perepelitsa
2024-05-20 19:14 ` Kannan Varadhan
2024-05-20 19:40 ` Roman Perepelitsa
2024-05-20 22:56 ` Bart Schaefer
2024-05-21 15:43 ` Mark J. Reed
2024-05-24 22:49 ` Bart Schaefer
2024-05-03 5:40 ` Lawrence Velázquez
2024-05-03 12:51 ` Ray Andrews
2024-05-03 13:36 ` Clinton Bunch
2024-05-03 13:58 ` Ray Andrews
2024-05-03 23:42 ` Lawrence Velázquez
2024-05-04 0:28 ` Bart Schaefer
2024-05-04 1:32 ` Ray Andrews
2024-05-05 6:17 ` Lawrence Velázquez
2024-05-05 15:35 ` Bart Schaefer
2024-05-04 1:19 ` Ray Andrews
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91cc2797-db97-41d4-a06b-207532ec13f4@eastlink.ca \
--to=rayandrews@eastlink.ca \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).