From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: subbytevectors Date: Mon, 11 Jun 2012 13:55:52 +0200 Message-ID: <87y5nuukon.fsf@gnu.org> References: <878vfwg2vw.fsf@pobox.com> <87obosbjnx.fsf@gnuvola.org> <87vcj0e7ng.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1339416040 11751 80.91.229.3 (11 Jun 2012 12:00:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Jun 2012 12:00:40 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jun 11 14:00:37 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Se3IP-0006uj-Q8 for guile-devel@m.gmane.org; Mon, 11 Jun 2012 14:00:33 +0200 Original-Received: from localhost ([::1]:36348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Se3IP-00019S-Nw for guile-devel@m.gmane.org; Mon, 11 Jun 2012 08:00:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Se3IF-00017j-P5 for guile-devel@gnu.org; Mon, 11 Jun 2012 08:00:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Se3I7-00059J-Kd for guile-devel@gnu.org; Mon, 11 Jun 2012 08:00:23 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Se3I7-00057e-38 for guile-devel@gnu.org; Mon, 11 Jun 2012 08:00:15 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Se3Hx-00063g-Uh for guile-devel@gnu.org; Mon, 11 Jun 2012 14:00:05 +0200 Original-Received: from 193.50.110.130 ([193.50.110.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jun 2012 14:00:05 +0200 Original-Received: from ludo by 193.50.110.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 11 Jun 2012 14:00:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.130 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 24 Prairial an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:cs7YoOkzEMurL1yMwAq8UUrw+uo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14589 Archived-At: Hi, Andy Wingo skribis: > On Sat 09 Jun 2012 17:16, Thien-Thi Nguyen 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’.