From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18865 invoked from network); 1 Sep 2008 13:15:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 1 Sep 2008 13:15:19 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 67892 invoked from network); 1 Sep 2008 13:15:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 1 Sep 2008 13:15:10 -0000 Received: (qmail 6698 invoked by alias); 1 Sep 2008 13:15:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25578 Received: (qmail 6666 invoked from network); 1 Sep 2008 13:15:01 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 1 Sep 2008 13:15:01 -0000 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by bifrost.dotsrc.org (Postfix) with ESMTP id 6A6A3801E2B4 for ; Mon, 1 Sep 2008 15:14:54 +0200 (CEST) Received: by rv-out-0506.google.com with SMTP id g37so1517605rvb.21 for ; Mon, 01 Sep 2008 06:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=LWZvHrvfIY6iGG5vw1/hqTQCJpUW02ZEInN/66goGNc=; b=tN4zsMOf5iOSGCWSZ51iYyMO/VNkwyi7OPKJCMkI6jfbyToefMtNnMJmOszLWMLUb8 leS5zPJUKwatVk/CoBiq4U3giAd343Bz8kTGIuCNarjIn9EFK8gNoluJcolxUycobPVo GGkzOK7lJdlQDH6Gq1G9kW8oTAj4oOfKfUIEU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=u1hgUH4jSqWynJLCPVfaQUmnJbUYCDsXLxKEnfGBg+UEbLhVnA4Dd3nIkWk0zVl09J HkjQWrZ8cnAUoehKa8z77YbioGKvSKo4tdJ/Oi+Q/uQlOVu0YLgXPZjYZ3+/cRzxbopI 3R5vDja0dbYKXACrLUbbBt4OgCqkpCL0H1a1U= Received: by 10.114.12.10 with SMTP id 10mr5242398wal.190.1220274892849; Mon, 01 Sep 2008 06:14:52 -0700 (PDT) Received: by 10.114.159.2 with HTTP; Mon, 1 Sep 2008 06:14:52 -0700 (PDT) Message-ID: <6cd6de210809010614t159db84cq23f7da817b3c7cf4@mail.gmail.com> Date: Mon, 1 Sep 2008 09:14:52 -0400 From: "Rocky Bernstein" To: "Richard Hartmann" Subject: Re: Numeric version of ZSH_VERSION? Cc: "Dan Nelson" , "Zsh hackers list" In-Reply-To: <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6cd6de210808301954x6fd72987i4bb0ea3665951de1@mail.gmail.com> <20080831031632.GI26653@dan.emsphone.com> <2d460de70809010538xfac8eceqc37a177c0481869c@mail.gmail.com> <6cd6de210809010606h19dc0ce0t34c5cbd9843d5c2e@mail.gmail.com> X-Virus-Scanned: ClamAV 0.92.1/8130/Mon Sep 1 14:14:12 2008 on bifrost X-Virus-Status: Clean 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 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 > wrote: >> On Sun, Aug 31, 2008 at 05:16, Dan Nelson 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 >> >