hn.today

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

mcmillen.dev581 points79 comments
Screenshot of 93% of Paint Splatters Are Valid Perl Programs (2019)

A playful paper takes up the deliberately absurd question of whether someone can smear paint on a wall without producing a valid Perl program. Its answer is yes, but only sometimes: applying optical character recognition to images of paint splatters, the author finds that 93% are recognized as text that Perl accepts. The work treats this as an empirical investigation, examining the properties of the resulting programs and showcasing seven splatters that fail to parse. The central joke rests on Perl’s permissive syntax, which can turn strings of apparently random characters into executable code.

The study was accepted for SIGBOVIK 2019, an April Fools’ research conference, and its tongue-in-cheek presentation imitates a serious programming-languages paper. Supporting materials include a gallery pairing splatter images with the Perl code OCR identified, plus a dataset of 100 images. Where OCR settings produced several valid interpretations, the author selected the version he found most aesthetically interesting. Later corrections add examples missed before submission: seemingly nonsensical splatters that Perl evaluates to zero or to short strings. These cases extend the joke by showing how little a visual mark needs to resemble conventional writing to become a program under Perl’s rules.

Read on mcmillen.dev79 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Ggml v1.0.0

Ggml v1.0.0

ggml 1.0.0 removes deprecated public APIs and legacy DIAG_MASK operations, while adding configurable YaRN truncation and FP8 support. It also improves backend performance with quantized matrix multiplication, fused MoE operations, and new attention and scheduling paths. (github.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.