chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Blobs: a (modest?) proposal


From: Alaric Snell-Pym
Subject: Re: [Chicken-users] Blobs: a (modest?) proposal
Date: Sun, 25 Jan 2009 14:36:20 +0000


On 24 Jan 2009, at 2:43 pm, felix winkelmann wrote:

On Sat, Jan 24, 2009 at 1:10 PM, Alaric Snell-Pym
<address@hidden> wrote:


What do people think of this? Would it be welcome in the chicken core
once it's proven itself?


Sure. The use of strings for binary data is indeed something that
should
be reduced. There is also a lot of copying involved. But one has to be
careful not to re-implement memory management completely: Use
srfi-4 bytevectors where appropriate and blobs where the data is
truly opaque (but I guess this is self-evident).

Indeed... my desire to base srfi-4 vectors on top of blobs is purely
so they can share an underlying memory management structure so that
raw I/O functions - memory map, reads, random C libraries such as
spread and gdbm and compression and encryption libraries, can use the
blob system to encapsulate the opaque buffers they return; then srfi-4
vectors, being wrappers around blobs that specialise their semantics,
can just sit on top of the foreign memory management of the blob.


cheers,
felix


ABS

--
Alaric Snell-Pym
Work: http://www.snell-systems.co.uk/
Play: http://www.snell-pym.org.uk/alaric/
Blog: http://www.snell-pym.org.uk/?author=4






reply via email to

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