Urgent.News

What's breaking now, across thousands of outlets.

Tech

93% of Paint Splatters Are Valid Perl Programs (2019)

In a 2019 paper titled "93% of Paint Splatters Are Valid Perl Programs," researchers explore a long-standing open question in the programming languages community: can actual paint splatters on a wall result in valid Perl code? The answer, according to the study, is yes. The researchers utilized optical character recognition (OCR) software to determine that approximately 93% of paint splatters parse as valid Perl programs.

The study highlights seven examples of paint splatters that were found to be invalid Perl programs. Additionally, the paper provides a gallery of pretty Perl programs created from paint splatters, and offers the images along with corresponding valid Perl source code for each. The authors chose the most "interesting" program for each image based on their aesthetic sense, using a variety of different OCR settings to generate the Perl code.

Some of the paint splatter Perl programs recognized by OCR include the strings "lerzfijglpFiji-j," which evaluates to the number 0 in Perl, and "*?," which also evaluates to the number 0. Another surprising program, recognized as ";i;c;;#\\?z{;?;;fn :.;,," evaluates to the string "c" in Perl. Finally, the image represented by ";E, __ ," is recognized as the string "E__" in Perl.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at mcmillen.dev →

More in Tech

More from Wednesday 11 November →