Panicz Maciej Godek writes:
> Your solution seems reasonable, but I have found another way, which
> lead me to some new problems.
> I realised that since sockets are ports in guile, I could process them
> with the plain "read" (which is what I have been using them for
> anyway).
>
> However, this
hello :)
[...]
But I have a give a warning again, when you try to avoid allocation
> overhead, you have to face the risk of the side-effect. To me, I'd
> prefer pure-functional. ;-P
>
>
Your solution seems reasonable, but I have found another way, which lead me
to some new problems.
I realised th
hi there!
On Tue, 2014-01-14 at 00:17 +0100, Panicz Maciej Godek wrote:
> Another option would be to use
> (substring (utf8->string buffer 0 n))
>
> This one works, but according to the manual, the
> string is "newly allocated", so it's unnecessary overhead.
>
Actually, substring is COW(copy-on
Hi,
what would be the best way to convert
only a part of a byte vector (interpreted as
UTF-8) to string?
Let's say that I have a big buffer,
(define buffer (make-u8vector 1024))
which contains some message
(define n (recv! sock buffer))
I'd like to get only the first n bytes of buffer.
I initial