Interlinear

Score: 198.18 (pass)

Why didn't I find any of these strokes to shave earlier?

#!perl -ap056
map$$_=$Z,B..Z;$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$Q.=$"x($x=$P=~y///c-length$Q).$S.@v.'/'.@t,$P.=$"x-$x.$S.$_,$S=$"for@F;$_=/./&&@F.":	$P
$V/$T:	$Q
";s/(	.{57}).{4,}(
.*	.{0,56}\S+).*/$1...$2/

Score: 199.18 (pass)

I actually broke 200! This is fun again! :-)

#!perl -ap056
map$$_=$Z,B..Z;$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$Q.=$"x($x=$P=~y///c-length$Q).$S.@v.'/'.@t,$P.=$"x-$x.$S.$_,$S=$"for@F;$_=@F?@F.":	$P
$V/$T:	$Q
":$Z;s/(	.{57}).{4,}(
.*	.{0,56}\S+).*/$1...$2/

Score: 200.18 (pass)

I finally met my goal of 200! Well, okay, so my goal was to -break- 200...

#!perl -ap056
$$_=$Z for B..Z;$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$Q.=$"x($x=$P=~y///c-length$Q).$S.@v.'/'.@t,$P.=$"x-$x.$S.$_,$S=$"for@F;$_=@F?@F.":	$P
$V/$T:	$Q
":$Z;s/(	.{57}).{4,}(
.*	.{0,56}\S+).*/$1...$2/

Score: 202.16 (pass)

Two more strokes off, but I've hit another wall.

#!perl -ap056
$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$q.=$"x($x=$p=~y///c-length$q).$s.@v.'/'.@t,$p.=$"x-$x.$s.$_,$s=$"for@F;$_=@F?@F.":	$p
$V/$T:	$q
":$z;s/(	.{57}).{4,}(
.*	.{0,56}\S+).*/$1...$2/;$V=$T=$p=$q=$s=$z

Score: 204.17 (pass)

A breakthrough for 8 strokes! Clear vision is a small price to pay for such joy. I need to get rid of $V=$T=...=$Z; though. If only I could see how...

#!perl -ap056
$V=$T=$p=$q=$s=$Z;$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$q.=$"x($x=$p=~y///c-length$q).$s.@v.'/'.@t,$p.=$"x-$x.$s.$_,$s=$"for@F;$_=(@F||last).":	$p
$V/$T:	$q
";s/(	.{57}).{4,}(
.*	.{0,56}\S+).*/$1...$2/

Score: 212.17 (pass)

Removed unnecessary duplication of @F. My brain hurts! I've hit a wall.

#!perl -ap056
$V=$T=$p=$q=$s=$Z;$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$q.=$"x($x=$p=~y///c-length$q).$s.@v.'/'.@t,$p.=$"x-$x.$s.$_,$s=$"for@F;$p=~s/(.{57}).{4,}/$1.../and($q)=$q=~/.{0,56}\S+/g;$_=(@F||last).":	$p
$V/$T:	$q
"

Score: 213.17 (pass)

Escaping a '/' character in a double-quoted string. Sheesh! Must have been left over from a regex try.

#!perl -ap056
@F||last;$V=$T=$p=$q=$s='';$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$q.=$"x($x=$p=~y///c-length$q).$s.@v.'/'.@t,$p.=$"x-$x.$s.$_,$s=$"for@F;$p=~s/(.{57}).{4,}/$1.../and($q)=$q=~/.{0,56}\S+/g;$_=@F.":	$p
$V/$T:	$q
"

Score: 214.17 (pass)

Tried a new algorithm that hasn't panned out so far, then came back to this old standby. More stroke shaving, nothing spectacular. Yet. :-)

#!perl -ap056
@F||last;$V=$T=$p=$q=$s='';$V+=@v=/[aeiouy]/ig,$T+=@t=/\w/g,$q.=$"x($x=$p=~y///c-length$q).$s.@v.'/'.@t,$p.=$"x-$x.$s.$_,$s=$"for@F;$p=~s/(.{57}).{4,}/$1.../and($q)=$q=~/.{0,56}\S+/g;$_=@F.":	$p
$V\/$T:	$q
"

