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

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



On 11/20/2022 10:17 PM, Bart Schaefer wrote:
On Sun, Nov 20, 2022 at 7:16 PM Lawrence Velázquez <larryv@xxxxxxx> wrote:
The concern is about publishing (and thus committing to) a complex
API right out of the gate, only to later realize that it is inelegant

The only thing that feels inelegant about the getrandom command is the hex-string default, and I would welcome suggestions for a better default action.

On a side note, while implementing getrandom, I found myself wishing zsh implemented typeset -ia (and -Fa)

This could be addressed by NOT defining getrandom as an autoloaded
builtin, so that a user would have to explicitly name it with zmodload
-ab, and document it as experimental.
I was originally against autoloading, though I now think that SRANDOM should be, but I'm not opposed to getrandom and zrandom having to be explicitly loaded.

Actually this could be done with -ap for SRANDOM and -af for zrandom,
as well, but they're much simpler and the only reasonable quibble
might be with the name "zrandom".
Not tied to the name, but plain random felt wrong somehow.

Incidentally, Clinton, I didn't look closer at the patch before
because the use of ".patch" as a name suffix meant I had download it
and open it in an external editor instead of just perusing it along
with my email.

Yeah, after I posted, I saw you make a similar comment to someone else.  I'll use .txt next time.  Incidentally this suggestion might be a good candidate for inclusion in the developer's guide when pasting into the message is not desirable.





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