<rss version="1.0"><channel><title>root.b-tree.org</title><description>A blog about OpenID, math, and software</description><link>http://root.b-tree.org/</link><language>en-us</language><item><title>Ruby "feature"</title><pubDate>Fri, 19 Sep 2008 14:35:49 PDT</pubDate><link>http://root.b-tree.org/post/ruby-feature/</link><guid>http://root.b-tree.org/GUID_NONURL/29</guid><description>&lt;p&gt;If you feel like breaking ruby:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2
3
4
5&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="kp"&gt;nil&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;nil?&lt;/span&gt;
    &lt;span class="kp"&gt;false&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description></item><item><title>Poking at Haskell</title><pubDate>Sun, 04 May 2008 16:25:40 PDT</pubDate><link>http://root.b-tree.org/post/poking-at-haskell/</link><guid>http://root.b-tree.org/GUID_NONURL/28</guid><description>&lt;p&gt;I was recently telling &lt;a class="reference" href="http://codersbase.net/"&gt;lispy&lt;/a&gt; about some &lt;a class="reference" href="http://www.haskell.org/"&gt;Haskell&lt;/a&gt; I was trying to write.  I decided I'd try porting one of my &lt;a class="reference" href="http://python.org/"&gt;Python&lt;/a&gt; scripts to Haskell.  The script is used in &lt;a class="reference" href="http://www.gnu.org/software/emacs"&gt;emacs&lt;/a&gt; when composing e-mail replies and needs to do things like format citation text.  One function I wrote computes the largest common prefix of a list of strings.  He ended up reducing it about threefold from my original Haskell; here was the result:&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2
3
4
5
6&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="nf"&gt;commonPrefix&lt;/span&gt; &lt;span class="ow"&gt;::&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
&lt;span class="nf"&gt;commonPrefix&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="ow"&gt;=&lt;/span&gt; &lt;span class="n"&gt;map&lt;/span&gt; &lt;span class="n"&gt;fst&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt; &lt;span class="n"&gt;takeWhile&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uncurry&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;zip&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;commonPrefixLines&lt;/span&gt; &lt;span class="ow"&gt;::&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;
&lt;span class="nf"&gt;commonPrefixLines&lt;/span&gt; &lt;span class="kt"&gt;[]&lt;/span&gt; &lt;span class="ow"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="nf"&gt;commonPrefixLines&lt;/span&gt; &lt;span class="n"&gt;lines&lt;/span&gt; &lt;span class="ow"&gt;=&lt;/span&gt; &lt;span class="n"&gt;foldl1&lt;/span&gt; &lt;span class="n"&gt;commonPrefix&lt;/span&gt; &lt;span class="n"&gt;lines&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;I think that's pretty elegant.  Thanks, lispy.&lt;/p&gt;
</description></item><item><title>Is winter over yet?</title><pubDate>Sat, 26 Apr 2008 16:54:51 PDT</pubDate><link>http://root.b-tree.org/post/is-winter-over-yet/</link><guid>http://root.b-tree.org/GUID_NONURL/27</guid><description>&lt;a href="http://flickr.com/photos/jtdaugherty/2443443118/"&gt;
&lt;img border="0" class="floatLeft"
     src="http://farm3.static.flickr.com/2350/2443443118_b1f10966ce_m.jpg" /&gt;
&lt;/a&gt;&lt;p&gt;Seriously?  The winter weather is especially persistent in the northwest this year.  This is only the second day in the last month that it has been sunny AND warm (where warm is defined as &amp;quot;above 60 degrees&amp;quot;) AND dry.  It's a great day for biking, and it's the sort of day that brings the whole city out to walk, skate, run, bike, and play on the river
waterfront in downtown Portland.&lt;/p&gt;
&lt;p&gt;Last night I had the great pleasure of seeing &lt;a class="reference" href="http://www.jonathancoulton.com/"&gt;Jonathan Coulton&lt;/a&gt; in concert, along with the extremely talented and hilarious &lt;a class="reference" href="http://www.paulandstorm.com/"&gt;Paul and Storm&lt;/a&gt;.  Thanks go to &lt;a class="reference" href="http://keturn.myopenid.com/"&gt;keturn&lt;/a&gt; for getting me tickets and even saving two seats for D and me (the show was sold out).  Coulton played &lt;cite&gt;Still Alive&lt;/cite&gt; and a bunch of other great songs.  It was a great opportunity to be able to see him perform.&lt;/p&gt;
&lt;a href="http://flickr.com/photos/jtdaugherty/2439625941/"&gt;
&lt;img border="0" class="floatRight"
     src="http://farm4.static.flickr.com/3055/2439625941_70ea5da4ce_m.jpg" /&gt;
