@Epoch:

Another couple of questions:

I'm not sure I'm quite getting your concerns/plans over endianness.  

The bQueue--formerly-known-as-bPipe- is just a bitstring, isn't it? 
One pokes bits into the queue and one pops bits out of it.  So aren't
concerns about endianness external to the class?

The one exception to this that I can think of is when the class
attempts to return an int value of the bitstring as a whole.  I'm
trying to use Math::BigInt->new("0b" . $bitstring) to interpret the bit
string and return a bigint. Since Math::BigInt exists on the standard
perl install on OSX, I assume that OSX's Math::BigInt handles
endianness correctly for that platform.  I'll do some tests to check
this.

Is there something that I'm missing here?

I suppose that one way in which I'm missing the point is that at this
point, $bQueue->push() shifts left and $bQueue->pop() shifts right.  Is
that inherently big-endian?  If so, perhaps I could test for endianness
upon the loading of the class and swap the definitions of push and pop
depending on the endianness.

And I suppose another change I'll need to make is to be flexible about
where to use the apply the "slack mask": big-endian should be at the
left end of $bQueue->{_queue}[0], little-endian should be at the right
end of $bQueue->{_queue}[last].  I think I have a little more thinking
to do about this one.

Anyway, bQueue::new, $bQueue->set() and $bQueue->read should be
endian-agnostic, I believe.

Any other way in which I'm missing the boat?

For now, version .01 of the class will probably be big-endian-ific.


-- 
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=49028

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to