Score: 223.16 (pass)

More shaving. Command line switches are wonderful.

#!perl -ap056
/./||last;$V=$T=$p=$q=$s=$Z;$V+=$v=@v=/[aeiouy]/ig,$T+=$t=@t=/\w/g,$x=$p=~y///c-length$q,$p.=$"x-$x.$s.$_,$q.=$"x$x."$s$v/$t",$s=$"for@F;$p=~s/(.{57}).{4,}/$1.../&&$q=~s/(.{0,56}\S+).*/$1/;$_=$z=@F.":	$p
$V\/$T:	$q
"

Score: 228.15 (pass)

I discovered command line switches (duh)! What a revelation! Surely Perl holds many secrets I have yet to discover.

#!perl -p056
/./||last;$V=$T=$p=$q=$s=$Z;$V+=$v=@v=/[aeiouy]/ig,$T+=$t=@t=/\w/g,$x=$p=~y///c-length$q,$p.=$"x-$x.$s.$_,$q.=$"x$x."$s$v/$t",$s=$"for@w=split;$p=~s/(.{57}).{4,}/$1.../&&$q=~s/(.{0,56}\S+).*/$1/;$_=$z=@w.":	$p
$V\/$T:	$q
"

Score: 237.16 (pass)

So many hours and only 9 fewer strokes to show for it! My left eyeball popped 2 hours ago.