&lt;/a&gt;&lt;p&gt;In other news, I finally got a &lt;a class="reference" href="http://twitter.com/jtdaugherty"&gt;Twitter account&lt;/a&gt;.  Anyone that knows me probably knows that I wait until a new web service is no longer new before I start using it, if I use it at all.  (When will I learn?  People always take my preferred username...)&lt;/p&gt;
&lt;p&gt;Last Wednesday I took my first Violin lesson with &lt;a class="reference" href="http://www.effesenden.com/"&gt;Wendy Goodwin&lt;/a&gt;.  It went really well and I'm excited to start sounding like total crap!  I love Violin music and look forward to learning to play some.  I think my music-reading skills will come back pretty quickly.  Getting my left hand to adjust to the fingerboard will be another matter entirely.&lt;/p&gt;
&lt;p&gt;Oh, and I have &lt;a class="reference" href="http://www.flickr.com/photos/jtdaugherty/2443447436/"&gt;asparagus&lt;/a&gt;!&lt;/p&gt;
</description></item><item><title>Car-free, at last</title><pubDate>Thu, 06 Mar 2008 23:29:21 PDT</pubDate><link>http://root.b-tree.org/post/car-free-at-last/</link><guid>http://root.b-tree.org/GUID_NONURL/26</guid><description>&lt;p&gt;Finally...&lt;/p&gt;
&lt;p&gt;We sold our car.&lt;/p&gt;
&lt;p&gt;We've been thinking about doing it for about a year.  D has been using &lt;a class="reference" href="http://trimet.org/"&gt;TriMet&lt;/a&gt; almost exclusively since she started attending graduate school, but I drove to work at my &lt;a class="reference" href="http://www.commandprompt.com/"&gt;previous job&lt;/a&gt; and for the first year of my &lt;a class="reference" href="http://janrain.com/"&gt;current one&lt;/a&gt;.  Last April, after &lt;a class="reference" href="http://en.wikipedia.org/wiki/Peak_oil"&gt;learning too much&lt;/a&gt; I decided I was going to start taking the bus as often as I could.  Since then, we've driven our car only two or three times per month, and with that transition complete, it was only a short jump to getting rid of the car altogether.&lt;/p&gt;
&lt;p&gt;Now, we'll save on insurance, maintenance, gas, etc.  And using TriMet and other services when we need them will be vastly cheaper, to say nothing of the other benefits.&lt;/p&gt;
&lt;p&gt;When we need a car we can always use &lt;a class="reference" href="http://www.zipcar.com/"&gt;ZipCar&lt;/a&gt; or even rent one, but one of the great things about Portland is that if you live relatively close in, you just don't need a car.  The key is realizing that.&lt;/p&gt;
&lt;p&gt;Not having a car is really liberating.  Woohoo!&lt;/p&gt;
</description></item><item><title>parsed.org: OpenID 2 Support</title><pubDate>Sun, 27 Jan 2008 19:56:35 PDT</pubDate><link>http://root.b-tree.org/post/parsed-openid2/</link><guid>http://root.b-tree.org/GUID_NONURL/25</guid><description>&lt;p&gt;In migrating my web services to a new server, I went ahead and upgraded the &lt;a class="reference" href="http://opendidenabled.com/python-openid/"&gt;OpenID library&lt;/a&gt; that &lt;a class="reference" href="http://parsed.org/"&gt;parsed.org&lt;/a&gt; and my other services use.  Now they support &lt;a class="reference" href="http://openid.net/2007/12/05/openid-2_0-final-ly/"&gt;OpenID 2&lt;/a&gt; (in addition to &lt;a class="reference" href="http://openid.net/specs/openid-authentication-1_1.html"&gt;OpenID 1&lt;/a&gt;), so if your identifier is served by a compliant provider, you can just enter your provider's URL into the input box to make login seamless.  For example, &lt;a class="reference" href="http://www.myopenid.com/"&gt;myopenid.com&lt;/a&gt; identifier users can simply enter &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;myopenid.com&lt;/span&gt;&lt;/tt&gt; into the input box.  For other features provided by OpenID 2, (maybe) read &lt;a class="reference" href="http://openid.net/specs/openid-authentication-2_0.html#anchor34"&gt;the spec&lt;/a&gt;.&lt;/p&gt;
</description></item><item><title>parsed.org feedback</title><pubDate>Sat, 12 Jan 2008 19:50:53 PDT</pubDate><link>http://root.b-tree.org/post/parsed-org-feedback/</link><guid>http://root.b-tree.org/GUID_NONURL/24</guid><description>&lt;p&gt;I run a computing tips website, &lt;a class="reference" href="http://parsed.org/"&gt;parsed.org&lt;/a&gt;.  I originally created it so &lt;a class="reference" href="http://www.xinu.org/"&gt;xinu&lt;/a&gt; and I could store IT tips in a central place.  The tips cover everything from SQL tricks to command line tips to code samples in various languages.&lt;/p&gt;
&lt;p&gt;The site has been online since Fall of 2004, and &lt;a class="reference" href="http://www.xinu.org/"&gt;xinu&lt;/a&gt; and I created most of the initial content.  I &lt;a class="reference" href="http://janrain.com/"&gt;changed jobs&lt;/a&gt; and implemented &lt;a class="reference" href="http://openid.net/"&gt;OpenID&lt;/a&gt; support on parsed.org and added it to the &lt;a class="reference" href="http://www.myopenid.com/directory"&gt;myopenid.com directory&lt;/a&gt;.  Since then, it has seen a few account creations per day.  But new content wasn't rolling in: the site wasn't keeping people around.&lt;/p&gt;
&lt;p&gt;So I decided to ask the users; many of the users that signed in chose to supply an e-mail address, so I kindly asked them what I could do to make parsed.org more compelling as a computing tip site.&lt;/p&gt;
&lt;p&gt;So far I've gotten some really good suggestions and ideas from the people who responded:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Better RSS feed coverage for individual tags and individual users' posts&lt;/li&gt;
&lt;li&gt;Automatic code highlighting and formatting&lt;/li&gt;
&lt;li&gt;Bookmarking (think gmail's starring feature)&lt;/li&gt;
&lt;li&gt;An &amp;quot;About&amp;quot; page to clarify the purpose of the site (it's true...)&lt;/li&gt;
&lt;li&gt;Tag cloud on the main page&lt;/li&gt;
&lt;li&gt;Better search interface (it currently doesn't search tags)&lt;/li&gt;
&lt;li&gt;Commenting support&lt;/li&gt;
&lt;li&gt;A &amp;quot;tip of the week&amp;quot; feature&lt;/li&gt;
&lt;li&gt;Tip voting&lt;/li&gt;
&lt;li&gt;The ability to get e-mail when interesting tips are posted (e.g., with certain tags)&lt;/li&gt;
&lt;li&gt;(P)avatar support&lt;/li&gt;
&lt;li&gt;Extensions (Firefox, Eclipse)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As time allows, I'm going to boil these down and start working on a few of them.  A lot of these will go a long way to making parsed.org better.&lt;/p&gt;
</description></item><item><title>Beer!</title><pubDate>Sun, 06 Jan 2008 23:11:49 PDT</pubDate><link>http://root.b-tree.org/post/beer/</link><guid>http://root.b-tree.org/GUID_NONURL/23</guid><description>&lt;a href="http://flickr.com/photos/jtdaugherty/sets/72157603657567579/"&gt;
&lt;img border="0" class="floatLeft"
     src="http://farm3.static.flickr.com/2003/2173762871_8c5f0eef5c_t.jpg" /&gt;
&lt;/a&gt;&lt;p&gt;Woohoo!  &lt;a class="reference" href="http://www.mountainviewdoor.com/"&gt;Brendon&lt;/a&gt; came over and helped me cook up a batch of beer tonight.  I've been meaning to get into this hobby for perhaps a year.  I recently went and picked up a homebrew kit from &lt;a class="reference" href="http://www.letsbrew.net/"&gt;Let's Brew&lt;/a&gt;, a local homebrew supply shop.  Photos of the event can be found &lt;a class="reference" href="http://flickr.com/photos/jtdaugherty/sets/72157603657567579/"&gt;here&lt;/a&gt;.&lt;/p&gt;
</description></item><item><title>Local Brews</title><pubDate>Fri, 04 Jan 2008 13:33:15 PDT</pubDate><link>http://root.b-tree.org/post/local-brews/</link><guid>http://root.b-tree.org/GUID_NONURL/22</guid><description>&lt;p&gt;For some time now I've been thinking about how far goods travel from producer to consumer.  I've been thinking about how some what I consume travels vast distances for my convenience.  With the ever-rising price of oil and, by extension, oil derivatives like heating oil, plastics, jet fuel, etc., it's important to reduce my consumption impact in terms of petrochemical cost.&lt;/p&gt;
&lt;p&gt;It all boils down to this question: what is the &lt;em&gt;energy component&lt;/em&gt; to something that you consume?&lt;/p&gt;
&lt;p&gt;This reasoning isn't transient; the cost of oil isn't going to decrease overall so this isn't something that should go out of style, so to speak.  Much of our consumption infrastructure in the U.S. (and, indeed, the first world) is built on oil and that is an enormous liability.  The only way to change that, as I see it, is to be a responsible capitalist (insofar as that is possible): decrease or eliminate the consumption of products that travel unnecessarily great distances.&lt;/p&gt;
&lt;p&gt;The grocery store chain that I almost exclusively patronize, &lt;a class="reference" href="http://www.newseasonsmarket.com/"&gt;New Seasons Market&lt;/a&gt;, is a local grocery store chain here in Portland.  They (along with some other stores) post the source of most products and make the information available upon request if it isn't posted.  For example, I know where my oranges, apples, lettuce, and other produce are grown.  The practical result of knowing that information is that I can make a choice when I buy an apple: I can get the one that came from California, or Washington State.  Why not support the (relatively) local industries that I can?&lt;/p&gt;
&lt;p&gt;But the same goes for any other product (or &lt;em&gt;service&lt;/em&gt;) I consume: coffee from South America or Africa, beer or whisky from Europe, corn products from the U.S., shipping from UPS or FedEx, flights from Southwest Airlines.  The consumption (purchase and use) has indirect effects -- indirect costs -- not only to me, but to the people and places involved in (or excluded from) the production process.&lt;/p&gt;
&lt;p&gt;Implicit in this form of &amp;quot;boycotting&amp;quot; is the notion that if enough people stop consuming those Californian apples, fewer shipments of them will travel to Oregon.  This may sound like the destruction of an industry, but if it isn't sustainable, it's eventually going to self-destruct anyway.&lt;/p&gt;
&lt;p&gt;It's not always easy to choose local over remote.  All too often I make consumption decisions based on what I enjoy eating, drinking, or doing, and sometimes this kind of change looks like a sacrifice.  But the real question, I've found, is whether those things are &lt;em&gt;important&lt;/em&gt;, and whether I have a sense of entitlement to consume something just because I have the money to purchase it: am I willing to take &lt;em&gt;responsibility&lt;/em&gt; for the production process?  Will I support and condone it?&lt;/p&gt;
&lt;p&gt;Bound up in this discussion is a wide range of other questions and issues: consume &lt;em&gt;less&lt;/em&gt; instead of &lt;em&gt;differently&lt;/em&gt;, think about &lt;em&gt;population&lt;/em&gt; and &lt;em&gt;carrying capacity&lt;/em&gt;, think about &lt;em&gt;land use&lt;/em&gt; and &lt;em&gt;attitudes&lt;/em&gt;, redefine economic &lt;em&gt;success&lt;/em&gt; and &lt;em&gt;expectations&lt;/em&gt;.  But I think I can save those for another day.&lt;/p&gt;
&lt;p&gt;So, my next step in changing my consumption habits will be to consume beer made only in the Pacific Northwest (of which there is a great deal, most of it delicious) or beer I make myself.  (Watch for an upcoming post on homebrewing, my newest soon-to-be hobby!)&lt;/p&gt;
</description></item><item><title>Now, with working RSS!</title><pubDate>Thu, 03 Jan 2008 19:58:20 PDT</pubDate><link>http://root.b-tree.org/post/now-with-working-rss/</link><guid>http://root.b-tree.org/GUID_NONURL/21</guid><description>&lt;p&gt;With some help from &lt;a class="reference" href="http://www.xinu.org/"&gt;xinu&lt;/a&gt;, I've seen the error of my ways and now the RSS on this blog is a lot more useful.  It now includes the content of my posts, including &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;IMG&lt;/span&gt;&lt;/tt&gt; tags for all of that pretty &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1203/" /&gt;.  I also moved it from &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/rss/&lt;/span&gt;&lt;/tt&gt; to &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;/rss.xml&lt;/span&gt;&lt;/tt&gt;, so if you've subscribed, you'll have to re-subscribe.  (This is to get readers to reset, since they store old entries in the feed, and they'll all be empty now.)  Enjoy!&lt;/p&gt;
</description></item><item><title>Problem 1</title><pubDate>Thu, 02 Aug 2007 20:44:51 PDT</pubDate><link>http://root.b-tree.org/post/problem-1/</link><guid>http://root.b-tree.org/GUID_NONURL/19</guid><description>&lt;p&gt;Given &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="100" height="26" title="0" src="http://root.b-tree.org/storedImage/1190/" /&gt;, prove that&lt;/p&gt;
&lt;p&gt;&lt;img class="blockLatex" width="343" height="48" title="0" src="http://root.b-tree.org/storedImage/1185/" /&gt;
&lt;img class="blockLatex" width="387" height="48" title="0" src="http://root.b-tree.org/storedImage/1186/" /&gt;&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Using arithmetic arguments.&lt;/li&gt;
&lt;li&gt;Using combinatorial arguments.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The arithmetic proof is straightforward.  Given the equality&lt;/p&gt;
&lt;p&gt;&lt;img class="blockLatex" width="253" height="48" title="0" src="http://root.b-tree.org/storedImage/1187/" /&gt;&lt;/p&gt;
&lt;p&gt;then we have this expansion:&lt;/p&gt;
&lt;p&gt;&lt;img class="blockLatex" width="496" height="49" title="0" src="http://root.b-tree.org/storedImage/1188/" /&gt;&lt;/p&gt;
&lt;p&gt;Multiplying by &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="65" height="30" title="0" src="http://root.b-tree.org/storedImage/1191/" /&gt; gives&lt;/p&gt;
&lt;p&gt;&lt;img class="blockLatex" width="182" height="15" title="0" src="http://root.b-tree.org/storedImage/1189/" /&gt;&lt;/p&gt;
&lt;p&gt;which is the definition of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="12" height="9" title="0" src="http://root.b-tree.org/storedImage/1192/" /&gt;.  Can you outline a combinatorial argument?  What I want to understand is what the RHS &amp;quot;partitions&amp;quot; of the LHS symbolize.&lt;/p&gt;
</description></item><item><title>One More Time, with Feeling</title><pubDate>Sun, 29 Jul 2007 18:44:56 PDT</pubDate><link>http://root.b-tree.org/post/one-more-time-with-feeling/</link><guid>http://root.b-tree.org/GUID_NONURL/18</guid><description>&lt;p&gt;When it comes to math, the brain is no different from an ordinary muscle: without relatively constant strength training, it will eventually atrophy.&lt;/p&gt;
&lt;p&gt;Ever since I finished my &lt;a class="reference" href="http://www.cs.uga.edu/"&gt;college degree&lt;/a&gt;, it has been increasingly clear that my math skills are lacking.  I think back to what I was able to do in school, and I realize that I haven't kept up on math practice -- or even gone back to investigate things that weren't clear at the time -- and I can feel it.  A full-time job and other obligations basically preclude the kind of focus that most degree-holders have realized.&lt;/p&gt;
&lt;p&gt;Now that studying isn't obligatory, I'm actually more interested.  Indeed, even things that weren't very clear in school now interest me, and I want to go back and re-learn things I never quite got.  Two topics in math that interest me are &lt;a class="reference" href="http://en.wikipedia.org/wiki/Graph_theory"&gt;Graph Theory&lt;/a&gt; and &lt;a class="reference" href="http://en.wikipedia.org/wiki/Combinatorics"&gt;Combinatorics&lt;/a&gt;.  My program didn't offer a Combinatorics course, and I lacked the Linera Algebra prerequisite for Graph Theory.&lt;/p&gt;
&lt;p&gt;So, after a few failed attempts at re-starting a study habit, I'm at it again.  This time, I've got some time blocked out each week and a &lt;a class="reference" href="http://www.firesidecoffeelodge.com/"&gt;few&lt;/a&gt; &lt;a class="reference" href="http://www.urbangrindcoffee.com/"&gt;places&lt;/a&gt; picked out that meet my requirements (accessible by bike or &lt;a class="reference" href="http://www.trimet.org/"&gt;bus&lt;/a&gt;, relatively quiet, food, etc.).&lt;/p&gt;
&lt;p&gt;As I work problems from &lt;a class="reference" href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-047126296X.html"&gt;two&lt;/a&gt; &lt;a class="reference" href="http://www.worldscibooks.com/mathematics/1280.html"&gt;books&lt;/a&gt; I have on these topics, I'd like to pick some of the interesting ones and post them here, complete with solutions if I can provide them, or provide a little discussion.  If you're having trouble starting a study habit, I hope you'll find this interesting, too.&lt;/p&gt;
</description></item><item><title>Jyte.com API: Python module</title><pubDate>Fri, 02 Feb 2007 11:36:37 PDT</pubDate><link>http://root.b-tree.org/post/jyte-com-api-python-module/</link><guid>http://root.b-tree.org/GUID_NONURL/17</guid><description>&lt;p&gt;Today I finished a python module that wraps the &lt;a class="reference" href="http://jyte.com/"&gt;jyte.com&lt;/a&gt; &lt;a class="reference" href="http://jyte.com/site/api"&gt;service API&lt;/a&gt;.  I intend to keep this current with the Jyte.com API capabilities.  Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a class="reference" href="http://darcs.cprogrammer.org/public/blog/blog/main/jyte.py"&gt;http://darcs.cprogrammer.org/public/blog/blog/main/jyte.py&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Software: Code Review</title><pubDate>Wed, 31 Jan 2007 19:48:07 PDT</pubDate><link>http://root.b-tree.org/post/software-code-review/</link><guid>http://root.b-tree.org/GUID_NONURL/16</guid><description>&lt;p&gt;Today, some co-workers and I did a little bit of code review, and it got me thinking about code review software; &lt;a class="reference" href="http://www.niallkennedy.com/blog/archives/2006/11/google-mondrian.html"&gt;Mondrian&lt;/a&gt; probably comes to mind for anyone in this sphere.  We do some code review at work, but not nearly enough.&lt;/p&gt;
&lt;p&gt;In Guido van Rossum's &lt;a class="reference" href="http://video.google.com/videoplay?docid=-8502904076440714866"&gt;Tech Talk&lt;/a&gt; on Mondrian, he called code review the &amp;quot;alternative to pair programming,&amp;quot; which I think is a fair characterization.  Pair programming isn't necessarily for everyone, and code review (either in a group or in isolation) is, as Guido points out, a non-threatening way to give feedback and criticism with the overall goal of finding ways to improve software, uphold standards of quality, etc. &lt;a class="footnote-reference" href="#first" id="id1" name="id1"&gt;[1]&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I already wrote a &lt;a class="reference" href="http://www.b-tree.org/projects/pt/"&gt;tool to track the status of Darcs patches&lt;/a&gt;.  Its purpose is to scan the contents of locally-available Darcs repositories and store metadata about those patches in an independent database, which you manipulate through a GTK UI.  I originally wrote it to track the porting status of patches, since at the time I was doing a lot of work porting our &lt;a class="reference" href="http://www.openidenabled.com/openid/libraries/python/"&gt;Python OpenID implementation&lt;/a&gt; to &lt;a class="reference" href="http://www.openidenabled.com/openid/libraries/php/"&gt;PHP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Starting with the ideas from &lt;a class="reference" href="http://www.b-tree.org/projects/pt/"&gt;patchtracker&lt;/a&gt;, I started thinking about the requirements for a code review system that we could use at work.  Here are the requirements I can think of:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;As one co-worker put it, make it hard to avoid code review.  So, make it easy to know what hasn't been reviewed.  One might even go so far as to prevent patches from being committed to a central repository until they've passed review, but how draconian you choose to be will depend on how much you trust your co-workers.  I'd say our track record is pretty good.&lt;/li&gt;
&lt;li&gt;Make it reasonably easy to integrate the code review software with your code repositories. &lt;a class="footnote-reference" href="#second" id="id2" name="id2"&gt;[2]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Make it possible for reviewers to add comments on a per-patch (or even per-hunk) basis, in addition to general comments about a patch set.&lt;/li&gt;
&lt;li&gt;Make it possible for reviewers to indicate which of their patches amend the patches reviewed.&lt;/li&gt;
&lt;li&gt;Make it possible for more than one developer to review a patch set.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think a web app would be pretty well-suited to this kind of functionality.  Without heavy employment of an RPC interface, that means the web app has to run on the same machine where the repositories live, but I don't think that's a concern if your repositories are readable.&lt;/p&gt;
&lt;p&gt;I'm going to let this simmer for a day or two, and then I might start hacking.  If you have more ideas, please comment.&lt;/p&gt;
&lt;table class="docutils footnote" frame="void" id="first" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#id1" name="first"&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;I'm no Google fanboy, but it's worth pointing out that since Google is such a software development powerhouse, one might as well try to learn from what has been successful for them.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table class="docutils footnote" frame="void" id="second" rules="none"&gt;
&lt;colgroup&gt;&lt;col class="label" /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td class="label"&gt;&lt;a class="fn-backref" href="#id2" name="second"&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;In our case, the repositories are (for the time being) &lt;a class="reference" href="http://darcs.net/"&gt;Darcs&lt;/a&gt; repos, and I don't have any particular interest in supporting anything else.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
</description></item><item><title>Sunday Brunch</title><pubDate>Sun, 21 Jan 2007 17:03:14 PDT</pubDate><link>http://root.b-tree.org/post/sunday-brunch/</link><guid>http://root.b-tree.org/GUID_NONURL/15</guid><description>&lt;p&gt;If you've never been to &lt;a class="reference" href="http://portland.citysearch.com/profile/8470164/portland_or/utopia_cafe.html"&gt;Utopia Cafe&lt;/a&gt;, you must go!&lt;/p&gt;
</description></item><item><title>Fido Image Service</title><pubDate>Fri, 12 Jan 2007 18:06:10 PDT</pubDate><link>http://root.b-tree.org/post/fido-project-image-service/</link><guid>http://root.b-tree.org/GUID_NONURL/14</guid><description>&lt;p&gt;I often take screenshots, and send links to friends.  Sometimes I want to capture something funny before it goes away.  Sometimes I want to show something running in my development environment.  Either way, I use a perl script, XWD, scp, and ImageMagick to take and store the screenshots on my web server.  However, getting the perl script to run reliably on a new machine is always painful and error-prone.  It doesn't help that Perl sucks.&lt;/p&gt;
&lt;p&gt;In an effort to develop another small proof-of-concept service for &lt;a class="reference" href="http://www.b-tree.org/projects/fido"&gt;fido&lt;/a&gt;, I built an &lt;a class="reference" href="http://images.cprogrammer.org/"&gt;image uploading service&lt;/a&gt; to make it easy to get screenshot images to (and from) my server in a platform-agnostic manner and facilitate the storage of extra metadata with the images.&lt;/p&gt;
&lt;p&gt;The service's &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/uploader.py"&gt;API&lt;/a&gt; lets a python client upload an image with a description and tracks other metadata like a thumbnail, image dimensions, content type, and time uploaded.&lt;/p&gt;
&lt;p&gt;I'm interested in writing a wx or pygtk client to make the service usable with Windows.&lt;/p&gt;
&lt;p&gt;To use the service, a python client need only supply a little code:&lt;/p&gt;
&lt;div class="highlight" &gt;&lt;table&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;fido.client&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;socket&lt;/span&gt;

&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#39;UploadService&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;some_image.jpg&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;rb&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;image_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;image_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;upload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image_data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gethostname&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
                    &lt;span class="s"&gt;&amp;quot;descriptive text&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;And, alternatively, this code to get image data:&lt;/p&gt;
&lt;div class="highlight" &gt;&lt;table&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;span class="n"&gt;images&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getImages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source_host&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;single_image&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;image_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;</description></item><item><title>I love automated testing.</title><pubDate>Sat, 30 Dec 2006 01:05:58 PDT</pubDate><link>http://root.b-tree.org/post/i-love-automated-testing/</link><guid>http://root.b-tree.org/GUID_NONURL/13</guid><description>&lt;p&gt;Current line tally for the &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/"&gt;fido framework&lt;/a&gt; codebase:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Lines of library code: 1462
Lines of test code:    1521
&lt;/pre&gt;
</description></item><item><title>Late-Night Hacking</title><pubDate>Thu, 28 Dec 2006 23:39:26 PDT</pubDate><link>http://root.b-tree.org/post/late-night-hacking/</link><guid>http://root.b-tree.org/GUID_NONURL/12</guid><description>&lt;p&gt;There are few pleasures I enjoy more than hacking late into the night.&lt;/p&gt;
&lt;p&gt;For a few weeks now, I've been pouring a lot of spare time into my &lt;a class="reference" href="http://www.b-tree.org/projects/fido/"&gt;fido RPC framework&lt;/a&gt;, which wraps the &lt;a class="reference" href="http://pyro.sourceforge.net/"&gt;Pyro RPC library&lt;/a&gt; to make it easier to use.  My goal with &lt;a class="reference" href="http://www.b-tree.org/projects/fido/"&gt;fido&lt;/a&gt; is to create a comprehensive RPC programming toolkit.  I'm a big fan of Pyro, but over the past few years I've found that it's tedious to get a world-class Pyro application running quickly.  Pyro provides a great infrastructure, but I want more:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;A convenient programming and system-level interface for creating and managing daemons&lt;/li&gt;
&lt;li&gt;A consistent and practical RPC object implementation that supports some key introspection operations&lt;/li&gt;
&lt;li&gt;A robust idiom for connecting to RPC endpoints, querying their contents, and getting object proxies&lt;/li&gt;
&lt;li&gt;A load-balancing, self-adjusting naming service that only hands out proxies that refer to real objects&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When it comes to actually using RPC, it should be easy to do these things quickly:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Define the interface for an RPC-capable object in an obvious, language-native way&lt;/li&gt;
&lt;li&gt;Create a daemon that hosts such an object&lt;/li&gt;
&lt;li&gt;Create a client program to begin calling methods on the object&lt;/li&gt;
&lt;li&gt;Register the object in a naming service to resolve its location&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Furthermore, my ideal RPC framework would be:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;easy to configure, both programmatically and using config files&lt;/li&gt;
&lt;li&gt;well-tested and use standard components&lt;/li&gt;
&lt;li&gt;robust and make it easy for me to tell when failures occur&lt;/li&gt;
&lt;li&gt;native to the language I prefer (&lt;a class="reference" href="http://www.python.org/"&gt;Python&lt;/a&gt;) and not ask me to write any middleware&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So far, I think I'm on the right track.  The fido &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/fido/services/ns.py"&gt;naming service&lt;/a&gt; is completely independent of the core framework, which is how I think all services should be implemented.  The &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/tests/"&gt;unit tests&lt;/a&gt; are coming along nicely, and the &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/fido/server.py"&gt;daemon interface&lt;/a&gt; is easy to script.  While configuration &lt;strong&gt;can&lt;/strong&gt; be done programmatically, config files are encouraged since they are more explicit and persistent and make it easy to get information about a daemon using an external tool.&lt;/p&gt;
&lt;p&gt;Fido is &lt;a class="reference" href="http://darcs.cprogrammer.org/public/fido/"&gt;available&lt;/a&gt; in &lt;a class="reference" href="http://darcs.net/"&gt;darcs&lt;/a&gt; if you want to take a peek or patch it.  It contains no README, but the code is documented to the point of silliness.  In the coming months, I'll make an official first release.&lt;/p&gt;
</description></item><item><title>Top-Posting Religious Wars</title><pubDate>Tue, 19 Dec 2006 22:48:17 PDT</pubDate><link>http://root.b-tree.org/post/top-posting-religious-wars/</link><guid>http://root.b-tree.org/GUID_NONURL/10</guid><description>&lt;p&gt;One of the best email sigs I've seen:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
A: No.
Q: Should I include quotations after my reply?
&lt;/pre&gt;
</description></item><item><title>OpenID Plugin for Trac</title><pubDate>Sun, 17 Dec 2006 22:45:58 PDT</pubDate><link>http://root.b-tree.org/post/openid-plugin-for-trac/</link><guid>http://root.b-tree.org/GUID_NONURL/7</guid><description>&lt;p&gt;After &lt;a class="reference" href="http://trac-hacks.org/ticket/1007"&gt;posting a patch&lt;/a&gt; to an &lt;a class="reference" href="http://trac-hacks.org/wiki/OpenidPlugin"&gt;OpenID plugin for Trac&lt;/a&gt;, it looks like I'll be taking over maintainership as soon as I get Subversion access!  Sadly, the original author wants to use &lt;a class="reference" href="http://en.wikipedia.org/wiki/Windows_CardSpace"&gt;CardSpace&lt;/a&gt;.  I look forward to improving the plugin.  It currently employs &lt;a class="reference" href="http://www.openidenabled.com/openid/simple-registration-extension/"&gt;Simple Registration&lt;/a&gt; and operates in &lt;a class="reference" href="http://www.openidenabled.com/openid/what-is-dumb-mode/"&gt;stateless mode&lt;/a&gt;.&lt;/p&gt;
</description></item><item><title>Posts in PDF format!</title><pubDate>Tue, 12 Dec 2006 20:44:50 PDT</pubDate><link>http://root.b-tree.org/post/posts-in-pdf-format/</link><guid>http://root.b-tree.org/GUID_NONURL/9</guid><description>&lt;p&gt;After &lt;a class="reference" href="http://root.b-tree.org/post/blog-software-improvements/"&gt;a recent comment posted by rorek&lt;/a&gt;, I felt inspired to implement support for rendering blog posts to PDF by way of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1181/" /&gt;.  Now, you can click the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;View&lt;/span&gt; &lt;span class="pre"&gt;PDF&lt;/span&gt;&lt;/tt&gt; link available next to each post title to get a PDF.&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Fortunately, &lt;a class="reference" href="http://www.python.org/"&gt;python&lt;/a&gt;'s &lt;a class="reference" href="http://docutils.sourceforge.net/"&gt;docutils&lt;/a&gt; supplies a &lt;a class="reference" href="http://docutils.sourceforge.net/rst.html"&gt;ReST&lt;/a&gt;-to-&lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1182/" /&gt; translator, which I use to convert my ReST blog posts into &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1183/" /&gt;.&lt;/li&gt;
&lt;li&gt;Blocks of highlighted source code are just translated into verbatim &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1184/" /&gt; blocks surrounded by (decorative?) boxes.&lt;/li&gt;
&lt;li&gt;Inline and block math elements are preserved and rendered as-is.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have trouble viewing the PDFs or notice any glitches, please let me know!&lt;/p&gt;
</description></item><item><title>Blog software improvements</title><pubDate>Sun, 10 Dec 2006 21:11:46 PDT</pubDate><link>http://root.b-tree.org/post/blog-software-improvements/</link><guid>http://root.b-tree.org/GUID_NONURL/8</guid><description>&lt;p&gt;After two days' worth of hacking on the blog code, three new improvements obtain:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1157/" /&gt; elements are now pre-rendered when posts are created or edited instead of being created when posts are viewed.&lt;/li&gt;
&lt;li&gt;The entire post body is also pre-rendered and served when posts are viewed, rather than rendering on demand.&lt;/li&gt;
&lt;li&gt;Comments are now supported, provided you log in with &lt;a class="reference" href="https://www.myopenid.com/"&gt;OpenID&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Not all is perfect, however.  Some problems remain.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class="first"&gt;Comments are plain text, and are rendered as such.  You won't get to use any fancy filters available in the blog post processing logic.  This is mostly because I'm not sure I want to make comment authors write ReST or &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1158/" /&gt;.  (It also has non-trivial implementation ramifications.)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Comments aren't previewable.  If you've ever posted a comment on a blog, you're probably too familiar with the uneasy feeling you get from not knowing how the blog's brain-dead internals are going to treat your input.  I plan to implement comment previewing as soon as I come up with (or hear ideas about) a sane way to make that happen in the commenting UI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1159/" /&gt; elements are not properly aligned with surrounding text.  For any given generated image, the text baseline in the image may be any number of pixels above the bottom of the image.  In the non-zero case, the image needs to be shifted vertically so its text baseline lines up with that of the surrounding text.&lt;/p&gt;
&lt;p&gt;The utility I use to generate PNG images from input, &lt;a class="reference" href="http://sourceforge.net/projects/dvipng/"&gt;dvipng&lt;/a&gt;, claims to support an option to report the &amp;quot;depth&amp;quot; of an element.  According to the man page section for the &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--depth&lt;/span&gt;&lt;/tt&gt; option:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Report the depth of the image. This only works reliably when the LaTeX style
&lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;preview.sty&lt;/span&gt;&lt;/tt&gt; from preview-latex is used. It reports the number of
pixels from the bottom of the image to the baseline of the image. This can
be used for vertical positioning of the image in, e.g., web documents,
where one would use CSS [...]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That sounds like exactly what I need.  In practice, the reported depth values seem to be much too large, resulting in odd-to-just-plain-wrong placement of generated images.  I've found a scheme that seems to work well for most elements, but it's a hack.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description></item><item><title>rorek.org: Proof</title><pubDate>Thu, 07 Dec 2006 10:38:06 PDT</pubDate><link>http://root.b-tree.org/post/rorek-proof/</link><guid>http://root.b-tree.org/GUID_NONURL/6</guid><description>&lt;p&gt;This proof to a &lt;a class="reference" href="http://root.b-tree.org/post/math-problem-1/"&gt;math problem I posted&lt;/a&gt; was posted on &lt;a class="reference" href="http://rorek.org/blog/reader/view/4"&gt;rorek.org&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;First note that &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="160" height="22" title="0" src="http://root.b-tree.org/storedImage/1150/" /&gt; trivially by their definitions.&lt;/p&gt;
&lt;p&gt;Let &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="50" height="15" title="0" src="http://root.b-tree.org/storedImage/1151/" /&gt; be of minimal eccentricity, and &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="50" height="15" title="0" src="http://root.b-tree.org/storedImage/1152/" /&gt; be of maximal
eccentricity. Consider the path from &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="9" height="9" title="0" src="http://root.b-tree.org/storedImage/1153/" /&gt; to &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="11" height="9" title="0" src="http://root.b-tree.org/storedImage/1154/" /&gt;
continuing to &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="9" title="0" src="http://root.b-tree.org/storedImage/1155/" /&gt;.  Then we have
&lt;img class="blockLatex" width="343" height="22" title="0" src="http://root.b-tree.org/storedImage/1149/" /&gt; &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="13" height="14" title="0" src="http://root.b-tree.org/storedImage/1156/" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description></item><item><title>Syntax Highlighting</title><pubDate>Thu, 07 Dec 2006 00:53:06 PDT</pubDate><link>http://root.b-tree.org/post/new-feature-syntax-highlighting/</link><guid>http://root.b-tree.org/GUID_NONURL/5</guid><description>&lt;p&gt;I've added a new feature: syntax highlighting with &lt;a class="reference" href="http://www.codento.com/people/mtr/genscript/"&gt;enscript&lt;/a&gt;.  Examples:&lt;/p&gt;
&lt;div class="highlight" &gt;&lt;table&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2
3
4
5
6
7
8&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;os.path&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyClass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__str__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;FOO&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="highlight" &gt;&lt;table&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2
3
4
5&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;java&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;.*;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;java&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;.*;&lt;/span&gt;

&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CoolClient&lt;/span&gt; &lt;span class="k"&gt;extends&lt;/span&gt; &lt;span class="n"&gt;CoreInterface&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="n"&gt;Runnable&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="highlight" &gt;&lt;table&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;pre&gt;1
2
3
4
5&lt;/pre&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;HTML&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;HEAD&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;TITLE&amp;gt;&lt;/span&gt;My site&lt;span class="nt"&gt;&amp;lt;/TITLE&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/HEAD&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/HTML&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: The blog now uses &lt;a class="reference" href="http://pygments.pocoo.org/"&gt;pygments&lt;/a&gt;, as it is infinitely more flexible; thanks, pygments authors!&lt;/p&gt;
</description></item><item><title>Bowling</title><pubDate>Wed, 06 Dec 2006 23:19:48 PDT</pubDate><link>http://root.b-tree.org/post/good-night-bowling/</link><guid>http://root.b-tree.org/GUID_NONURL/4</guid><description>&lt;p&gt;Tonight was a good night at the alley:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
Current bowling average: 119
Tonight's session average: 151 (games: 140, 150, 164)
&lt;/pre&gt;
</description></item><item><title>Graph Diameter and Radius</title><pubDate>Wed, 06 Dec 2006 12:48:43 PDT</pubDate><link>http://root.b-tree.org/post/math-problem-1/</link><guid>http://root.b-tree.org/GUID_NONURL/3</guid><description>&lt;p&gt;Here's something I've been working on.  I'd like to see a concise proof if you can provide one:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1164/" /&gt; be a connected graph with vertex set &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1165/" /&gt;.  Let &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="54" height="22" title="0" src="http://root.b-tree.org/storedImage/1166/" /&gt; be the length of the
shortest &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="44" height="9" title="0" src="http://root.b-tree.org/storedImage/1167/" /&gt; path in &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1168/" /&gt;.&lt;/p&gt;
&lt;p&gt;For each &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="50" height="15" title="0" src="http://root.b-tree.org/storedImage/1169/" /&gt;, the eccentricity of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="9" height="9" title="0" src="http://root.b-tree.org/storedImage/1170/" /&gt; is defined as
&lt;img class="blockLatex" width="297" height="22" title="0" src="http://root.b-tree.org/storedImage/1160/" /&gt;&lt;/p&gt;
&lt;p&gt;The radius of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1171/" /&gt; is defined as
&lt;img class="blockLatex" width="246" height="22" title="0" src="http://root.b-tree.org/storedImage/1161/" /&gt;&lt;/p&gt;
&lt;p&gt;The diameter of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1172/" /&gt; is defined as
&lt;img class="blockLatex" width="262" height="22" title="0" src="http://root.b-tree.org/storedImage/1162/" /&gt;&lt;/p&gt;
&lt;p&gt;Prove that for any connected graph &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="14" height="14" title="0" src="http://root.b-tree.org/storedImage/1173/" /&gt;,
&lt;img class="blockLatex" width="271" height="22" title="0" src="http://root.b-tree.org/storedImage/1163/" /&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</description></item><item><title>Obligatory First Post</title><pubDate>Tue, 05 Dec 2006 22:59:06 PDT</pubDate><link>http://root.b-tree.org/post/first-post/</link><guid>http://root.b-tree.org/GUID_NONURL/2</guid><description>&lt;p&gt;Every blog has to have a first post.  This is mine.  This is a blog package that I've been working on.  It uses &lt;a class="reference" href="http://www.djangoproject.com/"&gt;Django&lt;/a&gt;, &lt;a class="reference" href="http://docutils.sourceforge.net/"&gt;docutils&lt;/a&gt;, &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1174/" /&gt;, &lt;a class="reference" href="http://www.python.org/"&gt;Python&lt;/a&gt;, &lt;a class="reference" href="http://www.openidenabled.com/openid/libraries/python/"&gt;OpenID&lt;/a&gt;, and &lt;a class="reference" href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;.  Needless to say, it's a little rough around the edges.  Some planned features might be:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Comments (maybe, leaning toward no.)&lt;/li&gt;
&lt;li&gt;Extra filters for placement of &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1175/" /&gt; elements.&lt;/li&gt;
&lt;li&gt;A filter to support syntax highlighting of Python code.&lt;/li&gt;
&lt;li&gt;Make it easier to package up for others to use.&lt;/li&gt;
&lt;li&gt;Pre-render &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1176/" /&gt; elements rather than doing them on the fly, every time.&lt;/li&gt;
&lt;li&gt;Re-engineer filter implementation so order doesn't matter.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img class="floatLatex" width="102" height="43" title="0" src="http://root.b-tree.org/storedImage/1179/" /&gt; Blog posts are written in &lt;a class="reference" href="http://docutils.sourceforge.net/rst.html"&gt;reStructured Text&lt;/a&gt;.  The primary distinguishing feature of this package is its support for &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1177/" /&gt; rendering.  I've seen many wiki packages with support for it, but I haven't come across any blog software that lets you render it.  Both inline (&lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="46" height="14" title="0" src="http://root.b-tree.org/storedImage/1180/" /&gt;) and block elements are supported.  In addition, floating elements can be placed on the right margin.  The idea of embedding &lt;img style="vertical-align: middle; bottom: -0px; position: relative;" width="48" height="19" title="0" src="http://root.b-tree.org/storedImage/1178/" /&gt; in blog posts was somewhat inspired by &lt;a class="reference" href="http://www.mathbin.net/"&gt;Mathbin&lt;/a&gt;, but it's not a new idea.&lt;/p&gt;
&lt;p&gt;If you're interested in the source, &lt;a class="reference" href="http://www.b-tree.org/contact"&gt;let me know&lt;/a&gt;.&lt;/p&gt;
</description></item></channel></rss>