Brifing

93% of Paint Splatters Are Valid Perl Programs

An empirical study explores the intersection of abstract art and programming language syntax.

1The Research Premise

Researchers investigated whether random paint splatters could function as valid Perl code. By utilizing optical character recognition software, they analyzed a dataset of one hundred images to determine their syntactical validity. The study aimed to address a humorous yet technical question regarding the inherent flexibility of the Perl programming language syntax.

2Empirical Findings

The analysis revealed that 93% of the paint splatters were successfully parsed as valid Perl programs. The remaining 7% failed to meet the language requirements, proving that not every random visual pattern translates into executable code. This empirical approach highlights the unique, often permissive nature of Perl's underlying parsing mechanisms and rules.

3SIGBOVIK Conference Context

This paper was accepted for publication at the SIGBOVIK 2019 conference, held in Pittsburgh on April 1st. The event is known for hosting unconventional research that promotes open science and productive procrastination. The authors received an Unwitting Participation Ribbon for their contribution, which included genuine artifacts alongside their technical analysis of splatters.

4Technical Parsing Methodology

The team used OCR software to convert visual paint patterns into strings that the Perl interpreter could process. When different OCR settings produced multiple valid interpretations, the researchers selected the most aesthetically interesting result. This subjective selection process added a layer of artistic curation to the otherwise rigid technical evaluation of code.

5Evaluating Specific Splatters

Certain splatters yielded surprising results, such as the string lerzfijglpFiji-j, which evaluates to the number zero in Perl. Another image, recognized as -*?, also resulted in a zero value. These examples demonstrate how the interpreter handles non-standard character sequences, effectively treating chaotic visual inputs as functional, albeit unconventional, programming language instructions.

6String Manipulation Results

Beyond numerical outputs, some splatters functioned as string literals. One specific image was interpreted as a sequence that evaluates to the character c, while another produced the string E__. These findings illustrate the diverse ways in which the Perl parser interprets arbitrary character sets derived from visual data, regardless of their origin.

7Data Availability Limitations

The researchers provided a tarball containing the one hundred paint-splatter images used as the primary dataset for the study. However, the source code for the project remains unavailable, as the author noted difficulties with GitHub management. Despite this, the full proceedings of the 2019 conference are accessible for those seeking further details.

8Broader Implications

While the study is largely experimental and humorous, it underscores the extreme flexibility of Perl's syntax. By successfully parsing 93% of random splatters, the research demonstrates how permissive language design can interpret almost any input. This serves as a reminder of the complex, often unpredictable nature of modern programming language parsers and compilers.

Original article: Hacker News (news.ycombinator.com) — 93% of Paint Splatters Are Valid Perl Programs