From: "Marijn Schouten (hkBst)" <hkBst@gentoo.org>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-user@gnu.org
Subject: Re: pipelines
Date: Mon, 30 Mar 2009 11:26:21 +0200 [thread overview]
Message-ID: <49D0903D.7070704@gentoo.org> (raw)
In-Reply-To: <m3r60gq215.fsf@pobox.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andy Wingo wrote:
> Hi Marijn,
>
> On Sat 28 Mar 2009 05:53, "Marijn Schouten (hkBst)" <hkBst@gentoo.org> writes:
>
>> how would I construct a pipeline with guile? Currently my best attempt which
>> turns to nothing is:
>>
>> guile> (use-modules (ice-9 popen))
>> guile> (with-output-to-port (open-pipe "echo" OPEN_WRITE) (lambda ()
>> (with-input-from-port (open-pipe* OPEN_READ "echo" "Hello world") (lambda ()
>> (display (readline))))))
>
> What do you mean by "pipeline"? Do you want to spawn off "echo foo |
> bar", or write data to "bar", or read data from "echo foo" ?
>
> Andy
By pipeline I mean for example:
echo "Hello world" | cat | cat | cat | grep world | cat
I know how to create such pipelines that contain only a single pipe. My question
is about how to do it when there are many pipes.
Marijn
- --
Gods do not want you to think, lest they lose existence.
Religions do not want you to think, lest they lose power.
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknQkD0ACgkQp/VmCx0OL2xg9QCfXpQiYE8NRW3jwKXwWT2/CMeG
4T0AnjjtydzaLNQb7qBp639Qd2UqHbR4
=lAkP
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2009-03-30 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 12:53 pipelines Marijn Schouten (hkBst)
2009-03-29 6:24 ` pipelines Andy Wingo
2009-03-30 9:26 ` Marijn Schouten (hkBst) [this message]
2009-03-30 19:00 ` pipelines Neil Jerram
2009-03-31 22:56 ` pipelines Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49D0903D.7070704@gentoo.org \
--to=hkbst@gentoo.org \
--cc=guile-user@gnu.org \
--cc=wingo@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).