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=-7.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31937 invoked from network); 11 Oct 2022 14:15:59 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Oct 2022 14:15:59 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1665497760; b=MyTpEKWTBt6Kyeqt9HuUtO3NVtFQ8PQTonlPCtQXLCvU+3o+bM8z7BCPBhgTjzUpywDSjTJNZN mUI0e1xhRWtJuMZE09P09hw0++xxV9ryKiIvHE3dRrZpgR6KdEGi3zR4uGRybmkZNHbhuihem7 KSRLBhPuYfSwpeRlcqRyezyKaNIplKbEm/5ZC99lOlbPZoEGEkvK7ZuoqTuGyWXkmGVxx7tius cSBsSP32rf+eKFsroIMTT/V0H5Y7lYQAS/PxzCRtdYmBWJgvtpBGIQLNim4NJ1ov/bAVc/SY2A 2dBDTqAxM6MTNb8tve032v0mAi+JwrZb0LIGgTEXGAsIyw==; 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=1665497760; bh=slvskIPW2FAC5fl3k2CqUYPhwFJ4NXUWE82bAt3lTo4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature; b=eXnxqaDWl39T/+T88c6PWCzJYSnU0p8bcPhXYKAAx7oMTLptnlfDdizpHJLRP+u6qkQYUlUcYJ dgisxr18MIS48/urZuHDUk7q/T1SDZ+1gsG0y+GeN2EieVYtx08wEBuJv6GS1+8ZxVAsNwqtcI NLO5lL/jFxHqTDkwFLphR7Lho3nedNJy1jjOl3UUDvbwtfRF/XzYOgmA+HwkKOxyWWTXpWGrsI +UsTSMD8IyspKPEnWsA2SZfJMdsR7QVym1J2f1GXYc4DSYWoLUTCPPbDqxEu78WvNbwYvGflLu GHqC6V6wqFuyeARyBqHiUGYW1Fv7z9XTbevkQqNUoB+tvg==; 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:In-Reply-To:From:References:To:Subject: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; bh=ptafB/sm29UJE2cVhObbBSLOBuuIWmRG46TqS3KAMOg=; b=O+cYwfWv7RrgEGZY0bJprlPewM rqEqHchlLZp2ENGxi8CDqfKQoDLY/6tfbZOAbt3JINr4zMWahGHxHBDVGJX4sPrPlpUv2vA1w/ixk pZja6sr5AmIycq2mlDP/1XWcR/t/cBW7bS83KU2RQwYt7RlPuovx9eA/y4zsoWRjvVT9A9zfDj3j3 LeykKTC2+PnLQwOhBT+78z4lI1kvE1IazivukwKqsp2LpdfF1rAS9ch+FB74YqptWV9YocSJSVBpi hKRC1lFXLnvXZzFyalOcH2nmfe4DP2hz1WhUEwaNyExWqpT/i2jCgYrfz+OYSIB1GLEkIZjvyCyRe aRf9gAsA==; Received: by zero.zsh.org with local id 1oiG34-000FwZ-F8; Tue, 11 Oct 2022 14:15:58 +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]:38440) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1oiG2k-000Fc1-UD; Tue, 11 Oct 2022 14:15:40 +0000 Received: from iris.zentaur.org (localhost [127.0.0.1]) by iris.zentaur.org (Postfix) with ESMTP id 4MmyVd3WH1z3wZj for ; Tue, 11 Oct 2022 14:15:37 +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:in-reply-to :from:from:references:to:content-language:subject:subject :user-agent:mime-version:date:date:message-id; s=dkim20200120; t=1665497736; x=1665501337; bh=slvskIPW2FAC5fl3k2CqUYPhwFJ4NXUW E82bAt3lTo4=; b=t8IqZVpbRMYcaGxACSWsVCTIfcImyf5rxO++BXhh8NFnrp8v izQgcTksl1h9utIVm/afW2kQDlNxJL6xs2vsWiE0ujMJ8ItZQJn80vRfx8bXmAnu r8SzfRezREbYAEzgW0sp8MbOH96micmuT0uqfrNt8qpaR2ZxSBEJgIdD3ngxVzDH B3Ji/Gj0j63TMx6eAF7mrMP3OGhycC6Hz9ICL72suzw7FHCZXLGj1JuIi8mfKPWZ tCOU5nP3KywtE2SNiVzxkoTn4EU/zt/zy7dU8AMy0ByW9BQGPk7uI6+HaUOxGcjj XVW5uIBpKAJWTk0kK7u9uISIkIp3Sjy5HPK4lQ== 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 3QRmM69oHH4v for ; Tue, 11 Oct 2022 14:15:36 +0000 (UTC) Received: from [192.168.72.136] (unknown [136.50.213.220]) by iris.zentaur.org (Postfix) with ESMTPSA id 4MmyVc5X8yz3wZb for ; Tue, 11 Oct 2022 14:15:36 +0000 (UTC) Message-ID: <2fb79279-47c1-f3e1-3331-fb84966a6258@zentaur.org> Date: Tue, 11 Oct 2022 09:15:37 -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 Subject: Re: use of rand() in zsh Content-Language: en-US To: zsh-workers@zsh.org References: <473d6200-de7e-05b0-8ec1-cd49c4258cf8@zentaur.org> <81965a4f-fff9-5a14-fac1-784ac46a6667@zentaur.org> <1540859773.2640486.1665494635446@mail.virginmedia.com> From: Clinton Bunch In-Reply-To: <1540859773.2640486.1665494635446@mail.virginmedia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: Avast (VPS 221010-10, 10/10/2022), Outbound message X-Antivirus-Status: Clean X-Seq: 50782 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 10/11/2022 8:23 AM, Peter Stephenson wrote: >> On 11/10/2022 13:51 Clinton Bunch wrote: >> >> 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 > That's a neat trick, but as someone who has had to hack to build software built and primarily tested on Linux, on a Unix system stuck in the '00's (if not the last century), I'd rather have an explicit load/test for the existence of the module than have it blow up on a system where SRANDOM didn't work. (8 years as an HP-UX admin) My $.02 for whatever that's worth. :)