<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Dan Lowe]]></title>
  <link href="http://tangledhelix.com/atom.xml" rel="self"/>
  <link href="http://tangledhelix.com/"/>
  <updated>2013-05-05T13:49:57-04:00</updated>
  <id>http://tangledhelix.com/</id>
  <author>
    <name><![CDATA[Dan Lowe]]></name>
    <email><![CDATA[dan@tangledhelix.com]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[tmux and mouse mode]]></title>
    <link href="http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode/"/>
    <updated>2012-07-16T11:17:00-04:00</updated>
    <id>http://tangledhelix.com/blog/2012/07/16/tmux-and-mouse-mode</id>
    <content type="html"><![CDATA[<p><strong>UPDATE 17 March 2013</strong>: <em>I am placing this post into the public domain
so people are free to incorporate it into their existing files which may
be in the public domain already.</em></p>

<hr />

<p>As I commented in my last <a href="http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux/">post about tmux</a>, tmux mouse mode left
some things to be desired. Namely, there are two problems.</p>

<p>First, it completely takes over the mouse. Meaning that you can no longer do a
simple &#8220;mark text and copy&#8221; operation on the native OS. There are patches over
this problem, like <a href="http://robots.thoughtbot.com/post/19398560514/how-to-copy-and-paste-with-tmux-on-mac-os-x">reattach-to-user-namespace</a>, but that is only
helpful if you are running tmux on your Mac. I practically never do that,
because most of the usefulness of tmux for me is in leaving active sessions to
remote servers. I work on remote servers over ssh connections, detach from
tmux, and stick my laptop in its bag. I come back to the session later. That
would not be possible if tmux were running on my Mac, so I am almost always
running it remotely on a Linux server.</p>

<p>Second, there is the pane problem. If you turn mouse mode off, and try to copy
text in a pane that has another pane to its side, the terminal will just copy
across the boundary. iTerm has no idea that the pane boundary exists; it&#8217;s just
another character printed in the terminal window.</p>

<p>These days, I have mouse mode turned on by default in <code>.tmux.conf</code>. It&#8217;s just
too useful to not have it on. If my hand is already on the trackpad, switching
between windows or panes, or doing pane resizes, is very handy with the
pointer. It&#8217;s also usually much faster to do a mark/copy operation within tmux
by using the pointer.</p>

<pre><code>set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
</code></pre>

<p>But I do often want to do an OS-native mark and copy. So, I have defined two
hotkeys to make it easy to turn mouse mode on and off.</p>

<pre><code># Toggle mouse on with ^B m
bind m \
  set -g mode-mouse on \;\
  set -g mouse-resize-pane on \;\
  set -g mouse-select-pane on \;\
  set -g mouse-select-window on \;\
  display 'Mouse: ON'

# Toggle mouse off with ^B M
bind M \
  set -g mode-mouse off \;\
  set -g mouse-resize-pane off \;\
  set -g mouse-select-pane off \;\
  set -g mouse-select-window off \;\
  display 'Mouse: OFF'
</code></pre>

<p><strong>UPDATE</strong> 20 July 2012: <a href="https://twitter.com/aristidesfl/statuses/225562233411874816">@aristidesfl</a> points out that you don&#8217;t
need to bind anything for mouse mode disable in iTerm2, simply hold option
down and iTerm2 turns it off temporarily.</p>

<p>That makes it easy to switch between the two states (mouse mode on or off). But
there is still one nagging situation: I want to do OS-native copy and paste,
but it&#8217;s in a pane. Even with mouse mode off, things break because the terminal
does not know what a tmux pane is. Once again, key bindings come to the rescue.</p>

<pre><code>unbind +
bind + \
  new-window -d -n tmux-zoom 'clear &amp;&amp; echo TMUX ZOOM &amp;&amp; read' \;\
  swap-pane -s tmux-zoom.0 \;\
  select-window -t tmux-zoom

unbind -
bind - \
  last-window \;\
  swap-pane -s tmux-zoom.0 \;\
  kill-window -t tmux-zoom
</code></pre>

<p>These bindings (<code>^B +</code> and <code>^B -</code>) are a &#8220;zoom&#8221; feature. Focused on a given
pane, <code>^B +</code> will promote the pane to be its own window. Then you can do
OS-native mark and copy all you want, no panes to worry about. When you&#8217;re
done, just use <code>^B -</code> to turn the window back into a pane, right where it was
before.</p>

<p>I&#8217;ve chosen to keep these two things separate, but with a little tinkering,
you can create a binding that does both operations together: zoom a window,
turn mouse mode off, and another binding to do the inverse.</p>

<p>As always you can find my current <code>.tmux.conf</code> file on <a href="https://github.com/tangledhelix/dotfiles/blob/master/tmux.conf">GitHub</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[iTerm2 keymaps for tmux]]></title>
    <link href="http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux/"/>
    <updated>2012-04-28T07:48:00-04:00</updated>
    <id>http://tangledhelix.com/blog/2012/04/28/iterm2-keymaps-for-tmux</id>
    <content type="html"><![CDATA[<p><strong>UPDATE 17 March 2013</strong>: <em>I am placing this post into the public domain
so people are free to incorporate it into their existing files which may
be in the public domain already.</em></p>

<p><strong>UPDATE 16 July 2012</strong>: <em>I have updated this post to reflect my current
keymaps, which I settled on after writing the original post.</em></p>

<hr />

<p>As I&#8217;ve <a href="http://tangledhelix.com/blog/2010/12/06/iterm2-iterm/">said before</a>, I&#8217;m a huge fan of <a href="http://www.iterm2.com">iTerm2</a>. I am also
a huge fan of <a href="http://tmux.sourceforge.net/">tmux</a>, the terminal multiplexor. If you&#8217;re not familiar with
tmux, it&#8217;s conceptually the same thing as <a href="http://www.gnu.org/software/screen/">GNU screen</a>, with some
differences, and (in my opinion) some advantages. For example:</p>

<ul>
<li><p>In screen, each instance is its own completely separate process. With
tmux, the first time you run it, you start a server, but subsequent runs
will instantiate clients that connect to that existing server. Why does
that matter? Because it means you can lop a window off of one tmux
session and glue it onto another. It also means you can view the same
session from multiple clients simultaneously (say you left tmux attached
at the office, you can attach to that same session at home without
disrupting the session you left attached at work). You can even
<a href="http://readystate4.com/2011/01/02/sharing-remote-terminal-session-between-two-users-with-tmux/">share a session with someone else</a>. All of that&#8217;s
possible because it&#8217;s all going on in the same server process.</p></li>
<li><p>tmux supports multiple panes within a window, where screen supports only
windows.</p></li>
<li><p>If you don&#8217;t set a window title, tmux will auto-set it for you based
on what you run in that window. So it might start as &#8220;bash&#8221; and change
automatically to &#8220;vim&#8221; or &#8220;top&#8221; or &#8220;tail&#8221; depending on what you run
inside. That is pretty handy to tell what&#8217;s going on in what window
even if you don&#8217;t take the time to set a name for it.</p></li>
</ul>


<p>It so happens that the authors of iTerm2 are tmux users as well, and they have
integrated a tmux mode into iTerm2. It&#8217;s an early stage thing, so you have to
forgive it, but at this point it still has some drawbacks. I am not going to
talk about that integration much in this post, but I wanted to point out that
it exists, that I know about it, and explain why I don&#8217;t use it.</p>

<ol>
<li><p>You can only connect iTerm2 to one iTerm2-aware tmux session at a time.</p></li>
<li><p>They communicate via a special protocol. In practical terms, this means
you &#8220;spend&#8221; a window for that channel. It sort of sits around lingering.
To be fair, they added an option to auto-hide it on connect so it goes
away by itself.</p></li>
<li><p>Because this is still under development, you currently have to run
the right version of iTerm2 with the right version of patched tmux.
That can be a headache if your server side is used by multiple people.
It also means an upgrade to iTerm2 sends you off to recompile tmux
before you can use it in integrated mode again.</p></li>
</ol>


<p>For these reasons, I have set aside the iTerm2 tmux integration and I&#8217;m
just using regular tmux again. I&#8217;ll check it out again someday after it has
matured (and preferably been built into tmux mainline so I don&#8217;t have to
patch a copy myself).</p>

<p>But after using the integration, I found I was longing for easy hotkeys to
navigate around my windows and panes in tmux. (Using the integrated mode, you
use the iTerm-native hotkeys because it treats the tmux windows and panes as
native iTerm tabs and panes).</p>

<p>I was frustrated by this because in tmux you use a prefix key for everything,
so going to the next window means using <code>Ctrl-B n</code> and going to another pane
might be <code>Ctrl-B H</code>. You can remap a lot of things, but it&#8217;s never as easy as
native keys like <code>Shift-Cmd-Right</code> or similar that we are used to using on
Macs and PCs.</p>

<p>At first, I played with the tmux mouse mode. It&#8217;s actually pretty nice.
Assuming you send mouse events through to the server, tmux will recognize them
(if you turn on the appropriate options), allowing you to select windows and
panes using mouse clicks. You can even resize panes. Unfortunately, that comes
at a cost: it breaks using normal mouse selection to copy from iTerm2 window
into other programs on your Mac. Not good.</p>

<p>Then, I found &#8220;Send Hex Code.&#8221;</p>

<p>Angels rejoiced. Benjamins fell from the sky. My doctor told me to eat more
ice cream.</p>

<p>Send Hex Code is just an unassuming option in a pulldown in the iTerm key
mapping preferences. But when I saw it, I knew it was the solution to my
problem. The thing is, you can represent any ASCII character as a hex value,
and sending a sequence of ASCII characters is exactly what I needed to do.</p>

<p>I looked up some ASCII and ANSI hex values.</p>

<ul>
<li><a href="http://ascii-table.com/">ASCII code</a></li>
<li><a href="http://ascii-table.com/control-chars.php">Control characters</a></li>
<li><a href="http://ascii-table.com/ansi-escape-sequences.php">ANSI escape sequences</a></li>
</ul>


<p>My first goal was to navigate between windows. The default maps for that are:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>^B n        next window
</span><span class='line'>^B p        previous window</span></code></pre></td></tr></table></div></figure>


<p>Let&#8217;s rewrite those as hex bytes.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>0x02 0x6E   next window
</span><span class='line'>0x02 0x70   previous window</span></code></pre></td></tr></table></div></figure>


<p>Next goal: navigate between panes in all four directions. This was stickier
because it involves arrow keys, but! arrow keys are just escape sequences. So
a few more hex bytes are all we need.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>^B &lt;arrow>      move to pane in &lt;arrow> direction</span></code></pre></td></tr></table></div></figure>


<p>The ANSI arrow sequence is <code>&lt;Esc&gt;[&lt;direction&gt;</code> where direction is one of
<code>[A, B, C, D]</code> (mapped to <code>[up, down, right, left]</code>). Rewritten as hex:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>0x02 0x1B 0x5B 0x41     move to pane above
</span><span class='line'>0x02 0x1B 0x5B 0x42     move to pane below
</span><span class='line'>0x02 0x1B 0x5B 0x43     move to pane at right
</span><span class='line'>0x02 0x1B 0x5B 0x44     move to pane at left</span></code></pre></td></tr></table></div></figure>


<p>Lastly, I wanted to be able to resize any given pane in any direction using
key bindings. I added some bindings to <code>~/.tmux.conf</code> (borrowing directional
keys from my favorite editor, <a href="http://www.vim.org/">Vim</a>).</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>bind-key J resize-pane -D
</span><span class='line'>bind-key K resize-pane -U
</span><span class='line'>bind-key H resize-pane -L
</span><span class='line'>bind-key L resize-pane -R</span></code></pre></td></tr></table></div></figure>


<p>Those bindings rewritten as hex values:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>0x02 0x4B   resize upward
</span><span class='line'>0x02 0x4A   resize downward
</span><span class='line'>0x02 0x48   resize leftward
</span><span class='line'>0x02 0x4C   resize rightward</span></code></pre></td></tr></table></div></figure>


<p>Armed with all of my hex sequences, I headed to the iTerm2 preferences. Under
the &#8220;Keys&#8221; section, you can add new items to the global shortcut list. (You
can also do this in a profile&#8217;s key settings if you have a reason to not want
bindings to be available to all profiles.) I added the below sequences,
binding them to hotkeys.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>Mac hotkey      Hex sequence            Purpose
</span><span class='line'>
</span><span class='line'>Cmd-Left        0x02 0x1B 0x5B 0x44     Move to pane at left
</span><span class='line'>Cmd-Down        0x02 0x1B 0x5B 0x42     Move to pane below
</span><span class='line'>Cmd-Up          0x02 0x1B 0x5B 0x41     Move to pane above
</span><span class='line'>Cmd-Right       0x02 0x1B 0x5B 0x43     Move to pane at right
</span><span class='line'>
</span><span class='line'>Cmd-Opt-Left    0x02 0x48               Resize leftward
</span><span class='line'>Cmd-Opt-Down    0x02 0x4A               Resize downward
</span><span class='line'>Cmd-Opt-Up      0x02 0x4B               Resize upward
</span><span class='line'>Cmd-Opt-Right   0x02 0x4C               Resize rightward
</span><span class='line'>
</span><span class='line'>Ctrl-Cmd-Left   0x02 0x70               Move to window at left
</span><span class='line'>Ctrl-Cmd-Right  0x02 0x6E               Move to window at right</span></code></pre></td></tr></table></div></figure>


<p>But I am a Vim user. <code>h,j,k,l</code> have been mapped into my fingers for more
than a decade, and they are on the main keyboard, so I don&#8217;t need to
move my hand to the side. Why not map those as well?</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>Mac hotkey      Hex sequence            Purpose
</span><span class='line'>
</span><span class='line'>Cmd-H           0x02 0x1B 0x5B 0x44     Move to pane at left
</span><span class='line'>Cmd-J           0x02 0x1B 0x5B 0x42     Move to pane below
</span><span class='line'>Cmd-K           0x02 0x1B 0x5B 0x41     Move to pane above
</span><span class='line'>Cmd-L           0x02 0x1B 0x5B 0x43     Move to pane at right
</span><span class='line'>
</span><span class='line'>Cmd-Opt-H       0x02 0x48               Resize leftward
</span><span class='line'>Cmd-Opt-J       0x02 0x4A               Resize downward
</span><span class='line'>Cmd-Opt-K       0x02 0x4B               Resize upward
</span><span class='line'>Cmd-Opt-L       0x02 0x4C               Resize rightward
</span><span class='line'>
</span><span class='line'>Ctrl-Cmd-H      0x02 0x70               Move to window at left
</span><span class='line'>Ctrl-Cmd-L      0x02 0x6E               Move to window at right</span></code></pre></td></tr></table></div></figure>


<p>The panel to enter each key binding into looks like this.</p>

<p><img src="http://tangledhelix.com/site-images/2012-04-28-iterm2-enter-hex-code.png" width="420" height="171"></p>

<p>And this is what my final key map looks like.</p>

<p><img src="http://tangledhelix.com/site-images/2012-04-28-iterm2-shortcut-keys.png" width="517" height="409"></p>

<p><img src="http://tangledhelix.com/site-images/2012-04-28-iterm2-shortcut-keys2.png" width="518" height="409"></p>

<p>Now I can move between tmux windows with <code>Ctrl-Cmd-{direction}</code>, move among
panes with <code>Cmd-{direction}</code>, and resize with <code>Cmd-Opt-{direction}</code>. It&#8217;s
really nice, and I can use Vim keys (H,J,K,L) or arrows.</p>

<p>(Yes, I am aware that this overrides certain keymaps. You will lose the
&#8220;Hide&#8221; hotkey, <code>Cmd-H</code>, but I never use that so I didn&#8217;t care. iTerm also
maps <code>Cmd-{left,right}</code> to navigate between tabs, but <code>Cmd-{digit}</code> and
<code>Shift-Cmd-{left,right}</code> will still work.)</p>

<p>Lastly, a few finishing touches for my <a href="https://github.com/tangledhelix/dotfiles/blob/master/tmux.conf">tmux.conf</a>. The colors I use
here assume <a href="http://ethanschoonover.com/solarized">Solarized Dark</a> for the iTerm color scheme. They may
look awful with another color scheme (or they may look fine).</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># Watch background windows for activity
</span><span class='line'>setw -g monitor-activity on
</span><span class='line'>
</span><span class='line'># Make the active pane more visible
</span><span class='line'>set -g pane-border-bg default
</span><span class='line'>set -g pane-border-fg colour245
</span><span class='line'>set -g pane-active-border-bg default
</span><span class='line'>set -g pane-active-border-fg colour46
</span><span class='line'>
</span><span class='line'># Make the active window's name stand out
</span><span class='line'>setw -g window-status-current-fg brightwhite
</span><span class='line'>setw -g window-status-current-bg black
</span><span class='line'>
</span><span class='line'># Use color to indicate activity in a background window
</span><span class='line'># (Note this is inverted, fg means bg and vice versa.)
</span><span class='line'>setw -g window-status-activity-fg white
</span><span class='line'>setw -g window-status-activity-bg brightred</span></code></pre></td></tr></table></div></figure>


<p>You can always find my current <code>.tmux.conf</code> file on <a href="https://github.com/tangledhelix/dotfiles/blob/master/tmux.conf">GitHub</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Tablet Computers Take Wait Out of Waiting Tables]]></title>
    <link href="http://tangledhelix.com/blog/2012/01/16/tablet-computers-take-wait-out-of-waiting-tables/"/>
    <updated>2012-01-16T23:43:00-05:00</updated>
    <id>http://tangledhelix.com/blog/2012/01/16/tablet-computers-take-wait-out-of-waiting-tables</id>
    <content type="html"><![CDATA[<blockquote><p>Wouldn&#8217;t the better solution just be to have an app, or web app, that users pull up on their phone? That is: why should a restaurant pay to provide the hardware that most are already carrying with them?</p><footer><strong>Ben Brooks</strong> <cite><a href='http://brooksreview.net/2012/01/stop-gap/'>Tablet Computers Take Wait Out of Waiting Tables</a></cite></footer></blockquote>


<p>No.</p>

<p>A geek would happily install an app on their phone. To us, it would seem
nifty, fun, and easy.</p>

<p>A regular person would walk in, find out they have to install an app on their
personal phone <em>to order lunch</em>, then walk out and find a restaurant whose
head was not up its own ass.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Now mirroring the "op" utility]]></title>
    <link href="http://tangledhelix.com/blog/2011/12/14/now-mirroring-the-op-utility/"/>
    <updated>2011-12-14T09:41:00-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/12/14/now-mirroring-the-op-utility</id>
    <content type="html"><![CDATA[<p>As a system administrator, <a href="http://swapoff.org/op.html">op</a> is one of my favorite tools. I have
<a href="http://tangledhelix.com/blog/2005/10/09/op-vs-sudo">explained</a> why already, so I won&#8217;t go into it here.</p>

<p>If you clicked the <a href="http://swapoff.org/op.html">op</a> link above, you may have noticed that it goes to
a 404 page. (If you&#8217;re in the future maybe it works again; congratulations!)
At least, as of December 2011, it is a 404 page and it&#8217;s been that way for at
least a year now. The maintainer of the site (Alec Thomas) tells me that his
server crashed some time back, and he hasn&#8217;t had the time to get all of the
old content back online. His site mentions an upcoming daughter, and those of
you with kids are already nodding your heads, because you know exactly how
this story goes.</p>

<p>In any case, since there is currently no other place online to download this
code so far as I know, I dug up a tarball and mirrored it on <a href="https://github.com">GitHub</a>.
<del>You can get the latest code for op at <a href="https://github.com/tangledhelix/op">tangledhelix/op</a>.</del></p>

<p>My C skills are not up to par, so I am not currently planning to do anything
with the code except host a copy of it. If Alec never gets back to it, and
I decide to brush up on C in the future&#8230; well, we&#8217;ll see.</p>

<p><strong>UPDATE</strong>: <a href="https://github.com/dagwieers">Dag Wieërs</a> went to much more effort than I did and has set
up a <a href="https://github.com/dagwieers/op">new repository</a> tagged with versions of op all the way back to
1.1 in 1995. It&#8217;s actually pretty amusing to see a release date in 1995 on
a GitHub page. I have removed my repo and will just point to his instead.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[GitHub: vim-octopress]]></title>
    <link href="http://tangledhelix.com/blog/2011/12/04/github-vim-octopress/"/>
    <updated>2011-12-04T16:02:00-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/12/04/github-vim-octopress</id>
    <content type="html"><![CDATA[<p>I wrote a <a href="http://www.vim.org">Vim</a> syntax mode for <a href="http://www.octopress.org">Octopress</a>.</p>

<p><a href="https://github.com/tangledhelix/vim-octopress">https://github.com/tangledhelix/vim-octopress</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[When even the death penalty doesn't deter copying]]></title>
    <link href="http://tangledhelix.com/blog/2011/08/08/when-even-the-death-penalty-doesnt-deter-copying/"/>
    <updated>2011-08-08T01:29:36-04:00</updated>
    <id>http://tangledhelix.com/blog/2011/08/08/when-even-the-death-penalty-doesnt-deter-copying</id>
    <content type="html"><![CDATA[<p>A bit of history to give some perspective on our modern issue of piracy (music
and movies):</p>

<blockquote><p>A few centuries ago, the penalty for unauthorized copying was breaking on the wheel. It is a term we&#8217;re not very familiar with these days, but it was a form of prolonged torturous death penalty where the convict first had every bone in his body broken, and then was weaved into the spokes of a wagon wheel and set up on public display. The cause of death was usually thirst, a couple of days later.</p></blockquote>


<p>Back then the issue was duplicating popular fabric patterns. Yes, that was
really a thing. And note that this didn&#8217;t happen to only a handful of
offenders. Sixteen thousand people suffered this fate. Over <em>fabric patterns</em>.</p>

<p>The brutality of our forebears never fails to amaze me.</p>

<p>But it&#8217;s the end result of this practice that I find the most fascinating:</p>

<blockquote><p>Capital punishment didn&#8217;t even make a dent in the pirating of the fabrics. Despite the fact that some villages had been so ravaged that everybody knew somebody personally who had been executed by public torture, the copying continued unabated at the same level.</p></blockquote>


<p>I guess some things never change.</p>

<p><a href="http://torrentfreak.com/and-when-even-the-death-penalty-doesnt-deter-copying-what-then-110807">And When Even The Death Penalty Doesn’t Deter Copying — What Then? | TorrentFreak</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[This is why your newspaper is dying]]></title>
    <link href="http://tangledhelix.com/blog/2011/07/27/this-is-why-your-newspaper-is-dying/"/>
    <updated>2011-07-27T17:27:50-04:00</updated>
    <id>http://tangledhelix.com/blog/2011/07/27/this-is-why-your-newspaper-is-dying</id>
    <content type="html"><![CDATA[<p>Ryan Cash complains about online newspaper sites:</p>

<blockquote><p>Another HUGE complaint I&#8217;d like to add to Brad&#8217;s list is when these websites draw a story out over 10 pages.</p><p>Welcome to the Internet &#8212; a place where physical pages don&#8217;t exist, and there&#8217;s no such thing as &#8220;no space left&#8221;. There is absolutely NO REASON for any story to span over more than one single page.</p></blockquote>


<p>I wholeheartedly agree.</p>

<p>But the problem here isn&#8217;t cluelessness on the part of the editors. The problem
is that newspapers aren&#8217;t in the business of providing news, and they never
have been. They are in the business of gathering page views. They used to call
it circulation, and they used to sell half-page ads, classifieds, and coupon
inserts, but it&#8217;s the same game as it ever was (except less profitable).</p>

<p>Back in the 90s, I toured a local NBC affiliate&#8217;s offices with a friend who was
in the news business. Two things I heard that day have informed my opinion of
commercial news ever since.</p>

<p>My friend, a local news producer for many years:</p>

<blockquote><p>How we decide what&#8217;s on tonight&#8217;s news: News is whatever I say it is.</p></blockquote>


<p>Down in the bowels of the building was a room where two men watched a wall of
monitors. A videotape robot busily swapped tapes behind them. This room aired
the commercials.</p>

<blockquote><p>This is the only room in the whole building that matters. What you think of as TV is just the stuff we cram in between commercials to keep you from changing channels.</p></blockquote>


<p><a href="http://ryancash.net/post/8131787194/why-traditional-newspapers-fail-online">This is Why Your Newspaper is Dying</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Internet is not an elephant]]></title>
    <link href="http://tangledhelix.com/blog/2011/04/25/the-internet-is-not-an-elephant/"/>
    <updated>2011-04-25T03:13:22-04:00</updated>
    <id>http://tangledhelix.com/blog/2011/04/25/the-internet-is-not-an-elephant</id>
    <content type="html"><![CDATA[<p>Now and then you hear an old-timer rant about how we young people never sit
down and write a real letter anymore. (Young in this case is probably defined
as under 75.) We&#8217;re too busy with our email, our Twitter and Facebook, our IMs
and texts.</p>

<p>Clearly, they are technically correct. Nobody writes letters anymore. It&#8217;s
archaic, a relic of a bygone era. It&#8217;s simple economics. In the old days,
a letter was the best option to reach across a great distance and communicate
with someone. Technology has changed the equation; many better options now
exist.</p>

<p>Think of the oldest person you know. Consider life when they came of age.
That&#8217;s when we set our expectations of how the world is supposed to work. I&#8217;ll
use my wife&#8217;s grandmother as an example. She will turn 91 in a few weeks,
meaning she was born in the spring of 1920, in rural Poland. Since then she has
seen a lot, including the inside of a Nazi work camp.</p>

<p>What was life like when she came of age? Well, she lived in the country. She
probably walked everywhere. Maybe she had a bike, maybe not. There was no
Internet. There were no mobile phones. The television would not be invented
until she was eight years old, but I suspect she did not personally see one
until she emigrated to the United States after World War II. A trip to the next
town over would probably have been a major undertaking, let alone a long trip
(even one to a country next door, a fairly short trip by modern first-world
standards).</p>

<p>I am not saying she rants about people not writing letters; I can&#8217;t say I have
ever heard her say anything on the subject. But within her life experience,
a letter was the best option for most of the time. Only after she was entering
her 70s were better options coming into play: cheap long-distance rates and the
Internet.</p>

<p>As I age, I find myself thinking about the longevity of the information
artifacts we generate. In the beginning, I was mostly worried about digital
photos. How could I ensure they survived? Unlike film negatives, digital
storage technology changes quickly. Think fast: here’s a ZIP disk. Can you read
it? No? What about this 5.25&#8221; floppy? 3.5&#8221;? What is the likelihood that the
JPEG format will be readable by computers in common use when I am
a grandparent?</p>

<p>These days, I am concerned about digital artifacts as a whole. My life is
ever-increasingly digital, as it is with all of us. I have scanned and shredded
most of my file cabinet. I get my bills via email. I communicate with everyone
online, leaving no persistent trail (or so I hope). I haven&#8217;t used a film
camera in years. My magnetic-tape videocamera is in a bag somewhere, but my
Flip Mino and my iPhone shoot video all the time.</p>

<p>For the past ten years, I have been a member of <a href="http://www.pgdp.net/">Distributed Proofreaders</a>,
whose mission is to help <a href="http://www.gutenberg.org/">Project Gutenberg</a> digitize public domain works for
safekeeping and distribution. We scan old books using OCR software, and then
the hive mind goes to work. I and many others proofread scanned text. Others
take the output from proofreaders and add formatting markup (italics,
footnotes, etc.). After several rounds of work, a completed ebook is handed off
to Project Gutenberg for publication. It is, for me, important work that I am
happy to help with. Time will destroy all old books eventually; I believe they
should be preserved for future generations.</p>

<p>I am currently working on a biography about <a href="http://en.wikipedia.org/wiki/William_Cowper">William Cowper</a>, a writer and
poet who lived during the latter half of the 18th century. As with many such
books, it is full of correspondence, which tells the story of his life. You get
a feel for who he was, how he lived, how his relationships worked. I had never
heard of William Cowper before I began scrutinizing these scans for errors, but
I now find myself fascinated with his story.</p>

<p>I wonder: will anyone be able to write such books about us in a hundred years?
How would they go about it? There will be so little left behind. Will your blog
still be running for someone to analyze? Where will your emails be accessible?
Your tweets? God help you, your Facebook photos from college?</p>

<p>They say the Internet never forgets, but I&#8217;m not so sure. I suspect that over
a long enough period of time, the Internet will in fact forget. It will forget
us all.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Changes]]></title>
    <link href="http://tangledhelix.com/blog/2011/03/19/changes/"/>
    <updated>2011-03-19T07:03:22-04:00</updated>
    <id>http://tangledhelix.com/blog/2011/03/19/changes</id>
    <content type="html"><![CDATA[<p>1992:</p>

<p><em>Friday, 3am. I wake up. Groggy, confused. This isn&#8217;t my bed. Where am I?</em></p>

<p>Conclusion: PAAARRRRTTTTYYY!!!</p>

<p>2011:</p>

<p><em>Friday, 3am. I wake up. Groggy, confused. This isn&#8217;t my bed. Where am I?</em></p>

<p>Conclusion: Must have fallen asleep in my kid&#8217;s room at 8pm again.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Xooming into the future]]></title>
    <link href="http://tangledhelix.com/blog/2011/03/07/xooming-into-the-future/"/>
    <updated>2011-03-07T11:59:40-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/03/07/xooming-into-the-future</id>
    <content type="html"><![CDATA[<p>&#8230; by which I mean that if you buy a Xoom and want all its whiz-bang features,
you&#8217;ll have to wait a while until the future catches up.</p>

<p>The Xoom has an impressive list of features that will only come to work by way
of future upgrades.</p>

<ol>
<li>4G LTE support, which will require you to ship the tablet back to Motorola
<em>for over a week</em>.</li>
<li>The microSD slot is not functional (they blame this one on Google).</li>
<li>Adobe Flash isn&#8217;t there. Wasn&#8217;t that the &#8220;big thing&#8221; that made this better
than an iPad? Hmmmm?</li>
</ol>


<p>Oh, and you can&#8217;t charge it via USB.</p>

<p>I can&#8217;t <em>wait</em> &#8230; to order an iPad 2.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[iPad 2: quit whining already]]></title>
    <link href="http://tangledhelix.com/blog/2011/03/04/ipad-2-quit-whining-already/"/>
    <updated>2011-03-04T16:45:16-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/03/04/ipad-2-quit-whining-already</id>
    <content type="html"><![CDATA[<p>Unless you live in a hut in the Sahara somewhere, you probably already know the
iPad 2 is coming in a week. I keep running across articles that bemoan this or
that feature that they hoped for but didn&#8217;t get. Some of it really makes me
roll my eyes.</p>

<h3>Retina Display</h3>

<p>This would be awesome. And I bet Apple would do it, if people would pay $699
for the base model. So&#8230; no. Check back next year.</p>

<h3>Stereo speakers</h3>

<p>Really? You&#8217;re confused about this? Let&#8217;s review how stereo works. You have
a right channel and a left channel. You use them to create an illusion that is
targeted to the right and left ears of the listener. Let&#8217;s review how the iPad
works. You hold it in any orientation as you see fit. Now, where exactly do you
suggest we put the &#8220;left&#8221; and &#8220;right&#8221; speakers?</p>

<h3>Thunderbolt</h3>

<p>Oh, sure. 10gb/s I/O wouldn&#8217;t kill the battery <em>at all</em>. Especially because,
like USB, it can power connected devices.</p>

<h3>4G/LTE wireless</h3>

<p>Really? Okay, so people in the ten square miles of the US with 4G/LTE coverage
would be happy, and everybody else would think the iPad sucks.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Paul Graham on: stuff]]></title>
    <link href="http://tangledhelix.com/blog/2011/01/22/paul-graham-on-stuff/"/>
    <updated>2011-01-22T19:59:46-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/01/22/paul-graham-on-stuff</id>
    <content type="html"><![CDATA[<p>Paul Graham, on our obsession with material possessions:</p>

<blockquote><p>Companies that sell stuff have spent huge sums training us to think stuff is still valuable. But it would be closer to the truth to treat stuff as worthless.</p><p>In fact, worse than worthless, because once you&#8217;ve accumulated a certain amount of stuff, it starts to own you rather than the other way around. I know of one couple who couldn&#8217;t retire to the town they preferred because they couldn&#8217;t afford a place there big enough for all their stuff. Their house isn&#8217;t theirs; it&#8217;s their stuff&#8217;s.</p></blockquote>


<p>Not long after I bought my first home in 1997, I was talking to the next-door
neighbor and mentioned that I was envious of his basement. My house didn&#8217;t have
one, but I had grown up with basements all my life. I was always trying to
figure out where to store things.</p>

<p>He replied that he had been in his house since it was built in the early 50s,
and he pitied whoever had to clean the basement out when he died. That was the
first time I ever thought of a basement as a double-edged sword.</p>

<blockquote><p>I first realized the worthlessness of stuff when I lived in Italy for a year. All I took with me was one large backpack of stuff. The rest of my stuff I left in my landlady&#8217;s attic back in the US. And you know what? All I missed were some of the books. By the end of the year I couldn&#8217;t even remember what else I had stored in that attic.</p><p>And yet when I got back I didn&#8217;t discard so much as a box of it. Throw away a perfectly good rotary telephone? I might need that one day.</p></blockquote>


<p>This reminds me of the storage unit I rented when I was selling my last house.
I filled a 100 square foot room with extraneous stuff I didn&#8217;t have any
day-to-day use for. It sat in there for more than six months.</p>

<p><a href="http://www.paulgraham.com/stuff.html">Paul Graham on: Stuff</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Instapaper's fatal Kindle flaw]]></title>
    <link href="http://tangledhelix.com/blog/2011/01/18/instapapers-fatal-kindle-flaw/"/>
    <updated>2011-01-18T19:59:29-05:00</updated>
    <id>http://tangledhelix.com/blog/2011/01/18/instapapers-fatal-kindle-flaw</id>
    <content type="html"><![CDATA[<p><img src="http://tangledhelix.com/site-images/2011-01-18-instapapers-fatal-kindle-flaw.jpg" width="526" height="180"></p>

<p>That&#8217;s very true.</p>

<p>Unfortunately, <a href="http://www.instapaper.com/">Instapaper&#8217;s</a> support for the <a href="http://amazon.com/kindle/">Kindle</a> is missing
one pretty big feature: the ability to assign a specific Instapaper folder to
send to a Kindle.</p>

<p>The only choice today is to feed &#8220;Read Later&#8221; to a Kindle. That&#8217;s great, if you
only use Instapaper for articles you want to read later. But how many people
actually use it that way?</p>

<p>I feed all sorts of things into Instapaper.</p>

<ul>
<li>Longer-form articles</li>
<li>Short blog posts</li>
<li>YouTube or Vimeo video pages</li>
<li>A political petition to be filled out</li>
<li>A cool gadget I saw on Amazon or wherever</li>
</ul>


<p>The long-form articles are what I want to send to my Kindle.</p>

<p>The blog posts would work for it, but why bother sending them there? I can
usually read those in under two minutes. And sending video pages or petitions
to my Kindle is just a waste. I can&#8217;t do anything with them there.</p>

<p>My solution for a while now has been to split &#8220;Read Later&#8221; into two folders.
The main &#8220;Read Later,&#8221; and a second that I named &#8220;Read Later - not for Kindle.&#8221;
I have two bookmarklets in Safari, one to send to my Kindle, the other to send
to a generic Instapaper folder. Not so bad, right?</p>

<p>Not if I&#8217;m using a browser.</p>

<p>Here&#8217;s the problem. I send things to Instapaper from a lot of places. The
browser, sure, but also from certain web apps I use, and from a number of
iPhone apps. Sometimes I email content to my Instapaper account. And <em>none</em> of
those methods support folders. The default for feeding into Instapaper via its
API or email is to stuff everything into &#8220;Read Later.&#8221;</p>

<p>That leaves me back where I started&#8212;now I have Kindle-inappropriate items
that might get fed to my Kindle. I have to pay Amazon for that delivery (okay,
it&#8217;s really cheap, but I&#8217;m still paying for it).</p>

<p>I have workarounds. Most iPhone apps, for instance, support opening links in
Mobile Safari. So I do that, leaving the app I was using, wait for the page to
load a second time in Safari, then use a bookmarklet to save to my non-Kindle
Instapaper folder. Then I have to go back to the app I started from, sometimes
having to wait for the page to load a third time, only to tap back to whatever
I am viewing (a Twitter stream, Facebook, Pulse News, whatever).</p>

<p>I could just put everything in &#8220;Read Later,&#8221; then go into the Instapaper iPhone
app or the web site and tidy up the folders before Friday morning when the
weekly Kindle deliveries go out. If I remember to. Which I never do.</p>

<p>All of this would be solved if Instapaper supported assigning a folder for
Kindle posts. Then I could haphazardly fill up &#8220;Read Later,&#8221; and as I look
through that stream, move things into the Kindle folder. Easy. Or at least much
easier than the dance I&#8217;ve been going through.</p>

<p>I mean <em>was</em> going through. Because at this point, I&#8217;m finding this dance so
annoying that I have turned Kindle deliveries off entirely. I&#8217;ll just read
things on my iPhone or laptop, and go back to using the Kindle for reading
books.</p>

<p>Don&#8217;t get me wrong, I love my Kindle and I love Instapaper. I&#8217;m just sick of
workarounds.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Who says help files aren't funny?]]></title>
    <link href="http://tangledhelix.com/blog/2010/12/26/who-says-help-files-arent-funny/"/>
    <updated>2010-12-26T01:48:37-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/12/26/who-says-help-files-arent-funny</id>
    <content type="html"><![CDATA[<p>I just found this gem in Vim&#8217;s help files.</p>

<p><code>:help map-overview</code></p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>:nunmap can also be used outside of a monastery.</span></code></pre></td></tr></table></div></figure>



]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[iTerm2 > iTerm]]></title>
    <link href="http://tangledhelix.com/blog/2010/12/06/iterm2-iterm/"/>
    <updated>2010-12-06T17:09:48-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/12/06/iterm2-iterm</id>
    <content type="html"><![CDATA[<p>I recently wrote that <a href="http://tangledhelix.com/blog/2010/11/20/iterm-terminal">iTerm is better than Terminal.app</a>.</p>

<p>Later that day, I received this reply on Twitter.</p>

<blockquote class="twitter-tweet" data-in-reply-to="5848262464507904"><p>@<a
href="https://twitter.com/tangledhelix">tangledhelix</a> iTerm2 &gt; iTerm <a
href="http://sites.google.com/site/iterm2home/">http://sites.google.com/site/iterm2home/</a></p>&mdash;
George Nachman (@gnachman) <a
href="https://twitter.com/gnachman/status/5897771114565632"
data-datetime="2010-11-20T08:18:32+00:00">November 20, 2010</a></blockquote>


<script src="http://tangledhelix.com//platform.twitter.com/widgets.js" charset="utf-8"></script>


<p>He was right.</p>

<p><a href="http://www.iterm2.com/">iTerm2</a> is a fork of the original <a href="http://iterm.sourceforge.net/">iTerm</a> project. By and large, they are
the same, but iTerm2 has a considerable number of improvements. Here are a few.</p>

<h3>Smart cursor color</h3>

<p>This may seem minor, but it&#8217;s nice to have. iTerm2 watches the colors being
displayed, and will adjust the cursor color to ensure it is fairly visible on
the screen.</p>

<h3>Paste history</h3>

<p>The last 20 items you copied from iTerm2, or pasted into it, are memorized. You
can access that list with a hotkey combo.</p>

<p>Even if you use a clipboard history manager, like the one built into
<a href="http://www.obdev.at/products/launchbar/">LaunchBar</a>, this is useful because it is limited to the iTerm2 application.
You can copy and paste all you want in other parts of the system, and the last
20 items that dealt with iTerm2 are always waiting for you when you get back.</p>

<h3>Find and autocomplete</h3>

<p>The Find feature in iTerm2 is really nice. <code>Cmd-F</code> brings up a search bar at
the bottom of the window, similar to the one used in Safari. Enter your search
string. Hit <code>Tab</code> to select to the end of the word (or <code>Shift-Tab</code> to go to the
beginning of the word). You can find, select, and copy, all without needing to
touch a mouse or trackpad.</p>

<p>But <em>even better</em> is autocomplete. Start typing, then hit <code>Cmd-;</code> to bring up
an autocomplete list, built from the contents of the window as well as the
aforementioned paste history. Type some more to refine the selection list. Use
the <code>Up</code> and <code>Down</code> arrow keys to choose what you are after, then <code>Enter</code> to
insert it at the cursor position.</p>

<h3>Instant replay</h3>

<p>Last, but absolutely not least, is the most innovative feature I&#8217;ve seen in
a terminal emulator since&#8230; well, since ever. This is iTerm2&#8217;s &#8220;wow factor.&#8221;</p>

<p><em>Instant reply is TiVo for your terminal session</em>.</p>

<p>No, I don&#8217;t mean you can scroll backward. Any terminal can do that. Instant
replay is like having someone stand over your shoulder with a videocamera,
recording your session. At any moment you can turn to them and ask for the tape
to be rewound and played back.</p>

<p>If that doesn&#8217;t sound useful to you, you aren&#8217;t thinking hard enough.</p>

<p>How many times have you lost output because something like <code>vim</code> or <code>less</code>
render in a way that doesn&#8217;t appear in your scrollback buffer? What about
curses-driven interfaces, which vanish forever when they close? Even when
they&#8217;re still running, the screens change and you can lose what you were
looking at before. Instant reply captures all of it. You can scrub back and
forth in time, just like when you play a video file.</p>

<p>It even remembers when you resized the window, and resizes it appropriately as
you step back and forth in time.</p>

<p>Give <a href="http://www.iterm2.com/">iTerm2</a> a try. I&#8217;m loving it.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[HengeDock review]]></title>
    <link href="http://tangledhelix.com/blog/2010/11/25/hengedock-review/"/>
    <updated>2010-11-25T03:13:03-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/11/25/hengedock-review</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been using a <a href="http://hengedocks.com/">HengeDock</a> for the past two months. I bought the model
matching my laptop, a late model 13&#8221; MacBook Pro. Here&#8217;s a mini-review.</p>

<h3>Pros</h3>

<ol>
<li><p>The vertical design gives me a nice small footprint.</p></li>
<li><p>With Apple&#8217;s current laptop designs, where all of the ports are on one side
and the optical drive is on the other, I can still access the optical drive
while docked. It&#8217;s on the top, like a toaster, reminiscent of the ill-fated
<a href="http://en.wikipedia.org/wiki/Power_Mac_G4_Cube">G4 Cube</a>.</p></li>
<li><p>The docking and undocking process is very simple. Drop it in to dock. Hold
the dock with one hand and pull the laptop out with the other. No wrangling
with multiple cables, and no wacky levers or latches like I have used on
other, much bulkier docks in the past.</p></li>
</ol>


<h3>Cons</h3>

<ol>
<li><p>As far as I can tell, Apple no longer sells power supplies with the
square-block style MagSafe power connectors. The HengeDock is not compatible
with the new barrel-style connector. If my current power supply goes kaput,
I may be stuck having to buy an old one on eBay to get the older connector,
or swapping power bricks with my wife (she&#8217;d get the barrel-style).
(HengeDocks now claims compatibility with all three types of MagSafe
connector on their new models.)</p></li>
<li><p>If my laptop&#8217;s battery is totally dead, I can dock it to charge. But then
I am left with an expensive paperweight. I have to wait a while to get some
charge in the battery, then remove the laptop and power it on after opening
the lid. If I&#8217;m quick, I can then close the lid and dock it and I&#8217;m in
business. Otherwise, I have to wait for it to boot up, then put it to sleep,
then dock it. I could solve that with a second power supply, but that&#8217;s a
hefty cost for the rare occasions when I run into this scenario.</p></li>
<li><p>The Mini DisplayPort to DVI adapter I bought from Apple doesn&#8217;t fit very
well underneath the dock case. In fact, I couldn&#8217;t get it to fit under there
at all. Mine is sticking out of the rear opening, halfway in and halfway
out. That works, but it&#8217;s not the best arrangement. The remaining cables
have to fit around it as they emerge from the dock, and it is a little
tight. (The company is now selling adapter cables for Mini DisplayPort to
DVI and also HDMI, specially designed to work with the HengeDock. They are
not included, so get ready to cough up another $25 if you want one of those.
Unless your display directly supports Mini DisplayPort, you probably would
have to buy an adapter of some type anyway.)</p></li>
<li><p>The initial installation process is not too rough, but it is more than a lot
of people might want to deal with. You have to thread cables up into the
dock body, through the proper hole, and then tighten them into position
with an allen wrench (included). HengeDocks recommends doing them one at a
time, by threading the cable up through the dock and plugging it into the
laptop, then lowering the laptop into the dock and tightening the screw.
It&#8217;s not that tough, but it&#8217;s not something I could see my mom wanting to
deal with.</p></li>
</ol>


<h3>Overall</h3>

<p>I&#8217;m happy with it. It gets the laptop connected and disconnected quickly, and
doesn&#8217;t waste space on my desk. My main gripe is that when I get a new laptop
at some point, the port configuration will probably have changed, and it will
become an expensive brick of resin.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[A religious crackpot in Congress]]></title>
    <link href="http://tangledhelix.com/blog/2010/11/24/a-religious-crackpot-in-congress/"/>
    <updated>2010-11-24T14:04:34-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/11/24/a-religious-crackpot-in-congress</id>
    <content type="html"><![CDATA[<p>The danger of crackpots in government:</p>

<blockquote><p>Rep. John Shimkus (R-IL) is running to be the head of the Energy and Commerce Committee, which has a key role in climate policy. And he created a stir a couple weeks ago after he reiterated his belief that global warming is not a problem because God has promised he wouldn&#8217;t destroy the Earth again after Noah&#8217;s flood.</p></blockquote>


<p>Ignoring the obvious flaw in his argument, his &#8220;logic&#8221; isn&#8217;t even defensible.</p>

<p>I am not a religious person, but I have religious education in my background.
More importantly, I have a copy of the Bible on my Kindle, meaning I can search
it easily. Let&#8217;s see if Rep. Shimkus&#8217; argument is reasonable, even using only
Biblical standards.</p>

<p>God&#8217;s covenant with Noah (<em>Genesis 8:20-22, 9:1-17</em>) only says that God will
not again destroy all life on Earth. He never says He will stop us from doing
it to ourselves.</p>

<p><strong>Genesis 8:21</strong></p>

<blockquote><p>And when the LORD smelled the pleasing aroma, the LORD said in his heart, &#8220;I will never again curse the ground because of man, for the intention of man&#8217;s heart is evil from his youth. Neither will I ever again strike down every living creature as I have done.&#8221;</p></blockquote>


<p>Further, only flood is mentioned as a specific extinction-level event. Other
possibilities such as widespread drought, famine, disease, a new ice age: these
are all available smiting options.</p>

<p><strong>Genesis 9:11</strong></p>

<blockquote><p>I establish my covenant with you, that never again shall all flesh be cut off by the waters of the flood, and never again shall there be a flood to destroy the earth.&#8221;</p></blockquote>


<p>Does anyone remember &#8220;free will&#8221;? That&#8217;s God giving us enough rope to hang
ourselves. Free will is already at work in the very first book of the bible,
<em>Genesis</em>. God sets up the first two humans with a paradise, and they only have
to follow one rule: don&#8217;t eat the fruit of one specific tree. That&#8217;s it. Then
He sits back and waits.</p>

<p>If you don&#8217;t know the story, I&#8217;ll bet you can guess: they ate the fruit, and
got kicked out, thus screwing all of humanity for the rest of time.</p>

<p>Free will.</p>

<p><a href="http://www.talkingpointsmemo.com/archives/2010/11/new_house_climate_czar.php">New House Climate Czar | Talking Points Memo</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[GitHub: vim-rdist]]></title>
    <link href="http://tangledhelix.com/blog/2010/11/23/github-vim-rdist/"/>
    <updated>2010-11-23T00:18:31-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/11/23/github-vim-rdist</id>
    <content type="html"><![CDATA[<p>I wrote a Vim syntax file for <a href="http://www.magnicomp.com/products/rdist/rdist.shtml">rdist</a>. If you&#8217;re one of the other ten people
out there who are still using rdist, feel free to grab a copy.</p>

<p><a href="https://github.com/tangledhelix/vim-rdist">https://github.com/tangledhelix/vim-rdist</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[iTerm > Terminal]]></title>
    <link href="http://tangledhelix.com/blog/2010/11/20/iterm-terminal/"/>
    <updated>2010-11-20T03:01:47-05:00</updated>
    <id>http://tangledhelix.com/blog/2010/11/20/iterm-terminal</id>
    <content type="html"><![CDATA[<p>I recently switched from Apple&#8217;s Terminal to <a href="http://iterm.sourceforge.net/">iTerm</a>. At first, it was just
an experiment, to see if iTerm was really usable. I&#8217;ve used iTerm before, but
it was some years ago, and at the time it was buggy, slow, and unstable. I&#8217;m
glad to report that it has grown by leaps and bounds, and is now my full-time
terminal.</p>

<p>Things I find superior to Apple Terminal:</p>

<h3>Real xterm keys</h3>

<p>I didn&#8217;t realize I was missing these before I had them again. I&#8217;ve used
<a href="http://en.wikipedia.org/wiki/Xterm">xterm</a> and similar (e.g. <a href="http://rxvt.sourceforge.net/">rxvt</a>) in the past, of course, but it&#8217;s been
some time. Xterm passes through keys like <code>PageUp</code> and <code>PageDown</code>, and most
unix programs know how to use those keys (<a href="http://www.vim.org">Vim</a>, for example).</p>

<p>Apple Terminal uses <code>PageUp</code> and <code>PageDown</code> for moving through your scrollback
buffer. You can send <code>PageUp</code> and <code>PageDown</code> through to your session, but only
by adding <code>Shift</code> to the mix. That works, but I found I never used it. In
fact, I didn&#8217;t really remember if it worked; I just had to fire up Terminal
and test it to be sure it worked.</p>

<p>You can send <code>Home</code>, <code>End</code>, function keys, etc., in this way as well. iTerm
lets you define custom key maps if you need to (though I haven&#8217;t).</p>

<h3>Support for up to 256 colors</h3>

<p>Another thing I wasn&#8217;t aware I was missing. It took a bit of finagling, and on
Solaris systems I needed to add an entry for <code>xterm-256color</code> in my
<code>$HOME/.terminfo</code> directory, but I can now support 256 colors in my terminal
sessions. I use this for my shell prompts and Vim, primarily, but you can use
extended color support in other programs as well, like <a href="http://www.gnu.org/s/emacs/">Emacs</a> or <a href="http://www.mutt.org">Mutt</a>.
Particularly when colorizing code in a text editor, you&#8217;d be surprised what
a difference this makes. The default palette of 16 colors just doesn&#8217;t cut it.</p>

<p>Compare these two editing sessions. On the left is Vim in its default color
scheme, using 16 colors. On the right is a 256-color supported session using
my favorite colorscheme, <a href="http://slinky.imukuppi.org/zenburnpage/">zenburn</a>.</p>

<p><img src="http://tangledhelix.com/site-images/2010-11-20-iterm-terminal-1.jpg" width="550" height="370"></p>

<p>Call me crazy, but if I&#8217;m looking at something all day, I&#8217;d rather it look
like the one on the right.</p>

<p>Here are two shell prompts. These use the same <code>$PS1</code> value in <a href="http://www.gnu.org/s/bash/">bash</a>, but
one uses color and one doesn&#8217;t.</p>

<p><img src="http://tangledhelix.com/site-images/2010-11-20-iterm-terminal-2.jpg" width="550" height="198"></p>

<p>It&#8217;s very easy for me to spot commands in my scrollback buffer. They stuck out
like sore thumbs.</p>

<p>Also, the colors help with certain visual cues. The green <code>(master)</code> is the
current branch if I am in a <a href="http://git-scm.com/">Git</a> repository. The color draws my attention
to it.</p>

<p>Next to the <code>$</code> input prompt are two bracketed numbers. The one on the right
is a count of current background jobs. It uses orange to make itself
noticeable (and being right next to the place I&#8217;m typing doesn&#8217;t hurt either).
The number to its left is the value of <code>$?</code> (the exit code of the last
command). If it&#8217;s anything other than zero, it turns bright red to draw my eye
to it.</p>

<p>This prompt packs a lot of useful information into a small area, and uses
color to help draw my attention where I want it to be drawn. The numbers go
gray when they aren&#8217;t of any use (when they are zero). The git branch vanishes
if I&#8217;m not in a git repository.</p>

<h3>Vertical zoom</h3>

<p>iTerm has an option to set the zoom button to maximize the window vertically
only. I used to have to do this with an Applescript, but now all I need to do
is click the green bubble in the title bar, or hit a key combo that I&#8217;ve bound
to the <code>Zoom</code> menu command. Perfect.</p>

<h3>Visible status for background tabs</h3>

<p>When you have multiple tabs in an iTerm window, they will show you an
indication of what&#8217;s happening using color. Normally a tab&#8217;s title is black.
If the session dies, it turns gray. If there is output coming through, it
turns violet, and if that new output stops, it turns red.</p>

<p>This turns out to be very useful to keep track of things going on that will
take a while, or output intermittently. For instance, running a long make, or
tailing a log file.</p>

<p><a href="http://iterm.sourceforge.net/">iTerm</a> is free, so why not give it a try?</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Driving Miss GaGa]]></title>
    <link href="http://tangledhelix.com/blog/2010/11/04/driving-miss-gaga/"/>
    <updated>2010-11-04T04:49:40-04:00</updated>
    <id>http://tangledhelix.com/blog/2010/11/04/driving-miss-gaga</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been listening to a lot of Lady GaGa lately.</p>

<p>Wait. Let me back up for a moment.</p>

<p>I&#8217;m not much of a music person. I don&#8217;t have music playing all day like most
other working geeks seem to. I find the lyrics too distracting, especially when
I&#8217;m coding.</p>

<p>(<em>Sometimes I listen to instrumentals: John Williams; Blue Man Group; Juno
Reactor. But usually I work in silence. It fits my largely spartan, minimalist
working style.</em>)</p>

<p>As a result, most of my music listening happens in the car. My wife
occasionally burns a CD of whatever she and the kids like at the time. The
current CD, playing nearly any time we&#8217;re in the car, is a slightly eclectic
mix including The Beatles, They Might Be Giants, and yes, Lady GaGa.</p>

<p>These three tracks form the sum total of what I have heard from Lady GaGa.</p>

<ul>
<li>So Happy I Could Die</li>
<li>Bad Romance</li>
<li>Paparazzi</li>
</ul>


<p>I like her voice. I don&#8217;t know the music terminology necessary to explain why
I like it; I just like how it sounds. But I noticed that over time, I decided
that it sounded significantly better in &#8220;Paparazzi.&#8221; <em>Why is that?</em> I wondered.
It didn&#8217;t make that much sense&#8212;the lyrics aren&#8217;t especially deep or
meaningful, and the general range of her voice between the songs isn&#8217;t very
different. It seemed like they ought to be roughly equal, but they weren&#8217;t.</p>

<p>I finally figured it out today: she recorded &#8220;Paparazzi&#8221; without auto-tune.</p>

<p>I&#8217;ve never paid much attention to auto-tune. I&#8217;ve heard people complain about
it, and I eventually googled it, but not being a music person, I moved on to
something else quickly. But I find that now that I&#8217;ve noticed it, I can&#8217;t
ignore it. It pisses me off.</p>

<p>It creates jarring, stepping transitions in the audio. It sounds like
a computer from the 80s trying to synthesize speech. It sounds unnatural.</p>

<p>But it&#8217;s worse than that, if you ask me. Remember, I&#8217;m talking about three
songs from the same artist. Comparing the auto-tuned tracks to what I&#8217;ll call
the &#8220;natural voice&#8221; track, the latter is clearly superior. Meaning <em>she doesn&#8217;t
need the damned thing</em> and it just makes everything sound worse. One has to
wonder if some arrogant dick producer insisted on auto-tuning everybody he
recorded because it cost him a mint to buy it. Even if it&#8217;s a net lose in terms
of quality.</p>

<p>I find myself eagerly awaiting auto-tune&#8217;s demise. Partly because I find it to
be something of a dishonest representation of the art it purports to improve,
but mostly because it makes me think of Stephen Hawking. Wearing a meat bikini,
in this case.</p>

<p>It&#8217;s going to take you all day to scrub that image out of your mind.</p>
]]></content>
  </entry>
  
</feed>
