unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: subbytevectors
Date: Mon, 11 Jun 2012 13:55:52 +0200	[thread overview]
Message-ID: <87y5nuukon.fsf@gnu.org> (raw)
In-Reply-To: 87vcj0e7ng.fsf@pobox.com

Hi,

Andy Wingo <wingo@pobox.com> skribis:

> On Sat 09 Jun 2012 17:16, Thien-Thi Nguyen <ttn@gnuvola.org> 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/libc-2.13.so"))
>
> 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.

Thanks,
Ludo’.




  reply	other threads:[~2012-06-11 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09 11:07 subbytevectors Andy Wingo
2012-06-09 15:16 ` subbytevectors Thien-Thi Nguyen
2012-06-09 17:07   ` subbytevectors Andy Wingo
2012-06-11 11:55     ` Ludovic Courtès [this message]
2012-06-11 14:01       ` subbytevectors Andy Wingo
2012-06-11 15:35         ` subbytevectors Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5nuukon.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).