Live data from Hacker News

93% of Paint Splatters Are Valid Perl Programs

colinm.org

31–40 of 135 posts

Re: 93% of Paint Splatters Are Valid Perl Programs

#31

Do any of the splatters generate a "use strict;" at the beginning?

It would be interesting to reverse-engineer this to figure out which paint splatters reliably produced "use strict;".

Presumably one could have AFL fuzz determine the input needed to generate any desired outcome if splatter generation is automated.

Re: 93% of Paint Splatters Are Valid Perl Programs

#33
post #14

Earlier quoted context omitted.

PHP won because it was easy to install and restrict (by memory usage) on shared servers, as well as the fact that writing a PHP script was as simple as renaming an .html file to .php so web designers who wanted some dynamic functionality could use it really easily. As bad as some aspects of PHP were, making it so trivial to install and make available on a server was a brilliant move that lots of languages could still…

The parent nailed it. It's easy to complain about PHP from various standpoints both pragmatic and PL-centric, but it has an amazing superpower which might be summed as "serverless for the web, v0".

No deployment setup will ever match the pure joy of dragging a .php file into WinFTP, watching the little blue progress bar, and refreshing your browser.

Re: 93% of Paint Splatters Are Valid Perl Programs

#36
Because of the frequency I see undecipherable strings like this in actual Perl code, I don't like Perl the programming language. However, I love Perl the project. Take a look at the config file for Perl and how many systems and architectures it accommodates: https://github.com/Perl/perl5/blob/blead/Configure

It's clearly such an incredible labor of love by Larry Wall et al. that I'm sad for them it isn't more popular. Just a mammoth amount of work by nice, passionate people.

In my world (bioinformatics), it was initially the go-to language. Even today I very occasionally run across something using BioPerl, requiring me to stumble through CPAN again. I get pretty nostalgic thinking about it.

Re: 93% of Paint Splatters Are Valid Perl Programs

#37
post #19
post #10

I love this footnote so much: > This feature does enable a neat quine: the Perl program “Illegal division by zero at /tmp/quine.pl line 1.”, when saved in the appropriate location, outputs “Illegal division by zero at /tmp/quine.pl line 1.” The reason for this behavior is left as an exercise for the reader.

It's trying to divide "Illegal division by zero at /" by "tmp/quine.pl line 1." and "tmp/quine.pl line 1." evaluates to 0?

I think it's equivalent to something like

  Illegal::division(by::zero(at/tmp/quine . pl::line(1.)))

Re: 93% of Paint Splatters Are Valid Perl Programs

#39
post #36

Because of the frequency I see undecipherable strings like this in actual Perl code, I don't like Perl the programming language. However, I love Perl the project. Take a look at the config file for Perl and how many systems and architectures it accommodates: https://github.com/Perl/perl5/blob/blead/Configure It's clearly such an incredible labor of love by Larry Wall et al. that I'm sad for them it isn't more popular…

Perl gives you as much rope as you want to hang yourself. If you can develop a style, and try to avoid being too clever, it can be just as readable as any other language.

Re: 93% of Paint Splatters Are Valid Perl Programs

#40

Do any of the splatters generate a "use strict;" at the beginning?

It would be interesting to reverse-engineer this to figure out which paint splatters reliably produced "use strict;".

How would you prevent it from finding "paint splatters" which are just renderings of the actual text in question?
Post reply on HN