[m-dev.] Binary data and UTF-8
Paul Bone
pbone at csse.unimelb.edu.au
Fri May 11 14:04:32 AEST 2012
On Fri, May 11, 2012 at 01:31:42PM +1000, Peter Wang wrote:
> On Fri, 11 May 2012 11:59:26 +1000, Paul Bone <pbone at csse.unimelb.edu.au> wrote:
> >
> > There's an open question on stack exchange today about parsing binary data and
> > UTF8.
> >
> > I'm not sure on the answer, I'd just be guessing. Peter W, would you mind answering the question?
> >
> > http://stackoverflow.com/questions/10543654/what-is-a-good-data-type-for-representing-arbitrary-binary-data
>
> I see you answered. I don't have an account anyway.
>
> I usually end up using a custom foreign type. One thing which prevented
> me from using bitmap (again) is a lack of distinction between size and
> capacity. That would allow a bitmap to grow efficiently on append.
I wanted to introduce a rope type (Boehm), not that this is not the same as
cord. size=capacity, but operations such as append are (relativly) cheap. I
think it's a nice balance.
> And my general complaint: working with bits is annoying and error prone.
> We don't necessarily need a new type, just a module that provides a
> byte-oriented interface on top of bitmap.
Agreed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/developers/attachments/20120511/abe26428/attachment.sig>
More information about the developers
mailing list