<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
<head>
  <title>the all-thing</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" href="/static/style.css" type="text/css" />
  <link rel="alternate" type="application/rss+xml" title="the all-thing RSS feed" href="/index.rss" />
  <link rel="alternate" type="text/plain" title="the all-thing in plain text" href="/index.txt" />
  <script type="text/javascript" src="/static/mootools.js"></script>
  <script type="text/javascript" src="http://music.masanjin.net:9292/waxiest.js"></script>
</head>
<body>

<div id="main">
  <div id="header">
    <h1><a  href="/">the all-thing</a></h1>
    
  </div>
  <div id="sidebar">
    <h3>Recent comments</h3>

    <ul class="sidebar-list">
    
    <li><b><a  href="/whisper-0.5#58174069c046a78e55f02ef81da81e74">Dominique Julia</a></b>
        <i><a  href="/whisper-0.5">Whisper 0.5 released</a></i>
           one week ago
    </li>
    
    <li><b><a  href="/ruby-ncurses-and-thread-blocking#8fa2a0f392d7c0562d630e4936407c11">William Morgan</a></b>
        <i><a  href="/ruby-ncurses-and-thread-blocking">Ruby, Ncurses and blocked threads</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/git-wtf-bf06ab7-released#533654a7a229569e27a6d0afd716c444">William Morgan</a></b>
        <i><a  href="/git-wtf-bf06ab7-released">git wtf bf06ab7 released</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/git-wtf-bf06ab7-released#b7b7a905477674eb6985b34a964a0dca">Joao Nelas</a></b>
        <i><a  href="/git-wtf-bf06ab7-released">git wtf bf06ab7 released</a></i>
           three months ago
    </li>
    
    <li><b><a  href="/ruby-ncurses-and-thread-blocking#b00001114360ac152f87d4ac2a6e0c5b">Ollivier Robert</a></b>
        <i><a  href="/ruby-ncurses-and-thread-blocking">Ruby, Ncurses and blocked threads</a></i>
           three months ago
    </li>
    
    </ul>

    <h3>Authors</h3>
    <ul class="sidebar-list">
    
      <li><a class="author" href="/by/William+Morgan/">William&nbsp;Morgan</a>&nbsp;(65) </li>
    
    </ul>

    <h3>Tags</h3>
    <ul class="sidebar-list">
    
      <li><a class="label" href="/label/releases/">releases</a>&nbsp;(15) </li>
    
      <li><a class="label" href="/label/whisper/">whisper</a>&nbsp;(13) </li>
    
      <li><a class="label" href="/label/git/">git</a>&nbsp;(9) </li>
    
      <li><a class="label" href="/label/stats/">stats</a>&nbsp;(8) </li>
    
      <li><a class="label" href="/label/trollop/">trollop</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/ruby/">ruby</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/sup/">sup</a>&nbsp;(6) </li>
    
      <li><a class="label" href="/label/git-wtf/">git-wtf</a>&nbsp;(4) </li>
    
      <li><a class="label" href="/label/vm/">vm</a>&nbsp;(4) </li>
    
      <li><a class="label" href="/label/mathml/">mathml</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/continuations/">continuations</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/ditz/">ditz</a>&nbsp;(3) </li>
    
      <li><a class="label" href="/label/proglang/">proglang</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/optimization/">optimization</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/benchmarks/">benchmarks</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/rubinius/">rubinius</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/inlining/">inlining</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ubuntu/">ubuntu</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/fibers/">fibers</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ritex/">ritex</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ruby1.9/">ruby1.9</a>&nbsp;(2) </li>
    
      <li><a class="label" href="/label/ncurses/">ncurses</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/javascript/">javascript</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/media/">media</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/vim/">vim</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/classification/">classification</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/massachusetts/">massachusetts</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/greasemonkey/">greasemonkey</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/wine/">wine</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/readme/">readme</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/ancient-greek/">ancient-greek</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/web/">web</a>&nbsp;(1) </li>
    
      <li><a class="label" href="/label/current+events/">current&nbsp;events</a>&nbsp;(1) </li>
    
    </ul>

    <h3>Other formats</h3>
    <ul class="sidebar-list">
    <li><a href="/index.rss"><img src="/static/rss-badge.png"/></a></li>
    <li><a href="/index.txt">plain text version</a></li>
    </ul>

    <h3 class="waxiest.author.original">Who is this man?</h3>
    <h3 class="waxiest.author.beautiful" style="display:none">I must find out more about this beautiful creature</h3>
    <h3 class="waxiest.author.beautifulbig" style="display:none">I MUST FIND OUT MORE ABOUT THIS BEAUTIFUL CREATURE</h3>
    <h3 class="waxiest.author.originalbig" style="display:none">WHO IS THIS MAN?</h3>

    <script type="text/javascript">
      var w = waxiest();
      w.optimizeHTMLSection("author", ["original", "beautiful", "beautifulbig", "originalbig"]);
    </script>

    <a href="http://masanjin.net" onClick="w.goalReached('greeting')">William Morgan</a>
  </div>
  <div id="content">
    <h2><a  href="/old25">Rethinking Sup</a></h2>

<div class="byline">
  <a  href="/by/William+Morgan/">William Morgan</a>,
  <span title="20 months ago">June 24, 2008  8:37pm</span>
</div>

  <div class="labels"><span class='label'><a  href="/label/sup/">sup</a></span> </div>


