From: "Rocky Bernstein" <rocky.bernstein@gmail.com>
To: "Richard Hartmann" <richih.mailinglist@gmail.com>
Cc: "Dan Nelson" <dnelson@allantgroup.com>,
"Zsh hackers list" <zsh-workers@sunsite.dk>
Subject: Re: Numeric version of ZSH_VERSION?
Date: Mon, 1 Sep 2008 09:14:52 -0400 [thread overview]
Message-ID: <6cd6de210809010614t159db84cq23f7da817b3c7cf4@mail.gmail.com> (raw)
In-Reply-To: <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@mail.gmail.com>
Can't count, make that 08090101.
Also, I meant to mention that is-at-least is fine for my needs as I
hope I indicated in my first reply. Alas, since ZSH_VERSION doesn't
change as quickly as I'd like, I still have to test for specific
features within 4.3.6-dev-0. But ZSH_VERSION is one of the features
tested using is-at-least.
On Mon, Sep 1, 2008 at 9:06 AM, Rocky Bernstein
<rocky.bernstein@gmail.com> wrote:
> Yeah, I thought of that too. One can use ! is-at-least and booleans
> for ranges. Or one can add as you say all of this into the is-at-least
> package.
>
> This kind of awkwardness would be more glaring in languages that
> support numeric ranges (e.g. Perl, Python, Ruby).
>
> My personal view is that is-at-least is a more complicated solution
> to a problem which is more easily and naturally solved by adding a
> numeric variable which just keeps increasing, e.g. 08100101 which
> might be the first change of Sept 1, '08. (I just tried
> using 08100101 in an arithmetic expression and the number seems not to
> be too large.)
>
> ksh recently added such a thing to .sh.version, so that in a string
> context it prints a string while in a numeric context it prints a
> number:
>
> $ echo ${.sh.version}
> Version M 93t 2008-08-25
> $ printf "%d\n" .sh.version
> 20080825
>
> (From which I gather David Korn and Glenn Fowler don't plan on more
> than one release a day.)
>
>
> On Mon, Sep 1, 2008 at 8:38 AM, Richard Hartmann
> <richih.mailinglist@gmail.com> wrote:
>> On Sun, Aug 31, 2008 at 05:16, Dan Nelson <dnelson@allantgroup.com> wrote:
>>
>>> The Misc/is-at-least function should do what you need:
>>
>> It lacks a is-at-max sibling _if_ you need to actually check on ranges.
>> Why not just use revision numbers for this (unless ZSH falls into the
>> git trap, at some point :p)?
>>
>>
>> Richard
>>
>
prev parent reply other threads:[~2008-09-01 13:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-31 2:54 Rocky Bernstein
2008-08-31 3:16 ` Dan Nelson
2008-08-31 13:21 ` Rocky Bernstein
2008-09-01 12:38 ` Richard Hartmann
2008-09-01 12:43 ` Mikael Magnusson
2008-09-01 13:06 ` Rocky Bernstein
2008-09-01 13:14 ` Rocky Bernstein [this message]
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=6cd6de210809010614t159db84cq23f7da817b3c7cf4@mail.gmail.com \
--to=rocky.bernstein@gmail.com \
--cc=dnelson@allantgroup.com \
--cc=richih.mailinglist@gmail.com \
--cc=zsh-workers@sunsite.dk \
/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).