www-home/sigbovik/index.html

92 lines
6.5 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/">
<link rel="alternate" type="application/atom+xml" href="https://www.mcmillen.dev/feed.atom" title="Colin McMillen's Blog - Atom">
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">
2021-07-02 04:55:08 +00:00
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@mcmillen">
<meta name="twitter:title" content="93% of Paint Splatters are Valid Perl Programs | Colin McMillen">
<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?">
2021-06-29 16:00:59 +00:00
</head>
2020-02-07 13:10:06 +00:00
2022-11-07 20:10:05 +00:00
<script>
function fixEmails() {
const mailtoArray = [
'm', 'a', 'i', 'l', 't', 'o', ':',
'c', 'o', 'l', 'i', 'n', '@',
'm', 'c', 'm', 'i', 'l', 'l', 'e', 'n',
'.', 'd', 'e', 'v'];
const mailtoLink = mailtoArray.join('');
const anchors = document.getElementsByTagName('a');
for (let i = 0; i < anchors.length; i++) {
const anchor = anchors[i];
if (anchor.href == 'mailto:email@example.com') {
anchor.href = mailtoLink;
if (anchor.innerText == 'colin at mcmillen dot dev') {
anchor.innerText = mailtoLink.substring(7);
}
}
}
}
</script>
<body onload="fixEmails()">
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>
2021-07-01 16:13:45 +00:00
<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>
2021-06-29 16:00:59 +00:00
<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>
2021-07-01 02:09:54 +00:00
<p><em>Posted 2019-04-01.</em></p>
2021-06-29 16:00:59 +00:00
<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>
2021-07-01 14:15:35 +00:00
<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>
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">
2022-11-07 20:10:05 +00:00
&copy; 2022 <a href="/" class="undecorated">Colin McMillen</a>. No cookies, no tracking.
2021-06-29 16:00:59 +00:00
</div>
</div>
</div>
</body>
2020-02-07 13:10:06 +00:00
</html>