<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-10051549</id><updated>2012-04-16T00:29:33.040-04:00</updated><category term='Python'/><category term='TV'/><category term='Waste of Time'/><category term='Travel'/><category term='Linux'/><category term='Music'/><category term='Food'/><category term='Software'/><category term='Tech'/><category term='Battlestar Galactica'/><category term='OCaml'/><category term='Emacs'/><category term='YouTube'/><category term='Downloads'/><category term='NotTech'/><category term='Academia'/><category term='Wiki'/><category term='LaTeX'/><category term='India'/><category term='Top Chef'/><category term='Politics'/><title type='text'>ProcrastiBlog</title><subtitle type='html'>This blog has moved to &lt;a href="http://procrastiblog.com"&gt;procrastiblog.com&lt;/a&gt;. All archived posts are available there. Please update your bookmarks.

If you have followed a broken link to a post on this site, please be so kind as to &lt;a href="mailto:chris%20symbol%20procrastiblog%20punctuation%20com"&gt;inform the management&lt;/a&gt;.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/-/Tech'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/search/label/Tech'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/-/Tech/-/Tech?start-index=26&amp;max-results=25'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10051549.post-6736181445654805254</id><published>2008-07-09T00:59:00.004-04:00</published><updated>2008-07-09T19:21:09.247-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='NotTech'/><title type='text'>We're moving to procrastiblog.com</title><content type='html'>I'm moving the blog to a new URL and a new host.* Future posts will appear at&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:180%;"&gt;&lt;a href="http://procrastiblog.com/"&gt;procrastiblog.com&lt;/a&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The new feed is &lt;a href="http://procrastiblog.com/feed/"&gt;http://procrastiblog.com/feed/&lt;/a&gt;. The existing archives have been imported to the new site.&lt;br /&gt;&lt;br /&gt;* One thing shouldn't require the other but—despite some dedicated users on the forums (or actually, just &lt;a href="http://www.nitecruzr.net/"&gt;this one guy&lt;/a&gt;)—Blogger showed a perfect indifference to getting &lt;a href="http://procrastiblog.com/"&gt;procrastiblog.com&lt;/a&gt; up on their servers. I'll give WordPress a chance to squander my money for a while.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-6736181445654805254?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/6736181445654805254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=6736181445654805254' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/6736181445654805254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/6736181445654805254'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/07/were-moving-to-procrastiblogcom.html' title='We&apos;re moving to procrastiblog.com'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-8429201637074689242</id><published>2008-06-29T17:10:00.003-04:00</published><updated>2008-06-29T17:25:41.923-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='OCaml'/><title type='text'>OCaml's Unix module and ARGV</title><content type='html'>Be warned: the &lt;code&gt;string array&lt;/code&gt; argument to &lt;code&gt;Unix.create_process&lt;/code&gt; et al. represents the &lt;em&gt;entire&lt;/em&gt; argument vector: the first element should be the command name. I didn't expect this, since there is a separate &lt;code&gt;prog&lt;/code&gt; argument to &lt;code&gt;create_process&lt;/code&gt;, and ended up with weird behavior* like,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# open Unix;;&lt;br /&gt;# create_process "sleep" [|"10"|] stdin stdout stderr;;&lt;br /&gt;10: missing operand&lt;br /&gt;Try `10 --help' for more information.&lt;br /&gt;- : int = 22513&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This can be a bit insidious&amp;mdash;in many cases skipping the first argument will only subtly change the behavior of the child process.&lt;br /&gt;&lt;br /&gt;Note that the &lt;code&gt;prog&lt;/code&gt; argument is what matters in terms of invoking the sub-process---the first element of the argument vector is what just what is passed into the process. Hence,&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# create_process "gcc" [|"foo";"--version"|] stdin stdout stderr;;&lt;br /&gt;- : int = 24364&lt;br /&gt;foo (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;* Actually, this "weird behavior" is the test that finally made me realize what was going on. The emergent behavior of my app was much more mysterious...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-8429201637074689242?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/8429201637074689242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=8429201637074689242' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/8429201637074689242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/8429201637074689242'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/06/ocamls-unix-module-and-argv.html' title='OCaml&apos;s Unix module and ARGV'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-1442905715043375202</id><published>2008-06-24T10:04:00.003-04:00</published><updated>2008-07-01T12:16:20.284-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Resetting a Terminal</title><content type='html'>You tried to &lt;code&gt;cat&lt;/code&gt; a binary file and now your terminal displays nothing but gibberish? Just type &lt;code&gt;reset&lt;/code&gt; (it may look like &lt;code&gt;⎼␊⎽␊├&lt;/code&gt;).&lt;br /&gt;&lt;br /&gt;It has taken me more than 10 years to learn this.&lt;br /&gt;&lt;br /&gt;[UPDATE] Interestingly, this doesn't work in my (alas, ancient) Mac OS X 10.3.9 terminal. Any tips? Also, why did &lt;code&gt;curl URL_TO_BINARY&lt;/code&gt; hose my terminal in the first place?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-1442905715043375202?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/1442905715043375202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=1442905715043375202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/1442905715043375202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/1442905715043375202'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/06/resetting-terminal.html' title='Resetting a Terminal'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-8740658510515209096</id><published>2008-06-23T10:50:00.004-04:00</published><updated>2008-06-23T11:09:00.705-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><title type='text'>Ripping a Muxtape</title><content type='html'>So &lt;a href="http://muxtape.com"&gt;Muxtape&lt;/a&gt; is a pretty cool site, but a little frustrating. If a friend posts a really cool mixtape (maybe you know somebody who &lt;a href="http://acsalltimeindierock.muxtape.com/"&gt;just barely entered the Aughties&lt;/a&gt;), it would be nice to be able to download it and save it, just like all those old cassette mixtapes sentimentally rotting underneath your bed.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.cs.nyu.edu/~cconway/tools/muxrip.rb"&gt;Enter muxrip&lt;/a&gt;. This simple Ruby script takes the name of the mixtape, downloads it, and creates a playlist for you in M3U or iTunes format. (Acknowledgments: the script basically just adds some polish to &lt;a href="http://gvlt.wordpress.com/2008/04/21/tutorial-muxtape-itunes/"&gt;this previous effort&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;PLEASE: Use this script responsibly. It would be a shame for Muxtape to get shut down.&lt;br /&gt;&lt;br /&gt;ALSO: I wouldn't be surprised if this suddenly stopped working. It depends on elements of the page layout and URL scheme that might (almost certainly will) change without notice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-8740658510515209096?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/8740658510515209096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=8740658510515209096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/8740658510515209096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/8740658510515209096'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/06/ripping-muxtape.html' title='Ripping a Muxtape'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-7817678263660362519</id><published>2008-06-08T20:00:00.005-04:00</published><updated>2008-06-23T11:09:25.327-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Tweaking an RSS Feed in Python</title><content type='html'>I've been teaching myself a bit of Python by the just-in-time learning method: start programming, wait for the interpreter to complain, and go check the reference manual; keep the API docs on your hard disk and sift through them when you need a probably-existing function. Recently, I wanted to write a very simple script to manipulate some XML (see below) and I was surprised (though it &lt;a href="http://www.somebits.com/weblog/tech/python/xpath.html"&gt;has been noted before&lt;/a&gt;) at the relatively confused state of the art in Python and XML.&lt;br /&gt;&lt;br /&gt;First of all, the Python &lt;a href="http://www.python.org/doc/current/lib/markup.html"&gt;XML API documentation&lt;/a&gt; is more or less "go read the W3C standards." Which is fine, but... make the easy stuff easy, people.&lt;br /&gt;&lt;br /&gt;Secondly, the supposedly-standard &lt;a href="http://pyxml.sourceforge.net/"&gt;PyXML library&lt;/a&gt; has been deprecated in some form or fashion such that some of the examples from &lt;a href="http://www.boddie.org.uk/python/XML_intro.html"&gt;the tutorial I was working with&lt;/a&gt; have stopped working (in particular, the &lt;code&gt;xml.dom.ext&lt;/code&gt; module has gone somewhere. Where, I do not know).&lt;br /&gt;&lt;br /&gt;So, in the interest of producing more and better code samples for future lazy programmers, here's how I managed to solve my little problem. &lt;br /&gt;&lt;br /&gt;The Problem: Twitter's RSS feeds don't provide clickable links&lt;br /&gt;&lt;br /&gt;The Solution: A script suitable for use as a "conversion filter" in &lt;a href="http://liferea.sourceforge.net/"&gt;Liferea&lt;/a&gt; (and maybe other feed readers too, who knows?). The script should:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Read and parse an RSS/Atom feed from the standard input.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Grab the text from the feed items and "linkify" them&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Print the modified feed on the standard output.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Easy, right? Well, yeah. The only tricky bit was using the right namespace references for the Atom feed, but again that's only because I refuse to read and comprehend the W3C specs for something so insignificant. I ended up using the &lt;a href="http://codespeak.net/lxml/"&gt;lxml library&lt;/a&gt;, because it worked. (The script would be about 50% shorter if I hadn't added a command-line option &lt;code&gt;--strip-user&lt;/code&gt; to strip the username from the beginning of items in a single-user feed and a third shorter than that if it only handled RSS or Atom and not both.)&lt;br /&gt;&lt;br /&gt;Here's the code, in toto. (You can &lt;a href="http://www.cs.nyu.edu/~cconway/tools/twitter-links.py"&gt;download it here&lt;/a&gt;.) &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;#! /usr/bin/env python&lt;br /&gt;&lt;br /&gt;from sys import stdin, stdout&lt;br /&gt;from lxml import etree&lt;br /&gt;from re import sub&lt;br /&gt;from optparse import OptionParser&lt;br /&gt;&lt;br /&gt;doc = etree.parse(stdin)&lt;br /&gt;&lt;br /&gt;def addlinks(path,namespaces=None):&lt;br /&gt;    for node in doc.xpath(path,namespaces=namespaces):&lt;br /&gt;        # Turn URLs into HREFs&lt;br /&gt;        node.text = sub("((https?|s?ftp|ssh)\:\/\/[^\"\s\&amp;lt;\&amp;gt;]*[^.,;'\"&amp;gt;\:\s\&amp;lt;\&amp;gt;\)\]\!])",&lt;br /&gt;                        "&amp;lt;a href=\"\\1\"&amp;gt;\\1&amp;lt;/a&amp;gt;",&lt;br /&gt;                        node.text)&lt;br /&gt;        # Turn @ refs into links to the user page&lt;br /&gt;        node.text = sub("\B@([_a-z0-9]+)",&lt;br /&gt;                        "@&amp;lt;a href=\"http://twitter.com/\\1\"&amp;gt;\\1&amp;lt;/a&amp;gt;",&lt;br /&gt;                        node.text)&lt;br /&gt;&lt;br /&gt;def stripuser(path,namespaces=None):&lt;br /&gt;    for node in doc.xpath(path,namespaces=namespaces):&lt;br /&gt;        node.text = sub("^[A-Za-z0-9_]+:\s*","",node.text)&lt;br /&gt;&lt;br /&gt;parser = OptionParser(usage = "%prog [options] SITE")&lt;br /&gt;parser.add_option("-s", "--strip-username", &lt;br /&gt;                  action="store_true", &lt;br /&gt;                  dest="strip_username",&lt;br /&gt;                  default=False,&lt;br /&gt;                  help="Strip the username from item title and description")&lt;br /&gt;(opts,args) = parser.parse_args()&lt;br /&gt;&lt;br /&gt;# For RSS feeds&lt;br /&gt;addlinks("//rss/channel/item/description")&lt;br /&gt;# For Atom feeds&lt;br /&gt;addlinks( "//n:feed/n:entry/n:content", &lt;br /&gt;          {'n': 'http://www.w3.org/2005/Atom'} )&lt;br /&gt;&lt;br /&gt;if opts.strip_username:&lt;br /&gt;     # RSS title/description&lt;br /&gt;     stripuser( "//rss/channel/item/title" )&lt;br /&gt;     stripuser( "//rss/channel/item/description" )&lt;br /&gt;     # Atom title/description&lt;br /&gt;     stripuser( "//n:feed/n:entry/n:title", &lt;br /&gt;                namespaces = {'n': 'http://www.w3.org/2005/Atom'} )&lt;br /&gt;     stripuser( "//n:feed/n:entry/n:content", &lt;br /&gt;                namespaces = {'n': 'http://www.w3.org/2005/Atom'} )&lt;br /&gt;&lt;br /&gt;doc.write(stdout)&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If there are any Python programmers in the audience and I'm doing something stupid or terribly non-idiomatic, I'd be glad to know.&lt;br /&gt;&lt;br /&gt;Thanks in part to &lt;a href="http://pipes.yahoo.com/pipes/person.info?eyuid=AvMdCa0yomsUWxc.7KU-"&gt;Alan H&lt;/a&gt; whose &lt;a href="http://pipes.yahoo.com/pipes/pipe.info?_id=RqZx0LAK3RGriGNi2h2EvQ"&gt;Yahoo Pipe&lt;/a&gt; was &lt;em&gt;almost&lt;/em&gt; good enough (it doesn't handle authenticated feeds, as far as I can tell) and from whom I ripped off the regular expressions.&lt;br /&gt;&lt;br /&gt;[UPDATE] Script changed per first commenter.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-7817678263660362519?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/7817678263660362519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=7817678263660362519' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7817678263660362519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7817678263660362519'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/06/tweaking-rss-feed-in-python.html' title='Tweaking an RSS Feed in Python'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-337407245130702575</id><published>2008-04-30T16:31:00.005-04:00</published><updated>2008-04-30T18:18:00.325-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'>Linux Quickies</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_UpOovsMuqNk/SBjvJylMaGI/AAAAAAAAAFQ/vOr4nFIHnWk/s1600-h/hardy+heron.jpg"&gt;&lt;img style="float:right;margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_UpOovsMuqNk/SBjvJylMaGI/AAAAAAAAAFQ/vOr4nFIHnWk/s320/hardy+heron.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5195165121647503458" /&gt;&lt;/a&gt;&lt;br /&gt;The upgrade from Ubuntu Gutsy to &lt;a href="http://www.ubuntu.com/products/whatisubuntu/804features/"&gt;Hardy Heron&lt;/a&gt; (cool logo, right?) was relatively uneventful. Some minor points...&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;I always thought the main Ubuntu servers would farm my downloads off to an appropriate mirror, but apparently that's not the case. You're likely to get better download times if you choose a mirror in System -&gt; Administration -&gt; Software Sources. If you choose "Other...", there's a "Select Best Server" feature. Oddly, my best response times were from New Zealand... maybe because they were all asleep when I tried it.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The &lt;a href="http://ubuntuforums.org/showpost.php?p=3675960&amp;amp;postcount=26"&gt;"ugly fix"&lt;/a&gt; for the infamous &lt;a href="https://launchpad.net/ubuntu/+source/acpi-support/+bug/59695"&gt;hard disk annihilating bug&lt;/a&gt; stopped working after I upgraded. &lt;a href="http://duopetalflower.blogspot.com/2008/04/harddrive-killer-bug-workaround-for.html"&gt;This new, different (but still ugly) fix&lt;/a&gt; worked for me. It would be really great if the Ubuntu team could find a way to make the OS stop trying to kill my hard disk by default.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;My WiFi light stopped working after the upgrade. This is &lt;a href="https://bugs.launchpad.net/linux/+bug/176090/"&gt;very easily fixed&lt;/a&gt; by installing the package &lt;code&gt;linux-backports-modules-hardy&lt;/code&gt;.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://kitenet.net/%7Ejoey/code/etckeeper/"&gt;&lt;code&gt;etckeeper&lt;/code&gt;&lt;/a&gt; is a great idea: it puts all the config files in &lt;code&gt;/etc&lt;/code&gt; under Git, Mercurial, or Bazaar source control and forces APT to commit before and after any upgrade, so it's easy to isolate and revert changes. (As a side note, using &lt;a href="http://bazaar-vcs.org/"&gt;Bazaar&lt;/a&gt; for a few weeks makes it physically painful to be forced to deal with CVS.)&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Anti-aliased fonts in Emacs are really nice. On Ubuntu Hardy, install &lt;code&gt;emacs-snapshot-gtk&lt;/code&gt; (on prior releases, downloads &lt;a href="http://peadrop.com/blog/2007/09/17/pretty-emacs-reloaded/"&gt;"Pretty Emacs"&lt;/a&gt;), then run &lt;code&gt;emacs-snapshot&lt;/code&gt; instead of &lt;code&gt;emacs&lt;/code&gt; (or run &lt;code&gt;update-alternatives&lt;/code&gt; to set &lt;code&gt;emacs-snapshot&lt;/code&gt; as the default). You should then be able to run, e.g., &lt;code&gt;emacs --font "Monospace-10"&lt;/code&gt; and get pretty, pretty (lick-able, as they say) fonts. Other reasonable choices are &lt;code&gt;"BitstreamVeraSansMono-X"&lt;/code&gt; or &lt;code&gt;"LiberationMono-X"&lt;/code&gt;, where &lt;code&gt;X&lt;/code&gt; is your desired point size. You can also invoke &lt;code&gt;M-x set-default-font&lt;/code&gt; and type your choice interactively, but for some reason the TrueType fonts above won't tab-complete—if you type a non-existent font, Emacs will silently use the default system fixed-width font (see System -&gt; Preferences -&gt; Appearance -&gt; Fonts). I've added the following to my &lt;code&gt;.emacs&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(if (&gt;= emacs-major-version 23)&lt;br /&gt;   (set-default-font "Monospace-10"))&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(The conditional is necessary if you may come into contact with earlier versions of Emacs, which will barf on TrueType fonts.)&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;In my experience, the fonts in your web browser will look better if you &lt;em&gt;don't&lt;/em&gt; use Microsoft's &lt;em&gt;gratis&lt;/em&gt; &lt;a href="http://en.wikipedia.org/wiki/Core_fonts_for_the_Web"&gt;TrueType core fonts&lt;/a&gt; (package &lt;code&gt;msttcorefonts&lt;/code&gt; in Ubuntu/Debian). In particular, the &lt;a href="http://en.wikipedia.org/wiki/Trebuchet_MS"&gt;Trebuchet font&lt;/a&gt; (which crops up frequently, including at the top of this page) tends to look pretty bad with &lt;a href="http://en.wikipedia.org/wiki/Subpixel_rendering"&gt;subpixel rendering&lt;/a&gt; turned on. Red Hat's &lt;a href="http://en.wikipedia.org/wiki/Liberation_fonts"&gt;Liberation fonts&lt;/a&gt; (package &lt;code&gt;ttf-liberation&lt;/code&gt;) are designed as drop-in replacements for the Microsoft fonts, but I haven't seen much value in installing them.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The instructions &lt;a href="http://procrastiblog.blogspot.com/2008/04/using-external-monitor-or-projector.html"&gt;I gave last month&lt;/a&gt; for hooking up to a projector aren't complete, because they often won't let you run the projector at a resolution greater than 640x480. This led to a rather embarrassing scene in front a class of undergraduates, where &lt;a href="http://www.openoffice.org/"&gt;OpenOffice.org&lt;/a&gt; simply refused to operate at such a pathetic resolution. This problem can be solved by &lt;a href="http://ubuntuforums.org/showthread.php?t=542222"&gt;the methods presented here&lt;/a&gt;, though it requires a bit of tweaking to get things just so. I haven't yet discovered a minimal solution—first I need to crack the meaning of the X11 "MetaModes" option. When I do, you'll be the first to know.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-337407245130702575?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/337407245130702575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=337407245130702575' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/337407245130702575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/337407245130702575'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/04/linux-quickies.html' title='Linux Quickies'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_UpOovsMuqNk/SBjvJylMaGI/AAAAAAAAAFQ/vOr4nFIHnWk/s72-c/hardy+heron.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-2753179892056757496</id><published>2008-04-15T11:08:00.003-04:00</published><updated>2008-04-15T11:18:28.169-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Only Thus Can It Be Unmade</title><content type='html'>The cleverer among you will espy the problem below immediately&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ export DATE=`date`&lt;br /&gt;$ echo $(DATE)&lt;br /&gt;bash: DATE: command not found&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In my half-caffeinated state, it took several minutes of frustration to figure out what was wrong: &lt;code&gt;$(DATE)&lt;/code&gt; is a Make-style variable; in Bash, &lt;code&gt;$(DATE)&lt;/code&gt; is the same as &lt;code&gt;`DATE`&lt;/code&gt; (a command substitution). The correct token is &lt;code&gt;$DATE&lt;/code&gt;.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;$ echo $DATE&lt;br /&gt;Tue Apr 15 11:08:38 EDT 2008&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I apologize for inflicting my stupidity upon you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-2753179892056757496?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/2753179892056757496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=2753179892056757496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2753179892056757496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2753179892056757496'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/04/only-thus-can-it-be-unmade.html' title='Only Thus Can It Be Unmade'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-2265686807387013927</id><published>2008-04-02T17:26:00.004-04:00</published><updated>2008-05-01T00:57:04.237-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Using an External Monitor or Projector With My Linux Laptop</title><content type='html'>For years, it was difficult enough to get my laptop working with an external monitor that I didn't even bother trying: I would boot into Windows in order to give a presentation. (This is the only reason I ever booted into Windows (or have a Windows install).) It either got dramatically easier to accomplish this at some point in the last year, or I've been incredibly stupid all this time. Just in case, here's how it works on my Dell Inspiron 6400 running Gutsy. My video card is an NVIDIA GeForce Go 7300&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Plug in the external monitor or projector. The monitor may work immediately (especially if you're repeating this step after fiddling about below), but it may be at the wrong resolution.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Open "Applications -&gt; System Tools -&gt; NVIDIA Settings" or execute &lt;code&gt;sudo nvidia-settings&lt;/code&gt; on the command line. This utility is provided by the &lt;code&gt;nvidia-glx-new&lt;/code&gt; package, which you should probably have installed.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Choose "X Server Display Configuration" and click "Detect Displays" at the bottom of the screen.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;The external monitor should appear in the Layout pane. Click on it, then click "Configure". Choose "TwinView" (which should hopefully not say that it requires an X restart).&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;In the "Display" box, choose "Position: Clones". This means that you want the same display to appear on both monitors. This is what works best for me, particularly for giving presentations. Having separate displays seems to confuse applications&amp;mdash;for example, "Presentation Mode" in Evince will "center" the slides, displaying the left half of a slide on the right half of the laptop screen and the right half of a slide on the left half of the projector. It's probably possible to tweak this with exactly the right viewport/workspace settings (&lt;a href="http://procrastiblog.blogspot.com/2007/11/eye-candy.html"&gt;ugh&lt;/a&gt;), but that's not how I roll.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;If the display is smaller than the default display&amp;mdash;the display's square will be smaller in the Layout pane and the displayed area will be cropped on the screen&amp;mdash;click on the&lt;br /&gt;default display in the Layout pane and choose a lower resolution. 1024x768 is usually safe. The laptop display will probably look bad, but the external display should look fine.&lt;br /&gt;&lt;br /&gt;Be careful: any smaller than 1024x768 and the Settings applet will be too big to display on the screen. If this happens, you'll have to navigate blind or hit Ctrl-Alt-Backspace to restart X (or don't automatically hit OK after the resolution changes and it will revert after 15 seconds).&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;To remove the external monitor or projector:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Unplug the monitor.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click "Detect Displays".&lt;/li&gt; &lt;br /&gt;&lt;li&gt;A message "The display device FOO has been unplugged..." will appear. Click "Remove."&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Click "Quit".&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Under no circumstances should you click "Save to X Configuration File" at any point in this process. That's just asking for trouble.&lt;br /&gt;&lt;br /&gt;Some sequence of actions&amp;mdash;it's not clear which&amp;mdash;may screw up the "X Server Display Configuration" pane. The display will &lt;br /&gt;continue to function in the meanwhile, but all the above commands are inaccessible. Restarting X made it go away (for me).&lt;br /&gt;&lt;br /&gt;[UPDATE] It seems it's necessary to update your &lt;code&gt;xorg.conf&lt;/code&gt; to get decent resolution on some projectors. I'm still investigating... In the meantime, &lt;a href="http://ubuntuforums.org/showthread.php?t=542222"&gt;this should help&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-2265686807387013927?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/2265686807387013927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=2265686807387013927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2265686807387013927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2265686807387013927'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/04/using-external-monitor-or-projector.html' title='Using an External Monitor or Projector With My Linux Laptop'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-5712948573257795272</id><published>2008-03-24T12:41:00.005-04:00</published><updated>2008-04-15T18:11:48.105-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Academia'/><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><title type='text'>LaTeX Appendectomies</title><content type='html'>I have need of a LaTeX package. I think a lot of people would find this package useful. I would prefer not to write it myself.&lt;br /&gt;&lt;br /&gt;This package would take a mode argument in the preamble and format the document in one of three ways: as a conference submission, as a camera-ready conference paper, or as a tech report. &lt;br /&gt;&lt;br /&gt;Suppose I have a theorem and that theorem has a proof.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;In a conference submission, the theorem would appear in the main text and would be re-stated along with its proof in an appendix.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In a camera-ready conference paper, the theorem would appear in the main text and the proof would not appear at all.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In a tech report, the theorem and the proof would appear inline in the main text.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Preferably, proofs could be included in the main text or sent to an appendix on a case-by-case basis. Proofs could also have "sketch" versions and full versions: the sketch version appears in the main text of a conference paper (either kind) and the full version appears only in a tech report.&lt;br /&gt;&lt;br /&gt;Suppose that, in proving a theorem, I first prove a lemma.&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;If the proof of the theorem appears in the main text (or an appendix), then the lemma and its proof should also appear in the main text (or the appendix), before the theorem.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If the proof of the theorem is omitted, or if a proof sketch is included which makes no reference to the lemma, then the lemma and its proof should not appear at all.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;One should be able to conditionally include text depending on the mode. For example, in camera-ready conference mode, one would probably include the sentence: "Full proofs of all theorems appear in a technical report [citation here]."&lt;br /&gt;&lt;br /&gt;The only package I've found that does anything like this is &lt;a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/thrmappendix.html"&gt;&lt;code&gt;thrmappendix&lt;/code&gt;&lt;/a&gt; , but it doesn't allow for a proof to appear in the main text at all. It's primarily concerned with the appearance and re-appearance of the &lt;em&gt;theorem&lt;/em&gt;, with or without its proof; I'm primarily concerned with the appearance or suppression of the &lt;em&gt;proof&lt;/em&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-5712948573257795272?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/5712948573257795272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=5712948573257795272' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5712948573257795272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5712948573257795272'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/03/latex-appendectomies.html' title='LaTeX Appendectomies'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-5530772840829692631</id><published>2008-01-24T18:46:00.000-05:00</published><updated>2008-01-24T19:11:50.991-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='OCaml'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'>The Triumphant Return of C-c C-t</title><content type='html'>The upgrade to Ubuntu gutsy and/or Emacs 22 broke my favorite feature of tuareg/ocaml-mode: &lt;code&gt;C-c C-t&lt;/code&gt; for "show type" in OCaml buffers (this requires compiling with &lt;code&gt;-dtypes&lt;/code&gt;, which generates type annotation files). I suffered without this for a length of time which is either embarrassing or impressive, depending on whether you consider poking around inside Emacs Lisp files a productive or unproductive use of time...&lt;br /&gt;&lt;br /&gt;I finally broke down and fixed it today. The problem is simply that Emacs and OCaml packages aren't cooperating properly. My solution, which may or may not be optimal, is as follows:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Copy the directory &lt;code&gt;/usr/share/emacs/site-lisp/ocaml-mode&lt;/code&gt; to a path of your choosing, say &lt;code&gt;~/.emacs.d/emacs22/ocaml-mode&lt;/code&gt;. Let's call this directory &lt;code&gt;DIR&lt;/code&gt;&lt;br /&gt;&lt;li&gt;(Optional) In Emacs 22, execute &lt;code&gt;C-u 0 M-x byte-recompile-directory&lt;/code&gt; and choose &lt;code&gt;DIR&lt;/code&gt;.&lt;br /&gt;&lt;li&gt;Add the following line to your &lt;code&gt;.emacs&lt;/code&gt; file:&lt;br /&gt;&lt;code&gt;(or (&amp;lt; emacs-major-version 22) (push "DIR" load-path))&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;The test for whether it worked is: load a &lt;code&gt;.ml&lt;/code&gt; file and type &lt;code&gt;C-c C-t&lt;/code&gt;. In the mini-buffer, you'll either see "&lt;code&gt;type: ...&lt;/code&gt;"; "&lt;code&gt;Point is not within a typechecked expression or pattern&lt;/code&gt;"; or "&lt;code&gt;No annotation file...&lt;/code&gt;" If it says "&lt;code&gt;C-c C-t is undefined&lt;/code&gt;", then you have failed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-5530772840829692631?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/5530772840829692631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=5530772840829692631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5530772840829692631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5530772840829692631'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/01/triumphant-return-of-c-c-c-t.html' title='The Triumphant Return of C-c C-t'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-4795539941736175416</id><published>2008-01-15T20:31:00.000-05:00</published><updated>2008-01-15T20:44:51.627-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Eye of the Tiger</title><content type='html'>Does anybody know which new API in Mac OS X 10.4 is the reason I can't use &lt;a href="http://faq.ilike.com/index.php?action=artikel&amp;cat=1&amp;id=6&amp;artlang=en"&gt;iLike&lt;/a&gt; the &lt;a href="http://www.amazon.com/gp/help/customer/display.html?nodeId=200154260"&gt;Amazon MP3 Downloader&lt;/a&gt; on my Power Mac G4? Any can anybody tell me why it sucks?&lt;br /&gt;&lt;br /&gt;Believe it or not, I actually &lt;em&gt;can't&lt;/em&gt; upgrade to 10.4, because it only comes on DVD-ROM and my, ahem, 6 year old G4 doesn't have a DVD-ROM drive. (You &lt;em&gt;can&lt;/em&gt; get CDs if you buy a copy of 10.4 and send Apple a check for ten or fifteen bucks, but... eh, no.) I will &lt;em&gt;not&lt;/em&gt; be buying a new computer this year.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-4795539941736175416?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/4795539941736175416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=4795539941736175416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/4795539941736175416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/4795539941736175416'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2008/01/eye-of-tiger.html' title='Eye of the Tiger'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-164934624457454898</id><published>2007-11-26T09:31:00.000-05:00</published><updated>2007-11-26T10:25:54.694-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='NotTech'/><category scheme='http://www.blogger.com/atom/ns#' term='Waste of Time'/><title type='text'>xkcd: Success</title><content type='html'>This is pretty much exactly how it went down when I upgraded to Gutsy.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://imgs.xkcd.com/349/"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://imgs.xkcd.com/comics/success.png" border="0" title="40% of OpenBSD installs lead to shark attacks.  It's their only standing security issue." alt="Success" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Consider this a standing endorsement of &lt;a href="http://xkcd.com"&gt;xkcd&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-164934624457454898?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/164934624457454898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=164934624457454898' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/164934624457454898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/164934624457454898'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/xkcd-success.html' title='xkcd: Success'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-5631320272673048659</id><published>2007-11-25T15:56:00.000-05:00</published><updated>2007-11-26T10:26:21.328-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Gnome Sessions</title><content type='html'>I tentatively clicked "Remember current running applications" in Gnome Session Preferences (aka &lt;code&gt;gnome-session-properties&lt;/code&gt;) and lived to regret it. What this does is it restarts any currently running application when you login. This is useful for, e.g., your online backup daemon, but kind of annoying for, e.g., five Emacs windows, Last.fm, some random Nautilus directory window, etc.&lt;br /&gt;&lt;br /&gt;Now, first I tried checking and unchecking "Automatically remember running applications when logging out", as the window layout makes it seem as if these two settings are related. They are not. Then, I was tempted to fix this by futzing with the "Startup Programs" or "Current Session" lists. This is Not Right. &lt;br /&gt;&lt;br /&gt;The Right Thing is to close all your programs (or just the offending ones) and then click again on "Remember current running applications". That is to say: the only way to change the "remembered" snapshot is to take another snapshot*. &lt;br /&gt;&lt;br /&gt;Note: Session Preferences has a Help button, but the Gnome manual page on it doesn't mention "Remember currently running programs" &lt;em&gt;or&lt;/em&gt; "Automatically remember running applications when logging out". This is annoying.&lt;br /&gt;&lt;br /&gt;* Presumably there is a text file tucked away somewhere that controls this (maybe &lt;code&gt;~/.gnome2/session&lt;/code&gt;?), but I haven't the patience to find out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-5631320272673048659?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/5631320272673048659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=5631320272673048659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5631320272673048659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5631320272673048659'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/gnome-sessions.html' title='Gnome Sessions'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-2362996385954231085</id><published>2007-11-25T15:03:00.000-05:00</published><updated>2008-01-20T16:35:58.297-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Academia'/><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><title type='text'>Style Guidelines for People</title><content type='html'>In the midst of some unrelated Googling, I came across Luca de Alfaro's &lt;a href="http://luca.cse.ucsc.edu/Style_guidelines_for_student_co-authors"&gt;style guidelines for student co-authors&lt;/a&gt;. This is good stuff. I particularly like "one sentence per line" b/w "fill-sentence macro". It's an elegant solution to a frequently annoying deficiency of &lt;code&gt;diff&lt;/code&gt;, which is unfortunately the baseline for anyone collaborating via CVS or SVN. I tweaked his macro to get nice indentation in AucTeX:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(defun fill-sentence ()&lt;br /&gt;  (interactive)&lt;br /&gt;  (save-excursion&lt;br /&gt;    (forward-char)&lt;br /&gt;    (forward-sentence -1)&lt;br /&gt;    (indent-relative)&lt;br /&gt;    (let ((beg (point)))&lt;br /&gt;      (forward-sentence)&lt;br /&gt;      (if (equal "LaTeX" (substring mode-name (string-match "LaTeX" mode-name)))&lt;br /&gt;          (LaTeX-fill-region-as-paragraph beg (point))&lt;br /&gt;        (fill-region-as-paragraph beg (point))))))&lt;br /&gt;(global-set-key "\ej" 'fill-sentence)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;[UPDATE 1/20/07] Fixed an off-by-one error when the cursor is on the first character of the sentence by adding &lt;code&gt;(forward-char)&lt;/code&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-2362996385954231085?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/2362996385954231085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=2362996385954231085' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2362996385954231085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2362996385954231085'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/style-guidelines-for-people.html' title='Style Guidelines for People'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-7249924746016111879</id><published>2007-11-25T11:42:00.001-05:00</published><updated>2008-03-24T14:45:29.367-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='LaTeX'/><title type='text'>LaTeX Letters</title><content type='html'>I was trying to write a letter in LaTeX the other day:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;\documentclass{letter}&lt;br /&gt;&lt;br /&gt;\address{Nowheresville}&lt;br /&gt;&lt;br /&gt;\signature{Me}&lt;br /&gt;&lt;br /&gt;\begin{document}&lt;br /&gt;\begin{letter}&lt;br /&gt;&lt;br /&gt;\opening{To Whom It May Concern:}&lt;br /&gt;&lt;br /&gt;Hello, there.&lt;br /&gt;&lt;br /&gt;\closing{Sincerely,}&lt;br /&gt;&lt;br /&gt;\end{letter}&lt;br /&gt;\end{document}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This led to the following two errors, which shed little light on the situation: &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;! LaTeX Error: There's no line here to end.&lt;br /&gt;&lt;br /&gt;See the LaTeX manual or LaTeX Companion for explanation.&lt;br /&gt;Type H &lt;return&gt; for immediate help.&lt;br /&gt; ...&lt;br /&gt;&lt;br /&gt;l.10 \opening{To Whom It May Concern:}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and (on a different example)&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;! Incomplete \iffalse; all text was ignored after line 66.&lt;br /&gt;&lt;inserted text&gt; &lt;br /&gt;                \fi &lt;br /&gt;l.16 \end{letter}&lt;br /&gt;                 &lt;br /&gt;Runaway text?&lt;br /&gt;\@mlabel{}{\unhbox \voidb@x \ignorespaces \global \let &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The problem, as it was gently explained to me, is I had omitted the second mandatory argument of &lt;code&gt;\begin{letter}&lt;/code&gt;, which is the address of the recipient. The following is correct:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;\documentclass{letter}&lt;br /&gt;&lt;br /&gt;\address{Nowheresville}&lt;br /&gt;&lt;br /&gt;\signature{Me}&lt;br /&gt;&lt;br /&gt;\begin{document}&lt;br /&gt;\begin{letter}{Foo Corp.}&lt;br /&gt;&lt;br /&gt;\opening{To Whom It May Concern:}&lt;br /&gt;&lt;br /&gt;Hello, there.&lt;br /&gt;&lt;br /&gt;\closing{Sincerely,}&lt;br /&gt;&lt;br /&gt;\end{letter}&lt;br /&gt;\end{document}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;[UPDATE] I just realized that the reason I got so confused about this is that I was working off a previous business letter that was formatted like:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;\begin{document}&lt;br /&gt;\begin{letter}&lt;br /&gt;{&lt;br /&gt;Foo Corp. \\&lt;br /&gt;... \\&lt;br /&gt;ATTN: Warranty Dept.}&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I'm not sure if I intended it to be the case (probably not), but LaTeX picked up the braces around the address as the argument to &lt;code&gt;letter&lt;/code&gt;. When I used this as the template for a personal letter and deleted the address, all hell broke loose.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-7249924746016111879?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/7249924746016111879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=7249924746016111879' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7249924746016111879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7249924746016111879'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/latex-letters.html' title='LaTeX Letters'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-7960276396789196073</id><published>2007-11-15T09:39:00.000-05:00</published><updated>2007-11-15T09:46:38.418-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Fake project directories in tarballs</title><content type='html'>To make a tarball where all the files are in a subdirectory FOO (as per &lt;a href="http://procrastiblog.blogspot.com/2007/04/unzip-into-subdirectory.html"&gt;best practices&lt;/a&gt;), where FOO doesn't really exist on your disk (e.g., FOO may be PROJECT-vX.Y.Z and the files are in directory PROJECT), just do&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;tar cvf NAME.tar --transform=s,^,FOO/,g FILES&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Note that the argument to &lt;code&gt;transform&lt;/code&gt; in this case is just a &lt;code&gt;sed&lt;/code&gt; command with commas instead of slashes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-7960276396789196073?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/7960276396789196073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=7960276396789196073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7960276396789196073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7960276396789196073'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/fake-project-directories-in-tarballs.html' title='Fake project directories in tarballs'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-771304488601093039</id><published>2007-11-10T18:24:00.000-05:00</published><updated>2007-11-25T13:42:26.980-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Eye Candy</title><content type='html'>The difference between "Desktop Plane" and "Desktop Wall" in the Ubuntu "Visual Effects" options (aka CompizConfig Settings) is that the latter allows windows to overlap a viewport* and the former does not. (Along with this comes a lot of incidental options and visual fillips, like the ability to drag a window entirely from one viewport to another.) Although this does not sound like a big productivity booster, I'm going to give the Wall a chance. &lt;br /&gt;&lt;br /&gt;I'm not going to give the "Desktop Cube" a chance, because it won't let me place viewports above and below, as well as left and right, seemingly out of some wrong-headed sense of pseudo-three-dimensional literalism (although your "cube" can have an arbitrary number of faces, they must be arranged linearly from left to right: Euclidian topologies only).&lt;br /&gt;&lt;br /&gt;* For some reason the "Desktop Plane," "Desktop Wall," and "Desktop Cube" options all use viewports and not workspaces**, so they don't work well with the Gnome Workspace Switcher.&lt;br /&gt;&lt;br /&gt;** For some other reason, Gnome has two distinct ways of implementing virtual desktops (viewports and workspaces) even though theres no discernible advantage to one over the other (except for compatibility with this application or that).&lt;br /&gt;&lt;br /&gt;[UPDATE] Visual Effects lead to intermittent system freezes. Fun! Going back to boring old workspaces.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-771304488601093039?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/771304488601093039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=771304488601093039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/771304488601093039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/771304488601093039'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/eye-candy.html' title='Eye Candy'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-5666508012723314035</id><published>2007-11-06T16:28:00.001-05:00</published><updated>2008-03-12T17:57:03.089-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Updating for Daylight Savings Time on Ubuntu</title><content type='html'>My system clock has been all wiggy since Daylight Savings Time ended (or started?) (it's ended) on Sunday. Believe it or not, it was actually flipping back and forth between correct and one hour ahead  for no apparent reason. I did two things which together seem to have fixed things.&lt;br /&gt;&lt;br /&gt;First, via &lt;a href="http://blog.fasttracksites.com/index.php?p=viewentry&amp;id=21"&gt;Fast Track Sites&lt;/a&gt;, I found that my system timezone information was out of date. The test for this is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% sudo zdump -v /etc/localtime | grep 2007&lt;br /&gt;/etc/localtime Sun Mar 11 07:59:59 2007 UTC = Sun Mar 11 01:59:59 2007 CST isdst=0 gmtoff=-21600&lt;br /&gt;/etc/localtime Sun Mar 11 08:00:00 2007 UTC = Sun Mar 11 03:00:00 2007 CDT isdst=1 gmtoff=-18000&lt;br /&gt;/etc/localtime Sun Nov 4 06:59:59 2007 UTC = Sun Nov 4 01:59:59 2007 CDT isdst=1 gmtoff=-18000&lt;br /&gt;/etc/localtime Sun Nov 4 07:00:00 2007 UTC = Sun Nov 4 01:00:00 2007 CST isdst=0 gmtoff=-21600&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If the output doesn't exactly match the above, you have a problem. Download the latest &lt;code&gt;tzdata2007X.tgz&lt;/code&gt; file (where &lt;code&gt;X&lt;/code&gt; is a lowercase letter) from the &lt;a href="ftp://elsie.nci.nih.gov/pub"&gt;National Cancer Institute&lt;/a&gt; (seriously). For gorey details, see the &lt;a href="http://blog.fasttracksites.com/index.php?p=viewentry&amp;id=21"&gt;Fast Track Sites post&lt;/a&gt; cited above. (I don't think you really have to do the &lt;code&gt;ln&lt;/code&gt; step, which sets your timezone to EST5EDT instead of, e.g., America/New_York. I skipped it.)&lt;br /&gt;&lt;br /&gt;Now your system ought to know the right start/end dates for Daylight Savings Time. But your clock is probably still out of whack.&lt;br /&gt;&lt;br /&gt;Now, via &lt;a href="http://ubuntuforums.org/showthread.php?t=150472"&gt;Ubuntu Forums&lt;/a&gt; and &lt;a href="http://www.stephensykes.com/blog_perm.html?34"&gt;Stephen Sykes&lt;/a&gt;, use &lt;code&gt;ntpdate&lt;/code&gt; to reset the clock. The trick(s) here are: (a) you have to shut down &lt;code&gt;ntpd&lt;/code&gt; first, (b) setting the clock back an hour will convince &lt;code&gt;sudo&lt;/code&gt; that you're trying to do something nefarious ("timestamp too far in the future"), and (c) I had to give &lt;code&gt;ntpdate&lt;/code&gt; the &lt;code&gt;-u&lt;/code&gt; option to get past some unseen firewall.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% sudo /etc/init.d/ntp-server stop&lt;br /&gt;* Stopping NTP server ntpd                                 [ OK ] &lt;br /&gt;% sudo ntpdate-debian -u&lt;br /&gt; 6 Nov 17:00:00 ntpdate[13693]: step time server 66.36.239.104 offset -3598.042737 sec&lt;br /&gt;% sudo /etc/init.d/hwclock.sh restart&lt;br /&gt;sudo: timestamp too far in the future: Nov  6 17:59:56 2007&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Oops. Using the "Adjust Date &amp; Time" applet, manually set the clock one hour forward. Now, run &lt;code&gt;sudo -k&lt;/code&gt;. Now, set the clock back to the correct time (again using "Adjust Date &amp; Time"). Starting over:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;% sudo ntpdate-debian -u&lt;br /&gt; 6 Nov 17:00:00 ntpdate[13693]: step time server 66.36.239.104 offset -3598.042737 sec&lt;br /&gt;% sudo /etc/init.d/hwclock.sh restart&lt;br /&gt; * Saving the system clock&lt;br /&gt;% sudo /etc/init.d/ntp start&lt;br /&gt; * Starting NTP server ntpd                                [ OK ] &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All done. Enjoy.&lt;br /&gt;&lt;br /&gt;[UPDATE 3/12/2008] It looks like this might be a semi-annual ritual: my system pulled the same schizo act when DST started this week. On Gutsy, &lt;code&gt;ntp-server&lt;/code&gt; has become &lt;code&gt;ntp&lt;/code&gt;. It's easier springing forward than falling back, because &lt;code&gt;sudo&lt;/code&gt; just times out when you set the clock forward.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-5666508012723314035?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/5666508012723314035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=5666508012723314035' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5666508012723314035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5666508012723314035'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/11/updating-for-daylight-savings-time-on.html' title='Updating for Daylight Savings Time on Ubuntu'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-3499481824513369552</id><published>2007-07-24T22:44:00.000-04:00</published><updated>2007-07-25T15:13:53.863-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>A Dubious Assertion</title><content type='html'>Being a conscientious software engineer, I try to be good about putting &lt;code&gt;assert&lt;/code&gt; statements in my code. And being a verification guy, I find myself tempted to express fairly deep correctness properties in my assertions. And this fills me with such satisfaction, that I am such a wise and clever programmer, that I should do such things.&lt;br /&gt;&lt;br /&gt;But then I'm trying to optimize some code so that it runs in something like an acceptable amount of time and for some reason I just can't shake this routine out of its stupor... What's going on here?&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Don't add assertions that change the asymptotic complexity of your algorithm.&lt;/em&gt; That's just dumb. (Of course you can always compile your code with assertions turned off, but even in testing the difference between O(n) and O(1) can pinch.)&lt;br /&gt;&lt;br /&gt;And now look at how much more wise and clever and self-satisfied I can be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-3499481824513369552?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/3499481824513369552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=3499481824513369552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3499481824513369552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3499481824513369552'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/07/dubious-assertion.html' title='A Dubious Assertion'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-5759596944310476770</id><published>2007-07-09T12:21:00.000-04:00</published><updated>2007-07-11T13:12:27.837-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'>Changing your PATH in Emacs' compilation mode</title><content type='html'>[UPDATE: This is not really wrong, but not really right either. See below.]&lt;br /&gt;&lt;br /&gt;I was a bit surprised at this problem, but I suppose most people use standard &lt;code&gt;make&lt;/code&gt; or &lt;code&gt;gcc&lt;/code&gt; to build... I want to build my project with a version of &lt;a href="http://omake.metaprl.org"&gt;OMake&lt;/a&gt; that I have compiled and installed in my home directory. I have &lt;code&gt;~/tools/bin&lt;/code&gt; in my &lt;code&gt;PATH&lt;/code&gt;, but for some reason &lt;code&gt;M-x compile&lt;/code&gt; still gives me&lt;br /&gt;&lt;pre&gt;/bin/bash: omake: command not found&lt;/pre&gt;&lt;br /&gt;The trick is that Emacs invokes the compile command in a non-interactive, non-login shell, which means that neither your &lt;code&gt;.bash_profile&lt;/code&gt; nor your &lt;code&gt;.bashrc&lt;/code&gt; (or any variations thereof) are going to get read.* The workaround is to set &lt;code&gt;BASH_ENV&lt;/code&gt; to point to a script file that sets your &lt;code&gt;PATH&lt;/code&gt;&amp;mdash;&lt;code&gt;bash&lt;/code&gt; reads the file pointed-to by &lt;code&gt;BASH_ENV&lt;/code&gt; in non-interactive mode. Here's my solution:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;~/.bash_profile:&lt;br /&gt;  . ~/.bashrc&lt;br /&gt;&lt;br /&gt;~/.bashrc:&lt;br /&gt;  export BASH_ENV=~/.bash_env&lt;br /&gt;  . "$BASH_ENV"&lt;br /&gt;&lt;br /&gt;~/.bash_env:&lt;br /&gt;  export PATH=/home/chris/tools/bin:$PATH&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There's probably a good reason why this is a bad idea, but it works.&lt;br /&gt;&lt;br /&gt;* A quick refresher course: &lt;code&gt;.bash_profile&lt;/code&gt; is for login shells; &lt;code&gt;.bashrc&lt;/code&gt; is for interactive, non-login shells; &lt;code&gt;BASH_ENV&lt;/code&gt; is for non-interactive, non-login shells (which, confusingly, will probably be a sub-process of an interactive and/or login shell, which is why the above example works).&lt;br /&gt;&lt;br /&gt;[UPDATE] The compilation shell being non-interactive and non-login is a red herring. While this is certainly the case, a non-interactive, non-login shell will inherit the environment of it's parent process. So, for instance, if your &lt;code&gt;PATH&lt;/code&gt; is properly set in your shell and you invoke Emacs from the command line, things should be fine.&lt;br /&gt;&lt;br /&gt;What was really causing my problem is that I was invoking Emacs from the &lt;a href="http://developer.gnome.org/arch/gnome/corecomponents/panel/"&gt;Gnome Panel&lt;/a&gt;. The environment that Emacs inherits in this case is Gnome's, not Bash's. How do you change the &lt;code&gt;PATH&lt;/code&gt; in the Gnome environment? Um... Eh... &lt;code&gt;gnome-session-properties&lt;/code&gt;? &lt;code&gt;.gnomerc&lt;/code&gt;?&lt;br /&gt;&lt;br /&gt;The solution I've settled on is to create a &lt;code&gt;.xsession&lt;/code&gt; file as follows,&lt;br /&gt;&lt;pre&gt;~/.xsession:&lt;br /&gt;  #! /usr/bin/bash&lt;br /&gt;&lt;br /&gt;  if [ -f ~/.bash_env ]; then&lt;br /&gt;    . ~/.bash_env&lt;br /&gt;  fi&lt;br /&gt;&lt;br /&gt;  exec gnome-session&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;where &lt;code&gt;.bash_env&lt;/code&gt; is as above.&lt;br /&gt;&lt;br /&gt;NOTE: If you leave off the last line, your X session will end before it begins. The &lt;code&gt;.xsession&lt;/code&gt; script &lt;em&gt;is&lt;/em&gt; the X process: when it ends, the X process ends. Execing &lt;code&gt;gnome-session&lt;/code&gt; replaces the script process with the Gnome session process.&lt;br /&gt;&lt;br /&gt;[UPDATE 2] Of course, another option is to just use &lt;code&gt;setenv&lt;/code&gt; in your &lt;code&gt;.emacs&lt;/code&gt; file. TMTOWTDI, in Emacs and Perl alike.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-5759596944310476770?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/5759596944310476770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=5759596944310476770' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5759596944310476770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/5759596944310476770'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/07/changing-your-path-in-emacs-compilation.html' title='Changing your PATH in Emacs&apos; compilation mode'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-2077068396866704576</id><published>2007-07-03T13:51:00.000-04:00</published><updated>2007-07-03T13:58:41.184-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Academia'/><title type='text'>A very witty observation that could render my education worthless</title><content type='html'>"There is no silver bullet&amp;mdash;but there are no werewolves."&lt;br /&gt;From &lt;em&gt;&lt;a href="http://www.mcs.vuw.ac.nz/comp/Publications/CS-TR-03-11.abs.html"&gt;No Name: Just Notes on Software Reuse&lt;/a&gt;&lt;/em&gt; by Robert Biddle, Angela Martin, and James Noble. In response to &lt;a href="http://info.computer.org/portal/site/computer/menuitem.eb7d70008ce52e4b0ef1bd108bcd45f3/index.jsp?&amp;pName=computer_level1&amp;path=computer/homepage/misc/Brooks&amp;file=index.xml&amp;xsl=article.xsl&amp;;jsessionid=GKNNSCqppTJ1SJMKyGwvwPb2TldjTsMNKRYvZVllhhKYjhjhGyRp!-135557833"&gt;Frederick Brooks&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-2077068396866704576?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/2077068396866704576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=2077068396866704576' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2077068396866704576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2077068396866704576'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/07/very-witty-observation-that-could.html' title='A very witty observation that could render my education worthless'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-3978794742041252610</id><published>2007-06-29T16:22:00.000-04:00</published><updated>2007-06-29T16:27:29.978-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='Emacs'/><title type='text'>Browsing gzipped tarballs in Emacs</title><content type='html'>Somehow the presence of a hundred billion .tar.gz files on the Internet prevents Google from giving me this very simple tip. Just opening a .tar file in Emacs will let you browse it as if it were a directory. If the file is gzipped, you need to enable &lt;code&gt;auto-compression-mode&lt;/code&gt;: either do &lt;code&gt;M-x auto-compression-mode&lt;/code&gt; or &lt;code&gt;(setq auto-compression-mode t)&lt;/code&gt; (e.g., in your &lt;code&gt;.emacs&lt;/code&gt; file).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-3978794742041252610?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/3978794742041252610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=3978794742041252610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3978794742041252610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3978794742041252610'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/06/browsing-gzipped-tarballs-in-emacs.html' title='Browsing gzipped tarballs in Emacs'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-2206653911845135053</id><published>2007-06-29T11:47:00.000-04:00</published><updated>2007-06-29T11:51:35.680-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Google Desktop for Linux!</title><content type='html'>&lt;a href="http://googledesktop.blogspot.com/2007/06/desktop-for-linux.html"&gt;Hooray!&lt;/a&gt; Beagle search for Gnome? &lt;a href="http://beagle-project.org/Main_Page"&gt;Boo!&lt;/a&gt; Go away!&lt;br /&gt;&lt;br /&gt;Google, if I give you all my data, do you promise to be gentle?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-2206653911845135053?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/2206653911845135053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=2206653911845135053' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2206653911845135053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/2206653911845135053'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/06/google-desktop-for-linux.html' title='Google Desktop for Linux!'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-7595125548113828430</id><published>2007-05-30T12:44:00.000-04:00</published><updated>2007-05-30T13:00:23.377-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><title type='text'>Multi-line Comments in Make</title><content type='html'>You see, this is why I hate Make. Did you know that a backslash at the end of a comment line extends the comment to the next line? For example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# This is a comment \&lt;br /&gt;and this is still a comment&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This is all very nice and logical&amp;mdash;a trailing backslash means the same thing no matter where it appears in a file&amp;mdash;but it has all the niceness and logic just exactly backwards. The behavior of (line-based) comments in every other programming environment I know of is: a comment character (in this case '&lt;code&gt;#&lt;/code&gt;') introduces a comment that is terminated by the end of the line; if a line is not preceded by a comment character, it is not a comment.&lt;br /&gt;&lt;br /&gt;This may seem harmless. But consider the following:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;FILES = \&lt;br /&gt;    file1 \&lt;br /&gt;    file2 \&lt;br /&gt;    file3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now suppose we decide to temporarily remove &lt;code&gt;file1&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;FILES= \&lt;br /&gt;#    file1 \&lt;br /&gt;    file2 \&lt;br /&gt;    file3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Does &lt;code&gt;FILES&lt;/code&gt; equal &lt;code&gt;"file2 file3"&lt;/code&gt;? No! &lt;code&gt;FILES&lt;/code&gt; is empty. And that's if you're lucky and you didn't get some weird syntax error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-7595125548113828430?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/7595125548113828430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=7595125548113828430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7595125548113828430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/7595125548113828430'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/05/multi-line-comments-in-make.html' title='Multi-line Comments in Make'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10051549.post-3784565111464354931</id><published>2007-05-23T15:50:00.000-04:00</published><updated>2007-05-23T15:57:33.301-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tech'/><category scheme='http://www.blogger.com/atom/ns#' term='OCaml'/><title type='text'>The Annals of OCaml Compiler Errors</title><content type='html'>&lt;code&gt;X is not a compilation unit description.&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;X&lt;/code&gt; is not a file type that the compiler expected to receive as input. For example, &lt;code&gt;X&lt;/code&gt; is a &lt;code&gt;.cma&lt;/code&gt; file and you'r running the compiler with the &lt;code&gt;-a&lt;/code&gt; flag&amp;mdash;&lt;code&gt;.cma&lt;/code&gt; files are only expected on the final link; linking a library into a library doesn't make any sense.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10051549-3784565111464354931?l=procrastiblog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://procrastiblog.blogspot.com/feeds/3784565111464354931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=10051549&amp;postID=3784565111464354931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3784565111464354931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10051549/posts/default/3784565111464354931'/><link rel='alternate' type='text/html' href='http://procrastiblog.blogspot.com/2007/05/annals-of-ocaml-compiler-errors.html' title='The Annals of OCaml Compiler Errors'/><author><name>Chris</name><uri>http://www.blogger.com/profile/09497993096630160212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm1.static.flickr.com/73/159295014_90ad74e192_t.jpg'/></author><thr:total>0</thr:total></entry></feed>
