if anyone is still listening (ha) - someone reminded me of this last
week, so I spent another 10 minutes looking at it.
#!perl -l
eval'$c-=fork?$c?s//(/:exit:- s//)/;'x2x pop or print
is the shortest I can get with this forking method, which still prints
the results in a random order, but it's shorter than bass's.
Jasper
On 23/11/2007, Jasper <[EMAIL PROTECTED]> wrote:
> On 23/11/2007, Jasper <[EMAIL PROTECTED]> wrote:
>
> > Just thought of this.
> >
> > Probably has performance issues and is a little bit longer. Boo!
> >
> > #!perl -l
> > $l=2*pop;fork?$l>$c++?$_.='(':exit:$c--?$_.=')':exit while$l--;print
> >
> > Doesn't order correctly (it would if I added a wait), doesn't print
> > right, but everyone loves potentially killing their machine with a
> > fork. Can't get rid of the two exits, so there seems to be flab for
> > sure
>
>
> Flabby indeed
>
> #!perl -l
> $_.=fork?$c--?')':exit:++$c&&'('for($_)x(2*pop);$c||print
>
> That's the same length as bass, but still with the same problems. A
> waitpid does solve the ordering problem, but the only way to stop the
> overall parent exiting before all the permutations have printed is to
> do something awful. Those solutions add lotsa characters... :(
>
> --
>
> Jasper
>
--
Jasper