There's a null character in this submission. I hope this works, but I'm afraid it won't...
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s//$&/g}$_=/\w/&&(@z=map$_^t^($_^=t^t),@F).": @F
${\t}: @z
"y/
|
What??? Larry is junking the empty regex in Perl 6? How awful. Now if anyone can tell me how to enter a submission with a literal \0 character, I would be sooo happy.
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s//$&/g}$_=/\w/&&(@z=map$_^t^($_^=t^t),@F).": @F
${\t}: @z
";y/\0/ /;s/ +$//m;s/( .{57})...+(.
.* .{0,56}\S+).*/$1..$2/
|
Two strokes to go... but which two strokes?
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
${\t}: @z
";y/\0/ /;s/ +$//m;s/( .{57})...+(.
.* .{0,56}\S+).*/$1..$2/
|
Let's go back to a previous solution, with .{0,56}\S+ .
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
".t.": @z
";y/\0/ /;s/ +$//m;s/( .{57}).{4,}(
.* .{0,56}\S+).*/$1...$2/
|
Only 4 strokes to go...
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
".t.": @z
";y/\0/ /;s/( .{57})...+\S.*(
.* .{56,}?) .*/$1...$2/;s/ +$//m
|
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
".t.": @z
";y/\0/ /;s/( .{57}).{3,}\S.*(
.* .{56,}?\s).*/$1...$2/;s/ +$//m
|
A few small improvements. v47 scores 0.01 lower than "/".
#!perl -ap056
sub t{lc=~y/aeiouy//.v47.s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
".t.": @z
";y/\0/ /;s/ +$//m;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*$#$1#
|
The xor'ings can be ordered in so many different ways... I've finally lost the my@z now. Again, the y/\0/ / should contain a literal \0.
#!perl -ap056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}$_=/./&&(@z=map$_^t^($_^=t^t),@F).": @F
".t.": @z
";y/\0/ /;s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*\Z#$1#
|
Yes! The \0 in the yansliteration should be a literal ctrl-@ character.
#!perl -ap056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}my@z;$_=/./&&(map$_^=t^($z[@z]=t^t^$_),@F).": @z
".t.": @F
";y/\0/ /;s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*\Z#$1#
|
Thank you perlrun!
#!perl -ap056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}my@z;$_=/./&&(@x=map{$z[@z]=$b=t^$_^$_;$_^t^t}@F).": @x
".t.": @z
";y/\0/ /;s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*\Z#$1#
|
Ahhh... much better. I used a standard golf technique here: going from a string based algorithm to an array based one. The xor'ing of the two lines to equalise the lengths is much clearer in this version. I don't like the my@z. I'll work on that next, probably.
#!perl -p056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}my@z;$_=/./&&(@x=map{$z[@z]=$b=t^$_^$_;$_^t^t}split).": @x
".t.": @z
";y/\0/ /;s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*\Z#$1#
|
Thank you, perlre!
#!perl -p056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}$w=split;$b^=(($@.=$_.$")^=($b.=t.$")^$b)^$@for@_;$_=/./&&"$w: $@
".t.": $b
";y/\0/ /;$@=$b=!s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#( .{0,56}\S+).*\Z#$1#
|
#!perl -p056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}$@=$b=$c;$w=split;$b^=(($@.=$_.$")^=($b.=t.$")^$b)^$@for@_;$_=/./&&"$w: $@
".t.": $b
";y/\0/ /;s/ +$//mg;s/(^.* .{57}).{4,}/$1.../&&s#(
.* .{0,56}\S+).*$#$1#
|
#!perl -p056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}$@=$b=$c;$w=split;$b^=(($@.=$_.$")^=($b.=t.$")^$b)^$@for@_;y/\0/ /,s/ +$//for$@,$b;$b=~/.{0,56}\S+/,$b=$&if$@=~s/(.{57}).{4,}/$1.../;$_=$w?"$w: $@
".t.": $b
":$c
|
#!perl -p056
sub t{lc=~y/aeiouy//."/".s/\w/$&/g}$w=split;$b^=(($@.=$_.$")^=($b.=t.$")^$b)^$@for@_;y/\0/ /,s/ +$//for$@,$b;$@=~s/(.{57}).{4,}/$1.../&&$b=~s/^(.{0,56}\S+).*/$1/;$_=$w?"$w: $@
".t.": $b
":$c;$@=$b=$c
|
#!perl -p056
sub e{lc=~y/aeiouy//."/".s/\w/$&/g}$w=split;$a.=$_,$b.=e,$a.=$"x($d=$b=~y///c-length$a).$",$b.=$"x-$d.$"for@_;s/ +$//,s/(.{57}).{4,}/$1/&&$b=~s/((\S+ +){${\~~split}}).*/$1/&&s/$/.../for$a;$_=$w?"$w: $a
".e.": $b
":'';$a=$b=!s/ +$//
|
#!perl -n056
sub e{1*lc=~y/aeiouy//."/".s/\w/$&/g}if(split){$w=@_;$a=$b='';$a.=$_,$b.=e,$a.=$"x($d=$b=~y///c-length$a).$",$b.=$"x-$d.$"for@_;s/ +$//,s/([^ ].{56}).{4,}/$1/&&($q=split,$b=~s/(([^ ]+ +){$q}).*/$1/e,s/$/.../)for$a;$b=~s/ +$//;print "$w: $a
",e,": $b
"
}
|
Not very good, perhaps, but it's a start. To be continued...
#!perl -n056
sub e{$a.=$"x($d=length($b)-length$a);$b.=$"x-$d}$v=s/[aeiouy]/$&/gi;$l=s/\w/$&/gi;if(split){$w=@_;$a=$b='';for(@_){$a.=$_.$";$b.=1*s/[aeiouy]/$&/gi."/".s/\w/$&/gi.$";e}$a=~s/ +$//;if($a=~s/([^ ].{56}).{4,}/$1/){$q=split' ',$a;$b=~s/(([^ ]+ +){$q}).*/$1/e;$a.='...'}$b=~s/ +$//;print"$w:\t$a
$v/$l:\t$b
"}
|