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 15373 invoked from network); 10 Oct 2022 23:33:10 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Oct 2022 23:33:10 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1665444790; b=ey6dcfXuO4aRk6n+YBVtpwjWnXiR0U+c1e6UT+fkptUOKE0KVllEMeFx+JXJAW/7GS4XsflCN6 rqLM+RQfVPsx+JwoNTGYAgyuGhJyrH+Wv3ifHDUPl3KKRdQK5E/pOfIJ4nNkS4+R4ZkmDEIJxY 3wqdA67W1EkPWfCLs+9kp4mEifPYkk8JJBweRHt2nj727HdYWh1tUTW3DyZfhBc7ZU1OHO4dNk oP/zeMnLy9WFfiTh7u2J96fwCbDNdz25DHnR7HgGTm6MN0kK8cXtjYZfBIBc1uL2tvzgEkG9Ik yjqox7w3Ai5TnF7DGfY2wQAC3uCJYDgx8G9iKosM69ftBw==; 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=1665444790; bh=Wk5pQ3qTpBrniWy1VryAEFyUx2kTCg8wHwmandZgTrc=; 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=L1tzWEWkM6kAWDEmBQptIkxApUw1ZM0lFmlzR8GI1SJgdV2Uhn3WHY/ozIxTOPJeOxY0qDyW0e ksi2OP8lRiuc2pn82xbgR/fADXPhaUwmVXfYtvyXUqcC2HbsXDVRMtft0/ktKxVDuhPYssG4s9 V47o0Nh/h3wbuP5G57iOBpbfvr5eHqNGXNtTA3T6HEQkLW7BcD6GUPhbBPnD3OGVyTOHhjtLzR 1C+DChROjM6wdTEiP3pdyR8t01itfOE8/09XClA20Q2hgXoKRUMU+h0A4l076MsiGrznxHg1EU VLi1A9D9z90IizYwbiHAbhNJAA6F37CFuK1D/rKFjhifkQ==; 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=Wk5pQ3qTpBrniWy1VryAEFyUx2kTCg8wHwmandZgTrc=; b=rg372cIZdN3dtu9ONYxwujw79W 3ARN5ehScgB8m+aqAEQYL8/n+/txIgfXbNILxIyu4ddXjn6sPje4afGEZuRpOlwCgHV3YE6TRqPr4 wD8LkcreGtvefO3mo9bKgp4KqNREhWn6ITY6+r4Q01dFBBjvuuUpGA3IMZezfVXVlWDxqblKCeyTN sGv7WWOh5o3YgC+Ohym8DWbZHuCYQHXqWSIdHsNFwfyGW9wCYsacwxYNAnqRi2LJ4uCEGRn2BGOqJ n/omx66+tcEUe4hCpQWbdLysQ4f1DI1QHExQmrwXdax7DQd87rScubfQnaBVcTQ78TiVGwfZOYjKo sa7xIYaQ==; Received: by zero.zsh.org with local id 1oi2Gi-000Cpj-Ve; Mon, 10 Oct 2022 23:33:08 +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]:38650) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oi2GP-000CYa-P7; Mon, 10 Oct 2022 23:32:50 +0000 Received: from iris.zentaur.org (localhost [127.0.0.1]) by iris.zentaur.org (Postfix) with ESMTP id 4MmZvz1tKSz3wZj for ; Mon, 10 Oct 2022 23:32:47 +0000 (UTC) Authentication-Results: iris.zentaur.org (amavisd-new); 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:content-type:subject :subject:from:from:to:content-language:user-agent:mime-version :date:date:message-id; s=dkim20200120; t=1665444766; x= 1665448367; bh=Wk5pQ3qTpBrniWy1VryAEFyUx2kTCg8wHwmandZgTrc=; b=G ItiZSm3zvedruD658QrqHWWZgVagKi0rKt7WFV1eYQ/HEBKrdIhEYwviyNqzvWE8 SQ0XQuRBAUmJDs2Uq42gAwVH8lRZ2nuCwVfudZyXGhP3gNNPNC42q7Cywk9TBzZU b6YN0LTEazUiqiwcLIC2IDq/In1KQcrj0kVm3IJmf6b1HM8m2vm7lUs2LGzu+RmT B2cZkjTUYBAH6PHPFFbNsxPCJvRtsHAyDOAcwiJeWNLchvTdExmzrpQyVhJ7H1vx vJ/mfFNtLFlyjI6Ous/srzemvDS/uhoWuCkM3mSQbuRoT3AfGwy2/uJhrc0R8A0D GriYgpBZrdLBrdoc6mfYw== X-Virus-Scanned: amavisd-new at iris.zentaur.org Received: from iris.zentaur.org ([127.0.0.1]) by iris.zentaur.org (iris.zentaur.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9ZYz_sjKpHW4 for ; Mon, 10 Oct 2022 23:32:46 +0000 (UTC) Received: from [192.168.72.136] (unknown [136.50.213.220]) by iris.zentaur.org (Postfix) with ESMTPSA id 4MmZvy50mFz3wZb for ; Mon, 10 Oct 2022 23:32:46 +0000 (UTC) Message-ID: Date: Mon, 10 Oct 2022 18:32:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Content-Language: en-US To: "zsh-workers@zsh.org" From: Clinton Bunch Subject: use of rand() in zsh Content-Type: text/plain; charset=UTF-8; format=flowed X-Antivirus: Avast (VPS 221010-10, 10/10/2022), Outbound message X-Antivirus-Status: Clean Content-Transfer-Encoding: quoted-printable X-Seq: 50771 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: Is there a reason that zsh goes out of the way (srand_deterministic) to=20 use the least random "random" function on modern Unix?=C2=A0 I would thin= k a=20 zrandom function that used getrandom() or arc4random() or /dev/urandom=20 would serve better. But before I write one, I wanted to know if there=20 was a reason that isn't obvious to me. (I have an idea for a new module builtin that solved the mktemp race in=20 zsh scripts and it should use a better random source than rand())