bytevector-string-ref

2022-12-18 Thread Sascha Ziemann
I am wondering if something like bytevector-string-ref is missing in the API. Or is there any other way to extract a string from a byte vector, without copying the data twice?

Re: Growing a Networked Garden with Spritely Goblins

2022-12-18 Thread alex sassmannshausen
Amazing! Big fan of his work on Chickadee and Catbird. Congrats! Alex On Sat, 17 Dec 2022, 22:13 Christine Lemmer-Webber, wrote: > A lovely article by David Thompson: > > > https://spritely.institute/news/growing-a-networked-garden-with-spritely-goblins.html > > By the way, David Thompson is w

Re: bytevector-string-ref

2022-12-18 Thread tomas
On Sun, Dec 18, 2022 at 01:12:57PM +0100, Sascha Ziemann wrote: > I am wondering if something like bytevector-string-ref is missing in the API. > Or is there any other way to extract a string from a byte vector, without > copying the data twice? Alas, it's more complicated than this. There's a who

Re: bytevector-string-ref

2022-12-18 Thread Taylan Kammer
On 18.12.2022 13:12, Sascha Ziemann wrote: > I am wondering if something like bytevector-string-ref is missing in the API. > Or is there any other way to extract a string from a byte vector, without > copying the data twice? > I don't think Guile currently has any way of giving you a string objec

Re: bytevector-string-ref

2022-12-18 Thread tomas
On Sun, Dec 18, 2022 at 05:25:16PM +0100, Taylan Kammer wrote: > On 18.12.2022 13:12, Sascha Ziemann wrote: > > I am wondering if something like bytevector-string-ref is missing in the > > API. > > Or is there any other way to extract a string from a byte vector, without > > copying the data twice

Re: bytevector-string-ref

2022-12-18 Thread Vijay Marupudi
The 2 copies occur if you want a portion of the bytevector to be converted to a string. The current API requires you to copy to a bytevector that's the length of the slice, and then convert that copy to a string. I've sent patches to guile-devel to address this issue (by extending utf{8,16,32}->st

[ANN] Guile-PNG 0.3.0 released

2022-12-18 Thread Artyom V. Poptsov
Hello Guilers, I'm pleased to announce Guile-PNG 0.3.0, Portable Network Graphics (PNG)[1] library for GNU Guile, implemented in pure scheme: https://github.com/artyom-poptsov/guile-png/releases/tag/v0.3.0 This version adds ability to draw polygons and filled rectangles, as well as fixes line d

Re: bytevector-string-ref

2022-12-18 Thread Matt Wette
On 12/18/22 4:12 AM, Sascha Ziemann wrote: I am wondering if something like bytevector-string-ref is missing in the API. Or is there any other way to extract a string from a byte vector, without copying the data twice? I sympathize with the struggle here.   I wonder if rlb is aware. I believe

Re: bytevector-string-ref

2022-12-18 Thread Sascha Ziemann
Maybe having a bytevector-slice-ref with shared memory would be more flexible. The partial usage of a bytevector as a string is just one use case. There may be others.

Re: bytevector-string-ref

2022-12-18 Thread tomas
On Sun, Dec 18, 2022 at 11:45:49PM +0100, Sascha Ziemann wrote: > Maybe having a bytevector-slice-ref with shared memory would be more flexible. > The partial usage of a bytevector as a string is just one use case. > There may be others. Is that related to "shared arrays"? This seems to be even mo

Re: [ANN] Guile-PNG 0.3.0 released

2022-12-18 Thread Dr. Arne Babenhauserheide
"Artyom V. Poptsov" writes: > I'm pleased to announce Guile-PNG 0.3.0, Portable Network Graphics > (PNG)[1] library for GNU Guile, implemented in pure scheme: > https://github.com/artyom-poptsov/guile-png/releases/tag/v0.3.0 > > This version adds ability to draw polygons and filled rectangles,