Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] zsh/random module [UPDATED]



On 11/24/2022 10:30 AM, Roman Perepelitsa wrote:
On Thu, Nov 24, 2022 at 5:20 PM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
To me, having $SRANDOM added to core zsh, and maybe a
randint(first, last) added to zsh/math would be more than
enough.
This is my opinion as well. These two facilities are easy to
understand, cover all use cases (even if requiring a bit of extra code
for the rare ones) and are easy to agree upon as far as the API is
concerned.

Roman.
If we move SRANDOM into zsh core, we'll need to define the behavior if urandom is not found.  The module fails to load if it doesn't find arc4random(), getrandom(), or /dev/urandom, but we can't do that if it's in core.






Messages sorted by: Reverse Date, Date, Thread, Author