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 need but they only work on file ports. (I get this error: > Wrong type argument in position 2 (expecting open file port): > #<input-output: soft 56f1d0>). > > Two questions. > > 1. Do I have other choices? I cannot find any. Using strings for binary I/O is Bad because it assumes a specific bit-representation of strings (namely, ASCII). SRFI-4 vectors and `uniform-vector-read!'/`uniform-vector-write' may be a better match. If you're not afraid of using experimental code, you might also want to try Guile-R6RS-Libs, which includes part of R6RS' binary I/O API (actually based on R5.92RS): http://www.laas.fr/~lcourtes/software/guile/guile-r6rs-libs-0.0.tar.gz http://www.r6rs.org/document/lib-html-5.92/r6rs-lib-Z-H-4.html#node_chap_2 http://www.r6rs.org/document/lib-html-5.92/r6rs-lib-Z-H-9.html#node_sec_7.2 Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user