zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: dana <dana@dana.is>
Cc: Cedric Ware <cedric.ware__bml@normalesup.org>, zsh-workers@zsh.org
Subject: Re: [PATCH] Enable sub-second timeout in zsystem flock
Date: Thu, 16 Apr 2020 04:24:53 +0000	[thread overview]
Message-ID: <20200416042453.78406746@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CD53C0FC-2349-45EF-8BAC-315FBB8C41CE@dana.is>

dana wrote on Tue, 14 Apr 2020 21:05 -0500:
> On 14 Apr 2020, at 20:15, Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> > dana, would you happen to have time to review the Cedric's latest
> > revision (workers/45690)?  
> 
> I'm not sure i fully understand the implications of the 32-vs-64-bit stuff,
> 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, «make -C Doc html pdf».)

> 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

  reply	other threads:[~2020-04-16  4:25 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 20:35 Cedric Ware
2019-07-29 22:25 ` Bart Schaefer
2020-01-04 18:47   ` Cedric Ware
2020-01-05 18:42     ` dana
2020-01-05 21:49       ` dana
2020-01-06 17:30       ` Cedric Ware
2020-01-06 17:36         ` Peter Stephenson
2020-01-07  3:48         ` dana
2020-01-11 15:41           ` Cedric Ware
2020-01-11 19:36             ` dana
2020-01-12  4:25               ` dana
2020-03-08 18:39                 ` Cedric Ware
2020-03-12 18:46                   ` dana
2020-03-12 19:13                     ` dana
2020-03-14 21:04                     ` Cedric Ware
2020-03-15  0:50                       ` Daniel Shahaf
2020-03-15  1:04                         ` dana
2020-03-15 16:03                         ` Cedric Ware
2020-03-15 16:54                           ` Daniel Shahaf
2020-03-15 17:35                             ` Peter Stephenson
2020-03-15 18:36                             ` Cedric Ware
2020-03-15 19:13                               ` Daniel Shahaf
2020-04-13 21:34                             ` Cedric Ware
2020-04-14 11:47                               ` Daniel Shahaf
2020-04-14 20:21                                 ` Cedric Ware
2020-04-15  1:15                                   ` Daniel Shahaf
2020-04-15  2:05                                     ` dana
2020-04-16  4:24                                       ` Daniel Shahaf [this message]
2020-04-18 16:32                                         ` Cedric Ware
2020-04-20 17:28                                           ` dana
2020-04-20 22:17                                             ` Cedric Ware
2020-03-15  1:04                       ` Daniel Shahaf
2020-03-13 14:26                   ` dana

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200416042453.78406746@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=cedric.ware__bml@normalesup.org \
    --cc=dana@dana.is \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).