<p class='first'>It&#8217;s been clear to me for a while now that Sup has been trying to be two very
different things at once, thus pleasing no one and irritating everyone. There&#8217;s
Sup the <em>email client</em>, which is kind of the standard view of things. And then
there&#8217;s Sup the <em>service</em>: a threaded, fielded, searchable, labelable view into
your email.</p>
<p>Sup the email client is lacking in many ways, as many people have been very
quick to point out to me. The most obvious of these is that it refuses to
actually, you know, actually write back any state to your mailstore.
Specifically, read/unread state is never written anywhere except its internal
index. Furthermore, mailstore rescans of most any type are incredibly slow.
These two features make using it in conjunction with other clients near
impossible, which pretty much breaks one of the primary  principles of tool
design: don&#8217;t break other tools. (Then there&#8217;s also the problem of <span class="caps">IMAP</span>
connections being terrifically slow and prone to crashes, but I lay most of
that blame on <span class="caps">IMAP</span> being a crappy protocol and the Ruby <span class="caps">IMAP</span> libraries leaving
a lot to be desired.)</p>
<p>Sup the service, on the other hand, suffers from the rather obvious flaw of not
being exposed in any manner other than through Sup itself (and irb, I suppose).</p>
<p>I think the reason for this bizarre situation stems from my goal of fusing two
very different things together: mutt and Gmail. Mutt is a client; Gmail is a
service; Sup cherry-picks functionality, and lack of functionality, from both.
Examples: I refused to have Sup write back to mailstores because Gmail didn&#8217;t
have to export to your local Maildir or mbox file, so why should I? (Well
technically, I said I would accept patches that did that, but that I wouldn&#8217;t
be working on that feature myself. A fine distinction!) At the same time, I
pooh-poohed the notion of a Sup server because mutt didn&#8217;t have a  server, and
so why should Sup? And so on.</p>
<p>For Sup to evolve into something more useful than it is, and that appeals to a
broader audience than it currently does, I believe it has to go down one of
these routes completely. And I believe I know which one, and I believe this can
be done without compromising the basic user experience, which I would be very
reluctant to do because it has been lovingly tweaked over the years to be
William&#8217;s Ideal Email Experience.</p>
<p>The first option is to make Sup more of a client. In order to be a real email
client, Sup must be able to interoperate with other clients. This means it has
to write back all its state to the mailstores: read/unread status in whatever
manner the mailstore supports, and probably something like all labels in a
special header. It must also be able to do a full rescan in a fast manner, so
that changes by other clients are reflected.</p>
<p>Right off the bat, that seems impossible, redundant with other software, and
not that interesting. As I wrote in a <a href="http://rubyforge.org/pipermail/sup-talk/2008-April/001456.html">sup-talk thread from a few months
ago</a>:</p>
<blockquote>
<p>Sup is never going to be able to compete with programs like Mutt in
terms of operations like &#8220;open up a mailstore of some format X, and mark a
bunch of messages as read, and move a bunch of messages to this other
mailstore.&#8221; That&#8217;s a tremendous amount of work to get right, get safe and get
fast, and Mutt&#8217;s already done it well, and I sure don&#8217;t want to have to
reimplement it.  Competing with mutt on grounds of speed, stability, and
breadth of Mailstore usage is a recipe for fail. Ruby sure as shit ain&#8217;t gonna
come close to C for speed (at least until Rubinius gets <span class="caps">LLVM</span> working), and
mutt&#8217;s already hammered out all the quirkinesses with Exchange, etc.</p>
</blockquote>
<p>But not only would it be impossible, it wouldn&#8217;t be interesting. The things
that make Sup valuable are the UI, the indexing and the flags, and those simple
don&#8217;t translate to external mailstores. Furthermore, Sup is aimed at the
mailstores of the future (my present mailstores), which are so big that mutt
can&#8217;t handle them anyways.</p>
<p>So that leaves Sup as a service. And that&#8217;s where things get interesting. But
I&#8217;ll save that for a later post.</p>

<h4>Discussion</h4>
<a name="comments"></a>

<ul class="comment-tree">

  
  
</ul>

<p class="comment-instructions">To leave a new comment, enter your email
address. A copy of the article will be sent to you via email.</p>
<form id='comment-form-old25' action='/comment/old25' method='post' class='comment-form'>
  <input type='text' name='email' id='textfield-email'/>
  <input type='submit' value='email me' id='submit-email me'/>
  <span class="form-result" id="form-result-old25"><!-- spanna --></span>
</form>


<script type="text/javascript">
/* <![CDATA[ */
$$('.comment-form').addEvent('submit', function(e) {
  e.stop();
  var el = this.getElement('.form-result');
  var result = el.empty().addClass('ajax-loading');
  this.set('send', {
    method: 'post',
    onComplete: function(response) { 
      result.removeClass('ajax-loading');
      result.set('html', response);
    },
  });
  this.send();
});
/* ]]> */
</script>


<script type="text/javascript">
/* <![CDATA[ */
$$('.reply-to-link').each(function(link, i) {
  var box = link.getParent().getParent().getElement('.reply-to-box');
  var oldHeight = box.getStyle("height");
  box.setStyle("height", 0);
  box.setStyle("opacity", 0);
  link.addEvent('click', function(e) {
    e.stop();
    box.setStyle("opacity", 1);
    box.setStyle("height", oldHeight);
    box.getElement("input").focus();
  });
});
/* ]]> */
</script>

  </div>

  <div id="footer" style="margin: 0px;">
    Served up by <a href="http://masanjin.net/whisper/">Whisper</a>. Yes!
  </div>
</div>
</body>
</html>
