From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31159 invoked from network); 22 Nov 2022 17:44:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Nov 2022 17:44:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:Reply-To:Cc: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=X+YQosKruuFgOPHkoMaGAOVKa7GOy3NvcrVsX4t891o=; b=rr1MGDemBJOV5c8U4Bqo82/eHO JM46rDcLdypgUDkGVrujS+XMJUd6s7WAQNyp/ntIXFM3+VQ+tSDGVbI7kPqWA90bzfcjKgzgAP9Kn y+MtFmN5yr4ORQ1YpB9bu2Ps+8MPLTjAoJbT15L54PDm0++OnL1AfDIeFw1yFQPFixiJVLlBDX+75 R69QfW4fQf+u5pCW6vSvkKGfIpjfaQ0VTj5+nPjXFlaGT2IWxgenKBvGQshx+UxzoYnV4mUov4Xr5 mdZU5FQ05nqSLZeGJk24j2eYYYyCvhAUf2isIfDDLnC1/9A31Sa6hpBUBi484gbIHND1wsK8OkQoy LzgdOFww==; Received: by zero.zsh.org with local id 1oxXK2-00035k-Ox; Tue, 22 Nov 2022 17:44:38 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oxXJk-0002ly-Cq; Tue, 22 Nov 2022 17:44:20 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1oxXJj-000F6M-7h; Tue, 22 Nov 2022 18:44:19 +0100 In-reply-to: From: Oliver Kiddle References: <741b77be-b679-76cc-f8ec-49c9d89323c1@zentaur.org> <1e8ea669-7a25-b321-6024-72dbc43ac023@zentaur.org> <41205a86-8aad-4821-baa4-1d2ac9bf3c5d@app.fastmail.com> <1b2cafe6-b4b5-c59a-11f3-4dbc1e99e2bc@zentaur.org> <6275a5ac-3a47-f591-7b3c-380ec4fed5ac@zentaur.org> <3423b634-a7c3-9efc-92cd-b9b995ac1c27@zentaur.org> <30a7e749-7f30-ecae-6479-a345b1682e7f@zentaur.org> To: Clinton Bunch , zsh-workers@zsh.org Subject: Re: [PATCH] zsh/random module [UPDATED] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <58052.1669139059.1@hydra> Date: Tue, 22 Nov 2022 18:44:19 +0100 Message-ID: <58053-1669139059.235596@kmQr.TTfz.Qbdo> X-Seq: 51025 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Firstly, thanks for your work on this Clinton and for being patient with us. Bart Schaefer wrote: > 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". Bash appears to have an SRANDOM and if this is compatible with that then I'd see no issue with having that feature autoload the module. The builtin's option letter API looks good to me. If we're going to quibble about naming, many of our modules use 'z' prefixes on their builtins so I'd favour zrandom for the builtin too. The use of "get" and "set" in naming is often superfluous and "get" implies the fetching of something that already exists rather than of something that needs to be created. What issue do you see with "zrandom" on the math function? Most of the existing math functions correspond fairly closely to libc counterparts. Distinguishing it from those seems reasonable. The question of why $RANDOM isn't backed by some secure modern and fancy implementation seems to come up roughly yearly. It's not a feature I use especially often and I certainly don't care, either about stability or security, on the rare occasion I use *(oe:REPLY=\$RANDOM:) to shuffle a few mp3 files when playing them. Neither would I have any special attachment to the existing $RANDOM implementation if it was changed in a compatible way. Given that it can be autoloaded, could we move $RANDOM to the module too? Oliver