Hi Ludo, Ludovic Courtès writes: > Hi Rutger, > > (+Cc: Andy.) > > Rutger van Beusekom skribis: > >> From d351c0a5ecde62e63368bec0e1f15108495a1a71 Mon Sep 17 00:00:00 2001 >> From: Rutger van Beusekom >> Date: Mon, 2 Mar 2020 10:38:57 +0100 >> Subject: [PATCH] Add pipeline procedure. >> >> * libguile/posix.c (scm_open_process): Remove. >> (scm_piped_process): Add to replace open_process. >> * module/ice-9/popen.scm (pipe->fdes): Add to convert pipe pair to fdes pair. >> (open-process): Add open-process for backwards compatibility. >> (pipeline): Add to implement a pipeline using piped-process. > > There are a couple super minor issues that I comment on below, but > otherwise LGTM! If Andy agrees, we can apply it once the copyright > assignment is on file, so maybe it won’t be in 3.0.2, we’ll see! As yet I have not received a copyright assignment form. > >> +@deffn (Scheme Procedure) pipeline commands > ^ ^ > Should be braces. > >> +Execute a @code{pipeline} of @var{commands} -- where each command is a >> +list of a program and its arguments as strings -- returning an input > > s/--/---/ so we get an em dash and not an en dash (I’m a typography > nitpicker :-)). > >> +port to the end of the pipeline, an output port to the beginning of the >> +pipeline and a list of PIDs of the processes executing the @var{commands}. >> + >> +@example >> +(let ((commands '(("git" "ls-files") >> + ("tar" "-cf-" "-T-") >> + ("sha1sum" "-"))) > ^ > There’s an extra space on these lines > >> + (pipe-fail? (compose not >> + zero? >> + status:exit-val >> + cdr >> + waitpid))) > > I don’t think we should encourage this style, which could also look > obscure to newcomers. I’d just make it a regular lambda. > Personally I really like composing procedures like a pipeline ;-), but I do not want to obscure things. > That’s all for me. > > Thanks again, Rutger! > > Ludo’. Thank you for helping me find where to dot the i's and cross the t's, please see the updated patch. Rutger.