93% of paint splatters are valid Perl programs (2019) mcmillen.dev · 283 points ...

@best30

93% of paint splatters are valid Perl programs (2019) mcmillen.dev · 283 points · 37 comments · HN thread

TL;DR A 2019 SIGBOVIK paper (an April Fools' conference of joke-but-rigorous papers) runs OCR on 100 images of paint splatters and finds that about 93% parse as valid Perl programs. The author shows examples, including splatters that evaluate to numbers or strings, and seven images that are not valid Perl.

  • The paper treats 'can you smear paint on a wall without producing valid Perl?' as an open problem and answers it empirically with OCR software.
  • About 93% of the 100 paint-splatter images used as the main dataset were recognized as valid Perl programs.
  • Many valid programs rely on Perl's 'unquoted strings' feature, where bare alphanumeric text is read as a string, so ME evaluates to "ME".
  • Some splatters evaluate to surprising results: one yields the number 0, another the string c, and the same splatter also evaluates as -3 in Python.
  • The paper was accepted at SIGBOVIK 2019 and received an 'Unwitting Participation Ribbon' joke award; the author also published a gallery and the full PDF.
  • Commenters note that OCR settings change the result, so the 93% figure depends heavily on the chosen OCR tool and lacks a baseline on random input.

Discussion The thread is light and playful, mostly riffing on the absurdity of the premise and on Perl's reputation. Several commenters praise the paper's humor and point to a footnote with a Perl error quine, while others joke about Pollock, Obfuscated Perl Contests, and keyboard-smashing producing valid Perl. A smaller strand is skeptical, arguing the statistic is meaningless without an OCR baseline. The thread also shows the story has been resubmitted several times since 2019, with prior discussions linked.

  • The paper is funny and a delight to read (many): Commenters enjoy the joke paper, its footnotes and easter eggs, and the deadpan treatment of an absurd question. Several single out the gggijgziifiiffif figure and the 'Figure − 3' easter egg.
  • Unquoted strings explain most of the valid programs (some): One commenter explains that Perl's unquoted-string feature makes most valid results possible, and that warnings with -w mention a future reserved word clash. Many languages would reject these inputs.
  • Nostalgia for Perl and its quirks (some): Several commenters recall enjoying Perl and its idioms like my $self = shift, and defend it as the right tool for certain jobs.
  • The 93% figure is meaningless (a few): A skeptic argues the result depends on which OCR is used and that no baseline on random input is given, so the percentage says little on its own.
  • Jokes about Perl being dead or magic (some): Commenters tease Perl's reputation, joke it is a Harry Potter-style magic, or say the headline is enough without reading the article.

Links from the comments

#Perl #SIGBOVIK #OCR #humor #programmingLanguages