Hello!
I pushed the patch as commit e441c34f1666921f6b15597c1aa3a50596a129d7
with the following changes taking into account your comments:
• adjusted copyright years;
• removed comment about ‘SCM_F_BYTEVECTOR_CONTIGUOUS’ since it’s quite
clear from the discussion in this thread that
On 14-01-2023 00:48, Ludovic Courtès wrote:
Ah yes, that’s right, I misunderstood the comment.
In the example above, where we’re only dealing with slices, we could
“skip” the parent (i.e., have each slice’s parent point to the “root” of
the hierarchy), but I don’t think we can assume this to
Maxime Devos skribis:
> On 13-01-2023 12:32, Ludovic Courtès wrote:
>>> IIUC, if you use bytevector-slice iteratively, say:
>>>
>>> (let loop ((bv some-initial-value)
>>> (n large-number))
>>>(if (> n 0)
>>>(loop (bytevector-slice bv 0 (bytevector-length bv))
>>>
On 13-01-2023 12:32, Ludovic Courtès wrote:
IIUC, if you use bytevector-slice iteratively, say:
(let loop ((bv some-initial-value)
(n large-number))
(if (> n 0)
(loop (bytevector-slice bv 0 (bytevector-length bv))
(- n 1))
bv))
you will end up with a
Hi,
Maxime Devos skribis:
> The only thing missing for me, is a procedure
> 'bytevector-slice/read-only' and 'bytevector-slice/write-only', then I
> could throw the module implementing the wrapping in Scheme-GNUnet and
> the overhead incurred by wrapping away.
I did consider the read-only
> On 12 Jan 2023, at 23:27, Ludovic Courtès wrote:
>
> lloda skribis:
>
>>> On 11 Jan 2023, at 18:37, Thompson, David wrote:
>>>
>>> On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès wrote:
What could be convenient though is ‘bytevector-copy’ (no bang), which
would combine
lloda skribis:
>> On 11 Jan 2023, at 18:37, Thompson, David wrote:
>>
>> On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès wrote:
>>>
>>> What could be convenient though is ‘bytevector-copy’ (no bang), which
>>> would combine ‘make-bytevector’ + ‘bytevector-copy!’.
>>
>> 'bytevector-copy'
This looks useful to me, especially once the optimiser recognises
'bytevector-slice'. (In Scheme-GNUnet, I defined a wrapper around
bytevectors called 'bytevectors slices' to implement such a thing.)
The only thing missing for me, is a procedure
'bytevector-slice/read-only' and
> On 11 Jan 2023, at 18:37, Thompson, David wrote:
>
> On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès wrote:
>>
>> What could be convenient though is ‘bytevector-copy’ (no bang), which
>> would combine ‘make-bytevector’ + ‘bytevector-copy!’.
>
> 'bytevector-copy' already exists, or do you
On Wed, Jan 11, 2023 at 12:34 PM Ludovic Courtès wrote:
>
> What could be convenient though is ‘bytevector-copy’ (no bang), which
> would combine ‘make-bytevector’ + ‘bytevector-copy!’.
'bytevector-copy' already exists, or do you mean some different
implementation of it?
- Dave
Hi,
Jean Abou Samra skribis:
> What do you think about making it more similar to substrings?
> There the 'substring' procedure makes a copy-on-write substring,
> and you have substring/shared if you really want shared mutation.
> Would something like this be meaningful / feasible / useful
> for
Hi Ludovic,
Le 11/01/2023 à 16:00, Ludovic Courtès a écrit :
+@node Bytevector Slices
+@subsubsection Bytevector Slices
+
+@cindex subset, of a bytevector
+@cindex slice, of a bytevector
+@cindex slice, of a uniform vector
+As an extension to the R6RS specification, the @code{(rnrs bytevectors
Hi Ludovic,
On Wed, Jan 11, 2023 at 10:00 AM Ludovic Courtès wrote:
>
> +@node Bytevector Slices
> +@subsubsection Bytevector Slices
> +
> +@cindex subset, of a bytevector
> +@cindex slice, of a bytevector
> +@cindex slice, of a uniform vector
> +As an extension to the R6RS specification, the
* module/rnrs/bytevectors/gnu.scm: New file.
* am/bootstrap.am (SOURCES): Add it.
* libguile/bytevectors.c (scm_bytevector_slice): New function.
* libguile/bytevectors.h (scm_bytevector_slice): New declaration.
* test-suite/tests/bytevectors.test ("bytevector-slice"): New tests.
*
14 matches
Mail list logo