From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Tue, 5 Apr 2011 18:28:32 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.38-20+; KDE/4.5.5; x86_64; ; ) References: <86fwpz55nj.fsf@cmarib.ramside> <86vcythf8h.fsf@cmarib.ramside> In-Reply-To: <86vcythf8h.fsf@cmarib.ramside> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201104051828.37808.dexen.devries@gmail.com> Subject: Re: [9fans] Making read(1) an rc(1) builtin? Topicbox-Message-UUID: c9f5d478-ead6-11e9-9d60-3106f5b1d025 On Monday 04 of April 2011 23:35:26 smiley@zenzebra.mv.com wrote: > (...) > I know that using awk(1) is a possibility, but awk(1) still has to > system() every "test -e", just like rc(1) does.=20 > (...) instead of "test -e" (and other object-related tests), why not to pipe from= =20 awk to plumb (the program) or to /mnt/plumb/send? i guess plumber is the=20 default `dispatch-if-object-exists' mechanism in p9. using the `plumb' program would require exactly one rfork()/exec() for one= =20 message you decide in awk to pass through -- less than one per click. even= =20 better, piping to /mnt/plumber/send is just one open()/write(). your script= is=20 free to add and/or change plumber rules upon start. =2D-=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] ``In other news, STFU and hack.'' mahmud, in response to Erann Gat's ``How I lost my faith in Lisp'' http://news.ycombinator.com/item?id=3D2308816