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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30829 invoked from network); 24 Oct 2022 02:01:29 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Oct 2022 02:01:29 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1666576890; b=RctSOLP31Mjk5zlZ/l7G60tm/Y8QCJp/0CLSCUWxGGNk7uqY1qE9/PslAIQrR5rLWefBk85yIC xw4qxvrpebFEV/DR8aibTm/sBQPXNtorUDX9jIbNxf4kKgU/hmdyrvBx3Pr10nBj3WDexWl+8Z msFnyOY09gDoZMHjE2WRC1Ue0dJiqyzd3tRfvR0RaCF9E6JwUIZqXQmm86FktJprpspY0T2fC1 utKUB0LvV+GM3Zz1P8O9+9c+okv0jVLcLK+754dvzGF+Hr8MenL+QTz92DjNVwFQZMZaZi/V/Y bujaInowZN8jJopv+H/s1zh1kaOPJrcs2bIG/of3LF6TTg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1666576890; bh=03lKHoJRl4D8wpu1bv7kLQBnwNDhP8prG3mi28BqS/I=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=D80MaixLKUOi5th9xWZ/+4ikukKvPsXO75DTXJAePnd53R3hD3gbo9Q/90jig3fLg2Xe1PaO9g 0VqILiPhAPZsnCAu+L+1i6BbdpB+DE19hELNLKAWCdL+iIW91gYMyeKS4gbxQhWsMoMfWa/RL3 mosTsy6wUHt0ksKS2Sffwq3d15QrFIgfGsbyeYo8nzYEAki7G8H1XwGWslFH4EUpn6DbxrD1y6 UsE81PoVuGqQPoVO7N/uJppm0fAs/DLtsS5Bql49+j0m5AZoLBdpYJ18+fVgZNiPcdThQsssYx bclf1gqVs7MQjZ6dlXgm79pdhn57b14ukJNs2GS3lBtsJw==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=hO8B10wSPWQXbgOzsBm0POwMfZuDK5MzbD86nk0MZbg=; b=GuOhraV0zT20o24XU2knNB4i3/ +5S7lRGv48mzQca80toADhd5hyqYQm9d/RPbmmNRm71A3+GgCz2mwlCTsAjNVzEzlvJzPs+L+Kimx hGoGUZc8jmNIfjFmorV2DYCS25u+sATAnH3yOSb8qLNU00MsflQUHfz3Rw3y6kYALgnhBOw4J9YBV 2Zki0brwWxs6bPo1sC2MmfrgfZqhGgA9WF/ih9iWiJxLaK1dw35wrXbQoHwvK7Bna9yE7a/j1fS/a 3NK129t3vHTVRjjV8xHUvNcrOkBSQUuaQkJ1Fe+hYKuzloNbJyemKdJFZ2IKLXCP6G7pJNZztN62b vyeIJvXQ==; Received: by zero.zsh.org with local id 1ommmP-000513-Dc; Mon, 24 Oct 2022 02:01:29 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f42.google.com) smtp.remote-ip=209.85.208.42; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f42.google.com ([209.85.208.42]:46079) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1ommmA-0004Wu-2s; Mon, 24 Oct 2022 02:01:14 +0000 Received: by mail-ed1-f42.google.com with SMTP id a67so26078277edf.12 for ; Sun, 23 Oct 2022 19:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hO8B10wSPWQXbgOzsBm0POwMfZuDK5MzbD86nk0MZbg=; b=td9FKRSwY7jPdaXSfflMuUxSslEVsWJmoueOTiMXe/lRcy8ADt4uwKqGw88vV4Wdp4 5b176XwEwNlS7X4YzPDV2bJ3RZiVX/fx0ruzRI6+ml3tV5JG97bbwZOxSYG3vePHI2SI Sd5r+xuhOmUQ1rXzTHpi4/oS4QJdfr8BOB17ekgEn+8avBQLM1s25VxrPLi4eOXo00jh /vwoptKPJ6FD9FWO9PMR+UymoS775qW3tCYUnuFv95zGINvj5/pv6G9KK62HhCEj60Yr PQw3YBt5E35O+uw7HSLyAC/KVAycWzOvAJNVCNU/+Y/oYqthYAznMTtBnfNyDhZSg+IB ewqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hO8B10wSPWQXbgOzsBm0POwMfZuDK5MzbD86nk0MZbg=; b=D5B6A/mUSXj8CwzQAasim01AkqVOpqNuXySYYjpnysR7aW93NtjAV9MWXp/aNQdFbs 2n1fdgB3otD588xUuXJTGefIdi5TClu7y1JRlYON5KA+dCjywr+alsurY0CJrIWOwoXs rvxleXvGWafTWd9sRlKwCZByBJKd2lK5Ci1zlA2N4uCA8IkST4WVVBLsG+Z+lFmqXOzx TySX63/ucS9JnxoUOKIjN/hJExnbm81g+oRjIMhrpx++gAyTbM23MlijvvLUZqM+0+Pm ytpzqJ4JlRM9xlNAKbNSHIjS5NxHFh5IYmFtPVdBqmXLkkCVcDql50BV7mh/5NMlbHao lvFA== X-Gm-Message-State: ACrzQf1EcHWZ1NgHb3Ag46KLhvt73mGQe+FZhZ4vA94DFjTnKiuG4YiD iGjEPVHJDpN3gd6ZZPP9n7gDj1il2xv1lQxG2puUrQ== X-Google-Smtp-Source: AMsMyM595ziJ99qfXYip0yudHutv7b7w3r3WGuovOVhYjrWTeumCzKFUl+GHYm3mtq9uUalYPlxO66OLTCw4BpIC8mU= X-Received: by 2002:a05:6402:1ac4:b0:460:23b2:f680 with SMTP id ba4-20020a0564021ac400b0046023b2f680mr19961681edb.219.1666576873707; Sun, 23 Oct 2022 19:01:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 23 Oct 2022 19:01:02 -0700 Message-ID: Subject: Re: preliminary patch for zsh/random module To: Clinton Bunch Cc: "zsh-workers@zsh.org" Content-Type: text/plain; charset="UTF-8" X-Seq: 50828 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 Sat, Oct 22, 2022 at 8:44 PM Clinton Bunch wrote: > > It still needs testing on more platforms and additional error-checking > as well as documentation, but I was hoping for some feedback on the > general ideas. Silly nits: * Typo in the introductory comment. * Indentation is funny, it looks like you may have used tab width other than 8 characters, which is the standard for zsh C code. (Or just never use tabs to indent.) * There should be spaces on either side of assignment "=" signs. You haven't been consistent. Aside to -workers: It's probably time to remove Zoltan's name from the copyright notices ... or more likely, to specify that the authors of new files should replace his name with their own name there. Actual question: What's the use case for returning or printing a block of random bytes? Why does this need to be a builtin? Suggestion: Treat SRANDOM like SECONDS, in that you can change the type from integer to floating-point. Then maybe the zrandom() math function isn't needed?