Zsh Mailing List Archive
Messages sorted by:
Re: Zsh hangs sometimes?
- X-seq: zsh-users 12821
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Zsh hangs sometimes?
- Date: Sun, 04 May 2008 13:13:25 +0100
- In-reply-to: Message from Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> of "Sat, 03 May 2008 04:35:59 PDT." <080503043559.ZM10535@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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 <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by: