From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17020 invoked from network); 4 May 2008 12:14:49 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) 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.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 May 2008 12:14:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 12332 invoked from network); 4 May 2008 12:14:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 May 2008 12:14:31 -0000 Received: (qmail 27363 invoked by alias); 4 May 2008 12:14:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12821 Received: (qmail 27343 invoked from network); 4 May 2008 12:14:20 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 4 May 2008 12:14:20 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id 3410F80ED172 for ; Sun, 4 May 2008 14:14:15 +0200 (CEST) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com with ESMTP id <20080504121752.HWKV17818.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Sun, 4 May 2008 13:17:52 +0100 Received: from pws-pc.ntlworld.com ([81.107.40.67]) by aamtaout02-winn.ispmail.ntl.com with ESMTP id <20080504121645.JZEI17393.aamtaout02-winn.ispmail.ntl.com@pws-pc.ntlworld.com> for ; Sun, 4 May 2008 13:16:45 +0100 Received: from pws-pc (pws-pc [127.0.0.1]) by pws-pc.ntlworld.com (8.14.2/8.14.2) with ESMTP id m44CDPVO003574 for ; Sun, 4 May 2008 13:13:25 +0100 Message-Id: <200805041213.m44CDPVO003574@pws-pc.ntlworld.com> From: Peter Stephenson To: zsh-users@sunsite.dk Subject: Re: Zsh hangs sometimes? In-Reply-To: Message from Bart Schaefer of "Sat, 03 May 2008 04:35:59 PDT." <080503043559.ZM10535@torch.brasslantern.com> Date: Sun, 04 May 2008 13:13:25 +0100 X-Virus-Scanned: ClamAV 0.91.2/7019/Sun May 4 04:17:43 2008 on bifrost X-Virus-Status: Clean Bart Schaefer wrote: > } and I've tidied up the STAT_ definitions because I can't do powers of > } two in my head well enough. > > Interesting. Not interesting that you can't do powers of two, but > interesting that your reaction to not being able to do powers of two > is to write out longhand the powers of two, rather than let the compiler > figure it out by use of shift operators. All my professors back in > college would have said the Right Thing is what was there before, in > which you can see plainly exactly which bit-position is set rather than > having to convert hex to binary in your head, and in which you can add > the next bit-position without having to first work out the next power. Can I suggest your professors were either very weird or (more likely) didn't do much real programming? You're suggesting (i) that they couldn't see from #define THIS_DEFINITION 0x0080 that the next one is obviously #define THAT_DEFINITION 0x0100 which I don't believe (ii) that they are happy when debugging, given a set of bits 0x09e1 (or whatever), to deduce that this includes (1<<11), (1<<8), (1<<7), (1<<6), (1<<5) and (1<<0)? In that case, please could they do more zsh debugging, because given 0x09e1 I need definitions that separate out into 0x0800, 0x0100, 0x0080, 0x0040, 0x0020 and 0x0001 so that I can work out what the flags are. I wrote the latter ones out straight away but had to think for a long time about the former ones. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/