www-home/sigbovik/index.html

68 lines
4.9 KiB
HTML
Raw Normal View History

2020-02-07 13:10:06 +00:00
<!DOCTYPE html>
<html lang="en">
2021-06-29 16:00:59 +00:00
<head>
<meta charset="UTF-8">
2021-06-29 16:00:59 +00:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/favicon.ico">
<link rel="canonical" href="https://www.mcmillen.dev/sigbovik/">
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<title>93% of Paint Splatters are Valid Perl Programs | Colin McMillen</title>
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=block" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Fira+Mono:500&display=block" rel="stylesheet">
<link rel="stylesheet" href="/pygments.css">
<link rel="stylesheet" href="/style.css">
<!-- TODO: add apple touch icon, maybe other favicon sizes -->
</head>
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<body>
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<div id="page-container">
<div id="content-wrap">
<div id="header">
<div class="content">
<a href="/" class="undecorated">Colin McMillen</a>
<span style="float: right;"><a href="https://twitter.com/mcmillen"><img src="/img/twitter.svg" alt="@mcmillen"></a></span>
</div>
</div>
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<div class="content">
<h1 id="93-of-paint-splatters-are-valid-perl-programs">93% of Paint Splatters are Valid Perl Programs</h1>
<p>Published 2019-04-01.</p>
<p>TLDR: <a href="2019.pdf">read the paper</a> and <a href="splatters.html">view the gallery of pretty Perl programs</a>.</p>
<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>
<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>
2020-02-07 13:10:06 +00:00
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">but is it possible to smear paint on the wall without creating valid Perl?</p>&mdash; Jake Archibald (@jaffathecake) <a href="https://twitter.com/jaffathecake/status/1095706032448393217?ref_src=twsrc%5Etfw">February 13, 2019</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js"></script>
2020-02-07 13:10:06 +00:00
2021-06-29 16:00:59 +00:00
<p>Accepted for publication at SIGBOVIK 2019, held April 1st 2019 in Pittsburgh. Winner of a Unwitting Participation Ribbon, &ldquo;an unwelcome brand weve 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>
<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>
<h2 id="supplementary-materials">Supplementary Materials</h2>
<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>
<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>
<p><strong>(source code not available yet because i am bad at GitHub)</strong></p>
<h2 id="errata">Errata</h2>
<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>
<p><img alt="paint splatter" src="splatters/6b78f8696b05f9322b2dda21b6932776.jpg"></p>
2020-02-07 13:10:06 +00:00
<p>The image below is recognized as the string <code>-*?</code>, which also evaluates to the number <code>0</code> in Perl:</p>
2021-06-29 16:00:59 +00:00
<p><img alt="paint splatter" src="splatters/e47b8463b359906947c66ec4c852a2a3.jpg"></p>
<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>
<p><img alt="paint splatter" src="splatters/803dd5a54c42ed93462c78ad7da357b0.jpg"></p>
<p>Finally, this image is recognized as the string <code>;E,'__'</code>, which evaluates to the string <code>E__</code> in Perl:</p>
<p><img alt="paint splatter" src="splatters/dc86c1c3553705b7b2f973d5be9e0389.jpg"></p>
</div>
</div>
<div id="footer">
<div class="content">
2021-06-29 16:08:23 +00:00
&copy; 2021 <a href="/" class="undecorated">Colin McMillen</a>.
2021-06-29 16:00:59 +00:00
</div>
</div>
</div>
</body>
2020-02-07 13:10:06 +00:00
</html>