Amirouche Boubekki <amirou...@hypermove.net>:

> I can't make work `get-bytevector-some` with my code. It only returns
> a single cell bv.

Run my test code as follows:

   cat | guile test.scm

That way, you get the natural pipe semantics for stdin.

> Instead I use `char-ready?`. Here is the definition of `recv-some`:
>
> ```
> (define (recv-some port)
>   (let next ((out '()))
>     (if (char-ready? port)
>       (let ((byte (get-u8 port)))
>         (if (eof-object? byte)
>             (u8-list->bytevector (reverse out))
>             (next (cons byte out))))
>       (u8-list->bytevector (reverse out)))))
> ```

Your code is ok but very micromanagerial. I really would like the
bytevector variants to do I/O in bulk.


Marko

Reply via email to