93% of Paint Splatters are Valid Perl Programs (discussed on Hacker News) made me laugh, it is the kind of high-quality trolling that the field of computer science could definitely use more of. It is actually a scientific paper accepted by the SIGBOVIK 2019 conference, and that is glorious.

In this paper, we aim to answer a long-standing open problem in the programming languages community: is it possible to smear paint on the wall without creating valid Perl?

We answer this question in the affirmative: it is possible to smear paint on the wall without creating a valid Perl program. We employ an empirical approach, using optical character recognition (OCR) software, which finds that merely 93% of paint splatters parse as valid Perl. We analyze the properties of paint-splatter Perl programs, and present seven examples of paint splatters which are not valid Perl programs.

My favourite part:

To be fair to Perl, when perl is run with the -w flag to enable warnings, it does helpfully inform the user that at some point in the future, the Perl developers will most likely pick gggijgziifiiffif as a new reserved word:

Unquoted string “gggijgziifiiffif” may clash with future reserved word at - line 1.

One of the footnotes (number 5, on page 5) did confuse me about as much as it entertained me:

[…] the Perl program “Illegal division by zero at /tmp/quine.pl line 1.”, when saved in the appropriate location, outputs “Illegal division by zero at /tmp/quine.pl line 1.” The reason for this behavior is left as an exercise for the reader.

Thankfully, a comment on Hacker News provides an explanation: unquoted strings are a feature in Perl, so “Illegal division by zero at” simply parses as a string without needing quotes around it like in sane(r) languages; “tmp/quine” however ends up being interpreted as a division of a string by another string. Because that is clearly nonsense, Perl replaces it with another nonsense (a bit like what undefined behaviour does in C and C++ actually!) which is 0 / 0, yielding the error. I love it.