From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2272 invoked from network); 31 Jan 2003 12:03:43 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 31 Jan 2003 12:03:43 -0000 Received: (qmail 1477 invoked by alias); 31 Jan 2003 12:03:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5853 Received: (qmail 1469 invoked from network); 31 Jan 2003 12:03:15 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 31 Jan 2003 12:03:15 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [143.90.131.180] by sunsite.dk (MessageWall 1.0.8) with SMTP; 31 Jan 2003 12:3:14 -0000 Received: from rabi ([211.121.229.167]) by t-mta2.odn.ne.jp with SMTP id <20030131120314740.NBYL.24063.t-mta2.odn.ne.jp@mta2.odn.ne.jp> for ; Fri, 31 Jan 2003 21:03:14 +0900 From: "Clifford Caoile" To: Subject: RE: a calculator for zsh - zcalc and pcal conflict Date: Fri, 31 Jan 2003 21:03:08 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-reply-to: <22197.1043948058@csr.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Everyone: Thanks to kwong and Phil for the zcalc suggestions. I have implemented the $@ in the input string and also the noglob/realias trick in my own .zshrc. I'm pretty sure the settings are obvious so I won't post them here. I don't know how "elegant" my "zcalc" is, but I get some round-off errors with some float computations. For example: +2403> zcalc 23.0 * 1.05 ~ 31Fri203104 24.150000000000002 +2404> zsh --version ~ 31Fri203106 zsh 4.0.6 (i686-pc-cygwin) +2403> echo $(( 23.0 * 1.05)) ~ 31Fri205300 1 24.150000000000002 +2404> zsh --version ~ 31Fri205302 zsh 4.0.4 (i386-redhat-linux-gnu) I have seen it where there isn't any round off error on my other machines at work and at home. What is this? Anyway, not a big deal, just a little annoying. Also, thanks to Peter S. for the heads up on the zsh-4.1.x dev branch. I guess for my own sake I should rename this "zcalc" so I'll be forward compatible. As far as I'm concerned, only 4.0.4 and 4.0.6 exist, because those are the zsh versions on my personal and work computers (RedHat 7.3, 8.0, Cygwin 2003/1), so I didn't know about that. I look forward to a release, but frankly, I think zsh-4.0.6 is pretty cool as is. Anyway, I've been thinking more and more that zsh is becoming more and more emacs-y, as in fully featured for the interactive use. GNU Emacs is an "advanced, self-documenting, customizable, extensible real-time display editor." zsh is an "advanced, self-documenting, customizable, extensible real-time display CLI". ,-~-. < ^ ; ~, Clifford Escobar CAOILE (aka "Piyo-kun") (_ _, J~~> _.___...:.__..__.: __.:_. .:_.__::_..:._::._... _____ p(^_^)q | -----Original Message----- | From: Peter Stephenson [mailto:pws@csr.com] | Sent: Friday, January 31, 2003 02:34 | To: zsh-users@sunsite.dk | Subject: Re: a calculator for zsh - zcalc and pcal conflict | | | kwong@nwsgpa.ih.lucent.com wrote: | > All, | > | > Earlier I posted a calculator "pcal" written in perl as | > a followup to Clifford's post of "zcalc" written in zsh. | > | > Andy Spiegl noticed a problem and his email is attached | > below. | | If you're worrying about conflicts, you might note there is already a | `zcalc' supplied with the 4.1 zsh distribution. It's a command-line | interface rather than one-shot. See the zshcontrib manual page. | | Yes, we still need to release 4.1, so you wouldn't know about this | unless you're tracking the development version. | | -- | Peter Stephenson Software Engineer | CSR Ltd., Science Park, Milton Road, | Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 | | | ********************************************************************** | The information transmitted is intended only for the person or | entity to which it is addressed and may contain confidential | and/or privileged material. | Any review, retransmission, dissemination or other use of, or | taking of any action in reliance upon, this information by | persons or entities other than the intended recipient is | prohibited. | If you received this in error, please contact the sender and | delete the material from any computer. | **********************************************************************