From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 9678 invoked from network); 16 Apr 2020 04:25:53 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 16 Apr 2020 04:25:53 -0000 Received: (qmail 22668 invoked by alias); 16 Apr 2020 04:25:42 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45705 Received: (qmail 4858 invoked by uid 1010); 16 Apr 2020 04:25:42 -0000 X-Qmail-Scanner-Diagnostics: from wout3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25779. spamassassin: 3.4.4. Clear:RC:0(64.147.123.19):SA:0(-2.6/5.0):. Processed in 4.201278 secs); 16 Apr 2020 04:25:42 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrfeeggdekfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfgjfhfogggtgfesthhqtd dtredtjeenucfhrhhomhepffgrnhhivghlucfuhhgrhhgrfhcuoegurdhssegurghnihgv lhdrshhhrghhrghfrdhnrghmvgeqnecukfhppeejledrudejjedruddugedrudegleenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegu rghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Date: Thu, 16 Apr 2020 04:24:53 +0000 From: Daniel Shahaf To: dana Cc: Cedric Ware , zsh-workers@zsh.org Subject: Re: [PATCH] Enable sub-second timeout in zsystem flock Message-ID: <20200416042453.78406746@tarpaulin.shahaf.local2> In-Reply-To: References: <20200308183907.mxnhqrr2uflwooax@phare.normalesup.org> <20200314210454.hp562smyqv3ew255@phare.normalesup.org> <20200315005036.45bc846b@tarpaulin.shahaf.local2> <20200315160324.dstgtmajzwxpaccn@phare.normalesup.org> <20200315165410.GA30241@tarpaulin.shahaf.local2> <20200413213449.orqym5bqboznancl@phare.normalesup.org> <20200414114700.108febf3@tarpaulin.shahaf.local2> <20200414202100.x7fxbf3liwbyclpe@phare.normalesup.org> <20200415011530.2b8f3ed3@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable dana wrote on Tue, 14 Apr 2020 21:05 -0500: > On 14 Apr 2020, at 20:15, Daniel Shahaf wrote: > > dana, would you happen to have time to review the Cedric's latest > > revision (workers/45690)? =20 >=20 > I'm not sure i fully understand the implications of the 32-vs-64-bit stuf= f, > nor whether it matters enough to go to all the extra trouble. It's a theory v. practice issue. In theory, zsh is written in C89, and C89 doesn't guarantee a 64-bit integer type. In practice, C89 is 31 years old; C99 does guarantee a 64-bit type; and we don't positively know of anyone porting zsh to a platform that doesn't have a 64-bit type; so the concern may well be academic, or nearly so. > But aside from that and the two bits you mentioned (agreed on the > semicolon), the only thing i noticed is that there are several > instances where the formatting of the new C code doesn't match its > surroundings, e.g. unnecessary brackets in ((foo < bar) || (baz > qux)) I don't mind these. They add clarity and don't hurt readability. > and inconsistent white space in foo? bar : baz Agreed. (I noticed them too, but didn't want to nitpick from the peanut gallery.) In other news, how about using real superscripts: --- a/Doc/Zsh/mod_system.yo +++ b/Doc/Zsh/mod_system.yo @@ -203,7 +203,7 @@ if the tt(-i) var(interval) option is given, otherwise = once a second. so that the shell waits only until the var(timeout) and not longer.) If the attempt times out, status 2 is returned. -(Note: var(timeout) must be less than 2^30-1 seconds (about 34 years); +(Note: var(timeout) must be less than ifzman(2^30-1)ifnzman(2NOTRANS(@sup{= 30})-1) seconds (about 34 years) and var(interval) must be less than 0.999 * LONG_MAX microseconds (only about 35 minutes on 32-bit systems).) (To see the difference, =C2=ABmake -C Doc html pdf=C2=BB.) > Otherwise i think it makes sense, as far as i understand it, and the tests > pass on my machine. I don't see any functional issues If you think the feature makes sense and the implementation is robust, why not merge it (once the 64-bit question is settled)? Between you and Cedric there have already been two pairs of eyes on the code, after all. Cheers, Daniel