mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: John Reiser <jreiser-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
To: Michal Soltys <soltys-R61QfzASbfY@public.gmane.org>
Cc: WANG Cong
	<xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] bash3 compat patch
Date: Wed, 12 Oct 2011 09:09:40 -0700	[thread overview]
Message-ID: <4E95BBC4.2010106@bitwagon.com> (raw)
In-Reply-To: <4E940418.6080102-R61QfzASbfY@public.gmane.org>

On 10/11/2011 01:53 AM, Michal Soltys wrote:
> On 11.10.2011 09:11, WANG Cong wrote:
>>
>> Interesting function, if i understand it correctly, it parallelizes
>> the stream into two so that can speed up the pattern filtering?
>>
>> My brain spins...
>>
> It was added by John Reiser (see commit d23159a69c818274486f1287ba6267b96f3febb7).
> 
> I just moved the main body into a function, so it's easily eval'able - in order to avoid {var}>& construct. As a side effect, it's (subjectively) a bit easier to read.

It may be easier to read the latest version "in the small",
but the re-formatting has destroyed the visual parallelism of the code.
The two-dimensional presentation highlights both the similarities
and differences of the two sides, and this can be essential
for easy understanding of the global situation.  In particular,
the 2-D presentation makes it easier to trace the pipes
and to see the similarities of the two sides:
-----
       local merge side2
       ( ( local _f1 _f2
           while  read _f1; do   echo "$_f1"
               if read _f2; then echo "$_f2" 1>&${side2}; fi
           done \
           | nmf1     1>&${merge}    )           {side2}>&1 \
           | nmf1  )      {merge}>&1
-----

-- 

  parent reply	other threads:[~2011-10-12 16:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 21:58 [PATCH 0/2] minimum bash version Michal Soltys
     [not found] ` <1318283885-1792-1-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-10 21:58   ` [PATCH 1/2] bash3 compat patch Michal Soltys
2011-10-11  7:11     ` WANG Cong
2011-10-11  8:53       ` Michal Soltys
     [not found]         ` <4E940418.6080102-R61QfzASbfY@public.gmane.org>
2011-10-12 16:09           ` John Reiser [this message]
     [not found]     ` <1318283885-1792-2-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-11  7:39       ` Harald Hoyer
2011-10-10 21:58   ` [PATCH 2/2] explicitly verify bash version Michal Soltys
     [not found]     ` <1318283885-1792-3-git-send-email-soltys-R61QfzASbfY@public.gmane.org>
2011-10-11  7:39       ` Harald Hoyer

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E95BBC4.2010106@bitwagon.com \
    --to=jreiser-po6cbstgb2zwk0htik3j/w@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=soltys-R61QfzASbfY@public.gmane.org \
    --cc=xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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