yesterday at 11:40 PM
SIGBOVIK papers are almost always a delight
EDIT: From their 2026 publication
>Permission to make digital or hard copies of portions of this work for personal use is granted; permission to make digital or hard copies of portions of this work for classroom use is also granted, but seems ill-advised
yesterday at 11:07 PM
Popular in:
2024 (515 points, 125 comments) https://news.ycombinator.com/item?id=40197013
2021 (431 points, 165 comments) https://news.ycombinator.com/item?id=27929730
today at 12:36 AM
And others! Here's the full list:
93% of paint splatters are valid Perl programs (2019) - https://news.ycombinator.com/item?id=40197013 - April 2024 (124 comments)
93% of Paint Splatters Are Valid Perl Programs (2019) - https://news.ycombinator.com/item?id=27929730 - July 2021 (163 comments)
93% of Paint Splatters Are Valid Perl Programs - https://news.ycombinator.com/item?id=20834351 - Aug 2019 (7 comments)
93% of Paint Splatters Are Valid Perl Programs - https://news.ycombinator.com/item?id=19576425 - April 2019 (132 comments)
today at 6:41 AM
You missed https://news.ycombinator.com/item?id=38754686 (1 comment)
(Found by clicking the âpastâ hyperlink leads me to https://hn.algolia.com/?query=93%25%20of%20paint%20splatters..., which gives me six results)
More interestingly, gnabgib reported a different number of comments, leaking the fact that they have showdead on (and you have it off)
yesterday at 11:17 PM
The reply near the top of the 2021 link with the Master Foo koan hits quite a bit differently in the age of vibecoding.
yesterday at 11:22 PM
Tangentially related, the only way for a Java properties file to be invalid is if it contains an invalid Unicode escape sequence (â\uâ not followed by four digits, and not preceded by an odd number of â\â). After resolving Unicode escapes, any character sequence is a valid properties file.
today at 5:54 AM
I've had a program where some R code stuffs some input in an URL, fires it at a server, then reads the returned CSV. No error handling or validation is attempted.
As it happens, basically anything is a valid CSV.
If the input is wrong, the server responds with an XML error. This got interpreted as a CSV. Every line became a record, but no column headers were found so every expected field is null/NA. All these nulls get nicely sorted and processed, which causes more string errors, etc ... Mayhem ensues when thst stuff ends up in a database.
today at 6:04 AM
CSV is not a format, its a vague idea, https://www.youtube.com/watch?v=YrqSp8m7fmk - this is a great video on how to make it fast, and how its pretty bad
today at 8:39 AM
Can't agree more. I've dealt with a CSV where multiple CSVs were cat'ted together, but the originals were not in the same dialect and differed even in charset encoding. Wrote a statistics based parser that decided which part of the file had to be decoded which way. Interesting technical challenge, but my god the reasons for its existence were dumb.
today at 12:18 PM
Falsehoods programmers believe about CSV: "Yeah, sure it's a mess and there are like, a gazillion different dialects of it, but at least once you know the dialect of a file, you can decode it"...
yesterday at 10:38 PM
The actual paper is also highly entertaining - https://www.mcmillen.dev/sigbovik/2019.pdf
today at 2:16 AM
From the paper:
"An interesting thing about these images is that theyâre not particularly Perl-specific; for example, the program shown in Figure â3 also evaluates as the number â3 in Python (and presumably several other programming languages.)"
We live in the age of Python, which I use every day. But I still also use Perl when it's the better tool for the job. And it often is!
yesterday at 10:55 PM
In particular, I like "Figure â 3. â 3 ." as a good little easter egg.
today at 12:11 AM
The remainder of the valid Perl programs are mostly valid due to a Perl
language feature that is not commonly present in most programming languages.
Namely, Perl has a feature called âunquoted stringsâ, in which a sequence
of alphanumeric characters by itself is parsed as though it were a quoted string.
As an example, Figure 5 is read by OCR as the text ME, which evaluates to the
string âMEâ even though the ME isnât quoted. This would result in a syntax
error in most other programming languages.
(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.)today at 1:47 AM
So they might be valid older(<v5?) PHP scripts as well?
today at 6:19 AM
PHP 5 had unquoted strings, and it looks like 7 did as well, but not 8.
today at 8:25 AM
For those who do not enjoy reading scientific papers this one is worth reading.
today at 9:37 AM
today at 9:48 AM
That's with the flexible perl5 parser with a dynamic lexer, which allows everything. For my new faster perl backend perl11-p2 I am using a PEG parser, similar to raku, which needs static rules for everything. So I bet it will not accept most of the noise. But I still can run only 50% of all perl programs.
today at 3:47 AM
Iâm more interested in how the OCR missed that âStitch & Shutterâ watermark in the third one.
today at 8:08 AM
It looks like the author used Tesseract, a traditional OCR image with lineage going back to HP flatbed scanners in the 1980s [1]
Obviously, it's been improved a lot since then - but traditional OCR is mostly about black text on white backgrounds. Or at least, the text being high-contrast relative to the rest of the document.
Light gold text on a white background, while there are black splatters? That's the sort of thing it would struggle with for sure.
[1] https://static.googleusercontent.com/media/research.google.c...
today at 4:06 AM
Hahahhahah good catch.
today at 12:32 AM
i loved programming perl. both the act, and the book. i long since gave it up, but i am still awed by how it could both be completely unceremonious and absurdly ceremonious. my $self = shift; for instance.
today at 1:22 AM
A whole new twist on "Hackers and Painters"
today at 12:51 AM
Someone should reverse that and see how many paintings can be made to execute as Perl and what those programs do when invoked.
today at 1:58 AM
You could kill two birds with one stone by entering them in the Obfuscated Perl Contest, were it still being held.
today at 3:11 AM
Every single day there's an Obfuscated Perl Contest being held somewhere on this planet....
today at 9:38 AM
> fruitful procrastination
It is so rare to find proper appreciation for this creative skill.
today at 6:42 AM
This is more about a bad OCR than about paint splatters. They also tried multiple OCR settings until one worked. If you used more accurate OCR this would be very different.
today at 8:16 AM
More accurate OCR would recognise the images have no text
$ touch temp.pl; perl temp.pl; echo "exit code $?"
exit code 0
which is a valid perl program. And that one image with the watermark "stitch & shutter" ? $ echo "stitch & shutter" > temp.pl; perl temp.pl; echo "exit code $?"
exit code 0
Also valid perl.today at 10:45 AM
today at 3:32 AM
It all depends on which OCR to use and therefore meaningless. It is especially more meaningless since they do not establish the baseline (OCR "pass" % on random input).
today at 3:37 AM
I think youâve missed the pointâŠ
today at 4:43 AM
Honest question, and Iâm not the person you answered to: what is the point? I sincerely donât get it.
today at 5:31 AM
Well a) itâs mostly a joke, b) to the extent itâs not a joke, itâs about how Perl accepts absurd inputs as valid programs, c) OCR paint splatters are just a funny way to get to weird arbitrary strings, of which a strangely high percentage (say, 93%) are valid Perl programs, d) so the choice of OCR doesnât really affect the âvalidityâ of the result, and e) the author did actually try multiple OCR settings and, when multiple OCRs produced valid Perl programs, chose âthe most âinteresting.ââ
today at 5:26 AM
It's a joke about Perl. It's not meant to be taken seriously as a study about OCR.
today at 5:48 AM
The problem is the ocr, then.
today at 5:41 AM
Perl is such a ride. I wrote and maintained a nms/statistics/alerting stack around 2003-2004, ended up being around 200k LoC iirc. Just heard it is still in use at that company. My condolences to whoever has had to maintain that monster.
I was somewhat pleasantly surprised a few days ago when an LLM out of the blue decided to use perl, not python, for some simple scripting. There is hope in the world yetâŠ
today at 10:32 AM
And Perl from 2003-2004 was especially bad. It took amazing effort to pass a file handle as a subroutine parameter. I once took a look at the Perl code behind Bugzilla, and quickly decided that it was better to let sleeping dogs lie.
yesterday at 11:49 PM
Figure 6 represents the string âgggijgziifiiffifâ, which by pure coincidence happens to accurately represent the authorsâ verbal reaction upon learning that âunquoted stringsâ were a feature intentionally included in the Perl language
today at 2:56 AM
There is a gem in the footnote right below gggijgziifiiffif, where it says it's possible to make a perl error quine by writing this line to the right location:
Illegal division by zero at /tmp/quine.pl line 1.
I just tried this perl 5.42.0, and any file name starting with a '/' will work.See also:
https://news.ycombinator.com/item?id=40202182
https://news.ycombinator.com/item?id=19576872
https://codegolf.stackexchange.com/a/48394
today at 7:18 AM
> I just tried this perl 5.42.0, and any file name starting with a '/' will work.
any file name? How about /1
?
yesterday at 11:59 PM
I'm afraid I have to tell you you lack the soul of a poet to truly appreciate the brilliant design . Perl is magic (like litteraly). I'm fairly sure it's one of the untold inspiration of the Harry Potter books
today at 12:12 AM
I really dig your whimsy.
today at 12:47 AM
This is also a valid Perl program (I bet)
today at 12:15 AM
necronomicon, maybe
today at 1:48 AM
93% of Perl Programs are valid Paint Spatters too.
today at 6:59 AM
The modern version would be to input the image without further context into an LLM and constrain the output to valid Rust.
yesterday at 11:00 PM
Jackson Pollock was writing perl code all along
yesterday at 11:42 PM
My Stone Roses album cover is actually a bonus Perl program?
today at 1:50 AM
Full Fathom Five is my brain on Perl.
today at 2:01 AM
No, when Pollock spattered paint on a canvas, it was generally on the floor, not the Wall.
yesterday at 11:59 PM
> Apparently in the brave new world of neural nets, Anything Goesâą
Quite some foresight indeed!
today at 12:23 AM
today at 10:11 AM
Luckily with AI, that has since increased to 100% with a small prompt ...
today at 3:19 AM
I don't need to read the article because the headline is true.
A mentor taught me that you can also roll your face on the keyboard to produce a valid Perl program. It's easy and fun to try!
today at 4:24 AM
A cat walking across the keyboard works too.
today at 3:19 AM
I thought perl was finally dead enough people would stop mocking it. I'll wait til next decade.
today at 6:07 AM
Perl is not dead! Its popularity has merely reached dotcom level! https://entropicthoughts.com/what-killed-perl
today at 5:40 AM
History in reverse: first you win, then they mock you, then they ignore you
today at 5:44 AM
[dead]
yesterday at 11:22 PM
https://www.tiktok.com/@evakozy/video/7693620372213730592
today at 3:30 AM
I think this is the first time Iâve seen a TikTok link on HN.
today at 3:57 AM
[dead]