[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subbytevectors

From: Ludovic Courtès
Subject: Re: subbytevectors
Date: Mon, 11 Jun 2012 13:55:52 +0200
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.0.93 (gnu/linux)


Andy Wingo <address@hidden> skribis:

> On Sat 09 Jun 2012 17:16, Thien-Thi Nguyen <address@hidden> writes:
>> If you want to make a case for such a facility, why not
>> show some code, both without (status quo) and with (proposed)?
>> It should be clear what expressiveness is gained, and how.
> For example, let's say I mmap a big file.
>   (define x (mmap-file "/usr/lib/debug/lib/x86_64-linux-gnu/"))
> I did some computation and have figured out that there is a region of
> interest between bytes 121241 and 121263 that interests me.  I would
> like to be able to pass off that region to some other piece of code,
> without giving it access to the entire bytevector.  I would also like to
> be able to pass around  

What about using copying (or rather, copy-on-write) sub-bytevectors to
start with?  That would avoid the aliasing issue; OTOH COW would make
the implementation more complex.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]