93% of Paint Splatters Are Valid Perl Programs (2019)
This delightful 2019 SIGBOVIK paper investigates a classic programming languages query: can you smear paint on a wall without creating valid Perl? Using OCR, the author empirically determines that a staggering 93% of paint splatters indeed parse as valid Perl, much to the amusement of the Hacker News community. It's a whimsical, yet technically grounded, exploration of language flexibility that regularly resurfaces on HN, sparking discussions about Perl's unique syntax and the nature of 'valid' code.
The Lowdown
This paper tackles a profound, long-standing open problem in programming languages: is it truly possible to smear paint on a wall without inadvertently creating a valid Perl program? Employing an empirical approach with optical character recognition (OCR) software, the author bravely ventures into the realm of abstract art meeting arcane syntax.
- The research found that a remarkable 93% of paint splatters, when processed by OCR, parsed as valid Perl programs.
- The methodology involved analyzing properties of these 'paint-splatter Perl' programs.
- Crucially, the paper successfully identified and presented seven rare examples of paint splatters that did not parse as valid Perl, proving that it is possible to avoid the language's pervasive grasp.
- The work was accepted for publication at SIGBOVIK 2019, an annual academic conference known for its humorous and often absurd research, held on April 1st.
- Supplementary materials include a gallery of all analyzed splatters with their corresponding Perl code (or 'Not valid' tags), a dataset of 100 splatter images, and an errata section highlighting additional surprising valid Perl programs discovered post-submission.
Ultimately, the paper provides a lighthearted, yet surprisingly rigorous, answer to a question that has likely haunted many a programmer: Perl's syntax is so flexible that even random splotches often qualify as legitimate code, though a dedicated effort can yield non-Perl paint.
The Gossip
Perl's Permissive Parsing
Commenters revel in the classic joke about Perl's notoriously flexible, some might say 'permissive,' syntax. The idea that random input can frequently be valid Perl prompts discussions about language design, with one commenter extending the observation to Java properties files, noting their similar robustness to invalid input.
Recurring Reads
Many Hacker News users acknowledge the paper's recurring popularity, noting its previous appearances on the front page in 2021 and 2024. This highlights the story's enduring appeal and status as a beloved, timeless piece of programming humor, with some reflecting on how the context of such jokes evolves over time.
Paper Praises
Enthusiastic comments directly laud the paper itself, with the original author linking to the full PDF and another user pointing out a specific, clever 'easter egg' within the paper's formatting ('Figure - 3. - 3 .'), underscoring the craftsmanship and wit embedded in the academic humor.