<p>These are some emacs keybindings (and other functions) that I once found useful. I’ve mostly used Sublime Text for the last few years, however.</p>
<p>I own a Nokia 6102i phone (provided by Cingular). <a href="http://gnokii.org">gnokii</a> is a Linux program that lets me interface with the phone. Here are some recipes:</p>
<p>The easiest way to chop an MP3 in Linux is with <code>dd</code>; the drawback is that you need to specify length in KB, not time. To chop an MP3 to be 200 KB long, do:</p>
<p>To make a Phonebook.ldif file from the phone (suitable for import into Thunderbird):</p>
<p><code>gnokii --getphonebook ME 1 end --ldif > Phonebook.ldif</code></p>
<p>To add the entries in Phonebook.ldif to the phone:</p>
<p><code>cat Phonebook.ldif | gnokii --writephonebook -m ME --find-free --ldif</code></p>
<p>You can specify <code>--overwrite</code> instead of <code>--find-free</code> if you want to overwrite all the entries, but this will lose some data (e.g. speed dial, preferred numbers).</p>
These show up on the phone in <code>My Stuff/Images</code>. The files don’t need to be any specific size; they are autoscaled. GIFs probably also work.</p>
<p>Unfortunately, nothing I knew of in 2007 (when this page was first written) would play <code>.amr</code> files, but these days (2021) perhaps <code>ffmpeg input.amr output.mp3</code> would work. You might have to use the <code>-ar</code> flag to specify the audio rate. I haven’t actually tried this though!</p>
<h2 id="embedding-fonts-in-pdfs">Embedding fonts in PDFs</h2>
<p>To check whether fonts are embedded, use <code>pdffonts</code>, which is included with <code>xpdf</code>. <code>pdffonts</code> gives output that looks like this:</p>
<p>You want <code>emb</code> to be <code>yes</code> for all fonts (and possibly <code>sub</code> as well; also, all fonts should be Type 1, not Type 3). By default in Ubuntu, pdflatex should embed all fonts. Just in case, you can check <code>/etc/texmf/updmap.d/00updmap.cfg</code>, which should have a line like this:</p>
<p>If it’s set to <code>false</code>, change it to <code>true</code>, then run <code>update-updmap</code> as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the <code>pdffonts</code> command). For anything that doesn’t have embedded fonts, you can try the following magical invocation:</p>
<p>This creates a file <code>figures/Mprime-new.pdf</code> that is hopefully identical to the input file <code>figures/Mprime.pdf</code>, except that the fonts are embedded. Run <code>pdffonts</code> on it to check.</p>
<p>Once all your figures are in PDF format, remake the paper again. Hopefully, all your fonts are now embedded — check again with <code>pdffonts</code>.</p>
<h1 id="93-of-paint-splatters-are-valid-perl-programs">93% of Paint Splatters are Valid Perl Programs</h1>
<p><em>Posted 2019-04-01.</em></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>
<p><a href="https://twitter.com/jaffathecake/status/1095706032448393217"><img alt="Screenshot of a Twitter conversation. Adrienne Porter Felt says: "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?" Jake Archibald replies: "but is it possible to smear paint on the wall without creating valid Perl?"" src="/media/20190401-sigbovik-tweet.png"></a></p>
<p>Accepted for publication at SIGBOVIK 2019, held April 1st 2019 in Pittsburgh. Winner of a Unwitting Participation Ribbon, “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.”</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’m on page 174.</p>
<p>Here’s <a href="splatters.html">all the paint splatters</a> on a single page, along with the valid Perl source code corresponding to each. “Not valid” 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 “interesting”, according to my own aesthetic sense.</p>
<p>Here’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’t recognize as “interesting” 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>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>
<h1 id="my-first-paper-in-10-years">My first paper in 10 years?!</h1>
<p><em>Posted 2019-04-03.</em></p>
<p>It’s been nearly two months since my last day at Google, so I guess I should finally make use of this newsletter :)</p>
<p>I wrote <a href="https://docs.google.com/document/d/1ZGGNMfmfpWB-DzWS3Jr-YLcRNRjhp3FKS6v0KELxXK8/preview">a paper</a> which was published on April 1st as part of SIGBOVIK 2019: “93% of Paint Splatters are Valid Perl Programs”. In this paper, I 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>(Long-standing since February 13, 2019, when a <a href="https://twitter.com/jaffathecake/status/1095706032448393217">Twitter conversation</a> between Adrienne Porter Felt & Jake Archibald posed the question.)</p>
<p>To answer this question, I downloaded 100 images of paint splatters from Pinterest, ran the open-source Tesseract OCR engine to turn each into a text string, and then sent that text to the Perl interpreter to see whether that text successfully parsed as Perl. It turns out that 93 of the 100 paint splatters do parse as valid Perl, but since 7% do not, I conclude that it <strong>is possible</strong> to smear paint on a wall without creating valid Perl.</p>
<p>You might suspect there is some chicanery going on with this result. You’d be correct, but… honestly there’s not <em>that</em> much chicanery going on. You’ll have to read the paper for details… and for my attempts at academic humor. :)</p>
<p>There’s also some <a href="/sigbovik">supporting material</a> on this website, including a <a href="/sigbovik/splatters.html">gallery of all 100 images</a> and their associated valid Perl code. Here’s a screenshot of some of them. (Did you know that the string <code>lerzfijglpFiji-j</code> evaluates to the number <code>0</code> in Perl?)</p>
<p>As it turns out, the publication date of my paper was exactly 10-years-minus-a-day since my Ph.D. thesis defense. I’d planned on travelling back to Carnegie Mellon to give this talk live at SIGBOVIK 2019, but unfortunately came down with a nasty cold-and-cough so I had to cancel my trip. :( Perhaps I can give a belated talk at next year’s conference.</p>
<p>For more light-hearted and vaguely CS-shaped research papers, check out the rest of the <a href="http://sigbovik.org/2019/proceedings.pdf">SIGBOVIK 2019 proceedings</a>. I particularly enjoyed “Elo World, a framework for benchmarking weak chess engines” by tom7 (“The computer players include some traditional chess engines, but also many algorithms chosen for their simplicity, as well as some designed to be competitively bad”.)</p>
<p>Some other random things that I’ve been up to in the last month-and-a-half:</p>
<ul>
<li>
<p><a href="https://twitter.com/mcmillen/status/1095795492196364297">ohnosay</a>, which is like “cowsay” but for comics in the style of webcomicname. [GitHub] This was a good excuse to get a Linux development environment set up on a persistent Google Cloud instance & to learn how to GitHub. Since then, I also realized that the World Outside Google uses Python 3, so I’ve started learning that :)</p>
<p><img alt='a three panel comic displayed on a linux terminal: "i will write a silly program" "hm, what did i do with my ssh credentials?" "oh no"' src="/media/20190403-update-ohno.png"></p>
<p>Gardening! Last August I randomly planted some peppermint in a railing container on my balcony, and it went gangbusters. This spring I’ve actually planned out a whole porch-garden (like <a href="https://twitter.com/sevandyk/status/1109121188079427585">Stardew Valley but real life</a>). Last year’s mint has started growing again, and I’ve added spearmint and mojito mint. I’ve also got two types of peas, two mixes of salad greens, and spinach planted. Later I’ll be planting carrots, basil, and rosemary. The peas just started sprouting a couple days ago, which is exciting!</p>
<p>Gloomhaven! This is a cooperative legacy-style board game — a fun dungeon-crawler that doesn’t need a DM, so everyone gets to play. Our group is still only a few scenarios in, but we’re enjoying it so far. SO MANY HEX TILES. I’m also getting ready to paint our party’s miniatures, which is another (potential) new hobby of mine; more to come in a future newsletter, I suspect :)</p>
<p>Video games: just started Sekiro: Shadows Die Twice on PS4. Recently completed (and really enjoyed) New Super Mario Bros. U Deluxe for Nintendo Switch (though Nintendo seems to be trying to give Google a run for their money on ridiculous product names). I’ve also been playing Total War: Warhammer 2 regularly, and Splatoon 2 from time to time. I tried getting into XCOM 2 & enjoyed it, but I’m not sure I’m interested enough to finish the campaign. I keep going back to Total War when I want something in the tactical / strategy genre.</p>
</li>
<li>
<p>Guitar: starting to learn fingerstyle, with the goal of eventually becoming good enough to play <a href="https://www.songsterr.com/a/wsa/chrono-cross-dream-of-the-shore-boardering-another-world-tab-s5033t2">Dream of the Shore Bordering Another World</a> from Chrono Cross.</p>
</li>
<li>
<p>Computer stuff: upgraded my PC’s video card (it was many years old) and upgraded to an all-SSD setup. It turns out that 2TB SSDs aren’t that expensive any more.</p>
</li>
<li>
<p>Getting healthcare without an employer is a disaster — even in Massachusetts, which reportedly has one of the best systems in the US. Still working on straightening out my paperwork. Apparently they refuse to believe in my proof of health-insurance termination, even though it’s lettermarked by Google and everything.</p>
</li>
</ul>
<p>Thanks for reading! Hopefully the next update will come sooner than 2 months and thus be a bit shorter than this one ended up being :)</p>
<h1 id="a-new-year-a-sneaky-new-project">A new year & a sneaky new project</h1>
<p><em>Posted 2020-02-09.</em></p>
<p>I can’t believe it’s here so quickly, but: today marks a year since my last day at Google. That seemed like a good occasion to dust off this newsletter & let you know what I’ve been up to: making a videogame!</p>
<p>I’m working on a stealth-based 2D platformer where you don’t have to kill anyone unless you want to. It’ll be possible to get through every level by sneaking and misdirection, but it’ll require you to be careful and tactical to do so… and of course if that doesn’t work out, you can always draw your swords and go in fighting! So far I’ve given it “Sneak” as a codename, but that’s definitely a placeholder until I can flesh out more of the world.</p>
<p>So far Sneak runs on PC & Xbox, but I hope to add Switch and PS4 support within the next couple months. I’m using a C# framework called MonoGame, which provides low-level graphics & audio support across all these platforms. In order to write games for Switch or PS4, you need to apply to Nintendo & Sony to get access to their platform-specific SDKs. So my first real milestone will be coming up with a compelling Game Design Doc & gameplay videos so that they can (hopefully) be convinced that I’m worth taking seriously. Wish me luck!</p>
<p>Sony won’t even talk to anyone unless they’re a Real Business (& Nintendo kinda wants you to be too), so as of… yesterday, I’m officially the founder of SemiColin Games LLC (and, for now at least, the only member…)</p>
<p>If you want to follow along, I have an extremely-placeholder website up at <a href="https://semicolin.games">semicolin.games</a> where you can sign up for Yet Another Newsletter if you like, and a Twitter account <a href="https://twitter.com/SemiColinGames">@SemiColinGames</a> that would appreciate a follow. I’ll probably set up a devblog with an RSS feed too eventually, but that’s not quite ready yet. When it is, I’ll send a quick update here.</p>
<p>I only got started in December & a lot of my work so far has been on building infrastructure (and learning how to start a business), so I don’t have any Extremely Compelling Gameplay Videos yet. Here’s a short animated GIF for now. The <a href="https://twitter.com/mcmillen/status/1205164954728509440">bloopers on Twitter</a> might be more fun though. :)</p>
<p>Thanks for following along with me on this adventure! Hopefully my next update will come more quickly, and be less wordy! I’ve wanted to make videogames since I was Literally A Kid, so I’m quite excited to finally be doing that full-time, and to hopefully share something good with all of you. When I’m at a stage where I want alpha testers, I’ll definitely be asking here first.</p>
<p>Thanks for your support!<br>
~ Colin (& <a href="https://semicolin.games">SemiColin Games</a>)</p>