Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh hangs sometimes?



Bart Schaefer wrote:
> } set of bits 0x09e1 (or whatever), to deduce that this includes (1<<11),
> } (1<<8), (1<<7), (1<<6), (1<<5) and (1<<0)?
> 
> If it's a bitmask, you should be asking the debugger to print it in
> binary rather than hex, so you can see the individual 100111100001.

Hmm... the first thing I do with that is group it as 1001 1110 0001,
otherwise I can't count it.  So I end up with something that looks like
hex anyway.  But in that form it's six and two threes (which you don't
say in California, either; I'm told it's probably a Tyneside
peculiarity) whether I turn it into hex or count within the groups of
four.

> In 0x09e1 you still have to compute that "e" is ... er ... gimme a
> moment ... 8+4+2.
> 
> I think perhaps your programming of BlueTooth drivers has you thinking
> more naturally in hex.

You're quite right that I tend to think down at the lowest levels, but
actually in firmware terms rather than driver terms.  I'm used to things
like

enum fiddly_analogue_radio_bits {
  ANA_TWEAK_FOR_THE_STUFF_IN_THAT_OTHER_WOTSIT_LVL_MASK = 0x0f00
};

and bitmasks don't naturally lend themselves to individual powers of
two.  (See the new definitions for colour attributes in zsh.h for
examples.)

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author