Top
Best
New

Posted by zenincognito 14 hours ago

93% of paint splatters are valid Perl programs (2019)(www.mcmillen.dev)
482 points | 59 commentspage 2
charcircuit 6 hours ago|
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.
michaelt 4 hours ago|
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.
SoraTakai 9 hours ago||
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).
ashton314 9 hours ago|
I think you’ve missed the point…
ckdot 8 hours ago||
Honest question, and I’m not the person you answered to: what is the point? I sincerely don’t get it.
asgraham 7 hours ago|||
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.””
odo1242 7 hours ago|||
It's a joke about Perl. It's not meant to be taken seriously as a study about OCR.
notorandit 7 hours ago||
The problem is the ocr, then.
xenic 7 hours ago||
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…

maxlybbert 2 hours ago|
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.
brisket_bronson 13 hours ago||
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
omoikane 10 hours ago||
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

toast0 5 hours ago||
> I just tried this perl 5.42.0, and any file name starting with a '/' will work.

any file name? How about /1

?

lta 13 hours ago||
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
hluska 12 hours ago|||
I really dig your whimsy.
tomaskafka 12 hours ago||||
This is also a valid Perl program (I bet)
bitwize 12 hours ago|||
necronomicon, maybe
polarsanel 11 hours ago||
93% of Perl Programs are valid Paint Spatters too.
silvandeboer 6 hours ago||
The modern version would be to input the image without further context into an LLM and constrain the output to valid Rust.
sadboi_fandango 14 hours ago||
Jackson Pollock was writing perl code all along
HeckFeck 13 hours ago||
My Stone Roses album cover is actually a bonus Perl program?
don-code 11 hours ago||
Full Fathom Five is my brain on Perl.
kmoser 11 hours ago||
No, when Pollock spattered paint on a canvas, it was generally on the floor, not the Wall.
criemen 13 hours ago|
> Apparently in the brave new world of neural nets, Anything Goes™

Quite some foresight indeed!

More comments...