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

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



On Wed 23 Nov 2022, at 17:54, Daniel Shahaf wrote:
> Well, agreed on that last sentence, but note that «-c 1» in the patch
> means one byte, not one nibble.

Right, i misspoke

On Wed 23 Nov 2022, at 17:54, Daniel Shahaf wrote:
> But 1 /is/ the default for integer mode, and I don't think anyone
> proposed to change that?  Rather, it was proposed to change the default
> for bytes mode from 4 bytes (8 nibbles) to 1 byte.  Do you reckon
> requesting 4 bytes
> should be the default for that mode, as opposed to, say, 1, 2, 8, or 64
> bytes?

The default for all modes was initially 8, so i was thinking of that as a
counter-proposal to them all being 1 as mentioned in the previous paragraph. I
think that no matter which number you choose, if you make it the same for all
modes, there's going to be at least one mode where it does something that is
rarely (or less) useful, like returning a single byte in raw or hex mode. But
i don't know how you'd quantify the usefulness of any particular alternative,
so i guess i'm just thinking out loud

On Wed 23 Nov 2022, at 17:54, Daniel Shahaf wrote:
> To be clear, it's not 1/1.9M, which is about the probability of a random
> Londoner being at 10 Downing Street right now.  It's 1/[10 ** 1.9M],
> which is about the probability of correctly guessing the genders of all
> Londoners.

That sounds very nearly impossible to me

dana




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