On Tue, 3 May 2011, Ole Tange wrote:
On Tue, May 3, 2011 at 5:06 PM, Rhys Ulerich wrote:
Following a recent discussion on the list I have given some thought
to making an option --nest.
My first thought was --multiply (as in multiply list 1 with list 2)
but I agree that --nest (as in nested for loops) is better.
Hmm... along the lines of --multiply I'd have said --outer as in
outer product. You could then also have --inner as in inner product
which would concatenate lines from multiple files prior to
processing.
I would like the option to be called something that people might
google for. I personally would never have googled for outer and inner.
I might have googled for multiply.
Can we come up with an even better word? Maybe something already used
elsewhere?
My first thought was --cross (from cross product). (Maybe --cartesian
(from Cartesian product)?)
'--cross' has the disadvantage of being very overloaded (cross product,
(a)cross different hosts, cross-compilation, etc.). On the other hand,
we're talking about software with the name 'parallel', so being
unambiguous is obviously not priority #1... ;-)
Other preferable synonyms might be found on:
http://en.wikipedia.org/wiki/Direct_product
I'd think something called "--nest" would be handy for situations
where one wants parallel to invoke parallel.
Which is basically what --nest does:
parallel -a file1 parallel -a file2 -I {o} echo {} {o}
will be the same as:
parallel --nest -a file1 -a file2 echo {1} {2}
But it's not actually nested, which seems misleading.
--
Best,
Ben