A paper presented at SIGBOVIK 2019 examined an unusual question in programming language theory: can paint randomly smeared on a wall accidentally create valid Perl code?

According to the research, the answer is largely yes. Using optical character recognition (OCR) software to analyze paint splatters, researchers found that approximately 93% of the splatters parsed as syntactically valid Perl programs. The study identified seven examples of paint splatters that did not constitute valid Perl.
The paper, accepted for publication at SIGBOVIK 2019 held April 1st in Pittsburgh, employed an empirical methodology. Researchers collected a dataset of 100 paint-splatter images and processed them through OCR software, which converted the visual patterns into text strings. These strings were then tested against Perl’s syntax rules to determine validity.
The findings suggest that Perl’s permissive syntax makes it unusually susceptible to generating valid programs from random input. The researchers analyzed properties of paint-splatter Perl programs and presented examples of how OCR-recognized text from splatters could evaluate to meaningful values in Perl.
For instance, one splatter was recognized by OCR as the string “lerzfijglpFiji-j,” which evaluates to the number 0 in Perl. Another, recognized as “-*?”, also evaluates to 0. A third example, recognized as “;i;c;;#\?z{;?;;fn’:.”, evaluates to the string “c” in Perl. A fourth splatter, recognized as “;E,‘’”, evaluates to the string “E”.
The paper was recognized with an “Unwitting Participation Ribbon” from SIGBOVIK organizers, described as “an unwelcome brand we’ve affixed to each paper determined after careful scrutiny to have included a genuine artifact, thereby furthering the admirable causes of open science and fruitful procrastination.”
The research included a gallery displaying all paint splatters on a single page alongside their corresponding valid Perl source code, with invalid splatters marked in red. The full dataset of 100 paint-splatter images was made available for review.
Key facts
- 93% of paint splatters analyzed via OCR parsed as valid Perl programs
- Researchers tested a dataset of 100 paint-splatter images using optical character recognition software
- Seven examples of paint splatters did not constitute valid Perl programs
- The study suggests Perl’s permissive syntax readily accepts random text strings as valid code
- Examples include splatters recognized as strings that evaluate to numbers or text values in Perl
