* ky00te is free! That leaves only newspeak in filters-nonfree.
[filters.git] / jibberish
1 #!/usr/bin/perl
2 # jibberish -- run all filters in random order
3
4 $ENV{PATH}.=":/usr/games";
5
6 @all= qw(
7 eleet
8 b1ff
9 chef
10 jethro
11 upside-down
12 kraut
13 cockney
14 jive
15 nyc
16 ken
17 ky00te
18 rasterman
19 );
20
21 @nonfree= qw(
22 newspeak
23 );
24
25 # Test to see if non-free filters are here, if so, add them to @all.
26 foreach (@nonfree) {
27 if (-x "/usr/games/$_") {
28 push @all, $_;
29 }
30 }
31
32 # shuffle order
33 srand;
34 for (0..$#all) {
35 my $n= @all*rand;
36 my $was= $all[$_];
37 $all[$_]= $all[$n];
38 $all[$n]= $was;
39 }
40
41 # start the pipe...
42 my $pipe= join '|', @all;
43 open FILTER, "$pipe|"
44 or die ""Never mind...\n";;
45
46 # display the results
47 while (<FILTER>) {
48 print $_
49 }
50
51 # This could be optimized: take the last program off the pipeline,
52 # open the pipeline as standard input, then exec that last program.
53 #
54 # But you have to ask yourself: how important is it to optimize
55 # the generation of jibberish?
This page took 0.022925 seconds and 5 git commands to generate.