read-string!/partial on non-file ports

2007-09-10 Thread Luigi Semenzato
Greetings, I would like to move binary data between two guile applications across a pipe (opened with open-input-output-pipe). Read-char and write-char in a loop are going to be too slow. Read-string!/partial and write-string/partial are exactly what I need but they only work on file ports. (I

Re: read-string!/partial on non-file ports

2007-09-10 Thread Stephen Compall
On Mon, 2007-09-10 at 12:25 -0700, Luigi Semenzato wrote: I would like to move binary data between two guile applications across a pipe (opened with open-input-output-pipe). Read-char and write-char in a loop are going to be too slow. Read-string!/partial and write-string/partial are exactly

Re: read-string!/partial on non-file ports

2007-09-10 Thread Luigi Semenzato
On 9/10/07, Stephen Compall [EMAIL PROTECTED] wrote: On Mon, 2007-09-10 at 12:25 -0700, Luigi Semenzato wrote: I would like to move binary data between two guile applications across a pipe (opened with open-input-output-pipe). Read-char and write-char in a loop are going to be too slow.

Re: read-string!/partial on non-file ports

2007-09-10 Thread Kevin Ryde
Mike Gran [EMAIL PROTECTED] writes: I wrote a peer-to-peer ap where I used (display data socket) to send and (read-string!/partial block socket-port) to receive. That'd be the ticket, I use a `socketpair' and read-string to talk back and forward to a child process. You have to have an ugly

Re: read-string!/partial on non-file ports

2007-09-10 Thread Ludovic Courtès
Hi, Luigi Semenzato [EMAIL PROTECTED] writes: I would like to move binary data between two guile applications across a pipe (opened with open-input-output-pipe). Read-char and write-char in a loop are going to be too slow. Read-string!/partial and write-string/partial are exactly what I

Re: read-string!/partial on non-file ports

2007-09-10 Thread Luigi Semenzato
Wow, thanks for all the help. Mike and Kevin pointed out that it's probably best to use socketpair rather than pipe. Of course. I am such a troglodyte. Kevin's example looks robust and I used it almost verbatim (I assume it's OK). It works fine. Ludovic suggests that uniform vectors are