Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Compression in Golf: Part II

by eyepopslikeamosquito (Chancellor)
on Oct 06, 2012 at 07:18 UTC ( #997591=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    # original 96-stroke solution
    # 102-stroke pack-friendly makeover
  2. or download this
    @c=(@b=(++$n,bottle.'s'x@-,of,beer),on,the,wall),s//Take one down and 
    +pass it around, @c.
    @c, @b.
    /until/, 99\D+/;print$'."Go to the store and buy some more$&"
  3. or download this
  4. or download this
  5. or download this
  6. or download this
    #        1         2         3         4         5         6         7
    #        1         2         3
  7. or download this
  8. or download this
    my $source = <<'PERSEVEROUS';
    open my $fh, '>', '' or die "error: open $!";
    binmode $fh;
    print $fh "eval lc pack u54,'" . $out . "'";

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://997591]
Approved by Athanasius
Front-paged by Athanasius
[ambrus]: was this bug: https://rt.cpan. org/Public/Bug/ Display.html?id= 59814
[Corion]: ambrus: Oh - that one would be much harder to automate... The SYNOPSIS section should mostly be a runnable program IMO, but I write only small snippets in my documentation for single functions/methods, and creating the appropriate environment for ...
[Corion]: ... those in an automated fashion seems somewhat hard to me. Although it should do wonders for the test coverage ;)
[haukex]: Corion: I once wrote an automated thingy for that here
[haukex]: here's the code that uses it
[Corion]: haukex: Hmm - maybe I can reuse that. I see that it uses Pod::Parser, which I think was one of the more fragile parsers. But if I'm statically (re)generating the tests instead of doing that "live" on the client/tester machines, that's a much smaller...
[Corion]: ... problem space than trying to cater to all versions of Pod::Parser(s)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-02-27 12:20 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (385 votes). Check out past polls.