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 24939 invoked from network); 11 Oct 2022 13:24:13 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Oct 2022 13:24:13 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1665494653; b=WuTq3bB/98wvD9ESLI+gXrMIQ4FkVmuszUxLc60g5R6QOZvi4nFW83rG8REa/WXYYQ87gWfFEd g4heUAD9BT+XsEpuLAZ2beidHqJd9qLgWq8n37i7tUHlfchgRJ6WxE1DubEshG68VxFdHEtJBg YoMylML3o484ec5Hu0IauXX+WBjXw2QiofT6pQuvmp0rqM7wkoVqVdIOlprB4rmRUevE2fDsiH Gf3Qursw9vc9w5r/BqWs19hdy9kUeVBm92Ajgfhy7J73ElugyBNlaGkVMOcnwVbY6Rfo7yIZRQ zFXIx3Bx26RWPl/mxIOTPIQ4cVOIltz8yXZDaj9jwWGKtg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1665494653; bh=c8gUCKjPknAx1TPFf+B/h2jsoMfZXn3KMD17CCdZuho=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject: References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature: DKIM-Signature; b=hDL+Qt9O7nIeaWoA63pSCch5Jfiibi5kH+nCOeVvKjQJSMVHVjdT3APlDzZdGQooIR0k7Ck0hV 1y5JneSVv5uq4vtSIbhU1tVG7sNCtslQo+qjYjqn7j+4WdMvRirLuIada+mlzf9cid2iV5mV6X GW9VJCQA4l+TCuFqseU0KPOQRcdf6qF/sxeDte4RY9XoUcDLiuMdDg0loxo54DuTKPHLy9Q5Hl unoYcJH/B3QMYDDzMN/Z1VJsQ9A/rKU9ciKNjycn4bDN9CG/hCd9jFDR6mJilHbVrz0OXmTfHR J7eDTIvkXkdSpit0n9A3HO5aRhwZpMVV9qQ5d1BM41e3UQ==; 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:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From: Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=4CcZdE0ldP3PVAAeP8C7bta4NKybgHqV3s3FVBzWU0Q=; b=RwWDsI6oQj9mmISt6lCiCPCCnl ctTdVrJ+sA+8JpN72DCSV43VGtUM/3dMSFceB742G5yqVvM2pkIYX8qxapKT9vtOBfSyfwwtcNORU aL/H+N2NYtl5DLpBShFY/KUJkVPbWTrAq4kfwKsJY9KT2+VRnGCJJ/i9mVqFwtKGFz+wQmyVVQd3I 4zzKCNWrJW9kFMyh+Znz/7KCFEA40bN3g7P2MswSwpH8bs+iKoAkaV74PhxFQsA28ChgZFobGlqGh iZoGoCCxl3CAiBPrKpOw6SUR/rGZr858WsOgPlqXxBipVE7522tv+6aRD0nk7SSNtXfHb0AEc8FJZ ePtExK+A==; Received: by zero.zsh.org with local id 1oiFEz-000ECK-9v; Tue, 11 Oct 2022 13:24:13 +0000 Authentication-Results: zsh.org; iprev=pass (smtpq2.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.97; dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256; dmarc=pass header.from=ntlworld.com; arc=none Received: from smtpq2.tb.ukmail.iss.as9143.net ([212.54.57.97]:59190) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oiFEi-000DrN-1r; Tue, 11 Oct 2022 13:23:57 +0000 Received: from [212.54.57.82] (helo=smtp3.tb.ukmail.iss.as9143.net) by smtpq2.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1) (envelope-from ) id 1oiFEh-0005S5-NW for zsh-workers@zsh.org; Tue, 11 Oct 2022 15:23:55 +0200 Received: from oxbe7.tb.ukmail.iss.as9143.net ([172.25.160.138]) by smtp3.tb.ukmail.iss.as9143.net with ESMTP id iFEhoqkupsyQZiFEhoTvjY; Tue, 11 Oct 2022 15:23:55 +0200 X-Env-Mailfrom: p.w.stephenson@ntlworld.com X-Env-Rcptto: zsh-workers@zsh.org X-SourceIP: 172.25.160.138 X-CNFS-Analysis: v=2.4 cv=W/8r6Dak c=1 sm=1 tr=0 ts=63456e6b cx=a_exe a=fsVlV1GYKS3C/xnq+HX56g==:117 a=1DWFKdCB1IcA:10 a=IkcTkHD0fZMA:10 a=ZjyAdWuDOD4A:10 a=If2VLsBYAAAA:8 a=mWcw3B24rDHAlUhIeioA:9 a=QEXdDO2ut3YA:10 a=ZCxjKSnKyCmnrEQjtP-5:22 X-Authenticated-Sender: p.w.stephenson@ntlworld.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1665494635; bh=c8gUCKjPknAx1TPFf+B/h2jsoMfZXn3KMD17CCdZuho=; h=Date:From:To:In-Reply-To:References:Subject; b=qCX/10p5Ky9uD6GGdTF6Aq+QO+6Jx42ZaJzxDoI9ZfhLd8nG5rbT0CIQgDhq7d0Ur nRMtG0zMrbBn18Uc0lE637nvHJKeikWrY/bnw91I0f3kNA7/GBYz5ATlm6qFfzXRWb 9v4GiplUof+Z84JGN28H7Z1nlRswAyrcHm91AZw0/g8Zh8AdZrSMWeh/ruxcLwJ/1X AAAE9CX5aCCuyZAgaEoNz6/kh9A9YsdcP5HMGYDXCcEe/EadxyuHpDdYfd++Dd2V0T 2Te1oYd1Tgnu7W654o1wbeTjZIe9RnhXU79IHXI4/eQn582IG3W8lGAkdZ81DfpcOp Pxtw+qQFp7GPg== Date: Tue, 11 Oct 2022 14:23:55 +0100 (BST) From: Peter Stephenson To: zsh-workers@zsh.org Message-ID: <1540859773.2640486.1665494635446@mail.virginmedia.com> In-Reply-To: <81965a4f-fff9-5a14-fac1-784ac46a6667@zentaur.org> References: <473d6200-de7e-05b0-8ec1-cd49c4258cf8@zentaur.org> <81965a4f-fff9-5a14-fac1-784ac46a6667@zentaur.org> Subject: Re: use of rand() in zsh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer X-Originating-IP: 147.161.224.167 X-Originating-Client: open-xchange-appsuite X-CMAE-Envelope: MS4xfAxwtPK4TL0WCGzlz+FS29lrQ380LpPbYkaPbg4SrtpmtDP8Bioxye61PvAM+l2T1RgNzfGF48rQekZSED/hCro7jScIUbWt95LXvU6cfsAux2u/3RLZ PLoi44JBQipz1LuWC4BFrkAmNpSuqVAQFqIy9w/NKQlIZz1zs3ya59IazWDkQ+vlSwrlELknlHWiouyM6vcjrufjurNw65alEfBRY+VUdFueWat38NDaqY/b X-Seq: 50781 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: > On 11/10/2022 13:51 Clinton Bunch wrote: > 1. Implement a shopt that changed the behavior of RANDOM (Pleasing > because of the elegance of using RANDOM for good random values, but > probably too confusing) > > 2. Simply implement a new parameter called SRANDOM (simplest, but change > to core zsh interface) > > 3. Write a module (e.g. zsh/random) that introduced a new special > parameter when loaded (more complicated, but isolated to those who want > it and possible to fail on systems that don't have a kernel entropy pool) An autoloadable parameter gives you something that works basically as if it's part of the shell but can be turned off as well as giving an error if the module isn't available, so might be the best bet. So the .mdd file would have autofeatures=p:SRANDOM pws