You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
6.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="icon" type="image/png" href="/favicon.ico">
  7. <link rel="canonical" href="https://www.mcmillen.dev/sigbovik/">
  8. <link rel="alternate" type="application/atom+xml" href="https://www.mcmillen.dev/feed.atom" title="Colin McMillen's Blog - Atom">
  9. <title>93% of Paint Splatters are Valid Perl Programs | Colin McMillen</title>
  10. <link rel="preconnect" href="https://fonts.gstatic.com">
  11. <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=block" rel="stylesheet">
  12. <link href="https://fonts.googleapis.com/css?family=Fira+Mono:500&display=block" rel="stylesheet">
  13. <link rel="stylesheet" href="/pygments.css">
  14. <link rel="stylesheet" href="/style.css">
  15. <meta name="twitter:card" content="summary">
  16. <meta name="twitter:site" content="@mcmillen">
  17. <meta name="twitter:title" content="93% of Paint Splatters are Valid Perl Programs | Colin McMillen">
  18. <meta name="twitter:description" content="TLDR: read the paper and view the gallery of pretty Perl programs. 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?">
  19. </head>
  20. <script>
  21. function fixEmails() {
  22. const mailtoArray = [
  23. 'm', 'a', 'i', 'l', 't', 'o', ':',
  24. 'c', 'o', 'l', 'i', 'n', '@',
  25. 'm', 'c', 'm', 'i', 'l', 'l', 'e', 'n',
  26. '.', 'd', 'e', 'v'];
  27. const mailtoLink = mailtoArray.join('');
  28. const anchors = document.getElementsByTagName('a');
  29. for (let i = 0; i < anchors.length; i++) {
  30. const anchor = anchors[i];
  31. if (anchor.href == 'mailto:email@example.com') {
  32. anchor.href = mailtoLink;
  33. if (anchor.innerText == 'colin at mcmillen dot dev') {
  34. anchor.innerText = mailtoLink.substring(7);
  35. }
  36. }
  37. }
  38. }
  39. </script>
  40. <body onload="fixEmails()">
  41. <div id="page-container">
  42. <div id="content-wrap">
  43. <div id="header">
  44. <div class="content">
  45. <a href="/" class="undecorated">Colin McMillen</a>
  46. <span style="float: right;"><a href="/feed.atom"><img src="/img/rss.svg" alt="Atom feed" style="width: 17px; height: 17px; margin-bottom: 1px;"></a></span>
  47. <span style="float: right;"><a href="https://twitter.com/mcmillen"><img src="/img/twitter.svg" alt="@mcmillen"></a></span>
  48. </div>
  49. </div>
  50. <div class="content">
  51. <h1 id="93-of-paint-splatters-are-valid-perl-programs">93% of Paint Splatters are Valid Perl Programs</h1>
  52. <p><em>Posted 2019-04-01.</em></p>
  53. <p>TLDR: <a href="2019.pdf">read the paper</a> and <a href="splatters.html">view the gallery of pretty Perl programs</a>.</p>
  54. <p>In this paper, we aim to answer a long-standing open problem in the programming languages community: <em>is it possible to smear paint on the wall without creating valid Perl?</em></p>
  55. <p>We answer this question in the affirmative: it <strong>is possible</strong> 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.</p>
  56. <p><a href="https://twitter.com/jaffathecake/status/1095706032448393217"><img alt="Screenshot of a Twitter conversation. Adrienne Porter Felt says: &quot;I don't want to teach my kid to code. I want him to splash in muddy puddles and smear paint on the walls and read novels under the covers way too late at night. I grew up too soon and wish I'd had more time to be a kid. Why do schools teach vocational skills so young these days?&quot; Jake Archibald replies: &quot;but is it possible to smear paint on the wall without creating valid Perl?&quot;" src="/media/20190401-sigbovik-tweet.png"></a></p>
  57. <p>Accepted for publication at SIGBOVIK 2019, held April 1st 2019 in Pittsburgh. Winner of a Unwitting Participation Ribbon, &ldquo;an unwelcome brand we’ve affixed to each paper determined after careful scrutiny to have included a genuine artifact, thereby furthering the admirable causes of open science and fruitful procrastination.&rdquo;</p>
  58. <p>Read it on <a href="https://docs.google.com/document/d/1ZGGNMfmfpWB-DzWS3Jr-YLcRNRjhp3FKS6v0KELxXK8/preview">Google Docs</a> or download a <a href="2019.pdf">PDF</a>. Or grab the <a href="http://sigbovik.org/2019/proceedings.pdf">entire SIGBOVIK 2019 proceedings</a>; I&rsquo;m on page 174.</p>
  59. <h2 id="supplementary-materials">Supplementary Materials</h2>
  60. <p>Here&rsquo;s <a href="splatters.html">all the paint splatters</a> on a single page, along with the valid Perl source code corresponding to each. &ldquo;Not valid&rdquo; is written in red for those images which did not parse as valid Perl programs. If different OCR settings recognized multiple valid Perl programs, I chose the one that seemed the most &ldquo;interesting&rdquo;, according to my own aesthetic sense.</p>
  61. <p>Here&rsquo;s a <a href="splatters.tar.gz">tarball of 100 paint-splatter images</a> that were used as the main dataset for this paper.</p>
  62. <p><strong>(source code not available yet because i am bad at GitHub)</strong></p>
  63. <h2 id="errata">Errata</h2>
  64. <p>There are a few paint splatter Perl programs that I didn&rsquo;t recognize as &ldquo;interesting&rdquo; until after the SIGBOVIK submission deadline. For example, this splatter is recognized by OCR as the string <code>lerzfijglpFiji-j</code>, which evaluates to the number <code>0</code> in Perl:</p>
  65. <p><img alt="paint splatter" src="splatters/6b78f8696b05f9322b2dda21b6932776.jpg"></p>
  66. <p>The image below is recognized as the string <code>-*?</code>, which also evaluates to the number <code>0</code> in Perl:</p>
  67. <p><img alt="paint splatter" src="splatters/e47b8463b359906947c66ec4c852a2a3.jpg"></p>
  68. <p>Another surprising program is shown below; OCR recognizes this image as the string <code>;i;c;;#\\?z{;?;;fn':.;</code>, which evaluates to the string <code>c</code> in Perl:</p>
  69. <p><img alt="paint splatter" src="splatters/803dd5a54c42ed93462c78ad7da357b0.jpg"></p>
  70. <p>Finally, this image is recognized as the string <code>;E,'__'</code>, which evaluates to the string <code>E__</code> in Perl:</p>
  71. <p><img alt="paint splatter" src="splatters/dc86c1c3553705b7b2f973d5be9e0389.jpg"></p>
  72. </div>
  73. </div>
  74. <div id="footer">
  75. <div class="content">
  76. &copy; 2023 <a href="/" class="undecorated">Colin McMillen</a>. No cookies, no tracking.
  77. </div>
  78. </div>
  79. </div>
  80. </body>
  81. </html>