George V. Reilly http://www.georgevreilly.com/ en Thu, 23 Feb 2017 08:00:00 GMT http://www.georgevreilly.com/rss/ acrylamid 0.7.10 Stitches in my Finger http://www.georgevreilly.com/blog/2017/02/23/StitchesInMyFinger.html <img alt="Five Stitches in Left Index Finger" class="right-float" src="http://www.georgevreilly.com/content/binary/finger-stitches.jpg"/> <p>I've had stitches before, but never from a self-inflicted cut. Five stitches this morning from a bread knife slipping on a stale loaf that I was going to toast. I never did get that snack.</p> <p>Fortunately, it hasn't been painful. The stitches should come out in 7–9 days. Meanwhile, typing is awkward and slow.</p> <p>My brother David when he was eight or nine nearly ruined his thumb with a chisel. He was using it to make a wooden sign for his cub scout troop. The chisel slipped and jammed into the back of his left thumb. He didn't sever the tendon and he got the full use of his thumb back, but he still has an ugly scar.</p> <p>Within a year or two of David's accident, my father lost the tip of his index finger. He was making a deposit into a night safe when some keys got in the way as the door swung closed. He flipped them out of the way, but his fingertip didn't clear the gap in time. Fortunately his own father was present and took him for medical treatment. He has a divot missing from the tip of his right index finger. Vincent, unlike his children, is left-handed so it wasn't quite as much of a loss as it sounds.</p> <p>Life! No-one gets out without scars.</p> Thu, 23 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-23:/blog/2017/02/23/StitchesInMyFinger.html I Haz Shoes http://www.georgevreilly.com/blog/2017/02/22/IHazShoes.html <p>I've been wearing a surgical boot since my <a class="reference external" href="http://www.georgevreilly.com/blog/2017/01/17/KneeWalker.html">heel surgery</a> six weeks ago. The first month I spent getting around on a knee walker or crutches. For the last couple of weeks, I've been walking more and more, but always wearing the boot. The doctor told me today that I could start weaning myself off the boot, but not to rush it.</p> <p>I wore shoes on my right foot tonight for the first time. I tried on a Doc Marten shoe but found it too stiff. It rubbed against the scar at the back of my heel. A pair of sneakers were more comfortable. I'll bring the right sneaker to work with me tomorrow and wear it for a while.</p> <p>It's such a relief to let my ankle flex forward. As soon as I step off my right foot while wearing the surgical boot, the inability to lean forward crimps my stride. And the thick raised sole pushes me off-kilter and does my hips and lower back no good.</p> <p>Baby steps!</p> Wed, 22 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-22:/blog/2017/02/22/IHazShoes.html OrderedDict Initialization http://www.georgevreilly.com/blog/2017/02/21/OrderedDictInitialization.html <p>An <a class="reference external" href="https://docs.python.org/2/library/collections.html#collections.OrderedDict">OrderedDict</a> is a Python <tt class="docutils literal">dict</tt> which remembers insertion order. When iterating over an <tt class="docutils literal">OrderedDict</tt>, items are returned in that order. Ordinary <tt class="docutils literal">dicts</tt> return their items in an unspecified order.</p> <p>Ironically, most of the ways of constructing an initialized <tt class="docutils literal">OrderedDict</tt> end up breaking the ordering in Python 2.x and in Python 3.5 and below. Specifically, using keyword arguments or passing a <tt class="docutils literal">dict</tt> (mapping) will not retain the insertion order of the source code.</p> <div class="highlight"><pre><span></span><span class="go">Python 2.7.13 (default, Dec 18 2016, 07:03:39)</span> <span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">OrderedDict</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span> <span class="o">=</span> <span class="n">OrderedDict</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="p">[</span><span class="s1">&#39;one&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="p">[</span><span class="s1">&#39;two&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">2</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="p">[</span><span class="s1">&#39;three&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="p">[</span><span class="s1">&#39;four&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">4</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="p">[</span><span class="s1">&#39;five&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="mi">5</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">odict</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="go">[(&#39;one&#39;, 1), (&#39;two&#39;, 2), (&#39;three&#39;, 3), (&#39;four&#39;, 4), (&#39;five&#39;, 5)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">OrderedDict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">three</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">four</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">five</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="go">[(&#39;four&#39;, 4), (&#39;one&#39;, 1), (&#39;five&#39;, 5), (&#39;three&#39;, 3), (&#39;two&#39;, 2)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">OrderedDict</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">three</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">four</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">five</span><span class="o">=</span><span class="mi">5</span><span class="p">))</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="go">[(&#39;four&#39;, 4), (&#39;five&#39;, 5), (&#39;three&#39;, 3), (&#39;two&#39;, 2), (&#39;one&#39;, 1)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">OrderedDict</span><span class="p">({</span><span class="s2">&quot;one&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;two&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s2">&quot;three&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;four&quot;</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span><span class="err">↩</span> <span class="go"> &quot;five&quot;: 5}).items()</span> <span class="go">[(&#39;four&#39;, 4), (&#39;three&#39;, 3), (&#39;five&#39;, 5), (&#39;two&#39;, 2), (&#39;one&#39;, 1)]</span> </pre></div> <p>Only passing an <em>iterable</em> of key-value pairs will retain the order.</p> <div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">&quot;one&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;two&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;three&quot;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span><span class="err">↩</span> <span class="go"> (&quot;four&quot;, 4), (&quot;five&quot;, 5)]).items()</span> <span class="go">[(&#39;one&#39;, 1), (&#39;two&#39;, 2), (&#39;three&#39;, 3), (&#39;four&#39;, 4), (&#39;five&#39;, 5)]</span> </pre></div> <p>Note that <tt class="docutils literal">OrderedDict</tt> is noticeably slower than <tt class="docutils literal">dict</tt> in Python 2.7, so only use <tt class="docutils literal">OrderedDict</tt> when insertion order matters.</p> <p>In Python 3.6, the <a class="reference external" href="https://www.python.org/dev/peps/pep-0468/">order of kwargs is preserved</a>, thanks to the <a class="reference external" href="https://mail.python.org/pipermail/python-dev/2016-September/146327.html">new compact implementation of dict</a>. <tt class="docutils literal">OrderedDict</tt> is also implemented in C and its performance is on par with that of <tt class="docutils literal">dict</tt>.</p> <p>Python 3.6 <tt class="docutils literal">dict</tt>s are now ordered too, but if you care about portable code (earlier CPython or other Python implementations such as Jython), use <tt class="docutils literal">OrderedDict</tt> rather than relying on this implementation detail.</p> <div class="highlight"><pre><span></span><span class="n">Python</span> <span class="mf">3.6</span><span class="o">.</span><span class="mi">0</span> <span class="p">(</span><span class="n">default</span><span class="p">,</span> <span class="n">Dec</span> <span class="mi">24</span> <span class="mi">2016</span><span class="p">,</span> <span class="mi">08</span><span class="p">:</span><span class="mo">01</span><span class="p">:</span><span class="mi">42</span><span class="p">)</span> <span class="o">&gt;&gt;&gt;</span> <span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">OrderedDict</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">OrderedDict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">three</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">four</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">five</span><span class="o">=</span><span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="n">odict_items</span><span class="p">([(</span><span class="s1">&#39;one&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;two&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;three&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;four&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="err">…</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">OrderedDict</span><span class="p">(</span><span class="nb">dict</span><span class="p">(</span><span class="n">one</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">two</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">three</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">four</span><span class="o">=</span><span class="mi">4</span><span class="p">,</span> <span class="n">five</span><span class="o">=</span><span class="mi">5</span><span class="p">))</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="n">odict_items</span><span class="p">([(</span><span class="s1">&#39;one&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;two&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;three&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;four&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="err">…</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">OrderedDict</span><span class="p">({</span><span class="s2">&quot;one&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">&quot;two&quot;</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> <span class="s2">&quot;three&quot;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;four&quot;</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span><span class="err">↩</span> <span class="s2">&quot;five&quot;</span><span class="p">:</span> <span class="mi">5</span><span class="p">})</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="n">odict_items</span><span class="p">([(</span><span class="s1">&#39;one&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;two&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;three&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;four&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="err">…</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">OrderedDict</span><span class="p">([(</span><span class="s2">&quot;one&quot;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;two&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;three&quot;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span><span class="err">↩</span> <span class="p">(</span><span class="s2">&quot;four&quot;</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="s2">&quot;five&quot;</span><span class="p">,</span> <span class="mi">5</span><span class="p">)])</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> <span class="n">odict_items</span><span class="p">([(</span><span class="s1">&#39;one&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;two&#39;</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;three&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s1">&#39;four&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="err">…</span> </pre></div> Tue, 21 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-21:/blog/2017/02/21/OrderedDictInitialization.html Review: Skinny Dip http://www.georgevreilly.com/blog/2017/02/19/ReviewSkinnyDip.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0446615129/?tag=georgvreill-20"><img alt="Skinny Dip" class="right-float" src="http://images.amazon.com/images/P/0446615129.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: Skinny Dip</div> <div class="line">Author: Carl Hiaasen</div> <div class="line">Rating: ★ ★ ★ ★</div> <div class="line">Publisher: Warner</div> <div class="line">Copyright: 2004</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0446615129/?tag=georgvreill-20">978-0446-615129</a></div> <div class="line">Pages: 496</div> <div class="line">Keywords: humor, crime</div> <div class="line">Reading period: 18–19 February, 2017</div> </div> <p>Joey Perrone is very surprised to find herself thrown off a cruise ship on her second wedding anniversary. After a night of swimming, she washes up on a small Florida island in the company of a prematurely retired investigator. Joey persuades Mick Stranahan not to report the attempted murder, but instead to investigate and torment her worthless husband, Chaz, who turns out to be a <a class="reference external" href="http://www.urbandictionary.com/define.php?term=biostitute">biostitute</a> for a major polluter of the Everglades, as well as a relentless pussyhound, an inept killer, and an all-round shitheel.</p> <p>Hiaasen has a lot of fun at the expense of some of his characters, but his outrage at the despoliation of the Everglades is quite real. And once again, the grizzled cynical middleaged guy attracts the pretty younger woman.</p> Sun, 19 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-19:/blog/2017/02/19/ReviewSkinnyDip.html HTML5 tables require tr inside thead http://www.georgevreilly.com/blog/2017/02/18/HTML5TablesRequireTrInsideThead.html <p>When I learned HTML tables back in the 90s, at some point I discovered the <tt class="docutils literal">&lt;thead&gt;</tt> element for grouping the <tt class="docutils literal">&lt;th&gt;</tt> column headers. What I missed was there should be a <tt class="docutils literal">&lt;tr&gt;</tt> element between the two. In other words, a well-formed HTML table with a header looks like this:</p> <div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">table</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">thead</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;</span>Name<span class="p">&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;</span>Value<span class="p">&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;</span>Date<span class="p">&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> <span class="p">&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span> <span class="p">&lt;/</span><span class="nt">thead</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">tbody</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">tr</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">td</span><span class="p">&gt;</span>USERNAME<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">td</span><span class="p">&gt;</span>John.Smith<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">td</span><span class="p">&gt;</span>2017-02-18T23:47<span class="p">&lt;/</span><span class="nt">td</span><span class="p">&gt;</span> <span class="p">&lt;/</span><span class="nt">tr</span><span class="p">&gt;</span> <span class="p">&lt;/</span><span class="nt">tbody</span><span class="p">&gt;</span> <span class="p">&lt;/</span><span class="nt">table</span><span class="p">&gt;</span> </pre></div> <p>and not:</p> <div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">table</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">thead</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;</span>Name<span class="p">&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> <span class="p">&lt;</span><span class="nt">th</span><span class="p">&gt;</span>Value<span class="p">&lt;/</span><span class="nt">th</span><span class="p">&gt;</span> … </pre></div> <p>The latter form—<tt class="docutils literal">&lt;thead&gt;</tt> directly enclosing <tt class="docutils literal">&lt;th&gt;</tt>s—had always worked for me. Until yesterday when I ran afoul of an HTML5 validator on a remote API, which simply would not let me proceed until I wrapped my <tt class="docutils literal">&lt;th&gt;</tt> cells with a <tt class="docutils literal">&lt;tr&gt;</tt>.</p> <p>Who knew?</p> Sat, 18 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-18:/blog/2017/02/18/HTML5TablesRequireTrInsideThead.html Review: The Italian Job http://www.georgevreilly.com/blog/2017/02/17/ReviewTheItalianJob.html <a class="reference external image-reference" href="https://en.wikipedia.org/wiki/The_Italian_Job"><img alt="The Italian Job" class="right-float" src="https://upload.wikimedia.org/wikipedia/en/b/b3/The_Italian_Job_1969_poster.jpg"/></a> <div class="line-block"> <div class="line">Title: The Italian Job</div> <div class="line">Director: Peter Collinson</div> <div class="line">Rating: ★ ★ ★ ★</div> <div class="line">Released: 1969</div> <div class="line">Keywords: heist, comedy, cars</div> <div class="line">Country: UK</div> <div class="line">Watched: 17 Febuary, 2017</div> </div> <p><a class="reference external" href="https://en.wikipedia.org/wiki/The_Italian_Job">The Italian Job</a> movie is worth your time. One of the quintessential movies of the Swinging Sixties, its British sensibility wears well, almost 50 years on. The humour still works. And it's probably the best advertisement that the <a class="reference external" href="https://en.wikipedia.org/wiki/Mini#Mini_Cooper_and_Cooper_S:_1961.E2.80.932000">Mini</a> ever had.</p> <p>Charlie Croker (Michael Caine) has inherited a plan to rip off $4 million in gold bullion from Fiat in Turin. He and the lads are going to help the balance of payments by bringing the loot back from the Common Market. (They're proto-Euroskeptics.) And they're going to do it by causing the mother of all traffic jams and making their getaway in three little Mini Coopers.</p> <p>Don't expect too much coherence from the plot. There's at least 20 minutes of gloriously improbable chase scene set pieces where the three Minis perform balletic moves and lose another police Alfa Romeo or two. The literal cliffhanger ending is a classic. As with most comedies of the time, the characterization is weak—we learn a bit about what makes Croker and crime boss Bridger (Noël Coward) tick, but the rest are ciphers. No matter. The plot ticks along and it delivers.</p> Fri, 17 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-17:/blog/2017/02/17/ReviewTheItalianJob.html Jenkins Pipelines http://www.georgevreilly.com/blog/2017/02/14/JenkinsPipelines.html <p>I just published a series of <a class="reference external" href="https://www.metabrite.com/devblog/posts/jenkins-01-migrating-pipelines/">blog posts</a> at the MetaBrite DevBlog about our experiences in migrating to Jenkins and Pipelines.</p> Tue, 14 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-14:/blog/2017/02/14/JenkinsPipelines.html Review: Kill Me Three Times http://www.georgevreilly.com/blog/2017/02/10/ReviewKillMeThreeTimes.html <a class="reference external image-reference" href="https://en.wikipedia.org/wiki/Kill_Me_Three_Times"><img alt="Kill Me Three Times" class="right-float" src="https://upload.wikimedia.org/wikipedia/en/2/2e/Kill_Me_Three_Times_poster.jpg"/></a> <div class="line-block"> <div class="line">Title: Kill Me Three Times</div> <div class="line">Director: Kriv Stenders</div> <div class="line">Rating: ★ ★ ★</div> <div class="line">Released: 2014</div> <div class="line">Keywords: black comedy thriller</div> <div class="line">Country: Australia</div> <div class="line">Watched: 10 February, 2017</div> </div> <p>A jealous husband engages a private detective-cum-killer for hire (Simon Pegg) to follow his wife. Upon proof of her infidelity, he orders a hit, which triggers a comedy of errors and double crosses, which ultimately leaves most of the cast dead at each other's hands.</p> <p>There's not much to like about this Australian noirish comedy. It's bloody but not that funny. The characters are thinly drawn and unengaging. They're a far cry from Tarantino's gonzo motormouths or the Coen Brother's quirky killers.</p> Fri, 10 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-10:/blog/2017/02/10/ReviewKillMeThreeTimes.html Review: I Shall Wear Midnight http://www.georgevreilly.com/blog/2017/02/09/ReviewIShallWearMidnight.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0061433063/?tag=georgvreill-20"><img alt="I Shall Wear Midnight" class="right-float" src="http://images.amazon.com/images/P/0061433063.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: I Shall Wear Midnight</div> <div class="line">Author: Terry Pratchett</div> <div class="line">Rating: ★ ★ ★ ★</div> <div class="line">Publisher: Harper</div> <div class="line">Copyright: 2010</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0061433063/?tag=georgvreill-20">0061433063</a></div> <div class="line">Pages: 355</div> <div class="line">Keywords: humor, fantasy</div> <div class="line">Reading period: 3–5 February, 2017</div> </div> <p>Tiffany Aching is now the overworked and overly responsible Witch of the Chalk. People everywhere are fearing and distrusting witches more. When her patient, the ailing Baron dies, she is blamed. Other troubles multiply. Eventually she realizes that the Cunning Man, a long-dead witchfinder, is seeping poison into people's hearts. Aided by the troublemaking Nac Mac Feegle, she defeats him.</p> <p>Recommended.</p> <p><a class="reference external" href="https://en.wikipedia.org/wiki/I_Shall_Wear_Midnight">I Shall Wear Midnight</a> follows <a class="reference external" href="http://www.georgevreilly.com/blog/2008/05/19/ReviewTheWeeFreeMen.html">The Wee Free Men</a>, <a class="reference external" href="http://www.georgevreilly.com/blog/2010/01/28/ReviewAHatFullOfSky.html">A Hat Full of Sky</a>, and <em>Wintersmith</em>.</p> Thu, 09 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-09:/blog/2017/02/09/ReviewIShallWearMidnight.html Old Presentations http://www.georgevreilly.com/blog/2017/02/07/OldPresentations.html <p>I uploaded some presentations to SpeakerDeck.com tonight.</p> <p>Here are various presentations of mine at <a class="reference external" href="https://speakerdeck.com/georgevreilly">SpeakerDeck.com</a> and <a class="reference external" href="http://www.slideshare.net/george_v_reilly">SlideShare.net</a>:</p> <ul class="simple"> <li><a class="reference external" href="https://speakerdeck.com/georgevreilly/lkrhash-the-design-of-a-scalable-hashtable">LKRhash: the design of a scalable hashtable</a>. I spoke about this at <a class="reference external" href="http://nwcpp.org/june-2012.html">NWCPP</a> (<a class="reference external" href="https://vimeo.com/44575071">video</a>) in June 2012.</li> <li><a class="reference external" href="https://speakerdeck.com/georgevreilly/software-performance-an-overview">Software Performance: an Overview</a>. I gave this talk at an internal brownbag at MetaBrite in January 2016.</li> <li><a class="reference external" href="https://speakerdeck.com/georgevreilly/flyingcloud-docker-containers-built-with-saltstack">FlyingCloud: Docker containers built with SaltStack</a>. I gave this talk at <a class="reference external" href="https://www.meetup.com/PSPPython/events/228878102/">PuPPy</a> (<a class="reference external" href="https://youtu.be/MbBzuI3p5xw?t=25m23s">video</a>) in March 2016.</li> <li><a class="reference external" href="http://www.slideshare.net/george_v_reilly/security-101-7567002">Security 101</a>. I gave this talk at an internal brownbag at Cozi in November 2011.</li> </ul> Tue, 07 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-07:/blog/2017/02/07/OldPresentations.html Trump: Media Suppresses Coverage of Terrorist Attacks http://www.georgevreilly.com/blog/2017/02/06/TrumpMediaSuppressesCoverageTerroristAttacks.html <p>Donald Trump is now <a class="reference external" href="https://www.washingtonpost.com/news/politics/wp/2017/02/06/president-trump-is-now-speculating-that-the-media-is-covering-up-terrorist-attacks/">claiming</a> (WaPo):</p> <blockquote> <p>Speaking to the U.S. Central Command on Monday, President Trump went off his prepared remarks to make a truly stunning claim: The media was intentionally covering up reports of terrorist attacks.</p> <p>“You’ve seen what happened in Paris, and Nice. All over Europe, it’s happening,” he said to the assembled military leaders. “It’s gotten to a point where it’s not even being reported. And in many cases the very, very dishonest press doesn’t want to report it. They have their reasons, and you understand that.”</p> </blockquote> <p>More: <a class="reference external" href="https://www.theatlantic.com/politics/archive/2017/02/trump-centcom-media-terror-cover-up/515823/">The Atlantic</a>, <a class="reference external" href="https://news.vice.com/story/trump-accused-the-media-of-ignoring-terrorist-attacks">Vice</a>.</p> <p>This is ridiculous on the face of it. With literally billions of cellphone cameras in circulation and hundreds of millions of people on social media, how could a real terrorist attack be covered up? And what would the media's motivation be for this coverup? And how would they all stay on message? Someone would scoop them. This is the kind of horseshit that <a class="reference external" href="https://www.washingtonpost.com/news/the-fix/wp/2017/02/06/trumps-suggestion-that-the-media-is-ignoring-terrorist-attacks-has-a-familiar-source-infowars/">InfoWars</a> flings around.</p> <p>It's another damned lie from Trump. Whether it's part of a deliberate plan or he's making shit up in the moment, it hardly matters. Trump and Kellyanne Conway and Sean Spicer and the rest of his administration are lying repeatedly and shamelessly.</p> <p>After Trump won the election, I entertained a faint hope that the grave responsibility of becoming the leader of the free world might cause Trump to become a little more serious and measured. As the presidential transition wore on, that hope died an ugly death. Two weeks after the Inauguration, it's very clear that Trump will lie about anything and pick a fight with anyone.</p> <p>There is worse to come.</p> Mon, 06 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-06:/blog/2017/02/06/TrumpMediaSuppressesCoverageTerroristAttacks.html Review: Gone, Baby, Gone http://www.georgevreilly.com/blog/2017/02/03/ReviewGoneBabyGone.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0061336211/?tag=georgvreill-20"><img alt="Gone, Baby, Gone" class="right-float" src="http://images.amazon.com/images/P/0061336211.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: Gone, Baby, Gone</div> <div class="line">Author: Dennis Lehane</div> <div class="line">Rating: ★ ★ ★ ★ ½</div> <div class="line">Publisher: William Morrow</div> <div class="line">Copyright: 1998</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0061336211/?tag=georgvreill-20">0061336211</a></div> <div class="line">Pages: 256</div> <div class="line">Keywords: crime</div> <div class="line">Reading period: 7 January–3 February, 2017</div> </div> <p>Four-year-old Amanda McCready has disappeared. Her aunt, desperate to find her, engages PIs Patrick Kenzie and Angie Gennaro to find the child. The mother, Helene, is drunken, slatternly, and neglectful: in short, unfit and unsympathetic. Kenzie and Gennaro don't want the case—the odds of finding Amanda alive and unharmed are low. They'll go through hell before they succeed.</p> <p>This book veers from blackly funny to gutwrenching. Kenzie and Gennaro come up against the worst of the worst and against decent people doing wrong for reasons that seem right to them. Lehane pulls us through the wringer along with his characters.</p> <p>Recommended.</p> Fri, 03 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-03:/blog/2017/02/03/ReviewGoneBabyGone.html Seattle Accessibility http://www.georgevreilly.com/blog/2017/02/02/SeattleAccessibility.html <p>I've been using a <a class="reference external" href="http://www.georgevreilly.com/blog/2017/01/17/KneeWalker.html">knee walker</a> for the last couple of weeks. For the first time, I took public transportation by myself to attend <a class="reference external" href="https://www.meetup.com/Papers-We-Love-Seattle/events/236557338/">Papers We Love</a> tonight. I rolled myself from 1st Ave S &amp; Washington up to the Pioneer Square station, took the Light Rail one stop north to the University Street station at 3rd &amp; Seneca, then rolled down the hill to 2nd &amp; Spring. It's a trip I wouldn't have thought about twice if I were walking normally—and I probably would have walked the entire way rather than take the Light Rail only one short stop.</p> <p>It's a different matter on a knee scooter. I said “roll” but “bump” is a better verb. I pushed my way over the bumpy streets and sidewalks up to 3rd &amp; Yesler, waited in a piss-reeking alcove for the elevator down to the mezzanine, then rolled over to the second elevator down to the platform of the Pioneer Square station. Two elevators up at University Street station, then rolling down one steep block, clenching the brakes all the way, to Second Ave, avoiding uneven surfaces and metal grates.</p> <p>It's tiring and annoying. I have a renewed appreciation for how difficult it is for wheelchair users and others with low mobility to get around. Before the <a class="reference external" href="https://en.wikipedia.org/wiki/Americans_with_Disabilities_Act_of_1990">Americans with Disabilities Act of 1990</a>, it must have been a lot worse. I suspect that Seattle is probably one of the more accessible cities.</p> Thu, 02 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-02:/blog/2017/02/02/SeattleAccessibility.html Review: The Rhesus Chart http://www.georgevreilly.com/blog/2017/02/01/ReviewTheRhesusChart.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0425256863/?tag=georgvreill-20"><img alt="The Rhesus Chart" class="right-float" src="http://images.amazon.com/images/P/0425256863.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: The Rhesus Chart</div> <div class="line">Author: Charles Stross</div> <div class="line">Rating: ★ ★ ★ ★ ½</div> <div class="line">Publisher: Ace</div> <div class="line">Copyright: 2014</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0425256863/?tag=georgvreill-20">978-0425256862</a></div> <div class="line">Pages: 359</div> <div class="line">Keywords: Lovecraftian spy thriller</div> <div class="line">Series: <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2016/04/faq-the-laundry-filesseries-ti.html">Laundry Files</a>, vol. 5</div> <div class="line">Reading period: 27–29 January, 2017</div> </div> <p><em>“Don't be silly,” Bob, said Mo, “everyone knows vampires don't exist!”</em> Thus opens <em>The Rhesus Chart</em>. We quickly come to realize that vampires do exist and we come to wonder why everyone in the Laundry is so dogmatically sure that they don't. One of the nest of baby vampires that sets the plot in motion is Bob's toxic ex-girlfriend, Mhari, who manages to convince the Laundry that they should recruit her clutch rather than exterminate them. But there are old vampires who have the Laundry's newest recruits in their sights.</p> <p>Sequel to <a class="reference external" href="http://www.georgevreilly.com/blog/2017/01/29/ReviewTheApocalypseCodex.html">The Apocalypse Codex</a>. More at Charlie Stross's <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2015/07/crib-sheet-the-rhesus-chart.html">Crib Sheet</a> and the <a class="reference external" href="http://thelaundryfiles.wikia.com/wiki/The_Rhesus_Chart">Laundry Files Wiki</a>.</p> Wed, 01 Feb 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-02-01:/blog/2017/02/01/ReviewTheRhesusChart.html Negative Circled Digits http://www.georgevreilly.com/blog/2017/01/31/NegativeCircledDigits.html <p>I found something very useful in the <a class="reference external" href="http://graphemica.com/blocks/dingbats">dingbats</a> range of Unicode characters: the negative circled san-serif digits, ➊ ➋ ➌ ➍ ➎ ➏ ➐ ➑ ➒ ➓ .</p> <p>I've started using them to label points of interest in code. They play well with the <tt class="docutils literal"><span class="pre">code-block</span></tt> directive in reStructuredText.</p> <div class="highlight"><pre><span></span>sudo docker images --format <span class="s1">&#39;{{.Repository}}:{{.Tag}}&#39;</span> <span class="se">\ </span> ➊ <span class="p">|</span> grep <span class="nv">$IMAGE_NAME</span> <span class="se">\ </span> ➋ <span class="p">|</span> grep -v latest <span class="se">\ </span> ➌ <span class="p">|</span> head -1 ➍ </pre></div> <ol class="arabic simple"> <li>A Golang Template format string for image-name and tag</li> <li>Match some Docker image name</li> <li>Exclude the <tt class="docutils literal">latest</tt> tag</li> <li>Take only the first</li> </ol> <p>Because these characters are extra-wide even in a monospaced font, Vim doesn't render them properly unless they're followed by a space.</p> Tue, 31 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-31:/blog/2017/01/31/NegativeCircledDigits.html JSON data from Docker Images http://www.georgevreilly.com/blog/2017/01/30/JsonDataFromDockerImages.html <p>I was trying to get some structured information from <tt class="docutils literal">docker images</tt>, hoping to replace some ugly Sed and AWK trickery. I could have used the <a class="reference external" href="https://docker-py.readthedocs.io/en/stable/">docker-py</a> library. Instead I chose to use the poorly documented <tt class="docutils literal"><span class="pre">--format</span></tt> option to <tt class="docutils literal">docker images</tt> (and some other Docker CLI commands). Adrian Mouat gives some useful starting points at <a class="reference external" href="http://container-solutions.com/docker-inspect-template-magic/">Docker Inspect Template Magic</a> and notes that formatting is built around <a class="reference external" href="https://golang.org/pkg/text/template/">Go templates</a>.</p> <p>I quickly figured out that this format would meet my immediate need.</p> <div class="highlight"><pre><span></span>sudo docker images --format <span class="s1">&#39;{{.Repository}}:{{.Tag}}&#39;</span> <span class="se">\</span> <span class="p">|</span> grep <span class="nv">$IMAGE_NAME</span> <span class="se">\</span> <span class="p">|</span> grep -v latest <span class="se">\</span> <span class="p">|</span> head -1 </pre></div> <p>That's fine, but I still had no idea what other possible names could be used in the format template. While getting there, I learned that <a class="reference external" href="https://nathanleclaire.com/blog/2015/11/12/using-curl-and-the-unix-socket-to-talk-to-the-docker-api/">Curl can be used with a Unix socket</a> to talk to the Docker daemon.</p> <div class="highlight"><pre><span></span>sudo curl --unix-socket /var/run/docker.sock <span class="se">\</span> http://localhost/images/json <span class="p">|</span> python -m json.tool </pre></div> <p>This produces a prettyprinted list of all the Docker images. However, the names are not the same as those that can be used in the format template.</p> <p>The actual field names that can be used in the format template can be found in <a class="reference external" href="https://github.com/docker/docker/blob/master/cli/command/formatter/image.go">cli/command/formatter/image.go</a>. They include:</p> <ul class="simple"> <li><tt class="docutils literal">.ID</tt> — 12-char SHA aka Image ID</li> <li><tt class="docutils literal">.Repository</tt> — aka image name</li> <li><tt class="docutils literal">.Tag</tt></li> <li><tt class="docutils literal">.Digest</tt> — unsure</li> <li><tt class="docutils literal">.CreatedSince</tt> — e.g., “4 weeks”</li> <li><tt class="docutils literal">.CreatedAt</tt> — date</li> <li><tt class="docutils literal">.Size</tt></li> <li><tt class="docutils literal">.Containers</tt></li> <li><tt class="docutils literal">.VirtualSize</tt></li> <li><tt class="docutils literal">.SharedSize</tt></li> <li><tt class="docutils literal">.UniqueSize</tt></li> </ul> Mon, 30 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-30:/blog/2017/01/30/JsonDataFromDockerImages.html Review: The Apocalypse Codex http://www.georgevreilly.com/blog/2017/01/29/ReviewTheApocalypseCodex.html <a class="reference external image-reference" href="http://www.amazon.com/dp/1937007464/?tag=georgvreill-20"><img alt="The Apocalypse Codex" class="right-float" src="http://images.amazon.com/images/P/1937007464.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: The Apocalypse Codex</div> <div class="line">Author: Charles Stross</div> <div class="line">Rating: ★ ★ ★ ★ ½</div> <div class="line">Publisher: Ace</div> <div class="line">Copyright: 2012</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/1937007464/?tag=georgvreill-20">978-1937007461</a></div> <div class="line">Pages: 336</div> <div class="line">Keywords: Lovecraftian spy thriller</div> <div class="line">Series: <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2016/04/faq-the-laundry-filesseries-ti.html">Laundry Files</a>, vol. 4</div> <div class="line">Reading period: 22–26 January, 2017</div> </div> <p>A major American fundamentalist preacher has drawn disturbingly close to the British Prime Minister, and the more the Laundry looks, they more alarmed they become. Hacker/computational demonologist/Laundry agent Bob Howard is leveling up with the Laundry and he has been assigned to “External Assets”, the wing that deals with deniable freelance agents. Bob, Persephone Hazard, and Johnny McTavish are sent to Colorado to investigate Golden Promise Ministries. There they find a hidden cult within the church where the members are possessed by alien parasites that are trying to hasten the Apocalypse by summoning a chained monster from another dimension.</p> <p>Sequel to <a class="reference external" href="http://www.georgevreilly.com/blog/2016/01/25/ReviewTheFullerMemorandum.html">The Fuller Memorandum</a>. More at Charlie Stross's <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2013/07/crib-sheet-the-apocalypse-code.html">Crib Sheet</a> and the <a class="reference external" href="http://thelaundryfiles.wikia.com/wiki/The_Apocalypse_Codex">Laundry Files Wiki</a>.</p> Sun, 29 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-29:/blog/2017/01/29/ReviewTheApocalypseCodex.html Review: The Jennifer Morgue http://www.georgevreilly.com/blog/2017/01/28/ReviewTheJenniferMorgue.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0441016715/?tag=georgvreill-20"><img alt="The Jennifer Morgue" class="right-float" src="http://images.amazon.com/images/P/0441016715.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: The Jennifer Morgue</div> <div class="line">Author: Charles Stross</div> <div class="line">Rating: ★ ★ ★ ★ ½</div> <div class="line">Publisher: Ace</div> <div class="line">Copyright: 2006</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0441016715/?tag=georgvreill-20">0441016715</a></div> <div class="line">Pages: 401</div> <div class="line">Keywords: Lovecraftian spy thriller</div> <div class="line">Series: <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2016/04/faq-the-laundry-filesseries-ti.html">Laundry Files</a>, vol. 2</div> <div class="line">Reading period: 13–20 January, 2017</div> </div> <p>Bob Howard is a computational demonologist who works for the occult British spy agency informally known as the Laundry. He's a computer hacker who's starting to get some field experience, but nobody would confuse him with a suave ladykilling man of action. A billionaire is intent upon raising an eldritch horror from the depths of the sea. Only Bob, who has been “destiny entangled” with a sultry American operative, can stop him. Bob is the last to realize that Ellis Billington has protected himself with a <a class="reference external" href="https://en.wikipedia.org/wiki/Geas">geas</a>, casting himself as a Bond villain re-enacting <a class="reference external" href="https://en.wikipedia.org/wiki/Thunderball_(film)">Thunderball</a>, and that Bob—and only Bob—has to step into the Bond role.</p> <p>Stross has a lot of fun with the Bond tropes and he pulls it off. Recommended.</p> <p>Sequel to <a class="reference external" href="http://www.georgevreilly.com/blog/2017/01/16/ReviewTheAtrocityArchives.html">The Atrocity Archives</a>. More at Charlie Stross's <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2013/06/crib-sheet-the-jennifer-morgue.html">Crib Sheet</a> and the <a class="reference external" href="http://thelaundryfiles.wikia.com/wiki/The_Jennifer_Morgue">Laundry Files Wiki</a>.</p> Sat, 28 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-28:/blog/2017/01/28/ReviewTheJenniferMorgue.html Seattle Womxn's March http://www.georgevreilly.com/blog/2017/01/22/SeattleWomxnsMarch.html <p>Trump was inaugurated as 45th President on Friday, drawing smaller crowds than either of Obama's inaugurations. There were prompt, easily disproved lies from Trump and his press secretary that Trump had drawn record crowds.</p> <p>On Saturday, huge crowds all over the US and elsewhere marched in opposition to Trump and his agenda. 500,000 marched in Washington DC—far more than attended the Trump Inauguration. That crowd included my 4-year-old niece, her mother, her aunt, and her cousin, as well as other friends from all over the country. 170,000 marched in Seattle. It's estimated that more than 3,000,000 people marched in total, making it the largest protest ever. Trump can pull yuge crowds after all.</p> <p>Emma and I attended the Seattle March. I would have marched but I had heel surgery last week. We took the Light Rail to Westlake Station and watched. I propped myself up outside Macy's for half an hour, kneeling on my scooter. That was tiring enough. I got no further than 20 yards from the station elevator.</p> <p>There was an endless, endless stream of good-natured protesters. Pink pussy hats everywhere. Lots of Nasty Women. Signs, lots of signs, many of them funny. A picture of Trump captioned “Lawrence of the Labia.” “Keep your Tiny Hands off my Body.” “There will be Hell Toupée.” “Hell, yes. We're Ovary Acting.” “We shall Overcomb.” “Pinkslip Putin's Puppet.”</p> <p>It was heartening to see such vocal opposition to Trump. But we have to keep the momentum going. “The march shouldn’t be a moment to rest and celebrate. It should be a <a class="reference external" href="http://www.refinery29.com/2017/01/136924/jen-psaki-million-woman-march-activism">warm up</a>.” We have to win at the <a class="reference external" href="https://www.theguardian.com/world/2017/jan/19/womens-march-washington-occupy-protest">ballot box</a>. And <a class="reference external" href="https://medium.com/@toddlombardo/not-sure-what-to-do-now-that-the-womens-march-is-over-c10714b8044a#.dc378rwgw">other things</a>.</p> <div class="figure"> <img alt="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16114263_10158086372785405_6552777769889160059_n.jpg?oh=b89f8607ec99761f2ffc414a66c40981&amp;oe=59146976" src="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16114263_10158086372785405_6552777769889160059_n.jpg?oh=b89f8607ec99761f2ffc414a66c40981&amp;oe=59146976" style="width: 600px;"/> <p class="caption">George resting surgical boot on knee scooter</p> </div> <div class="figure"> <img alt="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16143254_10158086372780405_5165437776929256294_n.jpg?oh=fdf169842fd20cab8292f0f645ead41d&amp;oe=590A957B" src="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16143254_10158086372780405_5165437776929256294_n.jpg?oh=fdf169842fd20cab8292f0f645ead41d&amp;oe=590A957B" style="width: 600px;"/> <p class="caption">Marchers at Westlake Plaza</p> </div> <div class="figure"> <img alt="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16174802_10155059480508447_4932311075734188806_n.jpg?oh=56638dcee0f0ade375be25a181d05d2d&amp;oe=5904D196" src="https://scontent-sea1-1.xx.fbcdn.net/v/t1.0-9/16174802_10155059480508447_4932311075734188806_n.jpg?oh=56638dcee0f0ade375be25a181d05d2d&amp;oe=5904D196" style="width: 600px;"/> <p class="caption">You can't tell in this photo but my right knee is kneeling on the knee scooter.</p> </div> Sun, 22 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-22:/blog/2017/01/22/SeattleWomxnsMarch.html Trump Inauguration http://www.georgevreilly.com/blog/2017/01/20/TrumpInauguration.html <p>Twenty-eight years ago today, I <a class="reference external" href="http://www.georgevreilly.com/blog/2009/01/20/TheOtherInauguration.html">attended George H.W Bush's inauguration</a>. By accident. Read <a class="reference external" href="http://www.georgevreilly.com/blog/2009/01/20/TheOtherInauguration.html">that post</a> for the rest of the story.</p> <p>I didn't especially care for Bush Senior. I certainly didn't care for George W. Bush, who was the worst U.S. president in my memory.</p> <p>We've just had one of the best. Obama was a president of high personal character and competence. His administration had integrity and remained free of <a class="reference external" href="http://www.dailykos.com/story/2017/1/11/1619079/-Comparing-Presidential-Administrations-by-Arrests-and-Convictions-A-Warning-for-Trump-Appointees">scandals</a>. He inherited an enormous economic mess and cleaned it up. He introduced the Affordable Care Act, something no other Democratic president managed. He faced wholly unprecedented opposition and intransigence from the Republicans, who vowed early on to make him a one-term president.</p> <p>In mid-2011, two young developer friends of mine took positions at <a class="reference external" href="https://en.wikipedia.org/wiki/Barack_Obama_presidential_campaign,_2012#Technology">Obama for America</a>, building the technology that helped re-elect Obama in 2012. I had previously helped out with technology on the <a class="reference external" href="http://www.georgevreilly.com/blog/2009/10/10/Approve71CreateAProfilePicture.html">Approve Referendum 71</a> campaign in 2009, and I was somewhat interested in joining them. After a phone interview with Harper Reed, the CTO of OFA, he offered me a job sight unseen. I thought about it, but declined. It would have been a huge upset in our lives, a big paycut, and I wasn't as keen on President Obama in 2011 as I had been about Candidate Obama in 2008. In hindsight, perhaps I should have taken the job. It would have been a hell of an experience.</p> <p>After eight years of a decent president, I am not looking forward to the Trump presidency. I see him as dangerous, belligerent, thin-skinned, ill-prepared, and profoundly unfit to be the most powerful man in the world.</p> <p>A huge Women's March takes place tomorrow in Washington DC. I have friends traveling from all over the country to take part. A large Womxn's March will also take place in Seattle. Were it not for my recent <a class="reference external" href="http://www.georgevreilly.com/blog/2017/01/17/KneeWalker.html">heel operation</a>, I would be marching with them in Seattle. I may still attend and watch from the sidelines.</p> <p>I've been helping out a little with the technology at <a class="reference external" href="https://presterity.org/">Presterity</a>. Jan Miksovsky co-founded Cozi where I spent six years. Several weeks ago, he decided to bring some technology to bear on the Trump problem, and he started Presterity, a <a class="reference external" href="http://www.geekwire.com/2017/shocked-trump-win-seattle-tech-workers-start-news-site-presterity-limit-damage-can/">community project to crowdsource information about the Trump administration</a>. I'll be doing more with Presterity in the coming months.</p> Fri, 20 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-20:/blog/2017/01/20/TrumpInauguration.html Bash: echo success of previous command http://www.georgevreilly.com/blog/2017/01/19/BashEchoSuccessOfPreviousCommand.html <p>C-like languages have a ternary operator, <tt class="docutils literal">cond ? true_result : false_result</tt>. Python has <tt class="docutils literal">true_result if cond else false_result</tt>. Bash doesn't have a ternary operator, but there are <a class="reference external" href="http://stackoverflow.com/a/3953712/6364">various workarounds</a>.</p> <p>I wanted to print <tt class="docutils literal">succeeded</tt> or <tt class="docutils literal">failed</tt> based on the exit code of the previous command in a shell script. In Unix, all programs exit with an integer status code. Successful programs exit with <tt class="docutils literal">0</tt>; all other values, positive or negative, indicate <a class="reference external" href="http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html">failure</a>. In Bash, the <a class="reference external" href="http://tldp.org/LDP/abs/html/exit-status.html">status code</a> of the previous program is held in <tt class="docutils literal">$?</tt>.</p> <div class="highlight"><pre><span></span>some/command or-other fer example <span class="nv">STATUS</span><span class="o">=</span><span class="s2">&quot;</span><span class="k">$(</span><span class="o">[</span> <span class="s2">&quot;</span><span class="nv">$?</span><span class="s2">&quot;</span> <span class="o">==</span> <span class="m">0</span> <span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="s1">&#39;succeeded&#39;</span> <span class="o">||</span> <span class="nb">echo</span> <span class="s1">&#39;failed&#39;</span><span class="k">)</span><span class="s2">&quot;</span> <span class="nb">echo</span> <span class="s2">&quot;Results: </span><span class="nv">$STATUS</span><span class="s2">&quot;</span> </pre></div> <p>There are <a class="reference external" href="http://stackoverflow.com/a/3953712/6364">other ways</a> to handle this.</p> Thu, 19 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-19:/blog/2017/01/19/BashEchoSuccessOfPreviousCommand.html Movember 2016 http://www.georgevreilly.com/blog/2017/01/18/Movember2016.html <a class="reference external image-reference" href="http://mobro.co/georgevreilly"><img alt="George with 10 weeks of handlebar mustache and 9 days of chin stubble" class="right-float" src="https://cdn.movember.com/uploads/member-profile/aeb4c51e27ea7578f89b0152292a2b6a-5880696d3c26f.jpg" style="width: 200px;"/></a> <p>I've worn a beard since 1986, when I was 21. Only rarely have I been cleanshaven since then. Emma, who met me in 1997, has only seen me cleanshaven once before, about 15 years ago. I promptly regrew the beard that time.</p> <p>I decided in October to fundraise for <a class="reference external" href="http://mobro.co/georgevreilly">Movember</a>. In truth, I was also curious to see what I looked like without my trademark beard. On Halloween night, I shaved everything off. Interim photos as I whittled down the beard can be seen below, as can some progress photos taken since then as I grew an over-the-top handlebar mustache.</p> <p>I've let the rest of the beard start growing in after my heel operation a week and a half ago. I look quite ruffianly at the moment.</p> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-profile/acdec956924333f64bb17e407bc269dd-5814d1d58fbc6.jpg" src="https://cdn.movember.com/uploads/member-profile/acdec956924333f64bb17e407bc269dd-5814d1d58fbc6.jpg" style="width: 200px;"/> <p class="caption">May 2016</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/158156adade5cc4f40056a9dfdfac506-58183fd02ac30.jpg" src="https://cdn.movember.com/uploads/member-album/158156adade5cc4f40056a9dfdfac506-58183fd02ac30.jpg" style="width: 200px;"/> <p class="caption">Van Dyke, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/f2878154feafe024f12459aed581bf79-58183fc608b02.jpg" src="https://cdn.movember.com/uploads/member-album/f2878154feafe024f12459aed581bf79-58183fc608b02.jpg" style="width: 200px;"/> <p class="caption">Big Moustache + Soul Patch, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="Big Moustache, Halloween" src="https://cdn.movember.com/uploads/member-album/7ed313a4794ede3f596996932303be50-58183fb038219.jpg" style="width: 200px;"/> <p class="caption">Big Moustache, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/d8f282d9b1c0128bc0bf6974fc04df3f-58183f9b72543.jpg" src="https://cdn.movember.com/uploads/member-album/d8f282d9b1c0128bc0bf6974fc04df3f-58183f9b72543.jpg" style="width: 200px;"/> <p class="caption">Neat Moustache, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/61b6fa52829a7f41251d42b1d6fe84e0-58183f866bc04.jpg" src="https://cdn.movember.com/uploads/member-album/61b6fa52829a7f41251d42b1d6fe84e0-58183f866bc04.jpg" style="width: 200px;"/> <p class="caption">Cleanshaven, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/848ca01a5348333e66a51f636bb3145f-58183f7c52395.jpg" src="https://cdn.movember.com/uploads/member-album/848ca01a5348333e66a51f636bb3145f-58183f7c52395.jpg" style="width: 200px;"/> <p class="caption">Cleanshaven, Halloween</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/15a9337868c885a7ccb0eb26f3ec3180-5820b7926d214.jpg" src="https://cdn.movember.com/uploads/member-album/15a9337868c885a7ccb0eb26f3ec3180-5820b7926d214.jpg" style="width: 200px;"/> <p class="caption">Nascent Moustache, day 7</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="/content/binary/movember-day11.jpg" src="http://www.georgevreilly.com/content/binary/movember-day11.jpg" style="width: 200px;"/> <p class="caption">Moustache, day 11.</p> <div class="legend"> This is my Mickey Rourke phase, apparently. I'll need some tats, stat.</div> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/479be8a4c1b25e3271fbac5fcc91e019-5839ceb23ef82.jpg" src="https://cdn.movember.com/uploads/member-album/479be8a4c1b25e3271fbac5fcc91e019-5839ceb23ef82.jpg" style="width: 200px;"/> <p class="caption">Definite Moustache, day 26</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="https://cdn.movember.com/uploads/member-album/f7bc004a8d991c9db1bf3db49b85d43c-5843759d1e5d7.jpg" src="https://cdn.movember.com/uploads/member-album/f7bc004a8d991c9db1bf3db49b85d43c-5843759d1e5d7.jpg" style="width: 200px;"/> <p class="caption">Moustache, day 33</p> </div> <hr class="docutils"/> <div class="figure"> <img alt="/content/binary/movember-day48.jpg" src="http://www.georgevreilly.com/content/binary/movember-day48.jpg" style="width: 200px;"/> <p class="caption">Moustache, day 48</p> </div> <hr class="docutils"/> <div class="figure"> <a class="reference external image-reference" href="https://en.wikipedia.org/wiki/Zardoz"><img alt="/content/binary/zardoz.jpg" src="http://www.georgevreilly.com/content/binary/zardoz.jpg" style="width: 400px;"/></a> <p class="caption"><a class="reference external" href="https://en.wikipedia.org/wiki/Zardoz">Zardoz</a></p> </div> Wed, 18 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-18:/blog/2017/01/18/Movember2016.html Knee Walker http://www.georgevreilly.com/blog/2017/01/17/KneeWalker.html <a class="reference external image-reference" href="http://www.eastsidelegup.com/"><img alt="Knee Walker" class="right-float" src="http://www.georgevreilly.com/content/binary/knee-walker.jpg" style="width: 300px;"/></a> <p>I had heel surgery last week to remove a heel spur which was causing tendonitis and to repair the Achilles tendon. More on that some other time.</p> <p>I rented a knee walker this morning from <a class="reference external" href="http://www.eastsidelegup.com/">Eastside Leg Up</a>. I love it! After barely getting around with crutches for a week, the scooter makes a <em>huge</em> difference. I can move around at normal walking pace now, instead of wearing myself out with the crutches.</p> <p>Incidentally, I found my first <a class="reference external" href="https://en.wikipedia.org/wiki/WebP">WebP</a> image in the wild: the original of the image that's shown here. I used ImageMagick <tt class="docutils literal">convert</tt> to make it into a JPEG.</p> Tue, 17 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-17:/blog/2017/01/17/KneeWalker.html Review: The Atrocity Archives http://www.georgevreilly.com/blog/2017/01/16/ReviewTheAtrocityArchives.html <a class="reference external image-reference" href="http://www.amazon.com/dp/0441016685/?tag=georgvreill-20"><img alt="The Atrocity Archives" class="right-float" src="http://images.amazon.com/images/P/0441016685.01.MZZZZZZZ.jpg"/></a> <div class="line-block"> <div class="line">Title: The Atrocity Archives</div> <div class="line">Author: Charles Stross</div> <div class="line">Rating: ★ ★ ★ ★</div> <div class="line">Publisher: Ace</div> <div class="line">Copyright: 2004</div> <div class="line">ISBN: <a class="reference external" href="http://www.amazon.com/dp/0441016685/?tag=georgvreill-20">0441016685</a></div> <div class="line">Pages: 345</div> <div class="line">Keywords: Lovecraftian spy thriller</div> <div class="line">Series: <a class="reference external" href="https://en.wikipedia.org/wiki/The_Laundry_Files">Laundry Files</a>, vol. 1</div> <div class="line">Reading period: 10–12 January, 2017</div> </div> <p>Bob Howard, Laundry hacker newly promoted to field agent, finds himself protecting a logic professor from rogue SS-Ahnenerbe agents who've been hiding in another dimension since the end of the War. But their biggest problem is the frost giant that was summoned. And later there's the subverted CCTV cameras with the basilisk stare.</p> <p>To borrow Charlie Stross's own words from his <a class="reference external" href="http://www.antipope.org/charlie/blog-static/2013/05/crib-sheet-the-atrocity-archiv.html">Crib Sheet</a>:</p> <blockquote> So there you've got the ingredients. Lovecraftian horror; the secret agency [the Laundry] dedicated to protecting us from the scum of the multiverse: the protagonist (Bob, a put-upon hacker who is an utterly inappropriate hire but who can't be gotten rid of): the cold war ambiance: the dark humour. I probably ought to mention the novels of <a class="reference external" href="https://en.wikipedia.org/wiki/Len_Deighton">Len Deighton</a>, which I was re-reading at the time—one of the most significant of the British cold war thriller writers.</blockquote> <p>Elsewhere, he makes the half-serious point that Deighton was a horror writer—the existential crisis of the Cold War—while Lovecraft was a spy writer.</p> <p>Stross piles horror upon absurdity in a satisfying and original creation.</p> Mon, 16 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-16:/blog/2017/01/16/ReviewTheAtrocityArchives.html Git File Modes http://www.georgevreilly.com/blog/2017/01/15/GitFileModes.html <p>Ever wonder what the six-digit file modes are in a Git commit? The mysterious <tt class="docutils literal">100644</tt> and <tt class="docutils literal">100755</tt> modes?</p> <div class="highlight"><pre><span></span><span class="gh">diff --git a/foo/bar.py b/foo/bar.py</span> old mode 100644 new mode 100755 <span class="gh">index b829edea4..ee6bda024</span> <span class="gd">--- a/foo/bar.py</span> <span class="gi">+++ b/foo/bar.py</span> <span class="gu">@@ -1,3 +1,4 @@</span> ... </pre></div> <p>I had made <tt class="docutils literal">foo/bar.py</tt> executable by using <tt class="docutils literal">chmod +x</tt> and adding a <tt class="docutils literal"><span class="pre">#!/usr/bin/env</span> python</tt> shebang. The last three digits are obviously the same <a class="reference external" href="http://weblogs.asp.net/george_v_reilly/archive/2004/12/13/284388.aspx">octal</a> digits that you can use with <tt class="docutils literal">chmod</tt>. But what's that <tt class="docutils literal">100</tt> prefix?</p> <p>The explanation can be found in a <a class="reference external" href="http://stackoverflow.com/a/8347325/6364">StackOverflow answer</a>:</p> <pre class="literal-block"> 100644₈ regular file (non-executable) S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH 100755₈ regular file (executable) S_IFREG | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH 120000₈ symbolic link S_IFLNK 160000₈ gitlink No stat(2) equivalent 040000₈ directory S_IFDIR </pre> <p>A <a class="reference external" href="https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html#_tt_filemodify_tt">gitlink</a> is used to refer to a commit in another repository; it's how submodules are implemented.</p> Sun, 15 Jan 2017 08:00:00 GMT tag:www.georgevreilly.com,2017-01-15:/blog/2017/01/15/GitFileModes.html