29 comments

  • snitty15 hours ago
    SIGBOVIK papers are almost always a delight<p>EDIT: From their 2026 publication<p>&gt;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
  • layer815 hours ago
    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.
    • hyperman19 hours ago
      I&#x27;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.<p>As it happens, basically anything is a valid CSV.<p>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&#x2F;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.
      • hilariously8 hours ago
        CSV is not a format, its a vague idea, <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=YrqSp8m7fmk" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=YrqSp8m7fmk</a> - this is a great video on how to make it fast, and how its pretty bad
        • hyperman16 hours ago
          Can&#x27;t agree more. I&#x27;ve dealt with a CSV where multiple CSVs were cat&#x27;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.
          • thesuitonym12 minutes ago
            My god. I love CSVs because the lack of any standardization makes them incredibly flexible, but combining CSVs is just a wild idea. What was that person thinking?
          • xg152 hours ago
            Falsehoods programmers believe about CSV: &quot;Yeah, sure it&#x27;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&quot;...
          • kakacik36 minutes ago
            [dead]
  • gnabgib15 hours ago
    Popular in:<p>2024 (515 points, 125 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40197013">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40197013</a><p>2021 (431 points, 165 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730</a>
    • tomhow14 hours ago
      And others! Here&#x27;s the full list:<p><i>93% of paint splatters are valid Perl programs (2019)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40197013">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40197013</a> - April 2024 (124 comments)<p><i>93% of Paint Splatters Are Valid Perl Programs (2019)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730</a> - July 2021 (163 comments)<p><i>93% of Paint Splatters Are Valid Perl Programs</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20834351">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20834351</a> - Aug 2019 (7 comments)<p><i>93% of Paint Splatters Are Valid Perl Programs</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19576425">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19576425</a> - April 2019 (132 comments)
      • Someone8 hours ago
        You missed <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38754686">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38754686</a> (1 comment)<p>(Found by clicking the ‘past’ hyperlink leads me to <a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=93%25%20of%20paint%20splatters%20are%20valid%20Perl%20programs&amp;type=story&amp;dateRange=all&amp;sort=byDate&amp;storyText=false&amp;prefix&amp;page=0" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?query=93%25%20of%20paint%20splatters...</a>, which gives me <i>six</i> results)<p>More interestingly, gnabgib reported a different number of comments, leaking the fact that they have <i>showdead</i> on (and you have it off)
    • thatsabadlook1 hour ago
      Yea but isn&#x27;t it refreshing seeing content like this instead of ai noise?
    • adamrezich15 hours ago
      The reply near the top of the 2021 link with the Master Foo koan hits quite a bit differently in the age of vibecoding.
  • zenincognito16 hours ago
    The actual paper is also highly entertaining - <a href="https:&#x2F;&#x2F;www.mcmillen.dev&#x2F;sigbovik&#x2F;2019.pdf" rel="nofollow">https:&#x2F;&#x2F;www.mcmillen.dev&#x2F;sigbovik&#x2F;2019.pdf</a>
    • heresie-dabord12 hours ago
      From the paper:<p>&quot;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.)&quot;<p>We live in the age of Python, which I use every day. But I still also use Perl when it&#x27;s the better tool for the job. And it often is!
    • Amorymeltzer16 hours ago
      In particular, I like &quot;Figure − 3. − 3 .&quot; as a good little easter egg.
    • 0xbadcafebee14 hours ago
      <p><pre><code> 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 &quot;gggijgziifiiffif&quot; may clash with future reserved word at - line 1.)</code></pre>
      • xhrpost13 hours ago
        So they might be valid older(&lt;v5?) PHP scripts as well?
        • Izkata8 hours ago
          PHP 5 had unquoted strings, and it looks like 7 did as well, but not 8.
          • asddubs1 hour ago
            They were deprecated in php 7, but did work
    • comboy6 hours ago
      For those who do not enjoy reading scientific papers this one is worth reading.
  • ideasphere11 hours ago
    I’m more interested in how the OCR missed that ‘Stitch &amp; Shutter’ watermark in the third one.
    • michaelt6 hours ago
      It looks like the author used Tesseract, a traditional OCR image with lineage going back to HP flatbed scanners in the 1980s [1]<p>Obviously, it&#x27;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.<p>Light gold text on a white background, while there are black splatters? That&#x27;s the sort of thing it would struggle with for sure.<p>[1] <a href="https:&#x2F;&#x2F;static.googleusercontent.com&#x2F;media&#x2F;research.google.com&#x2F;en&#x2F;&#x2F;pubs&#x2F;archive&#x2F;33418.pdf" rel="nofollow">https:&#x2F;&#x2F;static.googleusercontent.com&#x2F;media&#x2F;research.google.c...</a>
    • bozdemir10 hours ago
      Hahahhahah good catch.
  • rurban5 hours ago
    That&#x27;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.
  • baron3dl14 hours ago
    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.
  • jacquesm14 hours ago
    Someone should reverse that and see how many paintings can be made to execute as Perl and what those programs do when invoked.
    • kmoser12 hours ago
      You could kill two birds with one stone by entering them in the Obfuscated Perl Contest, were it still being held.
      • mlmonkey11 hours ago
        Every single day there&#x27;s an Obfuscated Perl Contest being held somewhere on this planet....
  • idlewords13 hours ago
    A whole new twist on &quot;Hackers and Painters&quot;
  • isolay5 hours ago
    &gt; fruitful procrastination<p>It is so rare to find proper appreciation for this creative skill.
  • charcircuit8 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.
    • michaelt6 hours ago
      More accurate OCR would recognise the images have no text<p><pre><code> $ touch temp.pl; perl temp.pl; echo &quot;exit code $?&quot; exit code 0 </code></pre> which is a valid perl program. And that one image with the watermark &quot;stitch &amp; shutter&quot; ?<p><pre><code> $ echo &quot;stitch &amp; shutter&quot; &gt; temp.pl; perl temp.pl; echo &quot;exit code $?&quot; exit code 0 </code></pre> Also valid perl.
  • SoraTakai11 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 &quot;pass&quot; % on random input).
    • ashton31411 hours ago
      I think you’ve missed the point…
      • ckdot10 hours ago
        Honest question, and I’m not the person you answered to: what is the point? I sincerely don’t get it.
        • asgraham9 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.””
        • odo12429 hours ago
          It&#x27;s a joke about Perl. It&#x27;s not meant to be taken seriously as a study about OCR.
  • dukoid1 hour ago
    Now I wonder if that holds for Objective C programs, too....
  • notorandit9 hours ago
    The problem is the ocr, then.
  • xenic9 hours ago
    Perl is such a ride. I wrote and maintained a nms&#x2F;statistics&#x2F;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.<p>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…
    • maxlybbert4 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_bronson15 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
    • omoikane12 hours ago
      There is a gem in the footnote right below gggijgziifiiffif, where it says it&#x27;s possible to make a perl error quine by writing this line to the right location:<p><pre><code> Illegal division by zero at &#x2F;tmp&#x2F;quine.pl line 1. </code></pre> I just tried this perl 5.42.0, and any file name starting with a &#x27;&#x2F;&#x27; will work.<p>See also:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40202182">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=40202182</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19576872">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19576872</a><p><a href="https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;a&#x2F;48394" rel="nofollow">https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;a&#x2F;48394</a>
      • toast07 hours ago
        &gt; I just tried this perl 5.42.0, and any file name starting with a &#x27;&#x2F;&#x27; will work.<p><i>any</i> file name? How about &#x2F;1<p>?
    • larsonian1 hour ago
      Unquoted strings are the default in shell languages, and one of the design goals of Perl was to be a more powerful replacement for shell scripts. It&#x27;s not a particularly surprising feature, really.<p>For anything more complex than a one-off script, Perl is pretty much always written with `use strict`, which disables unquoted strings and certain other (mis)features.
    • lta14 hours ago
      I&#x27;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&#x27;m fairly sure it&#x27;s one of the untold inspiration of the Harry Potter books
      • hluska14 hours ago
        I really dig your whimsy.
      • tomaskafka14 hours ago
        This is also a valid Perl program (I bet)
      • bitwize14 hours ago
        necronomicon, maybe
  • trpaslik10 minutes ago
    perl is a write-only language ;-)
  • polarsanel13 hours ago
    93% of Perl Programs are valid Paint Spatters too.
  • sadboi_fandango15 hours ago
    Jackson Pollock was writing perl code all along
    • HeckFeck15 hours ago
      My Stone Roses album cover is actually a bonus Perl program?
      • don-code13 hours ago
        Full Fathom Five is my brain on Perl.
    • kmoser12 hours ago
      No, when Pollock spattered paint on a canvas, it was generally on the floor, not the Wall.
  • silvandeboer7 hours ago
    The modern version would be to input the image without further context into an LLM and constrain the output to valid Rust.
  • criemen14 hours ago
    &gt; Apparently in the brave new world of neural nets, Anything Goes™<p>Quite some foresight indeed!
  • spwa44 hours ago
    Luckily with AI, that has since increased to 100% with a small prompt ...
  • _doctor_love11 hours ago
    I don&#x27;t need to read the article because the headline is true.<p>A mentor taught me that you can also roll your face on the keyboard to produce a valid Perl program. It&#x27;s easy and fun to try!
    • lisper10 hours ago
      A cat walking across the keyboard works too.
  • NoMoreNicksLeft11 hours ago
    I thought perl was finally dead enough people would stop mocking it. I&#x27;ll wait til next decade.
    • theonemind9 hours ago
      History in reverse: first you win, then they mock you, then they ignore you
    • kqr8 hours ago
      Perl is not dead! Its popularity has merely reached dotcom level! <a href="https:&#x2F;&#x2F;entropicthoughts.com&#x2F;what-killed-perl" rel="nofollow">https:&#x2F;&#x2F;entropicthoughts.com&#x2F;what-killed-perl</a>
    • HackerThemAll1 hour ago
      Perl requires more brain power than most coders have, especially nowadays.<p>Perl has never disappointed me. Many years ago during just 2 weeks I&#x27;d written a few clever automations and orchestrations in Perl that had lasted with 100% availability for a decade after I changed that job. Even though my superior, the self-proclaimed &quot;top coder manager all-in-one god&quot; despised it (and me), he was incapable of comprehending and rewriting that. It was not because I obfuscated the code, but because of what I wrote in the first sentence above. In the end he hired a consultancy and got a monstrous solution in Java. But finally it was &quot;his&quot;.
  • kronks9 hours ago
    [dead]
  • TMWNN15 hours ago
    <a href="https:&#x2F;&#x2F;www.tiktok.com&#x2F;@evakozy&#x2F;video&#x2F;7693620372213730592" rel="nofollow">https:&#x2F;&#x2F;www.tiktok.com&#x2F;@evakozy&#x2F;video&#x2F;7693620372213730592</a>
    • fractorial11 hours ago
      I think this is the first time I’ve seen a TikTok link on HN.
  • lakt42t11 hours ago
    [dead]