From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 6E2DC22802 for ; Sun, 24 Mar 2024 15:12:20 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711289540; b=psoVMFVbdJ7sofbgV7i2XXwYy3PB+8t7ODot2JyCk8nmH3RearetbEBpdUjBkJj/63K8y/abOx 0QX1GKRwnqPvaBOhJjnf2dfZubj5FJPuM7TrzrM7bdzBUosnlLV+G9Ubg5jSjYGUuXZauY+7K8 4bvyj4At/3EPkWPv8Zo4sjGbiJQjArIjyAvottz3bGOCftuxZohNZDrW6QueeWyWfadq+jz3by mGLoX5jqLVSOaYq8mDlMRpvLNdnEtmQUQgHT9U6ClRn6X7qQY/2AdIhuCvztOevGV9zjoYkmyY s0CGKfrZbvf3p3zvhX6UuevidL6uhxGD/7L+PQqQ6GTKPA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1711289540; bh=mHmQy/kzAOkqaonmRceKVJaPBvZefVmCyT1ezqHnsJw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:From:To: MIME-Version:Date:Message-ID:DKIM-Signature:DKIM-Signature; b=NVwNAtNyqUWSAYY2mRJAR2ccm6QqOZgaZIDB5PXvVY+qZuXtKpIF3ygXD1mSaC6/041Ox/a3Oj l4LehfxfU6LnuLiYZK8h/E2pKpyrcWmNAWQ1xl1uwW7sQOGShMdA+Pzz3XK7TInd7jyjNU2jDo fnjgpua54TbMjQG10HHsT6eDxfkybsLSzRf1i4cHZ6JCoG+pMlv0jCsWCSkS7pAEYD7rGeoG/M IXAOoTdgn/Pu9qyMcoALwxEOorGV9gSrwtrnv4n/vg2aoLLmXLNAXyjJaDai8CTGFDEYfroGAO tsUGNKt8quYbawZeQAKadxXf6sach5gWqV/sC33FrX/aSQ==; 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:Subject:From:To:MIME-Version:Date:Message-ID:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=mHmQy/kzAOkqaonmRceKVJaPBvZefVmCyT1ezqHnsJw=; b=gmRe4VfIWrgL8XMZlOzOh1INi2 0DWtfcWAB2d3ibHCFP99BMl5cBAv7mm73Y2wl27r0BvRDnHW4Ad9zxdWEB/qx0iExzAHHMpERVPRk 67x14g9MpcAPwYBXb99anUVNewfuXR/tBM7HWWf8MiOYX84QxRaO22rY12mDsPXLCBfPxT0eDk149 nzX26n8+jbME/MuZAXolh9Hh7L8JZ46BAPBt+vgiWADCdhdkb3OhhFjhNz107V2FFa5gT4XlQ6rEz ANGEarG60oY9QWhNHLlqOMjf2jjQwyX0y6Fg766TUrfKyXTCUvNsDtCSinX2QEaJDvBmjR5kPOtol VM4BQg3w==; Received: by zero.zsh.org with local id 1roOa9-0002FQ-Lt; Sun, 24 Mar 2024 14:12:17 +0000 Authentication-Results: zsh.org; iprev=pass (iris.zentaur.org) smtp.remote-ip=198.58.127.206; dkim=pass header.d=zentaur.org header.s=dkim20200120 header.a=rsa-sha256; dmarc=pass header.from=zentaur.org; arc=none Received: from iris.zentaur.org ([198.58.127.206]:59058) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1roOZb-0001vh-0i; Sun, 24 Mar 2024 14:11:44 +0000 Received: from iris.zentaur.org (localhost [127.0.0.1]) by iris.zentaur.org (Postfix) with ESMTP id 4V2dKS4KDsz3wZv for ; Sun, 24 Mar 2024 14:11:40 +0000 (UTC) Authentication-Results: iris.zentaur.org (amavis); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=zentaur.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zentaur.org; h= content-transfer-encoding:content-type:subject:from:to :content-language:user-agent:mime-version:date:message-id; s= dkim20200120; t=1711289497; x=1711293098; bh=mHmQy/kzAOkqaonmRce KVJaPBvZefVmCyT1ezqHnsJw=; b=0SsgxZnM1XzncfIsCe/iv5vRdQdSQxZ+1Z1 r4AF4rVkpro0FdSJqxlc6DV9s3qttGSvZRSvo0WvT7o6IBFnkmAvYDQTVUWoL53A /daZ/6Gab5c4z2/8+1cVLWfKhmFvT1nQbifsFm0Y6kvITNLpu3SAhVdxbK+C2eE9 oFM9InfAq7X/ILz8TPFCmL1PE4JBTK5lGss+4e5nhWhlzp0eAxRWv5/F55TXR7RJ U45kdkxRrBdea2nEGXPFb7LztxmxmIZBhFIehyf9XIt5AVTdh6/ZqLHp9XZfs8uH 3+wSTkfN11wngBomjLX7TQm+LWwBp/qvPd6UcATD/mWDgCMHJQw== X-Virus-Scanned: amavis at iris.zentaur.org Received: from iris.zentaur.org ([127.0.0.1]) by iris.zentaur.org (iris.zentaur.org [127.0.0.1]) (amavis, port 10026) with ESMTP id q2fHXHPF1wB5 for ; Sun, 24 Mar 2024 14:11:37 +0000 (UTC) Received: from [IPV6:2605:a601:a57c:ee00::4000] (unknown [IPv6:2605:a601:a57c:ee00::4000]) by iris.zentaur.org (Postfix) with ESMTPSA id 4V2dKP5qLHz3wZt for ; Sun, 24 Mar 2024 14:11:37 +0000 (UTC) Message-ID: <57374b5f-77b9-4dee-aaba-5c4bdeb1b281@zentaur.org> Date: Sun, 24 Mar 2024 09:11:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: "zsh-workers@zsh.org" From: Clinton Bunch Subject: [PATCH 0/1] zsh/random module Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Seq: 52808 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: This is a resurrection of a module to provide an interface into the=20 kernel random pool for the shell. It provides a ro parameter SRANDOM (32-bit random integer) It provides 2 math functions zrand_float() and zrand_int zrand_int takes 0-3 arguments, an exclusive upper bound, a lower bound,=20 a flag to make the upper bound inclusive.=C2=A0 It is equivalent to SRAND= OM=20 with no arguments. zrand_float takes no arguments and returns a floating point number=20 between 0 and 1, inclusive. I am still working on the test harness.=C2=A0 I'm thinking about using a = C=20 program for analysis of shell output, but no current test harness does=20 anything like that.=C2=A0 (long double would really be helpful for larger= =20 bounds, 1-20 works, 1-100 causes overflows) This version has no builtins.=C2=A0 Though I still think some could be=20 useful, I have to admit that what I have in mind for them *can* be=20 accomplished in shell by someone with moderate experience, if less=20 efficiently.