#!perl
$/=$Z;map{$V=$T=$p=$q=$s=$Z;$V+=$v=@v=/[aeiouy]/ig,$T+=$t=@t=/\w/g,$x=$p=~y///c-length$q,$p.=$"x-$x.$s.$_,$q.=$"x$x."$s$v/$t",$s=$"for@w=split;$p=~s/(.{57}).{4,}/$1.../&&$q=~s/(.{0,56}\S+).*/$1/;print$z=@w,":	$p
$V/$T:	$q
"}<>=~/.+?\./sg

Score: 246.17 (pass)

Switched to postfix 'for', replaced \t with tabs, more shaving.

#!perl
undef$/;for(<>=~/\G(.*?\.)/sg){$V=$T=$p=$q=$s='';$V+=$v=@v=/[aeiouy]/ig,$T+=$t=@t=/\w/g,$x=$p=~y///c-length$q,$p.=$"x-$x.$s.$_,$q.=$"x$x.$s."$v/$t",$s=$"for@w=split;$p=~s/(.{57}).{4,}/$1.../&&$q=~s/(.{0,56}\S+).*/$1/;print$z=@w,":	$p
$V/$T:	$q
"}

Score: 256.16 (pass)

Reduced the code that deals with handling '...'

#!perl
undef$/;for(<>=~/\G(.*?\.)/sg){$V=$T=$x=$p=$q=$s='';for(@w=split){$V+=$v=@v=/[aeiouy]/ig;$T+=$t=@t=/\w/g;$f="$v/$t";$p.=$"x-$x.$s.$_;$q.=$"x$x.$s.$f;$x=y///c-length$f;$s=$"}$p=~s/(.{57}).{4,}/$1.../&&$q=~s/(.{0,56}\S+).*/$1/;print$z=@w,":\t$p
$V/$T:\t$q
"}

Score: 266.17 (pass)

Removed some duplicated functionality, more stroke shaving. Looking for a hidden breakthrough.

#!perl
undef$/;for(<>=~/\G(.*?\.)/sg){$V=$T=$x=$p=$q=$s='';for(@w=split){$V+=$v=@v=/[aeiouy]/ig;$T+=$t=@t=/\w/g;$f="$v/$t";$p.=$"x-$x.$s.$_;$q.=$"x$x.$s.$f;$x=y///c-length$f;$s=$"}length$p<61or substr($p,57)='.'x3,$q=~s/(.{0,55} \S+).*/$1/;print$z=@w,":\t$p\n$V/$T:\t$q\n"}

Score: 289.21 (pass)

More incremental gains.

#!perl
undef$/;for(<>=~/\G(.*?\.)/sg){$V=$T=$x=$p=$q=$i='';for(@w=split){$V+=$v=@v=/[aeiouy]/ig;$T+=$t=@t=/\w/g;$f="$v/$t";$p.=$",$q.=$"if$i;($x<0?$p:$q).=$"x abs$x;$p.=$_;$q.=$f;$x=y///c-$f=~y///c;$i++}length$p<61or substr($p,57)='...',$q=~s/(.{0,55} \S+).*/$1/;print$z=@w,":\t$p\n$V/$T:\t$q\n"}

Score: 298.24 (pass)

Just some stroke shaving. I have too many named variables. And I'll want to replace \t and \n with literal tabs and newlines.

#!perl
undef$/;for(<>=~/\s*(.*?\.)/sg){my($V,$T,$x,$p,$q);for(@w=split){$V+=$v=y/aeiouyAEIOUY//;$T+=$t=s/\w/$&/g;$f="$v/$t";$p.=$",$q.=$"if defined$x;($x<0?$p:$q).=$"x abs$x;$p.=$_;$q.=$f;$x=y///c-$f=~y///c}$p=~s/(.{57}).*/$1.../,$q=~s/(.{0,55}\s\S+).*/$1/ if length$p>60;print$z=@w,":\t$p\n$V/$T:\t$q\n"}

Score: 306.25 (pass)

Ditched the data structure along with the loop that created it. Looking much better, but still a lot of work to do.

#!perl
undef$/;for(<>=~/\s*(.*?\.)/sg){my($V,$T,$x,$p,$q);for(@w=split){$V+=$v=y/aeiouyAEIOUY//;$T+=$t=s/\w/$&/g;$f="$v/$t";$p.=$",$q.=$"if defined $x;($x<0?$p:$q).=$"x abs$x;$p.=$_;$q.=$f;$x=y///c-$f=~y///c}if(length$p>60){$p=substr($p,0,57).'...';$q=~s/(.{0,55}\s\S+).*/$1/}print scalar@w,":\t$p\n$V/$T:\t$q\n"}

Score: 335.25 (pass)

Cleaned up the first part a little bit. I'm still nowhere near happy, but getting more familiar with the problem.

#!perl
undef$/;for(<>=~/\s*(.*?\.)/sg){$V=$T=0;@d=map{$V+=$v=y/aeiouyAEIOUY//;$T+=$t=s/\w/$&/g;[$_,"$v/$t"]}split;my$x;my$p;my$q;for(@d){($w,$f)=@$_;$p.=$",$q.=$"if defined $x;($x<0?$p:$q).=$"x abs$x;$p.=$w;$q.=$f;$x=$w=~y///c-$f=~y///c}if(length$p>60){$p=substr($p,0,57).'...';$q=~s/(.{0,55}\s\S+).*/$1/}print scalar@d,":\t$p\n$V/$T:\t$q\n"}

Score: 358.25 (pass)

First working program, very ugly. Lots of work to do from here!

#!perl
undef$/;for(<>=~/\s*(.*?\.)/sg){my@d;my$V;my$T;for(split){$V+=$v=y/aeiouyAEIOUY//;$T+=$t=s/\w/$&/g;$f="$v/$t";push@d,[$_,"$v/$t"]}my$x;my$p;my$q;for(@d){($w,$f)=@$_;$p.=$",$q.=$"if defined $x;($x<0?$p:$q).=$"x abs$x;$p.=$w;$q.=$f;$x=$w=~y///c-$f=~y///c}if(length$p>60){$p=substr($p,0,57).'...';$q=~s/(.{0,55}\s\S+).*/$1/}print scalar@d,":\t$p\n$V/$T:\t$q\n"}