<?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-1757282266690627073</id><updated>2012-01-20T10:17:57.673-08:00</updated><category term='DRM'/><category term='Python'/><category term='anime'/><category term='AirPlay'/><category term='iPhone'/><category term='django programming'/><category term='javascript'/><category term='bioinformatics'/><category term='mochikit'/><category term='crypto'/><category term='Linux'/><category term='c'/><title type='text'>applied procrastination</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>81</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5669303171902376866</id><published>2012-01-20T10:17:00.000-08:00</published><updated>2012-01-20T10:17:57.769-08:00</updated><title type='text'>hdiutil and OS X data recovery</title><content type='html'>Your hard drive fails, so the first thing you do is grab &lt;tt&gt;dd&lt;/tt&gt; and pull a byte-by-byte copy of the drive's contents:&lt;br /&gt;&lt;pre&gt;   dd if=/dev/bad_drive of=bad_drive.img conv=noerror,sync&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Problem is, if the drive was from a Mac and you want to use a recovery tool like &lt;i&gt;Data Rescue&lt;/i&gt; or &lt;i&gt;Drive Warrior&lt;/i&gt;, you'll probably need to attach your drive image as a loopback device, and double-clicking the file to mount it doesn't work when the filesystem is fragged.&lt;br /&gt;&lt;br /&gt;Enter &lt;a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html"&gt;hdiutil&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;   hdiutil attach -nomount bad_drive.img&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5669303171902376866?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5669303171902376866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5669303171902376866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5669303171902376866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5669303171902376866'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2012/01/hdiutil-and-os-x-data-recovery.html' title='hdiutil and OS X data recovery'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-582499081048704157</id><published>2011-12-21T14:51:00.000-08:00</published><updated>2011-12-21T14:52:31.681-08:00</updated><title type='text'>Resuming truncated 'cp's</title><content type='html'>I'm sure this isn't too hard to do w/ &lt;tt&gt;dd&lt;/tt&gt;, but let's say you've got some slow network disk mounted under &lt;tt&gt;/mnt/crappy_SMB_share&lt;/tt&gt; and were 100 gigs into a 101G file when the Windows server went down, and now you want to finish off that last gig.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp;&amp;nbsp;cd /mnt/crappy_SMB_share&lt;br /&gt;&amp;nbsp;&amp;nbsp;curl -C - -O file:///original/file/location&lt;/pre&gt;&lt;br /&gt;from &lt;a href="http://www.linuxquestions.org/questions/linux-newbie-8/how-to-resume-failed-copy-cp-command-where-it-left-off-183092/"&gt;here.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-582499081048704157?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/582499081048704157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=582499081048704157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/582499081048704157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/582499081048704157'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/12/resuming-truncated-cps.html' title='Resuming truncated &apos;cp&apos;s'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5886430854773745822</id><published>2011-09-27T21:52:00.000-07:00</published><updated>2011-09-27T21:59:12.781-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AirPlay'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>AirPlay: streaming from iTunes and your iPhone to a Linux box</title><content type='html'>So I've got a Debian machine as a WiFi access-point / file-server, and I decided to plug some speakers in and stream music from my iPhone.&lt;br /&gt;&lt;br /&gt;I tried Erica Sadun's &lt;a href="http://ericasadun.com/category/airplayer/"&gt;AirPlayer&lt;/a&gt;, a Python script that, as it turns out, implements version 2 of the AirPlay protocol -- the one that supports video and images.&amp;nbsp; What it DOESN'T support is sound, at least not without the appropriate crypto key.&lt;br /&gt;&lt;br /&gt;Which led me to &lt;a href="https://github.com/albertz/shairport#readme"&gt;Shairport&lt;/a&gt;, vessel of the secret sound-support sauce.&amp;nbsp; Shairport only implements AirPlay v1, which can't handle images of any kind.&amp;nbsp; Which means that the video portion of YouTube can be streamed from my iPhone to AirPlayer, and the audio portion to Shairport, but I have to choose one.&amp;nbsp; Huzaah.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-V49ATb9ZUt4/ToKpkvZ6OrI/AAAAAAAAA3s/QYfcpsofGKk/s1600/airplay.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-V49ATb9ZUt4/ToKpkvZ6OrI/AAAAAAAAA3s/QYfcpsofGKk/s1600/airplay.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This worked well enough for iTunes, but iOS, ie, my iPhone, didn't work until I &lt;a href="https://github.com/albertz/shairport/issues/53"&gt;disabled IPv6&lt;/a&gt; on my Linux box.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5886430854773745822?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5886430854773745822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5886430854773745822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5886430854773745822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5886430854773745822'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/09/airplay-streaming-from-itunes-and-your.html' title='AirPlay: streaming from iTunes and your iPhone to a Linux box'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-V49ATb9ZUt4/ToKpkvZ6OrI/AAAAAAAAA3s/QYfcpsofGKk/s72-c/airplay.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1024227278071914333</id><published>2011-06-03T21:24:00.000-07:00</published><updated>2011-06-03T21:24:45.755-07:00</updated><title type='text'>Yet more Crescent City</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-38VTtwJ5A-0/Temytbf-COI/AAAAAAAAA1w/oGvef6_B9sY/s1600/IMG_2891.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://1.bp.blogspot.com/-38VTtwJ5A-0/Temytbf-COI/AAAAAAAAA1w/oGvef6_B9sY/s640/IMG_2891.jpg" width="552" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Those giant game-of-jacks pieces are called &lt;a href="http://en.wikipedia.org/wiki/Dolos"&gt;dolos&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1024227278071914333?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1024227278071914333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1024227278071914333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1024227278071914333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1024227278071914333'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/06/yet-more-crescent-city.html' title='Yet more Crescent City'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-38VTtwJ5A-0/Temytbf-COI/AAAAAAAAA1w/oGvef6_B9sY/s72-c/IMG_2891.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4245800570492522125</id><published>2011-06-02T19:53:00.001-07:00</published><updated>2011-06-02T19:53:55.194-07:00</updated><title type='text'>Hello from Crescent City, CA</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-4RL6FmvdrKU/TehMqjadSxI/AAAAAAAAA1o/hhVP0ztWQYM/s1600/IMG_2944.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-4RL6FmvdrKU/TehMqjadSxI/AAAAAAAAA1o/hhVP0ztWQYM/s400/IMG_2944.jpg" width="359" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4245800570492522125?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4245800570492522125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4245800570492522125' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4245800570492522125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4245800570492522125'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/06/hello-from-crescent-city-ca.html' title='Hello from Crescent City, CA'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-4RL6FmvdrKU/TehMqjadSxI/AAAAAAAAA1o/hhVP0ztWQYM/s72-c/IMG_2944.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5298198768332202796</id><published>2011-05-04T15:27:00.000-07:00</published><updated>2011-05-04T15:27:07.329-07:00</updated><title type='text'>Another in a series of brief tests of Wolfram Alpha</title><content type='html'>If you've spent the last couple of years behind a few inches of lead, protecting you from the nerd-radiation of the &lt;a href="http://www.wolframalpha.com/"&gt;Wolfram|alpha&lt;/a&gt; launch,well, you should read up on it.&amp;nbsp; It claims to be, not a search engine, but something smarter, a compendium of systematic data (temperature records, physical constants, business data, you name it), and the algorithms necessary to process that info.&lt;br /&gt;&lt;br /&gt;I've been disappointed thus far.&amp;nbsp; I tried another reasonable-seeming query today: &lt;a href="http://www.wolframalpha.com/input/?i=kinetic+energy+of+a+ring+with+mass+1+kg+and+radius+1m+rotating+at+100+rpm"&gt;"kinetic energy of a ring with mass 1 kg and radius 1m rotating at 100 rpm"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(If you're wondering, I was hanging out by a centrifuge, which just begged the question, ya know?)&lt;br /&gt;&lt;br /&gt;And what did Alpha have to say? "and (English word)"&lt;br /&gt;&lt;br /&gt;It recognized the word "and" as English.  That's it.&lt;br /&gt;&lt;br /&gt;The answer didn't show up until the 8th hit in &lt;a href="http://www.google.com/search?q=kinetic+energy+of+a+ring+with+mass+1+kg+and+radius+1m+rotating+at+100+rpm"&gt;google's results&lt;/a&gt;, but &lt;a href="http://www.absoluteastronomy.com/topics/Flywheel"&gt;there it was&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; E = 0.5 * I * ω&lt;br /&gt;&amp;nbsp;&amp;nbsp; I = m r&lt;sup&gt;2&lt;/sup&gt;&lt;br /&gt;&lt;br /&gt;etc etc.&amp;nbsp; Granted, I still have to do the math, but at least it's something.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5298198768332202796?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5298198768332202796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5298198768332202796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5298198768332202796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5298198768332202796'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/05/another-in-series-of-brief-tests-of.html' title='Another in a series of brief tests of Wolfram Alpha'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3293967945277051759</id><published>2011-01-28T09:26:00.000-08:00</published><updated>2011-01-28T09:26:05.964-08:00</updated><title type='text'>The lively faces of poverty</title><content type='html'>At the risk of &lt;a href="http://www.nypress.com/article-19271-flat-n-all-that.html"&gt;sounding like Tom Friedman&lt;/a&gt;, the most striking thing about Saigon was the bustling, crowded buzz of the place -- the way every square inch of public space was somehow occupied by a person, streets completely filled with Vespas and every sidewalk a public market.&lt;br /&gt;&lt;br /&gt;The average Vietnamese &lt;a href="http://en.wikipedia.org/wiki/List_of_countries_by_GDP_%28PPP%29_per_capita"&gt;lives on about $3,100 per annum&lt;/a&gt;, less than half what her counterpart in China makes, so we're talking about a very poor country.&amp;nbsp; But that poverty doesn't manifest itself as obvious misery--not where we visited, at least.&amp;nbsp; Instead, you see this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_ai4qK69BEF0/TUL6IhuvPjI/AAAAAAAAA0U/JGceRsconnI/s1600/key_cutter.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_ai4qK69BEF0/TUL6IhuvPjI/AAAAAAAAA0U/JGceRsconnI/s400/key_cutter.jpg" width="375" /&gt;&lt;/a&gt;&lt;/div&gt;This Hanoi street is lined by key-cutting carts, as could be found on every other street corner in Saigon.&amp;nbsp; These are industrious, hard-working people, but in the US, copying keys must occupy 30 minutes out of the day of a Home Depot employee; the rest of the time, he's off stocking shelves while the machine rests in the corner.&amp;nbsp; American labor is simply too expensive to waste waiting for customers; instead, each worker has a whole stock of capital goods (the key-cutting machine, a forklift, etc) at his command, keeping him occupied each and every minute.&lt;br /&gt;&lt;br /&gt;In Saigon, you can find any food or service you need, right there on the sidewalk, because in Saigon, you can make a living cutting keys for one blocks-worth of people.&amp;nbsp; It's actually kinda nice if you don't mind crowds ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3293967945277051759?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3293967945277051759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3293967945277051759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3293967945277051759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3293967945277051759'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2011/01/lively-faces-of-poverty.html' title='The lively faces of poverty'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/TUL6IhuvPjI/AAAAAAAAA0U/JGceRsconnI/s72-c/key_cutter.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1882104331188717304</id><published>2010-12-30T23:50:00.000-08:00</published><updated>2010-12-30T23:52:21.675-08:00</updated><title type='text'>The future is already here – it's just not very evenly distributed.  (An open letter to AT&amp;T)</title><content type='html'>Dear AT&amp;amp;T,&lt;br /&gt;&lt;br /&gt;Attached you'll find a picture my wife and I took on a boat traveling through Vietnam's Mekong Delta.&amp;nbsp; Our abilities with our new camera are admittedly lacking, so it's hard to make out the orange life vests lining the boat's ceiling and green jungle in the background, but then, this is my blog, not a court of law.&amp;nbsp; The real crux of this photo is the 5 bars you see on my iPhone: I had good reception throughout the Delta -- much, much better than I get in America's second most density populated big city*.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_ai4qK69BEF0/TR2J056jJCI/AAAAAAAAAzA/yehf3NHRThY/s1600/IMG_1602.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="255" src="http://4.bp.blogspot.com/_ai4qK69BEF0/TR2J056jJCI/AAAAAAAAAzA/yehf3NHRThY/s400/IMG_1602.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;AT&amp;amp;T, I've loved my iPhone these past 2 years, but long for a phone call that doesn't end mid-sentence, and will be thrilled to move to a network that can compete with the 3rd world the moment my contract expires.&lt;br /&gt;&amp;nbsp; -- kieran&lt;br /&gt;&lt;br /&gt;* - These kinds of comparisons hinge on the definition of terms like "big city," of course, but scan through &lt;a href="http://en.wikipedia.org/wiki/Demographics_of_the_United_States#Population_density"&gt;Wikipedia's density stats&lt;/a&gt; and look for a city you recognize that isn't NYC.&amp;nbsp; And if you haven't tried AT&amp;amp;T in San Francisco, don't bother.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1882104331188717304?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1882104331188717304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1882104331188717304' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1882104331188717304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1882104331188717304'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/12/future-is-already-here-its-just-not.html' title='The future is already here – it&apos;s just not very evenly distributed.  (An open letter to AT&amp;T)'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/TR2J056jJCI/AAAAAAAAAzA/yehf3NHRThY/s72-c/IMG_1602.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4073882819754674447</id><published>2010-10-14T06:07:00.000-07:00</published><updated>2010-10-14T06:07:23.859-07:00</updated><title type='text'>Konichiwa</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_ai4qK69BEF0/TLb_uruT8YI/AAAAAAAAAy4/HngJL1oNOq0/s1600/rhino.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/_ai4qK69BEF0/TLb_uruT8YI/AAAAAAAAAy4/HngJL1oNOq0/s320/rhino.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Hello from Osaka.  God knows what's going on with that very uncomfortable rhino up there, but one thing I'll say for Japan: it's dense.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_ai4qK69BEF0/TLb_tz4KP4I/AAAAAAAAAy0/tp2eBAyr3K8/s1600/countryside.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://1.bp.blogspot.com/_ai4qK69BEF0/TLb_tz4KP4I/AAAAAAAAAy0/tp2eBAyr3K8/s320/countryside.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;That shot out the window of a train is exurban, far-out Osaka.  No sprawl in sight: dense, multi-story housing and ... woods.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4073882819754674447?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4073882819754674447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4073882819754674447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4073882819754674447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4073882819754674447'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/10/konichiwa.html' title='Konichiwa'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/TLb_uruT8YI/AAAAAAAAAy4/HngJL1oNOq0/s72-c/rhino.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3060868519934454437</id><published>2010-08-01T15:40:00.000-07:00</published><updated>2010-08-01T15:40:02.597-07:00</updated><title type='text'>OpenOffice makes me appreciate Firefox' search function.</title><content type='html'>The search dialog that appears when you hit &lt;tt&gt;Command-&lt;/tt&gt; [or &lt;tt&gt;Control-&lt;/tt&gt;, depending upon OS] &lt;tt&gt;F&lt;/tt&gt; is a bit of UI that's improved greatly but subtly in Firefox: instead of a separate dialog appearing, an embedded interface shows up at the bottom of the page.&lt;br /&gt;&lt;br /&gt;This means the dialog location is consistent and predictable, but more importantly, it means that I can always search by hitting &lt;tt&gt;Command-F&lt;/tt&gt;.&amp;nbsp; Under OpenOffice, &lt;tt&gt;Command-F&lt;/tt&gt; toggles between opening and closing the search dialog; if I was searching for something earlier, I've now CLOSED the dialog rather than opening it.&amp;nbsp; Very annoying.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3060868519934454437?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3060868519934454437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3060868519934454437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3060868519934454437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3060868519934454437'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/08/openoffice-makes-me-appreciate-firefox.html' title='OpenOffice makes me appreciate Firefox&apos; search function.'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3050866318868028974</id><published>2010-07-22T10:18:00.000-07:00</published><updated>2010-07-22T10:18:04.365-07:00</updated><title type='text'>Quick link: shameless self-promotion edition</title><content type='html'>In the interest of raising the site's Google Pagerank, and as a plug for my &lt;a href="http://brensscrapbook.blogspot.com/"&gt;wife&lt;/a&gt;, who did the site design, here's a link to my sister-in-law's optometry site, &lt;a href="http://lakevisionoptometry.net/"&gt;Lake Vision Optometry&lt;/a&gt;, located in the verdant, exotic lands of Riverside, CA.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3050866318868028974?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3050866318868028974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3050866318868028974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3050866318868028974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3050866318868028974'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/07/quick-link-shameless-self-promotion.html' title='Quick link: shameless self-promotion edition'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5943448450736916299</id><published>2010-07-21T16:46:00.000-07:00</published><updated>2010-07-21T16:46:02.083-07:00</updated><title type='text'>The Eee, Ubuntu, and Songbird</title><content type='html'>After years reading about super-cheap Netbooks, I finally picked one up for a friend, though ASUS' Eee PC 1201t skates pretty close to the line separating Netbooks from Notebooks with its 1.6ghz AMD CPU, 12" LED LCD screen and 250G drive.&amp;nbsp; All for $380!&lt;br /&gt;&lt;br /&gt;Don't try to get an OS on the beast, though.&amp;nbsp; That'll be tough.&amp;nbsp; After determining that &lt;a href="http://meego.com/"&gt;MeeGo&lt;/a&gt; doesn't support the Eee's Radeon GPU and finding &lt;a href="http://www.geteasypeasy.com/"&gt;EasyPeasy&lt;/a&gt; kinda clunky, I decided to put Ubuntu 10.04 on it.  Unfortunately, Canonical has mostly dropped support for USB installers, and this little machine has no DVD drive, leaving me to pull off bits of cheap Taiwanese plastic until I hit hard-disk.&lt;br /&gt;&lt;br /&gt;Now that Ubuntu's loaded, however, I couldn't be happier.&amp;nbsp; All the hardware -- Wifi card, webcam, everything -- was supported without any tinkering, and Ubuntu looks great.&lt;br /&gt;&lt;br /&gt;I do miss iTunes, though.&amp;nbsp; Songbird (installed via &lt;a href="http://skyzim.com/songbird-1-4-3-installer/"&gt;Skyzim's  deb&lt;/a&gt;) is a gorgeous replacement, so long as you don't want to listen to any w4a files from the iTunes store -- which I do.  &lt;a href="http://getsatisfaction.com/songbird/topics/wma_and_m4a_support_in_ubuntu_linux"&gt;This thread&lt;/a&gt; explains the fix, though it's tough for the command-line-phobic.  After installing the various gstreamer libraries, you'll want to open your favorite editor and add one line to &lt;tt&gt;/usr/bin/songbird&lt;/tt&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;export SB_GST_NO_SYSTEM=1&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5943448450736916299?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5943448450736916299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5943448450736916299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5943448450736916299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5943448450736916299'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/07/eee-ubuntu-and-songbird.html' title='The Eee, Ubuntu, and Songbird'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4095921794003561617</id><published>2010-07-01T09:42:00.000-07:00</published><updated>2010-07-01T09:42:59.385-07:00</updated><title type='text'>Quick links: succinct non-English words</title><content type='html'>Care of &lt;a href="http://reddit.com/"&gt;reddit&lt;/a&gt;, &lt;a href="http://betterthanenglish.com/"&gt;a site&lt;/a&gt; devoted to non-English words that don't have a good counterpart.  &lt;a href="http://en.wikipedia.org/wiki/Schadenfreude"&gt;Shadenfreude&lt;/a&gt; hasn't appear yet (perhaps it's officially English now?), but  &lt;a href="http://betterthanenglish.com/drachenfutter-german/"&gt;drachenfutter&lt;/a&gt; has:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Literally translated as dragon’s food.&lt;br /&gt;&lt;br /&gt;Drachenfutter are gifts that a husband brings to his wife after pissing her off. It is usually an attempt to avoid her wrath by giving her chocolate, flowers or other small gifts.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4095921794003561617?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4095921794003561617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4095921794003561617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4095921794003561617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4095921794003561617'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/07/quick-links-succinct-non-english-words.html' title='Quick links: succinct non-English words'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-6579730402535770441</id><published>2010-06-11T16:47:00.000-07:00</published><updated>2010-06-11T16:47:47.528-07:00</updated><title type='text'>On leaking memory like a sieve</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_ai4qK69BEF0/TBLJn9EROWI/AAAAAAAAAp0/qQOI_8n_T4E/s1600/memory.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="326" src="http://1.bp.blogspot.com/_ai4qK69BEF0/TBLJn9EROWI/AAAAAAAAAp0/qQOI_8n_T4E/s400/memory.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I tend to leave browser tabs open for weeks on end, and if it's not entirely clear from the&amp;nbsp;gratuitous&amp;nbsp;screen-grab above, those 19 Google Chrome processes each consume anywhere from 16 to 108M of memory, for a grand total of 577M.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;And here I thought Firefox was bad about memory management.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-6579730402535770441?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/6579730402535770441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=6579730402535770441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6579730402535770441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6579730402535770441'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/06/on-leaking-memory-like-sieve.html' title='On leaking memory like a sieve'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ai4qK69BEF0/TBLJn9EROWI/AAAAAAAAAp0/qQOI_8n_T4E/s72-c/memory.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-844550828854299345</id><published>2010-06-09T11:40:00.000-07:00</published><updated>2010-06-09T11:41:02.405-07:00</updated><title type='text'>Filed under "I wish I'd thought of that"</title><content type='html'>&lt;img height="122" src="http://www.pnas.org/content/107/20/9186/F1.large.jpg" width="400" /&gt;&lt;br /&gt;&lt;br /&gt;From "&lt;a href="http://www.pnas.org/content/107/20/9186.full?sid=80592eec-af79-4986-b0f2-0c94a5acf80f"&gt;Comparing genomes to computer operating systems in terms of the topology and evolution of their regulatory control networks&lt;/a&gt;"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-844550828854299345?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/844550828854299345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=844550828854299345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/844550828854299345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/844550828854299345'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/06/filed-under-i-wish-id-thought-of-that.html' title='Filed under &quot;I wish I&apos;d thought of that&quot;'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8194923279094579031</id><published>2010-06-01T10:49:00.000-07:00</published><updated>2010-06-01T10:49:13.319-07:00</updated><title type='text'>Faster than a speeding mushroom</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_ai4qK69BEF0/TAVHc2muhEI/AAAAAAAAAo4/ia9nkN4MHww/s1600/stopmotion.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" src="http://1.bp.blogspot.com/_ai4qK69BEF0/TAVHc2muhEI/AAAAAAAAAo4/ia9nkN4MHww/s640/stopmotion.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This growth occurred over the course of two days. Moving clockwise from the top left, pictures were taken at: 7pm on Wednesday, 8 am Thursday morning, 11pm Thursday night, and finally 7pm Friday night.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8194923279094579031?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8194923279094579031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8194923279094579031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8194923279094579031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8194923279094579031'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/06/faster-than-speeding-mushroom.html' title='Faster than a speeding mushroom'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ai4qK69BEF0/TAVHc2muhEI/AAAAAAAAAo4/ia9nkN4MHww/s72-c/stopmotion.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7620818752039235200</id><published>2010-05-26T14:49:00.000-07:00</published><updated>2010-05-26T14:50:14.129-07:00</updated><title type='text'>Accidental Mycology</title><content type='html'>This houseplant has been looking unhealthy for a while, but I didn't know it was this bad:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_ai4qK69BEF0/S_1MEwJKilI/AAAAAAAAAgs/62RNMRzB5yw/s1600/mushrooms.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_ai4qK69BEF0/S_1MEwJKilI/AAAAAAAAAgs/62RNMRzB5yw/s320/mushrooms.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;I'm lame enough to post update pictures, so my non-existant readers can look forward to watching these mushrooms grow in near real-time. (PS: Bren should get credit for this one; she noticed the growth and took the picture)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7620818752039235200?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7620818752039235200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7620818752039235200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7620818752039235200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7620818752039235200'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/05/accidental-mycology.html' title='Accidental Mycology'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ai4qK69BEF0/S_1MEwJKilI/AAAAAAAAAgs/62RNMRzB5yw/s72-c/mushrooms.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8731275389400134617</id><published>2010-05-13T08:56:00.000-07:00</published><updated>2010-05-13T08:56:31.143-07:00</updated><title type='text'>Quick link: Knoppix on a USB jump-drive</title><content type='html'>Everyone's &lt;a href="http://www.knopper.net/"&gt;favorite bootable Linux CD&lt;/a&gt; can be written to a USB simply by running the &lt;tt&gt;flash-knoppix&lt;/tt&gt; command:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.knopper.net/knoppix/knoppix62-en.html"&gt;http://www.knopper.net/knoppix/knoppix62-en.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It worked on an off-brand USB stick, but my SanDisk Cruzer refuses to play along.  SanDisk implements their encryption via some weird juju that makes their USB drives very uncooperative; I wouldn't recommend them.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8731275389400134617?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8731275389400134617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8731275389400134617' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8731275389400134617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8731275389400134617'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/05/quick-link-knoppix-on-usb-jump-drive.html' title='Quick link: Knoppix on a USB jump-drive'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4695611708664043129</id><published>2010-05-06T16:27:00.000-07:00</published><updated>2010-05-06T16:28:41.056-07:00</updated><title type='text'>Banksy?</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_ai4qK69BEF0/S-NPPj1QMMI/AAAAAAAAAgI/X92AL0AnVqI/s1600/banksy.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="http://4.bp.blogspot.com/_ai4qK69BEF0/S-NPPj1QMMI/AAAAAAAAAgI/X92AL0AnVqI/s640/banksy.jpg" width="480" /&gt;&lt;/a&gt;&lt;/div&gt;Bren with a &lt;a href="http://uptownalmanac.com/2010/04/third-banksy-found-its-real-time"&gt;potential Banksy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;(And it seems that blogger strips EXIF tags from uploaded files.&amp;nbsp; No fun!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4695611708664043129?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4695611708664043129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4695611708664043129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4695611708664043129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4695611708664043129'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/05/banksy.html' title='Banksy?'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/S-NPPj1QMMI/AAAAAAAAAgI/X92AL0AnVqI/s72-c/banksy.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8755767504975243713</id><published>2010-05-05T10:12:00.000-07:00</published><updated>2010-05-05T10:12:44.335-07:00</updated><title type='text'>Python debugging quickie</title><content type='html'>I've gotten into the habit of using &lt;tt&gt;pdb&lt;/tt&gt; to interactively debug python code.  I'll plug &lt;tt&gt;import pdb; pdb.set_trace()&lt;/tt&gt; into the middle of an uncooperative function in order to examine machine state as the code runs.&amp;nbsp; (Note that I don't need to full capabilities of a debugger here; I'm not stepping through the code line-by-line.)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ipython.scipy.org/moin/"&gt;iPython&lt;/a&gt; is a much better choice, as &lt;a href="http://mail.scipy.org/pipermail/ipython-user/2010-January/006766.html"&gt;this posting lays out&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;import IPython.Shell; IPython.Shell.IPShellEmbed(argv=[])()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's all you need to drop out of your function and into an iPython shell.  When you're done twisting knobs, &lt;tt&gt;ctrl-D&lt;/tt&gt; will exit iPython and return to your function.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8755767504975243713?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8755767504975243713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8755767504975243713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8755767504975243713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8755767504975243713'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/05/python-debugging-quickie.html' title='Python debugging quickie'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-6058871055798547030</id><published>2010-05-03T10:31:00.000-07:00</published><updated>2010-05-06T12:27:44.455-07:00</updated><title type='text'>Inchoate musing: what does it mean to own a device?</title><content type='html'>There's &lt;a href="http://www.engadget.com/2010/05/03/apple-to-face-antitrust-inquiry-over-iphone-coding-restrictions/"&gt;talk&lt;/a&gt; that the DoJ is looking into antitrust action against Apple for their &lt;a href="http://www.appleinsider.com/articles/10/04/08/apples_iphone_4_sdk_license_bans_flash_java_mono_apps.html"&gt;recent decree&lt;/a&gt; that iPhone / iPad developers only use Apple-approved tools, ie, C/C++/Objective-C under Xcode.&lt;br /&gt;&lt;br /&gt;I don't really know how antitrust law works, but it's not clear to me that Apple's move violates it.  Microsoft was only prosecuted for bundling IE because they already had a monopoly on desktop OS's; it would be hard to argue that Apple has a smart-phone monopoly.&lt;br /&gt;&lt;br /&gt;But I still think Apple's wrong, and government intervention is probably right.&lt;br /&gt;&lt;br /&gt;In my mind, this falls under the broader problem of technology companies prescribing some narrow range of approved uses for the products we buy.  A &lt;a href="http://www.osnews.com/story/23236/Why_Our_Civilization_s_Video_Art_and_Culture_is_Threatened_by_the_MPEG-LA"&gt;pernicious example&lt;/a&gt;&amp;nbsp;is the license shipping with every camera that records video as MPEG or h264, which forbids making any money off any video you record with a consumer-grade camera, because that would make your work "professional."  So if you've ever uploaded a video to YouTube, you probably violated your license.&lt;br /&gt;&lt;br /&gt;I think I'd like to see something like a Gadget Owner's Bill of Rights: if I buy it, I can use it as I see fit. The vendor can eschew support for altered devices, of course, but I can't be legally prevented from modifying the device, and third parties can't be prevented from helping me. &amp;nbsp;(And let's pass laws to keep the 'Net neutral, while we're at it!)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Only moderately tangential update&lt;/b&gt;:&amp;nbsp; &lt;a href="http://reddit.com/"&gt;Reddit&lt;/a&gt; links to another great example of the kind of legal machinations that enable device manufacturers to claim excessive control over what you do w/ your device: a &lt;a href="http://www.flickr.com/photos/winterj/4501585188/"&gt;92 page Terms of Service&lt;/a&gt; agreement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-6058871055798547030?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/6058871055798547030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=6058871055798547030' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6058871055798547030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6058871055798547030'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/05/inchoate-musing-what-does-it-mean-to.html' title='Inchoate musing: what does it mean to own a device?'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2341392569360024554</id><published>2010-03-17T14:33:00.000-07:00</published><updated>2010-03-17T14:33:30.397-07:00</updated><title type='text'>More Python weirdness</title><content type='html'>You can almost use Python as a functional language, but ... you run into trouble. &amp;nbsp;The following code, discovered by Nithin Reddy, will raise an exception:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;funs = [lambda i: i + j for j in [1,2,3,4,5]]&lt;br /&gt;del j&lt;br /&gt;funs[0](1)&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;The issue is that lambda, which executes in the context of the lambda call rather than the lambda creation. Using a proper &lt;tt&gt;def&lt;/tt&gt; won't work either -- the following code fails in precisely the same way:&lt;tt&gt;&lt;br /&gt;funs = []&lt;br /&gt;for j in [1,2,3,4,5]:&lt;br /&gt;&amp;nbsp;&amp;nbsp;def f(a): return a + j&lt;br /&gt;&amp;nbsp;&amp;nbsp;funs.append(f)&lt;br /&gt;del j&lt;br /&gt;funs[0](1)&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The fix is to &lt;a href="http://en.wikipedia.org/wiki/Currying"&gt;curry&lt;/a&gt; your function:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;def partial(f, *args, **kwargs):&lt;br /&gt;&amp;nbsp;&amp;nbsp;def bound_f(*args2, **kwargs2):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = kwargs.copy()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x.update(kwargs2)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return f(*(args + args2), **x)&lt;br /&gt;&amp;nbsp;&amp;nbsp;return bound_f&lt;br /&gt;&lt;br /&gt;import operator&lt;br /&gt;funs = [partial(operator.add,j) for j in [1,2,3,4,5]]&lt;br /&gt;del j&lt;br /&gt;funs[0](1)&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;I'm not quite sure what to make of this.  Is function context bound on &lt;tt&gt;return&lt;/tt&gt;?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2341392569360024554?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2341392569360024554/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2341392569360024554' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2341392569360024554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2341392569360024554'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/03/more-python-weirdness.html' title='More Python weirdness'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-500727379857444655</id><published>2010-03-10T10:18:00.000-08:00</published><updated>2010-03-10T10:18:56.685-08:00</updated><title type='text'>Too many options</title><content type='html'>The &lt;a href="http://jqueryui.com/demos/autocomplete/"&gt;autocomplete module&lt;/a&gt; that comes with &lt;a href="http://jqueryui.com/"&gt;jQuery UI&lt;/a&gt; is not the same as the &lt;a href="http://docs.jquery.com/Plugins/Autocomplete/autocomplete#url_or_dataoptions"&gt;jQuery Autocomplete plugin&lt;/a&gt;.  Totally different interface.&amp;nbsp; Using the documentation for one while running the other will not make for an enjoyable afternoon.&lt;br /&gt;&lt;br /&gt;jQueryUI comes with all manner of functionality beyond autocomplete, so that'd be my recommendation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-500727379857444655?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/500727379857444655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=500727379857444655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/500727379857444655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/500727379857444655'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/03/too-many-options.html' title='Too many options'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4055796714063920836</id><published>2010-03-05T14:54:00.000-08:00</published><updated>2010-03-05T14:54:29.199-08:00</updated><title type='text'>Write once, read many</title><content type='html'>Nice: the &lt;a href="http://pedant.gsf.de/"&gt;PEDANT database&lt;/a&gt; contains the output of many common genome annotation tools against 3,000 complete genomes, notably &lt;a href="http://pedant.gsf.de/pedant3htmlview/pedant3view?Method=analysis&amp;amp;Db=p3_p168_Hom_sapie"&gt;including the human genome&lt;/a&gt;.  I've been looking for the results of running, say, &lt;a href="http://www.cbs.dtu.dk/services/TMHMM/"&gt;TMHMM&lt;/a&gt; against every human gene.&lt;br /&gt;&lt;br /&gt;(For more, see the paper: &lt;a href="http://www.ncbi.nlm.nih.gov/pubmed/18940859"&gt;PEDANT covers all complete RefSeq genomes&lt;/a&gt;.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4055796714063920836?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4055796714063920836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4055796714063920836' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4055796714063920836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4055796714063920836'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/03/write-once-read-many.html' title='Write once, read many'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3553927086431011079</id><published>2010-02-15T10:42:00.000-08:00</published><updated>2010-02-15T10:42:35.763-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django programming'/><title type='text'>Tiny, neat Django trick</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;In SQL, you can retrieve a list of records via the "IN" syntax:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&amp;nbsp;&amp;nbsp; SELECT * FROM mytable WHERE id IN (1,2,3,4,5,6);&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;Django supports near-identical syntax:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;tt&gt;&amp;nbsp;&amp;nbsp; MyTableModel.objects.filter(id__in=[1,2,3,4,5,6])&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande'; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 11px;"&gt;&lt;span class="Apple-style-span" style="font-family: Times;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;nice!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3553927086431011079?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3553927086431011079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3553927086431011079' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3553927086431011079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3553927086431011079'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/02/tiny-neat-django-trick.html' title='Tiny, neat Django trick'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2520496631159080929</id><published>2010-02-13T13:37:00.001-08:00</published><updated>2010-02-13T13:37:57.729-08:00</updated><title type='text'>Happiness</title><content type='html'>Small bit of Scientology bashing: &lt;a href="http://www.reddit.com/r/AskReddit/comments/b1pop/is_it_possible_to_be_happy/"&gt;Is it possible to be happy?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2520496631159080929?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2520496631159080929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2520496631159080929' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2520496631159080929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2520496631159080929'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/02/happiness.html' title='Happiness'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8931215501061779598</id><published>2010-02-11T16:24:00.000-08:00</published><updated>2010-02-11T16:24:02.203-08:00</updated><title type='text'>Screen recordings under Snow Leopard (OS X 10.6)</title><content type='html'>For all your software demo needs: Snow Leopard will create screen recordings out of the box.&lt;br /&gt;&lt;br /&gt;Just run Quicktime, go to File -&amp;gt; "New Screen Recording."&lt;br /&gt;&lt;br /&gt;(Thanks to Nithin Reddy for the heads-up)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8931215501061779598?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8931215501061779598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8931215501061779598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8931215501061779598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8931215501061779598'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/02/screen-recordings-under-snow-leopard-os.html' title='Screen recordings under Snow Leopard (OS X 10.6)'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1036840915868421029</id><published>2010-02-11T10:08:00.000-08:00</published><updated>2010-02-11T10:08:01.577-08:00</updated><title type='text'>Animal adjectives</title><content type='html'>That I found this on a site called "PubQuizHelp" seems appropriate enough.  You probably know that "simian" refers to all things monkey-related--hence the adjective's popularity during the Bush administration--and you may have heard that "ursine" is the word for all things bear ... but did you know that calling someone "lapine" likens them to a rabbit?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.pubquizhelp.com/animals/adject.html"&gt;Very useful stuff.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1036840915868421029?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1036840915868421029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1036840915868421029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1036840915868421029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1036840915868421029'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/02/animal-adjectives.html' title='Animal adjectives'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2636114673536534221</id><published>2010-01-29T09:16:00.000-08:00</published><updated>2010-01-29T09:16:30.960-08:00</updated><title type='text'>jQuery 1.4</title><content type='html'>The jQuery Javascript library, without which cross-browser Javascript development is unthinkable, has &lt;a href="http://jquery14.com/day-12/jquery-141-released"&gt;reached version 1.4.1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Particularly useful is the ability to create new DOM elements. (See &lt;a href="http://jquery14.com/day-01/jquery-14"&gt;this brief discussion,&lt;/a&gt; though no anchor link means you'll have to search for "Quick Element Construction.")&lt;br /&gt;&lt;br /&gt;What those docs overlook is the &lt;tt&gt;.text&lt;/tt&gt; property, which enables you to create a proper element:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;$("#foo").append( jQuery("&amp;lt;div&amp;gt;", {&lt;br /&gt;    id: "foo",&lt;br /&gt;    text: "I'm a new DIV element",&lt;br /&gt;    click: function() {&lt;br /&gt;       $(this).css("backgroundColor", "red");&lt;br /&gt;    }}));&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;or even create a nested elements via &lt;tt&gt;.html&lt;/tt&gt;:&lt;br /&gt;&lt;tt&gt;$("#foo").append( jQuery("&amp;lt;select&amp;gt;", {html: "&amp;lt;option value='1'&amp;gt;One&amp;lt;/option&amp;gt;"}) );&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2636114673536534221?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2636114673536534221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2636114673536534221' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2636114673536534221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2636114673536534221'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/01/jquery-14.html' title='jQuery 1.4'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3551857351284961838</id><published>2010-01-24T12:07:00.001-08:00</published><updated>2010-01-24T12:14:07.706-08:00</updated><title type='text'>The Great Pacific Garbage Patch, local edition</title><content type='html'>This week's &lt;a href="http://sfist.com/2010/01/22/storm_prompts_state_of_emergency_fo.php"&gt;massive storm system&lt;/a&gt; seems to have washed up a small taste of the &lt;a href="http://en.wikipedia.org/wiki/Great_Pacific_Garbage_Patch"&gt;Great Pacific Garbage Patch&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ai4qK69BEF0/S1youFj1z4I/AAAAAAAAAR8/eE4KMBdZcXw/s1600-h/ocean_beach_trash.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 372px; height: 400px;" src="http://4.bp.blogspot.com/_ai4qK69BEF0/S1youFj1z4I/AAAAAAAAAR8/eE4KMBdZcXw/s400/ocean_beach_trash.jpg" alt="" id="BLOGGER_PHOTO_ID_5430400760421928834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We're doomed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3551857351284961838?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3551857351284961838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3551857351284961838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3551857351284961838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3551857351284961838'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/01/great-pacific-garbage-patch-local.html' title='The Great Pacific Garbage Patch, local edition'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/S1youFj1z4I/AAAAAAAAAR8/eE4KMBdZcXw/s72-c/ocean_beach_trash.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2492232335679791907</id><published>2010-01-21T17:26:00.000-08:00</published><updated>2010-01-25T14:06:19.472-08:00</updated><title type='text'>Multi-line strings</title><content type='html'>Javascript doesn't have multi-line strings, but offers &lt;a href="http://stackoverflow.com/questions/805107/multiline-strings-in-javascript"&gt;a variety of hacks&lt;/a&gt; ranging from concatination &lt;tt&gt;("line 1\n"&lt;br /&gt;+"def")&lt;/tt&gt; to the &lt;tt&gt;CDATA&lt;/tt&gt; hack, but as always, your milage will vary depending upon your browser.&lt;br /&gt;&lt;br /&gt;Python has dedicated multi-line string denominators, namely the triple-quote -- """ and '''.  Quite workable, but not as elegant as simply allowing newlines in a string.&lt;br /&gt;&lt;br /&gt;C and shell have the backslash:&lt;br /&gt;&lt;br /&gt;char * s = "line 1\n\&lt;br /&gt;line 2";&lt;br /&gt;&lt;br /&gt;Haskell extends that to the double-backslash:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;s = "line 1\n\&lt;br /&gt;\line 2"&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;PHP, in a rare moment of elegance and usability, treats a newline in a string as a newline.&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;$s = "line 1&lt;br /&gt;line 2";&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Now why is that so hard?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt;  Jake is right: C-style backslashes work in Javascript (at least on Firefox).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2492232335679791907?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2492232335679791907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2492232335679791907' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2492232335679791907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2492232335679791907'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/01/multi-line-strings.html' title='Multi-line strings'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8082078819694641136</id><published>2010-01-08T10:40:00.000-08:00</published><updated>2010-01-11T09:03:53.779-08:00</updated><title type='text'>stackoverflow.com, in which we circumvent Django's template system</title><content type='html'>The whole separate-code-from-presentation imperative that inspired Django's template system ... let's say I have my doubts.  From my experience, Django's particular approach to templates diverts much too much of my attention to &lt;a href="http://stackoverflow.com/questions/511067/how-to-repeat-a-block-in-a-django-template/2029797#2029797"&gt;circumventing its limitations&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Update:&lt;br /&gt;&lt;br /&gt;In response to &lt;a href="https://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8082078819694641136"&gt;Jake's observation&lt;/a&gt; that "variables should always be set in the view, not the template," in general, I agree.&lt;br /&gt;&lt;br /&gt;But the specific counter-example I'll supply is the very common &lt;span style="font-weight:bold;"&gt;title&lt;/span&gt; example.  Let's say you'd like to create a base template like so:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;{% block title %}&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;{% block title %}&amp;lt;/h1&amp;gt;&lt;br /&gt;  ...&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;And then you inherit from that template:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;{% block title %}User Feedback{% endblock %}&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This is a very simple, commonplace scenario, and it's simply unsupported.  Django will error out on the second call to &lt;tt&gt;{% block title %}&lt;/tt&gt;, and I think that's dumb.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8082078819694641136?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8082078819694641136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8082078819694641136' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8082078819694641136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8082078819694641136'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/01/stackoverflowcom-in-which-we-circumvent.html' title='stackoverflow.com, in which we circumvent Django&apos;s template system'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-6267417361087923841</id><published>2010-01-04T09:33:00.000-08:00</published><updated>2010-01-04T09:47:41.791-08:00</updated><title type='text'>Python's Zipfile library</title><content type='html'>So you want to generate a big bundle of files all at once, and send 'em in one convenient package?  Python's ZipFile library to the rescue!  You can create each file, write it to a zip, then send the whole mess over the wire without ever touching the disk!  (&lt;a href="http://docs.python.org/library/stringio.html"&gt;StringIO&lt;/a&gt; is pretty essential as well.)&lt;br /&gt;&lt;br /&gt;Ahh, but wait: anyone unzipping your files will find each file marked unreadable/unwritable/unexecutable.  And the &lt;a href="http://docs.python.org/library/zipfile.html"&gt;Python ZipFile docs have zilch to say about it&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This turns out to be the requisite incantation, &lt;a href="http://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zipf"&gt;care of Stackoverflow&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;  info = zipfile.ZipInfo(name)&lt;br /&gt;  info.external_attr = 0777 &lt;&lt; 16&lt;br /&gt;  zip.&lt;span class="pln"&gt;writestr&lt;/span&gt;&lt;span class="pun"&gt;(&lt;/span&gt;&lt;span class="pln"&gt;info&lt;/span&gt;&lt;span class="pun"&gt;,&lt;/span&gt;&lt;span class="pln"&gt; bytes&lt;/span&gt;&lt;span class="pun"&gt;)&lt;/span&gt;&lt;span class="pln"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/tt&gt;&lt;br /&gt;Obvious, no?  Of COURSE you need to bitshift the permissions by 16!  (File perms clearly occupy the first 16b of an int, which might even be the standard on Unix, but that doesn't excuse the Python docs' utter silence on the matter.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-6267417361087923841?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/6267417361087923841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=6267417361087923841' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6267417361087923841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/6267417361087923841'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2010/01/pythons-zipfile-library.html' title='Python&apos;s Zipfile library'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5612239269487943700</id><published>2009-11-19T09:14:00.000-08:00</published><updated>2009-11-19T09:18:53.787-08:00</updated><title type='text'>One last thought on Wavelet image sharpening</title><content type='html'>The GIMP's plugin documentation for the &lt;a href="http://registry.gimp.org/node/9836"&gt;Wavelet sharpen plugin&lt;/a&gt; is interesting:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;"The wavelet decomposition of an image results in multiple images with different frequency content. When amplifying the high frequency parts the recomposed image appears to be sharper than the original one. That way the frequency which should be amplified most can also be selected and a given unsharpness in the original image can be taken into account."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That matches with &lt;a href="http://www.procida.us/"&gt;Tom Crimi's&lt;/a&gt; description of Wavelets as vaguely similar to the uniquitous &lt;a href="http://en.wikipedia.org/wiki/Fast_Fourier_transform"&gt;FFT&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5612239269487943700?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5612239269487943700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5612239269487943700' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5612239269487943700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5612239269487943700'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/11/one-last-thought-on-wavelet-image.html' title='One last thought on Wavelet image sharpening'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1826777048966393036</id><published>2009-11-18T09:13:00.000-08:00</published><updated>2009-11-18T13:16:56.700-08:00</updated><title type='text'>Sharpening photos like they do in CSI</title><content type='html'>There's a recurring joke on nerd hang-outs like &lt;a href="http://reddit.com/"&gt;reddit&lt;/a&gt; about the "enhanced photo" plot device on dramas like &lt;a href="http://www.imdb.com/title/tt0247082/"&gt;CSI&lt;/a&gt;: a grainy, low-resolution image is zoomed and sharpened to bring out impossibly small details -- finding the reflection of the killer in a distant chrome hub-cap, that sort of thing.  It's obviously stupid.&lt;br /&gt;&lt;br /&gt;But after playing around with &lt;a href="http://www.gimp.org/macintosh/"&gt;The&lt;/a&gt; &lt;a href="http://gimp-win.sourceforge.net/"&gt;GIMP's&lt;/a&gt; "Wavelet enhance" filter, I'm really impressed -- it really seems to bring out fuzzy details:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ai4qK69BEF0/SwQtqsOUk0I/AAAAAAAAAQk/G5BqI0L2Sxo/s1600/wavelet_sharpen.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 275px;" src="http://1.bp.blogspot.com/_ai4qK69BEF0/SwQtqsOUk0I/AAAAAAAAAQk/G5BqI0L2Sxo/s400/wavelet_sharpen.jpg" alt="" id="BLOGGER_PHOTO_ID_5405495664200422210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(My best effort at cleaning the image up with contrast &amp;amp; brightness on the left; the wavlet-enhanced version on the right.)  Clearly, it can't restore missing detail, but it seems to do a good job of improving the contrast around edges / features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1826777048966393036?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1826777048966393036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1826777048966393036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1826777048966393036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1826777048966393036'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/11/sharpening-photos-like-they-do-in-csi.html' title='Sharpening photos like they do in CSI'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ai4qK69BEF0/SwQtqsOUk0I/AAAAAAAAAQk/G5BqI0L2Sxo/s72-c/wavelet_sharpen.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7804423323339528963</id><published>2009-11-16T15:21:00.000-08:00</published><updated>2009-11-16T15:29:36.233-08:00</updated><title type='text'>Firefox can't print, and what to do about it.</title><content type='html'>Say you've got a big, information-rich, scroll-heavy page, with annotations and doodads located a long scroll off the screen.  But say it works: you can scroll around and find what you need; it's a solid app.&lt;br /&gt;&lt;br /&gt;Firefox won't be able to print it -- not usefully, at least, b/c Firefox will print only to the right edge of the visible page, thereby limiting you to the width of your physical screen.  Creating a new paper-type, some monstrously wide fictional ur-sheet, won't help things either.  So what's a boy to do?&lt;br /&gt;&lt;br /&gt;Enter &lt;a href="http://cutycapt.sourceforge.net/"&gt;CutyCapt&lt;/a&gt;, a &lt;a href="http://webkit.org/"&gt;WebKit&lt;/a&gt;-based command-line tool that renders to PNG.  (Or PDF, or whatever file format your heart desires.)  Better still, it will execute any Javascript on the page, so pages that are essentially blank until the JS runs will render just file.&lt;br /&gt;&lt;br /&gt;You'll need &lt;a href="http://en.wikipedia.org/wiki/Xvfb"&gt;Xvfb&lt;/a&gt;, the X virtual framebuffer, if you want to run it on a headless box, but Xvfb is a little miracle in itself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7804423323339528963?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7804423323339528963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7804423323339528963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7804423323339528963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7804423323339528963'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/11/firefox-cant-print-and-what-to-do-about.html' title='Firefox can&apos;t print, and what to do about it.'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5448718837341002433</id><published>2009-10-20T10:29:00.000-07:00</published><updated>2009-11-12T09:54:55.959-08:00</updated><title type='text'>Microsoft Outlook 2003: The Worst Program of All Time</title><content type='html'>I'm forced to use Outlook 2003 by a clueless IT department -- forced, in fact, to sit an entire separate ThinkPad next to my iMac just for email, since a Mac can't possibly sit on the trusted network.   It's a security threat, after all.   Unlike Windows.   Which is secure.&lt;br /&gt;&lt;br /&gt;Having used &lt;a href="http://mail.google.com/"&gt;GMail&lt;/a&gt; for years, I'm shocked at the sheer unfriendliness of Outlook:&lt;br /&gt;&lt;br /&gt;Searching takes minutes, and only barely works.&lt;br /&gt;&lt;br /&gt;Perhaps due to way Exchange is configured, Outlook won't auto-complete contacts by first name, only last, and even then it only auto-completes names from my personal contact list, not names in the Exchange directory.&lt;br /&gt;&lt;br /&gt;Threading.    THREADING.   I had threading in 1998 using &lt;a href="http://en.wikipedia.org/wiki/Mutt_%28e-mail_client%29"&gt;Mutt&lt;/a&gt;, a command-line email client.  GMail has had threading since day 1.   An email and it's replies form a dialog, obviously, and Outlook's failure to group those emails into a thread makes it about as useful to me as my Nokia 3510's SMS functionality was.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5448718837341002433?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5448718837341002433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5448718837341002433' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5448718837341002433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5448718837341002433'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/10/microsoft-outlook-2003-worst-program-of.html' title='Microsoft Outlook 2003: The Worst Program of All Time'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7442918871540606816</id><published>2009-07-31T09:03:00.000-07:00</published><updated>2009-07-31T09:19:59.199-07:00</updated><title type='text'>On technolgical improvements in lighting</title><content type='html'>Two out of three light bulbs burned out in our new lamp, so off to the store we went.  We wound up with two different bulbs: an LED ($9), and a compact fluorescent ($7).  This lamp has 1 incandescent bulb, 1 CFL, and 1 LED; would anyone care to guess which is which?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ai4qK69BEF0/SnMXA63npUI/AAAAAAAAANY/gQRhFAUEJ2A/s1600-h/lamp.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 300px; height: 400px;" src="http://4.bp.blogspot.com/_ai4qK69BEF0/SnMXA63npUI/AAAAAAAAANY/gQRhFAUEJ2A/s400/lamp.jpg" alt="" id="BLOGGER_PHOTO_ID_5364656885698372930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Wikipedia's &lt;a href="http://en.wikipedia.org/wiki/Light-emitting_diode"&gt;entry on LEDs&lt;/a&gt; has an enlightening explanation of the &lt;a href="http://en.wikipedia.org/wiki/Light-emitting_diode#Phosphor_based_LEDs"&gt;temperature of such white LEDs&lt;/a&gt;; the phosphor that converts the LED's blue light into white light doesn't do a very good job of it, and much of the blue leaks out -- &lt;a href="http://en.wikipedia.org/wiki/File:White_LED.png"&gt;this graph&lt;/a&gt; captures the effect nicely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7442918871540606816?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7442918871540606816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7442918871540606816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7442918871540606816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7442918871540606816'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/07/on-technolgical-improvements-in.html' title='On technolgical improvements in lighting'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/SnMXA63npUI/AAAAAAAAANY/gQRhFAUEJ2A/s72-c/lamp.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-365791194871943142</id><published>2009-07-24T11:22:00.000-07:00</published><updated>2009-07-24T11:25:33.899-07:00</updated><title type='text'>PostgreSQL and capitalization</title><content type='html'>The terminal-based PostgreSQL front-end &lt;tt&gt;psql&lt;/tt&gt;, which ships standard, does &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; like capitalized table names.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ri=&gt; \d KDplot_plotpoint&lt;br /&gt;Did not find any relation named "KDplot_plotpoint"&lt;br /&gt;ri=&gt; \d "KDplot_plotpoint"&lt;br /&gt;          Table "public.KDplot_plotpoint"&lt;br /&gt;Column |   Type     | Modifier&lt;br /&gt;...&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Double-quotes are your friends.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-365791194871943142?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/365791194871943142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=365791194871943142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/365791194871943142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/365791194871943142'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/07/postgresql-and-capitalization.html' title='PostgreSQL and capitalization'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5808464332433722662</id><published>2009-07-21T10:16:00.000-07:00</published><updated>2009-07-21T13:39:46.743-07:00</updated><title type='text'>On ZFS and terror</title><content type='html'>I've had my main backup / nameless cruft repository on 3 x 1TB drives in a ZFS RAID-Z array for a while now, and finally found out what happens ZFS (or Linux ZFS-FUSE, at least) encounters bad blocks.&lt;br /&gt;&lt;br /&gt;It loses it, completely.&lt;br /&gt;&lt;br /&gt;I suspect this is largely a Linux problem: once a bad block is encountered, the Linux kernel (?) seems to go into an infinite-reread tailspin, flooding syslog with errors and generally making the SATA bus (and the machine at large) unusable.  So it might not be ZFS' fault.&lt;br /&gt;&lt;br /&gt;And a quick aside to the many posts claiming that "the OS should never see a bad block; the drive should silently remap the block to a spare and the OS will only be aware of it when you've run out of spares!":  bullshit.  I've had half a dozen drives turn up w/ bad blocks, and the SMART stats on each reported plenty of spares, and each drive was fine after a forced overwrite.  (IE, I zero'ed out the drive.)&lt;br /&gt;&lt;br /&gt;So I repeated my zero-out procedure on this drive, and the sequence of events gets fuzzy, but at some point I backed up &lt;tt&gt;/etc&lt;/tt&gt; and at some later point I ran &lt;tt&gt;zpool export&lt;/tt&gt; on the &lt;tt&gt;DEGRADED&lt;/tt&gt; array.  When the time came to put the newly-zero'ed drive back in the array, zpool wouldn't bring it back up:   &lt;tt&gt;zpool import&lt;/tt&gt; reported that "&lt;tt&gt;The pool can be imported despite missing or damaged devices&lt;/tt&gt;," but &lt;tt&gt;zpool import tank&lt;/tt&gt; ("tank" being the customary name for ZFS pools, I think) complained that it "&lt;tt&gt;cannot import 'tank': one or more devices is currently unavailable.&lt;/tt&gt;"  &lt;tt&gt;zpool import -f tank&lt;/tt&gt; yielded the same thing.&lt;br /&gt;&lt;br /&gt;This when when I began to panic.&lt;br /&gt;&lt;br /&gt;Despite having 2 fully functional drives, all my data would have been lost.  But remember that backup of &lt;tt&gt;/etc&lt;/tt&gt;, notably including &lt;tt&gt;/etc/zfs/zpool.cache&lt;/tt&gt;?  That was my salvation: restoring that brought me back to my pre-&lt;tt&gt;export&lt;/tt&gt;, degraded state, which in turn let me &lt;tt&gt;replace&lt;/tt&gt; the faulty drive.&lt;br /&gt;&lt;br /&gt;My data is safe for now, but my confidence in ZFS is shaken.  Why did exporting a degraded array make it un-importable?  If I lose my zpool.cache, is all lost?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5808464332433722662?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5808464332433722662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5808464332433722662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5808464332433722662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5808464332433722662'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/07/on-zfs-and-terror.html' title='On ZFS and terror'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8732144617936666789</id><published>2009-06-03T17:08:00.001-07:00</published><updated>2009-06-03T17:15:16.665-07:00</updated><title type='text'>Developer preferences</title><content type='html'>Ubuntu still &lt;a href="http://www.kuliniewicz.org/blog/archives/2009/03/24/installing-ghc-610-on-ubuntu-intrepid/"&gt;ships with GHC 6.8&lt;/a&gt;, released 12 December 2007.  Macports offers &lt;a href="http://trac.macports.org/browser/trunk/dports/lang/ghc/Portfile"&gt;6.10.3&lt;/a&gt;, which has been around for about 3 weeks.&lt;br /&gt;&lt;br /&gt;I might be reading into this too much, but methinks there's something there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8732144617936666789?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8732144617936666789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8732144617936666789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8732144617936666789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8732144617936666789'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/06/developer-preferences.html' title='Developer preferences'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3259233898741974327</id><published>2009-05-15T10:00:00.000-07:00</published><updated>2009-05-15T10:07:06.865-07:00</updated><title type='text'>On the prescience of Infinite Jest</title><content type='html'>It's not a central plot point, but DFW's near-future &lt;a href="http://isbn.nu/9780316921176"&gt;Infinite Jest&lt;/a&gt; (&lt;a href="http://en.wikipedia.org/wiki/Infinite_Jest"&gt;1996&lt;/a&gt;) mentions Microsoft Pink, the operating system du jour.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Perhaps he has a &lt;a href="http://www.slashgear.com/microsoft-pink-cellphone-blending-zune-sidekick-dna-at-ces-2009-2624322/"&gt;fan&lt;/a&gt; &lt;a href="http://www.engadget.com/2009/04/28/microsofts-pink-smartphone-could-rival-iphone-on-verizon/"&gt;in&lt;/a&gt; &lt;a href="http://www.engadget.com/2009/05/12/microsoft-pink-specs-leak-out-tegra-snapdragon-omap-3-oh-m/"&gt;Redmond&lt;/a&gt;?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3259233898741974327?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3259233898741974327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3259233898741974327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3259233898741974327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3259233898741974327'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/05/on-prescience-of-infinite-jest.html' title='On the prescience of Infinite Jest'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2571422023860254294</id><published>2009-04-22T16:04:00.000-07:00</published><updated>2009-04-22T16:21:20.954-07:00</updated><title type='text'>Are you sure you want to navigate away from this page?</title><content type='html'>Scenario: you've been tasked with creating a simple web-based time-sheet application, so employees can log what percentage of their time is devoted to which project.  Now, this hardly qualifies as "Bioinformatics," a domain claimed by both your job title and personal aspirations, but it's a small company and they pay your rent.&lt;br /&gt;&lt;br /&gt;So you build the little beasty, and your cube-neighbor sits down to fill out a time-sheet.  She spends 7 minutes selecting options and punching in percentages, and then realizes she wants to trim one field from 15% to 10%, clicks her mouse 4 pixels too far to the right putting the page, and not the text input, into focus, and hits &lt;b&gt;Backspace&lt;/b&gt; -- equivalent to the back button.&lt;br /&gt;&lt;br /&gt;There go her 7 tedious minutes of form-filling -- this app isn't sophisticated enough to autosave a draft in real-time, after all.&lt;br /&gt;&lt;br /&gt;Enter the &lt;tt&gt;onbeforeunload&lt;/tt&gt; function.&lt;br /&gt;&lt;br /&gt;I've borrowed from &lt;a href="http://www.4guysfromrolla.com/webtech/100604-1.shtml#postadlink"&gt;this guy&lt;/a&gt; a bit, but here's the code:&lt;br /&gt;&lt;pre&gt;var confirm_exit = true;&lt;br /&gt;&lt;br /&gt;window.onbeforeunload = function() {&lt;br /&gt;if( confirm_exit )&lt;br /&gt; return "";&lt;br /&gt;return; };&lt;br /&gt;&lt;br /&gt;$(document).ready( function() {&lt;br /&gt; $("#id_theform").submit( function() { confirm_exit = false; } );&lt;br /&gt;} );&lt;/pre&gt;Originally, I'd planned to skip the ugly global variable and simply re-bind the &lt;tt&gt;onbeforeunload&lt;/tt&gt; function, but apparently you can't rebind like that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2571422023860254294?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2571422023860254294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2571422023860254294' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2571422023860254294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2571422023860254294'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/04/are-you-sure-you-want-to-navigate-away.html' title='Are you sure you want to navigate away from this page?'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-100557821481617571</id><published>2009-04-10T13:07:00.000-07:00</published><updated>2009-04-14T16:37:38.517-07:00</updated><title type='text'>A Beginner's Guide to Hating iMovie '08</title><content type='html'>Thank you, Apple. This is pretty much my first experience editing footage into a "movie," and with iMovie '08, you've made the process slow, painful, and constrained.  What's more, I was lucky enough to get my computer weeks before the release of iMovie '09, so any of your stunning omissions fixed in the subsequent version will cost me $100.  No thanks.&lt;br /&gt;&lt;br /&gt;First off, titles.  Adding chapter titles is a pretty common use for iMovie, I would think, but clips cut from one Project and pasted in another are stripped of their title.  Thanks.&lt;br /&gt;&lt;br /&gt;Oh, but wait: "chapter titles?"  What's a chapter?  iMovie isn't really meant to create movies for later burning onto a DVD -- who would ever want to distribute a DVD?  So very 2003!  The only way I've found to separate footage into chapters for iDVD is to put each chapter into its own Project.  Annoying.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-100557821481617571?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/100557821481617571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=100557821481617571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/100557821481617571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/100557821481617571'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/04/beginners-guide-to-hating-imovie-08.html' title='A Beginner&apos;s Guide to Hating iMovie &apos;08'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7453758229744761721</id><published>2009-04-09T11:07:00.000-07:00</published><updated>2009-04-09T13:22:36.892-07:00</updated><title type='text'>The perils of laziness</title><content type='html'>I've begun cargo culting my way into Haskell, in the hopes that I'll eventually grasp such mathematical mysteries as &lt;a href="http://ulissesaraujo.wordpress.com/2009/04/08/anamorphisms-in-haskell/"&gt;anamorphisms&lt;/a&gt;.  In the mean time, I'd like to write some code that actually works.&lt;br /&gt;&lt;br /&gt;To this end, I've written a program to digest the C. elegans transcriptome &lt;span style="font-style: italic;"&gt;in silico&lt;/span&gt;, then check the resulting fragments against data from a mass spectroscopy experiment (Multidimensional Protein Identification Technology --"MudPIT"--if you're curious).  I use regular expressions to break up the protein sequences, store the fragments in a big Data.Map, and then test my MudPIT fragments against the Map.&lt;br /&gt;&lt;br /&gt;I've greatly simplified my function to be a simple list-to-map conversion -- which would be stupid, since Data.Mat.fromList does this quite well -- but the real function involves plenty of off-topic complexity, so here's the svelt form:&lt;br /&gt;&lt;pre&gt;  add_frags (i:l) m =&lt;br /&gt;   let m' = M.insert i () m in&lt;br /&gt;   add_frags l &lt;bb style="font-weight: bold;"&gt;$!&lt;/bb&gt; m'&lt;br /&gt; add_frags [] m = m&lt;br /&gt;&lt;/pre&gt;The important part is the &lt;tt&gt;$!&lt;/tt&gt;, in bold.  Given some function &lt;tt&gt;f&lt;/tt&gt; and parameter &lt;tt&gt;x&lt;/tt&gt;, &lt;tt&gt;f $! x&lt;/tt&gt; is equivalent to &lt;tt&gt;x `seq` f x&lt;/tt&gt;;  the &lt;tt&gt;seq&lt;/tt&gt; function, meanwhile, forces the evaluation of the first thunk.  So &lt;tt&gt;f $! x&lt;/tt&gt; applies &lt;tt&gt;f&lt;/tt&gt; to &lt;tt&gt;x&lt;/tt&gt; AFTER &lt;tt&gt;x&lt;/tt&gt; HAS BEEN EVALUATED.&lt;br /&gt;&lt;br /&gt;Without that forced evaluation, ghc will simply add more thunks to the stack until the stack is blown ... hours after the run has begun.  You can pretty easily imagine this as a series of substitutions, which is exactly what we're talking about:&lt;br /&gt;&lt;pre&gt;  import qualified Data.Map as M&lt;br /&gt; m = M.empty&lt;br /&gt; add_frags ["ACDEF","GHI","KLMNO","PQRST",...] m&lt;br /&gt;  -&gt; M.insert "ABCDEF" () (add_frags ["GHI","KLMNO","PQRST",...] m)&lt;br /&gt;  -&gt; M.insert "ABCDEF" () (M.insert "GHI" () (add_frags ["KLMNO","PQRST",...] m))&lt;br /&gt;&lt;/pre&gt;And off the stack grows, until &lt;b&gt;pop&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7453758229744761721?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7453758229744761721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7453758229744761721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7453758229744761721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7453758229744761721'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/04/perils-of-laziness.html' title='The perils of laziness'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1411585957278618714</id><published>2009-03-30T11:45:00.000-07:00</published><updated>2009-04-01T09:05:26.230-07:00</updated><title type='text'>RAID 5 on an Leopard Xserve</title><content type='html'>This seems too trivial to merit a posting, but there are other &lt;a href="http://www.xservenotes.com/2005/10/software_raid_p.html"&gt;posts&lt;/a&gt; that might lead one to believe that Leopard doesn't support RAID-5 on an Xserve, which it does, &lt;span style="font-weight: bold;"&gt;provided you've got a RAID card installed&lt;/span&gt;.  When booting the installation DVD, just look for "RAID utility" under the "Utilities" menu.  Just be sure to create the RAID before you pick an installation disk.&lt;br /&gt;&lt;br /&gt;Update: Jashugan's right; I've updated appropriately.  Though I still like the sound of "Xserver."  One last thought: why ever does the RAID 5 volume build process take something like 2 hours / 100G?  I understand the time required to rebuild parity after replacing a failed disk on a live array, but the initial build should be faster than that.  Unless the OS is doing a bad block scan on the disks or somesuch, but ... why do that for a RAID and not under other circumstances?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1411585957278618714?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1411585957278618714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1411585957278618714' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1411585957278618714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1411585957278618714'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/03/raid-5-on-leopard-xserver.html' title='RAID 5 on an Leopard Xserve'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2263800683043456258</id><published>2009-03-24T09:15:00.000-07:00</published><updated>2009-03-24T09:31:42.708-07:00</updated><title type='text'>Regarding encryption ...</title><content type='html'>Not encryption in general, but one very specific instance of it: Apache SSL on my Ubuntu/8.10 box.&lt;br /&gt;&lt;br /&gt;Ubuntu ships with two SSL modules available -- the canonical, OpenSSL-based Apache &lt;tt&gt;mod_ssl&lt;/tt&gt;, and the newer &lt;tt&gt;mod_gnults&lt;/tt&gt; (pronounced "noodles?").  I decided to try mod_gnutls for no good reason, and it seemed to work -- I could serve content via an encrypted connection!  Except for the silent redirects.  I'd point my browser to /, get redirected to my SSL login page as expected ... and then wind up on the login page over vanilla HTTP.&lt;br /&gt;&lt;br /&gt;In situations like this, &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/6647"&gt;HttpFox&lt;/a&gt; is your friend. As are &lt;a href="http://en.wikipedia.org/wiki/Netcat"&gt;netcat&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/OpenSSL"&gt;OpenSSL&lt;/a&gt; itself, which, if you'll pardon the tangent, has it's own netcat-like behavior indispensable for debugging encrypted network services:&lt;br /&gt;&lt;pre&gt;   openssl s_client -connect myserver.com:443&lt;/pre&gt;Via openssl, here's the offending HTTP transaction:&lt;br /&gt;&lt;pre&gt;GET /ri/account/login?next=/ri/ HTTP/1.1&lt;br /&gt;Host: myserver.com&lt;br /&gt;&lt;br /&gt;HTTP/1.1 301 Moved Permanently&lt;br /&gt;Date: Tue, 24 Mar 2009 15:26:47 GMT&lt;br /&gt;Server: Apache/2.2.9 (Ubuntu) DAV/2 mod_gnutls/0.5.1 PHP/5.2.6-2ubuntu4 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2&lt;br /&gt;Content-Type: text/html; charset=utf-8&lt;br /&gt;&lt;b&gt;Location: http://myserver.com/ri/account/login/?next=/ri/&lt;/b&gt;&lt;br /&gt;Vary: Accept-Encoding&lt;br /&gt;Content-Length: 0&lt;/pre&gt;I ask, over HTTPS, for the login page, and it redirects me back to the unencrypted version.  And I never quite figured it out, either -- I just switched to &lt;tt&gt;mod_ssl&lt;/tt&gt; and the problem went away.&lt;br /&gt;&lt;br /&gt;I can't even say this is a GNUtls bug, but it's certainly some strange behavior.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2263800683043456258?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2263800683043456258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2263800683043456258' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2263800683043456258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2263800683043456258'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/03/regarding-encryption.html' title='Regarding encryption ...'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1660342046172971229</id><published>2009-03-23T11:56:00.000-07:00</published><updated>2009-03-23T12:11:47.435-07:00</updated><title type='text'>python-ldap authentication and you</title><content type='html'>Or me, at least.&lt;br /&gt;&lt;br /&gt;Here's how I managed to make my python client code running on a Debian/Ubuntu box authenticate against a Windows Active Directory LDAP server:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Obtain the server's cert: &lt;tt&gt;openssl s_client -showcerts -connect myserver.com:636 &gt; their_server.pem&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Edit the resulting file to isolate just the cert you want.  In my case, the file had two certs embedded in it, plus some identifying cruft.  Preceding the first, desired cert was a block that looked like this: &lt;tt&gt; 0 s:/C=US/ST=MyState/L=MyCity/O=My Company Inc./OU=Information Technology/OU=For Intranet Use Only/CN=my.host.com&lt;/tt&gt;, followed by &lt;tt&gt;-----BEGIN CERTIFICATE-----&lt;/tt&gt;.  Next came VeriSign's cert.  Delete everything but the CERTIFICATE block for your server, including the BEGIN and END lines, and save to &lt;tt&gt;/etc/ssl/certs/myserver.pem&lt;/tt&gt; -- you can save to any location, really.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;And here's the code:&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;import ldap&lt;br /&gt;#ldap.set_option(ldap.OPT_DEBUG_LEVEL,4095)&lt;br /&gt;ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)&lt;br /&gt;ldap.set_option(ldap.OPT_X_TLS_CACERTFILE,"/etc/ssl/certs/myserver.pem")&lt;br /&gt;l = ldap.initialize("ldaps://myserver.com:636")&lt;br /&gt;l.set_option(ldap.OPT_PROTOCOL_VERSION, 3)&lt;br /&gt;l.simple_bind_s("username@DOMAIN","password")&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1660342046172971229?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1660342046172971229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1660342046172971229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1660342046172971229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1660342046172971229'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/03/python-ldap-authentication-and-you.html' title='python-ldap authentication and you'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1375337151500396356</id><published>2009-03-11T15:21:00.001-07:00</published><updated>2009-03-11T15:27:43.859-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DRM'/><category scheme='http://www.blogger.com/atom/ns#' term='crypto'/><title type='text'>The trouble with DRM</title><content type='html'>Cory Doctorow's brilliant denunciation of DRM, as delivered at a Google Author talk a couple years ago:&lt;br /&gt;&lt;pre&gt;If you deliver to an attacker the cipher-text, the cipher, and&lt;br /&gt;the key, and rely on the attacker not combining those except&lt;br /&gt;under circumstances you dictate, you're living in a fool's paradise.&lt;br /&gt;&lt;/pre&gt;I was reminded of this by &lt;a href="http://en.wikipedia.org/wiki/Roger_Gregory_%28programmer%29"&gt;Roger Gregory,&lt;/a&gt; who directed me to a &lt;a href="http://www.youtube.com/watch?v=JDaicPIgn9U"&gt;youtube video about cold-boot attacks&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1375337151500396356?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1375337151500396356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1375337151500396356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1375337151500396356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1375337151500396356'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/03/trouble-with-drm.html' title='The trouble with DRM'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7753676820271355397</id><published>2009-03-05T09:51:00.000-08:00</published><updated>2009-04-01T08:59:02.278-07:00</updated><title type='text'>Timing out an arbitrary Python function</title><content type='html'>Update:&lt;br /&gt;&lt;br /&gt;The problem with the signal.alarm approach described below is that the alarm WILL happen, thus interrupting a hung function in the failure mode we're trying to account for.  But it will ALSO SIGNAL if that function returned as expected, thus throwing an exception at some random point in later code.&lt;br /&gt;&lt;br /&gt;The solution is to disable the alarm, as described below:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Occasionally, child processes die.  If you don't want your script to hang, you do something like this:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;TIMEOUT = 10&lt;br /&gt;process = subprocess.Popen(...)&lt;br /&gt;(o, _, _) = select.select( [process.stdout], [], [], TIMEOUT )&lt;br /&gt;if o:&lt;br /&gt; return process.stdout.readline()&lt;br /&gt;else:&lt;br /&gt; os.kill(process.pid, signal.SIGKILL)&lt;br /&gt; os.waitpid(-1, os.WNOHANG)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This works perfectly well (and mimics the C version pretty closely), but what if the process is already wrapped in a python module and you don't have direct access to the process?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mail.python.org/pipermail/python-list/2004-May/262652.html"&gt;This guy&lt;/a&gt; has a good solution:&lt;br /&gt;&lt;pre&gt;  def raiseTimeout(a,b):&lt;br /&gt;   raise Exception()&lt;br /&gt;signal.signal(signal.SIGALRM, raiseTimeout) # bind a signal handler&lt;br /&gt;signal.alarm(1)                             # raise the alarm sig in 1 s&lt;br /&gt;some_hang_prone_function()                  # this is the problem function&lt;br /&gt;signal.alarm(0)                             # disable the previously set alarm&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;My original version used a lambda in place of a proper function, but it turns out that &lt;tt&gt;lambda a,b: raise Exception()&lt;/tt&gt; isn't proper syntax.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7753676820271355397?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7753676820271355397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7753676820271355397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7753676820271355397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7753676820271355397'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/03/timing-out-arbitrary-python-function.html' title='Timing out an arbitrary Python function'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-9144526431228600344</id><published>2009-02-28T13:59:00.000-08:00</published><updated>2009-02-28T14:02:09.367-08:00</updated><title type='text'>Bay Area Kvetch: Pubilc Transit on the Peninsula</title><content type='html'>This really does seem to be the only public transit route from my job to SFO:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ai4qK69BEF0/Sam0NRKj3fI/AAAAAAAAAKw/YqF4f1ix_0c/s1600-h/sfo.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 210px;" src="http://4.bp.blogspot.com/_ai4qK69BEF0/Sam0NRKj3fI/AAAAAAAAAKw/YqF4f1ix_0c/s400/sfo.png" alt="" id="BLOGGER_PHOTO_ID_5307971775871835634" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-9144526431228600344?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/9144526431228600344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=9144526431228600344' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/9144526431228600344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/9144526431228600344'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/02/bay-area-kvetch-pubilc-transit-on.html' title='Bay Area Kvetch: Pubilc Transit on the Peninsula'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ai4qK69BEF0/Sam0NRKj3fI/AAAAAAAAAKw/YqF4f1ix_0c/s72-c/sfo.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-808807884135987767</id><published>2009-02-11T07:39:00.000-08:00</published><updated>2009-02-11T07:46:44.862-08:00</updated><title type='text'>Apple's USB dongle</title><content type='html'>The Ethernet port on my 2006 Macbook died, so I went to &lt;a href="http://www.frys.com/"&gt;Fry's&lt;/a&gt; and picked up Apple's &lt;a href="http://store.apple.com/us/product/MB442Z/A"&gt;USB Ethernet adapter&lt;/a&gt; -- you know, the one w/ the imperceptibly fine print on the back explaining "only for use in Macbook Air."  That one.&lt;br /&gt;&lt;br /&gt;And it worked at first, until I unplugged it for the night and plugged it back in.  No amount of rebooting helped, but finally I worked out the procedure:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Under System Preferences -&gt; Network, select the USB Ethernet device and hit the (-) button at the bottom, removing it from the list.  This apparently unloads the driver from the kernel.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;From the command line, run &lt;tt&gt;sudo kextload /System/Library/Extensions/IONetworkingFamily.kext/Contents/PlugIns/AppleUSBEthernet.kext&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Back under System Preferences -&gt; Network, press the (+) button and choose "USB Ethernet," then "Apply"&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That should do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-808807884135987767?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/808807884135987767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=808807884135987767' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/808807884135987767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/808807884135987767'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/02/apples-usb-dongle.html' title='Apple&apos;s USB dongle'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5008277526325435487</id><published>2009-01-29T16:05:00.000-08:00</published><updated>2009-01-29T16:35:08.376-08:00</updated><title type='text'>How Not to Create a Dialog Box</title><content type='html'>From Aquamacs on Mac OS X:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ai4qK69BEF0/SYJLFqEjlJI/AAAAAAAAAKg/ozfFuSsKKUE/s1600-h/aquamacs_dialog.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 476px; height: 232px;" src="http://2.bp.blogspot.com/_ai4qK69BEF0/SYJLFqEjlJI/AAAAAAAAAKg/ozfFuSsKKUE/s400/aquamacs_dialog.png" alt="" id="BLOGGER_PHOTO_ID_5296878672305951890" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or perhaps this was plain OS X Emacs, Aquamacs certainly has the same dialog.  "Save this but no more," eh?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5008277526325435487?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5008277526325435487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5008277526325435487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5008277526325435487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5008277526325435487'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/01/how-not-to-create-dialog-box.html' title='How Not to Create a Dialog Box'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_ai4qK69BEF0/SYJLFqEjlJI/AAAAAAAAAKg/ozfFuSsKKUE/s72-c/aquamacs_dialog.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3682821750823830868</id><published>2009-01-28T15:17:00.000-08:00</published><updated>2009-01-28T15:30:52.466-08:00</updated><title type='text'>My computer is taunting me.  Loudly.</title><content type='html'>I'm leaving &lt;a href="http://www.xoma.com/"&gt;Xoma&lt;/a&gt;, and arrived at work yesterday morning to a surprise: my computer is taunting me!  And loudly, too.&lt;br /&gt;&lt;br /&gt;There followed much perusal of &lt;tt&gt;ps&lt;/tt&gt; lists and &lt;tt&gt;grep&lt;/tt&gt;ing through the entire filesystem, but I couldn't find the source.  Nithin finally suggested I &lt;tt&gt;find&lt;/tt&gt; any file altered in the past few days, which led me to ... Nithin's &lt;tt&gt;.bash_history&lt;/tt&gt;.  Which led me to this, from "site-packages/date.py":&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;import os&lt;br /&gt;import sys&lt;br /&gt;import random as ran&lt;br /&gt;&lt;br /&gt;taunts = [&lt;br /&gt;  'Wha' + 't ar' + 'e y' + 'ou do' + 'ing?',&lt;br /&gt;  'go' + 'od ridd' + 'ance',&lt;br /&gt;  'say' + 'anara! suc' + 'ker', 'y' + 'ou a' + 're a dir' + 'ty trai' + 'tor',&lt;br /&gt;  'I tho' + 'ught w' + 'e w' + 'ere frie' + 'nds',&lt;br /&gt;  'a ro' + 'ck wa' + 's mi' + 'spla' + 'ced, ' + 'Kie' + 'ran ha' + 's vani' + 'shed',&lt;br /&gt;  'won' + 'der b' + 'oi h' + 'as go' + 'ne t' + 'o t' + 'he da' + 'rk si' + 'de']&lt;br /&gt;&lt;br /&gt;if __name__ == '__main__':&lt;br /&gt;t_index = ran.randint(0, len(taunts)-1)&lt;br /&gt;os.system('os' + 'ascr' + 'ipt -e "set Vol' + 'ume 6"')&lt;br /&gt;os.system(('sa' + 'y "%s"') % taunts[t_index])&lt;br /&gt;&lt;br /&gt;sys.exit()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This process was run every 15 min by a &lt;tt&gt;launchd plist&lt;/tt&gt; called "com.apple.spaces.plist," which sounds pretty innocuous.  Brilliant!&lt;br /&gt;&lt;br /&gt;Xoma's lucky that Nithin Reddy and Jake Rothenbuhler possess more loyalty and general fortitude than I do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3682821750823830868?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3682821750823830868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3682821750823830868' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3682821750823830868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3682821750823830868'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2009/01/my-computer-is-taunting-me-loudly.html' title='My computer is taunting me.  Loudly.'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1095070024024592565</id><published>2008-12-14T10:46:00.000-08:00</published><updated>2008-12-14T10:50:29.951-08:00</updated><title type='text'>The dread -lcrt0.o error on Mac OS X</title><content type='html'>I periodically run into this problem compiling software on the mac:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; ld_classic: can't locate file for: -lcrt0.o&lt;br /&gt; collect2: ld returned 1 exit status&lt;br /&gt; make: *** [muscle] Error 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In this case, I was compiling &lt;a href="http://www.drive5.com/muscle/"&gt;MUSCLE,&lt;/a&gt; a multiple alignment program.&lt;br /&gt;&lt;br /&gt;The solution is to track the &lt;tt&gt;-static&lt;/tt&gt; flag down in your Makefile, and remove it.  GCC/OSX does NOT like &lt;tt&gt;-static&lt;/tt&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1095070024024592565?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1095070024024592565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1095070024024592565' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1095070024024592565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1095070024024592565'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/12/dread-lcrt0o-error-on-mac-os-x.html' title='The dread -lcrt0.o error on Mac OS X'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8386248722795882961</id><published>2008-12-13T14:13:00.000-08:00</published><updated>2008-12-13T14:23:07.827-08:00</updated><title type='text'>On the color of bits</title><content type='html'>Programmers and mathematicians tend to have a hard time with Intellectual Property law. and Copyright in particular.  Fundamentally, when speaking of information, lawyers and math types aren't speaking the same language.  This essay manages to capture the difference better than anything I've read: &lt;a href="http://ansuz.sooke.bc.ca/lawpoli/colour/2004061001.php"&gt;What Colour are your bits?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8386248722795882961?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8386248722795882961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8386248722795882961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8386248722795882961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8386248722795882961'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/12/on-color-of-bits.html' title='On the color of bits'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1569160555088069602</id><published>2008-11-25T14:44:00.000-08:00</published><updated>2008-11-25T15:10:45.554-08:00</updated><title type='text'>A Minor Quibble with Javascript, or: Why Automatic Type Coercion is Evil</title><content type='html'>Earlier today, I posted a question to &lt;a href='http://groups.google.com/group/mozilla.dev.tech.js-engine/topics'&gt;mozilla.dev.tech.js-engine&lt;/a&gt;, to whit:&lt;br /&gt;&lt;br /&gt;   isNaN( [1] ) = false.  Why?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And got the answer I feared: &lt;a href='http://bclary.com/2004/11/07/#a-15.1.2.4'&gt;it's in the spec!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As best I can follow, the spec lays out this sequence for determining whether [1] is, in fact, a number:&lt;br /&gt;&lt;br /&gt;   &lt;tt&gt;isNaN( [1] ) -&gt; ToNumber( [1] ) -&gt; ToPrimitive( [1] ) -&gt; [1].toString() -&gt; "1"&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;And "1" is coerced into a number.&lt;br /&gt;&lt;br /&gt;Automatic coercion, of which this is a rather contorted example, produces counter-intuitive results every time.  Language designers should never, ever make it core to their language.  That is all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1569160555088069602?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1569160555088069602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1569160555088069602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1569160555088069602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1569160555088069602'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/11/minor-quibble-with-javascript-or-why.html' title='A Minor Quibble with Javascript, or: Why Automatic Type Coercion is Evil'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3299631826624384757</id><published>2008-10-28T09:34:00.000-07:00</published><updated>2008-10-28T16:31:18.211-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='anime'/><title type='text'>Berserk, ep 25</title><content type='html'>i finished the anime treatment of the Berserk manga last night.  overall, it's good: well-drawn and voiced, and full of those morally ambiguities that make for interesting drama.&lt;br /&gt;&lt;br /&gt;but the last episode felt more than anything like a bored&lt;br /&gt;father who's gotten sick of telling his kids a bedtime story and&lt;br /&gt;decides to finish it, and finish it fast:&lt;br /&gt;&lt;br /&gt;"so then the broken Prince takes was reunited with his loyal soldiers&lt;br /&gt;and fled to a field.  and then, uhh, they were all eaten by monsters.&lt;br /&gt;yeah.  the end.  now GO TO SLEEP!"&lt;br /&gt;&lt;br /&gt;the Berserk Manga wikipedia entry suggests a much lengthier, more baroque plot arc centering on an ongoing battle between the survivors of the last anime episode (ie, Guts) and demons, but that doesn't change the fact that supernatural occurrences were pretty subtle until the last couple of episodes, making the series finale pretty jarring.&lt;br /&gt;&lt;br /&gt;so i'll echo my brother's advice: if you decide to rent Berserk, you'll sleep better if you stop at episode 19.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3299631826624384757?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3299631826624384757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3299631826624384757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3299631826624384757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3299631826624384757'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/10/berserk-ep-25.html' title='Berserk, ep 25'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3276994069044266229</id><published>2008-10-15T10:58:00.000-07:00</published><updated>2008-10-15T11:08:38.675-07:00</updated><title type='text'>The limits of Open Source</title><content type='html'>One of the arguments made against Open Source in the bad old days, back before IBM started making Real Money on Linux and Microsoft's attitude &lt;a href="http://developers.slashdot.org/article.pl?sid=08/10/04/1515244"&gt;became schizophrenic&lt;/a&gt;, was that Open Source developers don't come up w/ truly new ideas, but simply re-implement old ones.&lt;br /&gt;&lt;br /&gt;Hogwash, but I can think of two technologies we should have thought up first:&lt;br /&gt;&lt;br /&gt;      &lt;a href="http://video.google.com/videoplay?docid=-8002801113289007228"&gt;Dtrace&lt;/a&gt;&lt;br /&gt;      &lt;a href="http://en.wikipedia.org/wiki/ZFS"&gt;ZFS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Just saying.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3276994069044266229?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3276994069044266229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3276994069044266229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3276994069044266229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3276994069044266229'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/10/limits-of-open-source.html' title='The limits of Open Source'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8612931038534197464</id><published>2008-09-24T14:29:00.000-07:00</published><updated>2008-09-24T15:26:53.582-07:00</updated><title type='text'>Reading the iPhone</title><content type='html'>The iPhone has a wonderfully clear, hi-rez screen, and seems a perfectly usable platform for ebooks -- not as good as the Kindle, but better than the &lt;a href="http://en.wikipedia.org/wiki/Palm_V"&gt;Palm V&lt;/a&gt; on which I once read "Don Quixote."&lt;br /&gt;&lt;br /&gt;Sadly, &lt;a href="http://www.plkr.org/"&gt;Plucker&lt;/a&gt; hasn't been ported to the iPhone yet, putting it somewhere behind the 1999 Palm V in functionality.&lt;br /&gt;&lt;br /&gt;There are a plethora of eBook readers available for download from the App Store.  Most of them cost money; &lt;a href="http://www.lexcycle.com/iphone"&gt;Stanza&lt;/a&gt; is one of the exceptions.  It's got some decent books available for download, and the library interface is only moderately wonky, but... but.  The book reader is TERRIBLE.  Rendering takes minutes--not downloading, but rendering--and tilting the screen triggers a complete re-render, meaning that any accidental tilt interrupts your reading for 2-3min.  Completely unusable.&lt;br /&gt;&lt;br /&gt;The best book reader I've found is the iPhone's built-in PDF viewer, accessed via &lt;a href="http://www.avatron.com/products/"&gt;Air Sharing,&lt;/a&gt; an app that was free a week ago but now costs $6.99.  Air Sharing allows you to connect to a network share on your iPhone via WebDAV, which initially sounds only mildly interesting, until you realize that files within that share can be opened for viewing on the iPhone.&lt;br /&gt;&lt;br /&gt;PDFs rendered this way open fast, rotate even faster, and the viewer state--ie, which page you're on--is saved between Air Share sessions.  It would be perfect were it not for the sometimes screen-unfriendly nature of PDFs.&lt;br /&gt;&lt;br /&gt;Text and HTML files can also be viewed, and the Text viewer retains state, but render times are prohibitive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8612931038534197464?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8612931038534197464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8612931038534197464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8612931038534197464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8612931038534197464'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/09/reading-iphone.html' title='Reading the iPhone'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3219183747975951128</id><published>2008-09-17T10:07:00.001-07:00</published><updated>2008-09-17T10:11:16.381-07:00</updated><title type='text'>Sync'ing Google Calendar w/ the iPhone</title><content type='html'>Do we have a word for the relationship milestone marked by my sync'ing my girlfriend's Google Calendar with my iPhone?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.downloadsquad.com/2007/07/27/syncing-google-calendar-to-your-iphone/"&gt;It's pretty easy to do, at least on a Mac.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3219183747975951128?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3219183747975951128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3219183747975951128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3219183747975951128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3219183747975951128'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/09/syncing-google-calendar-w-iphone.html' title='Sync&apos;ing Google Calendar w/ the iPhone'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8249786956930122515</id><published>2008-09-09T11:49:00.000-07:00</published><updated>2008-09-09T11:54:10.492-07:00</updated><title type='text'>A loathsome and indefensible lie</title><content type='html'>From &lt;a href="http://community.livejournal.com/metaquotes/6823581.html"&gt;Livejournal&lt;/a&gt;, by way of &lt;a href="http://scienceblogs.com/pharyngula/2008/09/what_i_hear_when_creationists.php"&gt;Pharyngula&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;The theory of childhood, also known as child origin, is a damnable, loathsome and indefensible lie. How can any thinking person suppose all humans used to be babies once? ...&lt;br /&gt;The development of children has been well-researched in our six-month study following a sample of one thousand children and adults of various ages. We have conclusively proven that while there are minor changes in features like height and body fat ... incontravertibly still every creature in the study that started out as a child had only slightly more adult features at the end of the observation period than at its beginning.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8249786956930122515?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8249786956930122515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8249786956930122515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8249786956930122515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8249786956930122515'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/09/loathsome-and-indefensible-lie.html' title='A loathsome and indefensible lie'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3619475665642953170</id><published>2008-09-08T15:57:00.000-07:00</published><updated>2008-09-08T16:01:06.098-07:00</updated><title type='text'>Two patched protein subtypes and a conserved domain of group I proteins that regulates turnover.</title><content type='html'>I'd almost forgotten about this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.ncbi.nlm.nih.gov/pubmed/18768465"&gt;Two patched protein subtypes and a conserved domain of group I proteins that regulates turnover.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kawamura S, Hervold K, Ramirez-Weber FA, Kornberg TB.&lt;br /&gt;&lt;br /&gt;Biochemistry &amp;amp; Biophysics, University of California, San Francisco, CA 94158.&lt;br /&gt;&lt;br /&gt;Patched (Ptc) is a twelve-cross membrane protein that binds the secreted Hedgehog protein. Its regulation of the Hedgehog signaling pathway is critical to normal development and to a number of human diseases. This report analyzes features of sequence similarity and divergence in the Ptc protein family and identifies two subtypes distinguished by novel conserved domains. We used these results to propose a rational basis for classification. We show that one of the conserved sequence regions in the C-terminal domain of Ptc 1 is responsible, at least in part, for rapid turnover. This sequence is absent from the stable Ptc 2 protein.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3619475665642953170?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3619475665642953170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3619475665642953170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3619475665642953170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3619475665642953170'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/09/two-patched-protein-subtypes-and.html' title='Two patched protein subtypes and a conserved domain of group I proteins that regulates turnover.'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5784488901095788200</id><published>2008-09-03T10:13:00.000-07:00</published><updated>2008-09-06T21:48:27.260-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bioinformatics'/><category scheme='http://www.blogger.com/atom/ns#' term='c'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Levenshtein distance</title><content type='html'>A &lt;a href="http://en.wikipedia.org/wiki/Levenshtein_distance"&gt;Levenshtein distance&lt;/a&gt;, or "edit distance," is a measure of the similarity of two given strings as embodied in the number of changes--insertions, deletions, or substitutions--required to transform one string into the other.&lt;br /&gt;&lt;br /&gt;This is an incredibly useful tool for grouping and ordering strings, and in particular, non-language strings -- we already have a convention for ordering words in English, but if you're staring at 200 protein sequences, alphabetic order doesn't do anything for you.&lt;br /&gt;&lt;br /&gt;There's a fast C implementation of the Levenshtein algorithm and though it doesn't seem to have a proper project homepage, it can be found in the &lt;a href="http://sourceforge.net/projects/translate/"&gt;Pootle &amp;amp; Translate Toolkit&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I needed to add a wildcard parameter to the Levenshtein algorithm so that the distance between, eg, ABC and AXC is 0, given that 'X' is the specified wildcard character.  (Normally, the Levenshtein distance between "ABC" and "AXC" is 1, of course: it takes one substitution to turn one string into the other.)&lt;br /&gt;&lt;br /&gt;So &lt;a href="http://sourceforge.net/mailarchive/forum.php?thread_name=6fcd10f70807291119p6777ca58o10a42602d5c89a63%40mail.gmail.com&amp;amp;forum_name=translate-devel"&gt;I did&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Before I attempted to modify this C version, though, I put together a simple, unoptimized Python version, and the difference in performance was shocking.  On my test data set, the C code took 0.3s to run, and the Python version took ... over 3 minutes.  It was over 1000x slower.&lt;br /&gt;&lt;br /&gt;After adding the couple of &lt;tt&gt;if&lt;/tt&gt; statements and loops necessary for the wildcard code, the C code slowed to 1.2s.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5784488901095788200?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5784488901095788200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5784488901095788200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5784488901095788200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5784488901095788200'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/09/levenshtein-distance.html' title='Levenshtein distance'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2274238808689249299</id><published>2008-08-19T15:56:00.000-07:00</published><updated>2008-08-19T16:21:05.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='mochikit'/><title type='text'>MochiKit, IE6, and DOM manipulation</title><content type='html'>I'd recommend &lt;a href="http://www.mochikit.com/"&gt;MochiKit&lt;/a&gt; to anyone who has to write Javascript code -- it lives up to its motto and "makes Javascript suck less."  I'd recommend it twice as forcefully to Python coders, as features like the &lt;a href="http://www.mochikit.com/doc/html/MochiKit/Iter.html"&gt;iteration tools&lt;/a&gt; are explicitly inspired by Python; and thrice as forcefully to any functional programming -minded Python coders, as it provides handy functions like map and zip, plus short-cuts for partial application and the like.&lt;br /&gt;&lt;br /&gt;Bob Ippolito is a smart man.&lt;br /&gt;&lt;br /&gt;MochiKit also provides some convenient DOM manipulation tools, such that swapping in a whole table takes only 3 or 4 lines of code:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; swapDOM( $('mytable'),&lt;br /&gt;          TABLE({'id':'mytable'},&lt;br /&gt;                TBODY(null, [TR(null, TD(null, "a cell"))] ) );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;(assuming you already had a DOM element w/ id='mytable')&lt;br /&gt;&lt;br /&gt;A quick caveat, though: Internet Explorer 6 is picky about tables, and requires that a table created via the DOM have a TBODY or nothing will be displayed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2274238808689249299?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2274238808689249299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2274238808689249299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2274238808689249299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2274238808689249299'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/08/mochikit-ie6-and-dom-manipulation.html' title='MochiKit, IE6, and DOM manipulation'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1804801367984427236</id><published>2008-07-17T13:01:00.000-07:00</published><updated>2008-07-20T22:13:36.849-07:00</updated><title type='text'>Python class inconsistencies</title><content type='html'>Update:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;amp;postID=1804801367984427236"&gt;Masklinn's correction&lt;/a&gt; is obviously correct -- this isn't primarily a class v. instance variable problem, it's the difference between the operators I'm using on the instance variables.&lt;br /&gt;&lt;br /&gt;So, an assignment (k.t = ...) points the attribute at a wholly new object, while accessing one of the attributes' methods actually alters the attributes' state.&lt;br /&gt;&lt;br /&gt;(Which is where the confusion over mutability comes into play, but it was still confusion on my part.)&lt;br /&gt;&lt;br /&gt;My original posting:&lt;br /&gt;&lt;br /&gt;This makes a modicum of sense if you have a basic grasp of the distinction between mutables and immutables in Python, but it still seems like a mess.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; class K(object):&lt;br /&gt;&gt;&gt;&gt;    t = (1,2,3)&lt;br /&gt;&gt;&gt;&gt;    l = [1,2,3]&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt; k = K()&lt;br /&gt;&gt;&gt;&gt; j = K()&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt; k.t = ('a','b','c')&lt;br /&gt;&gt;&gt;&gt; j.l.append( 10 )&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt; j.t&lt;br /&gt;(1, 2, 3)&lt;br /&gt;&gt;&gt;&gt; k.l&lt;br /&gt;[1, 2, 3, 10]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Do you see it?&lt;br /&gt;&lt;br /&gt;Class &lt;span style="font-style: italic;"&gt;K&lt;/span&gt; defines two attributes, a tuple &lt;span style="font-style: italic;"&gt;t&lt;/span&gt; and a list &lt;span style="font-style: italic;"&gt;l&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;If you instantiate &lt;span style="font-style: italic;"&gt;K&lt;/span&gt; twice (&lt;span style="font-style: italic;"&gt;k&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;j&lt;/span&gt;), then change the &lt;span style="font-style: italic;"&gt;t&lt;/span&gt; attribute of one and the &lt;span style="font-style: italic;"&gt;l&lt;/span&gt; attribute of the other, the change to &lt;span style="font-style: italic;"&gt;l&lt;/span&gt; will be shared between instances, while the change to &lt;span style="font-style: italic;"&gt;t&lt;/span&gt; will only effect the instance.&lt;br /&gt;&lt;br /&gt;Whether an attribute belongs to the class or the instance depends on whether it's type is mutable or not!&lt;br /&gt;&lt;br /&gt;There's a fix in one case: you can use &lt;tt&gt;__init__&lt;/tt&gt; to make mutable data instance-specific:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; class K(object):&lt;br /&gt;&gt;&gt;&gt;    t = (1,2,3)&lt;br /&gt;&gt;&gt;&gt;    l = [1,2,3]&lt;br /&gt;&gt;&gt;&gt;    def __init__(self):&lt;br /&gt;&gt;&gt;&gt;       self.l = [1,2,3]&lt;br /&gt;&lt;/pre&gt;Now changes to &lt;span style="font-style: italic;"&gt;k.l&lt;/span&gt; won't effect &lt;span style="font-style: italic;"&gt;j.l&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, I can't find a way to accomplish the opposite--create a class attribute for an immutable data type--w/out resorting to &lt;tt&gt;__get_attribute__&lt;/tt&gt; magic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1804801367984427236?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1804801367984427236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1804801367984427236' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1804801367984427236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1804801367984427236'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/07/python-class-inconsistencies.html' title='Python class inconsistencies'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2063499987842140255</id><published>2008-06-14T12:19:00.001-07:00</published><updated>2008-06-14T13:09:25.469-07:00</updated><title type='text'>Pyrex for performance and obfuscation</title><content type='html'>I've recently been asked to obfuscate a bunch of Python code.  Encryption is one possibility, but the user needs the key along with the encrypted code in order to run the code, so this is really just a round-about form of obfuscation.  And if multi-billion dollar (and rather unsavory) industries &lt;a href="http://www.schneier.com/blog/archives/2007/01/bluray_cracked.html"&gt;can't get this right&lt;/a&gt;, I'd rather not even try.&lt;br /&gt;&lt;br /&gt;One novel form of obfuscation is compilation to C-code, a task made relatively simple by &lt;a href="http://www.ldots.org/pyrex-guide"&gt;Pyrex&lt;/a&gt; and, more recently, &lt;a href="http://www.cython.org/"&gt;Cython&lt;/a&gt;.  Both projects are mainly intended to ease the integration of C libraries with Python; both accomplish this by compiling native Python code into a &lt;tt&gt;.so&lt;/tt&gt; shared object.  This &lt;tt&gt;.so&lt;/tt&gt; file should, in turn, be slightly harder to decypher than Python bytecode.&lt;br /&gt;&lt;br /&gt;Pyrex isn't as actively maintained as Cython, but it is available via Macports, so I'm using Pyrex for now.&lt;br /&gt;&lt;br /&gt;Pyrex appears to work by first translating your Python code into C, then compiling this C against the Python libraries.  Unannotated Python objects remain &lt;tt&gt;PyObject *&lt;/tt&gt; pointers -- it's quite possible that the Python interpreter, or VM, or whatever lies underneath, is still doing most of the heavy lifting with Pyrex-translated code; I can't make any sense of it.&lt;br /&gt;&lt;br /&gt;But Pyrex also allows you to write Python-like code that gets translated to native C, with all the implied performance gains.  As a simple example, I've done a naive implementation of the Fibonacci sequence in plain Python and in Pyrex' C/Python intermediary.  Here's the file, called "pyrex_fib.pyx":&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cdef _cfib( int i ):&lt;br /&gt; if i &lt; 3:&lt;br /&gt;  return 1&lt;br /&gt; else:&lt;br /&gt;  return _cfib(i-1) + _cfib(i-2)&lt;br /&gt;&lt;br /&gt;def cfib( i ):&lt;br /&gt; return _cfib( i )&lt;br /&gt;&lt;br /&gt;def pyfib( i ):&lt;br /&gt; if i &lt; 3:&lt;br /&gt;  return 1&lt;br /&gt; else:&lt;br /&gt;  return pyfib(i-1) + pyfib(i-2)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;_cfib and pyfib are the same function, w/ _cfib implemented in Pyrex C notation; cfib is a wrapper around _cfib.  (Native C functions can't be called directly from Python and must be wrapped.)&lt;br /&gt;&lt;br /&gt;"pyrex_fib.pyx" is compiled to a Python-friendly &lt;tt&gt;.so&lt;/tt&gt; file via distutils; here's the contents of "setup.py" -- lifted from &lt;a href="http://www.ldots.org/pyrex-guide/2-compiling.html"&gt;Michael's Guide to Pyrex&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;from distutils.core import setup&lt;br /&gt;from distutils.extension import Extension&lt;br /&gt;from Pyrex.Distutils import build_ext&lt;br /&gt;setup(&lt;br /&gt;name = "PyrexGuide",&lt;br /&gt;ext_modules=[&lt;br /&gt; Extension("pyrex_fib", ["pyrex_fib.pyx"])&lt;br /&gt; ],&lt;br /&gt;cmdclass = {'build_ext': build_ext}&lt;br /&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The compilation is accomplished via &lt;tt&gt;python setup.py build_ext --inplace&lt;/tt&gt;, but note that bugs can result in the rather cryptic error message &lt;tt&gt;error: Pyrex does not appear to be installed on platform 'posix'&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I also wrote a plain Python version, "py_fib.py":&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def pyfib( i ):&lt;br /&gt; if i &lt; 3:&lt;br /&gt;  return 1&lt;br /&gt; else:&lt;br /&gt;  return pyfib(i-1) + pyfib(i-2)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This enables me to compare Pyrex-translated Python code stored in a &lt;tt&gt;.so&lt;/tt&gt; to the same code stored in a regular Python module, and compare them both to the "native" version.&lt;br /&gt;&lt;br /&gt;I do this comparison via a simple module that imports both forms and runs them, timing each invocation.  Here's the output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;kieran@host:~/tmp/pyrex$ ./time_fib.py&lt;br /&gt;Sat Jun 14 12:15:07 2008&lt;br /&gt;pyrex_fib.cfib(40) = 102334155 in 9.6s&lt;br /&gt;pyrex_fib.pyfib(40) = 102334155 in 121.5s&lt;br /&gt;py_fib.pyfib(40) = 102334155 in 98.0s&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Interestingly, the Pyrex-translated Python code is about 20% slower than the regular Python; presumably, it's not benefiting from various interpreter optimizations.  The "C" implementation blows them both out of the water.&lt;br /&gt;&lt;br /&gt;Pyrex looks great for wrapping C libraries for Python, and might serve for code obfuscation, but the major limitation is the difficulty of moving non-scalar data types between C and Python: it wouldn't have been easy to return a Python dictionary from my cfib routine, for example.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2063499987842140255?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2063499987842140255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2063499987842140255' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2063499987842140255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2063499987842140255'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/06/pyrex-for-performance-and-obfuscation.html' title='Pyrex for performance and obfuscation'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3621124637717816488</id><published>2008-05-30T10:34:00.000-07:00</published><updated>2008-05-30T10:43:02.081-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Ouroboros</title><content type='html'>Circular dependencies will break your Python code!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Ouroboros"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/commons/f/fa/Ouroboros.png" alt="Ouroboros" border="0" height="190" width="179" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Given some module A that depends upon module B (ie, &lt;tt&gt;import B&lt;/tt&gt;), and given a module B which depends upon module A, you'll get this rather cryptic error message:&lt;br /&gt;&lt;br /&gt;    &lt;tt&gt;ImportError: cannot import name A&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;This works at any remove, of course -- the circle could stretch through 1,000 modules, but once you forge that loop, you're toast.&lt;br /&gt;&lt;br /&gt;The solution is to refactor your code to put routine from A needed by B into a separate module C that depends upon neither.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3621124637717816488?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3621124637717816488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3621124637717816488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3621124637717816488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3621124637717816488'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/05/ouroboros.html' title='Ouroboros'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-976169962753194206</id><published>2008-05-28T10:02:00.000-07:00</published><updated>2008-05-28T10:07:57.318-07:00</updated><title type='text'>Leopard emacs is broken...</title><content type='html'>Which means that GNUplot is broken under Leopard, and with it, &lt;a href="http://www.tau.ac.il/%7Ekineret/amit/scipy_tutorial/"&gt;scipy&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Fortunately, there's a &lt;a href="http://www.ericrose.net/archives/2008/01/21/installing-octave-on-leopard/"&gt;solution&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;sudo mv /usr/bin/emacs-i386 /usr/bin/emacs-i386.backup&lt;br /&gt;sudo /usr/libexec/dumpemacs -d&lt;br /&gt;emacs --version&lt;br /&gt;emacs&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;It's quite beyond me why the emacs shipping w/ Leopard is broken out of the box, but can be repaired via the &lt;tt&gt;dumpemacs&lt;/tt&gt; command, but there it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-976169962753194206?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/976169962753194206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=976169962753194206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/976169962753194206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/976169962753194206'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/05/leopard-emacs-is-broken.html' title='Leopard emacs is broken...'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-8251678306857220133</id><published>2008-02-14T10:40:00.001-08:00</published><updated>2008-02-14T10:42:11.109-08:00</updated><title type='text'>Redirecting from mod_python</title><content type='html'>The sort of thing I'm inclined to forget:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def handler(req):&lt;br /&gt;    req.headers_out['location'] = 'http://www.modpython.org/'&lt;br /&gt;    req.status = apache.HTTP_MOVED_TEMPORARILY&lt;br /&gt;    req.send_http_header()&lt;br /&gt;    return apache.OK&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Care of &lt;a href="http://www.modpython.org/FAQ/faqw.py?req=edit&amp;amp;file=faq03.002.htp"&gt;the mod_python FAQ&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-8251678306857220133?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/8251678306857220133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=8251678306857220133' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8251678306857220133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/8251678306857220133'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/02/redirecting-from-modpython.html' title='Redirecting from mod_python'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2471536306461949969</id><published>2008-01-21T09:01:00.000-08:00</published><updated>2008-01-22T16:02:22.221-08:00</updated><title type='text'>mod_python, Leopard, and the trouble w/ 64 bits</title><content type='html'>mod_python is broken under Leopard, at least on 64-bit capable systems.&lt;br /&gt;&lt;br /&gt;Actually, this is only half true.  Leopard ships w/ Apache 2, but more importantly, it ships w/ a 64-bit capable Apache 2.  Because it's the 64-bit version that runs on capable systems, any modules linked by Apache need to be 64-bit capable.&lt;br /&gt;&lt;br /&gt;Apache is 64-bit capable:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;kieran@bali:~$ file /usr/sbin/httpd&lt;br /&gt;/usr/sbin/httpd: Mach-O universal binary with 4 architectures&lt;br /&gt;/usr/sbin/httpd (for architecture ppc7400):     Mach-O executable ppc&lt;br /&gt;/usr/sbin/httpd (for architecture ppc64):       Mach-O 64-bit executable ppc64&lt;br /&gt;/usr/sbin/httpd (for architecture i386):        Mach-O executable i386&lt;br /&gt;/usr/sbin/httpd (for architecture x86_64):      Mach-O 64-bit executable x86_64&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And mod_python, built by simply running ./configure and make, is 64-bit:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;kieran@bali:~$ file  /usr/libexec/apache2/mod_python.so&lt;br /&gt;/usr/libexec/apache2/mod_python.so: Mach-O 64-bit bundle x86_64&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So that much works.  And basic mod_python functionality is intact.  The problem comes when you try to compile python libraries  that depend upon native C/C++ code.  Neither command line options nor the CFLAGS environmental variable can force &lt;a href="http://lists.apple.com/archives/Web-dev/2008/Jan/msg00009.html"&gt;python distutils&lt;/a&gt; to build 64-bit friendly libraries.&lt;br /&gt;&lt;br /&gt;I haven't figured out how to force distutils to cooperate yet, but in the meantime, rebuilding the entire software stack in &lt;a href="http://www.finkproject.org/"&gt;fink&lt;/a&gt; creates a usable environment.&lt;br /&gt;&lt;br /&gt;The first step is to simply ask for mod_python:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;stop apache: &lt;tt&gt;sudo service org.apache.httpd stop&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;install the necessary packages: &lt;tt&gt;fink install libapache2-mod-python-py24&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;accept the lengthy list of dependencies&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Installing the PHP module wasn't so easy; I wound up building it by hand.  First, make sure the Postgres include files are installed, assuming you need Postgres:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;fink install postgresql82-dev&lt;br /&gt;&lt;br /&gt;./configure --with-apxs2=/sw/bin/apxs2 --without-iconv --with-mysql=/sw/ --with-pgsql=/sw/&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2471536306461949969?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2471536306461949969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2471536306461949969' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2471536306461949969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2471536306461949969'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/01/modpython-leopard-and-trouble-w-64-bits.html' title='mod_python, Leopard, and the trouble w/ 64 bits'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-1681163513276165802</id><published>2008-01-14T10:55:00.000-08:00</published><updated>2008-02-27T14:47:38.545-08:00</updated><title type='text'>Magsafe Connector Disassembly</title><content type='html'>The chord nearest the &lt;a href="http://en.wikipedia.org/wiki/Magsafe"&gt;Magsafe&lt;/a&gt; plug on a modern Apple laptop is under a good deal of mechanical stress, and mine finally gave out; the outer layer of wire looked like loose steel wool.  So I decided to take the plug apart:&lt;br /&gt;&lt;br /&gt;&lt;table border="0" cellpadding="6" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ai4qK69BEF0/R8XnwT_Y6zI/AAAAAAAAAEs/LiSSMCviWWc/s1600-h/magsafe_front.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 167px; height: 92px;" src="http://bp0.blogger.com/_ai4qK69BEF0/R8XnwT_Y6zI/AAAAAAAAAEs/LiSSMCviWWc/s320/magsafe_front.JPG" alt="" id="BLOGGER_PHOTO_ID_5171794564290767666" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ai4qK69BEF0/R8XoOz_Y60I/AAAAAAAAAE0/3H5NTmjR5lo/s1600-h/magsafe_back.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 155px; height: 93px;" src="http://bp2.blogger.com/_ai4qK69BEF0/R8XoOz_Y60I/AAAAAAAAAE0/3H5NTmjR5lo/s320/magsafe_back.JPG" alt="" id="BLOGGER_PHOTO_ID_5171795088276777794" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Notice that black bit on the PCB in the left-hand image?  That's a chip, identified by the following text:&lt;br /&gt;&lt;br /&gt;A3&lt;br /&gt;2100&lt;br /&gt;613A1&lt;br /&gt;&lt;br /&gt;It most likely controls the switch between the orange "charging" LED indicator and the green "powered" LED.  However, I wonder if this chip doesn't hold the answer to another mystery: &lt;a href="http://blogs.zdnet.com/Apple/?p=316"&gt;why won't the Macbook battery charge off the Magsafe airline adapter?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For further information on the subject, I'd suggest Stuart Schmitt's &lt;a href="http://pangea.stanford.edu/%7Eschmitt/magsafe/"&gt;guide&lt;/a&gt; to hacking the MagSafe cable for use w/ a standard DC transformer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-1681163513276165802?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/1681163513276165802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=1681163513276165802' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1681163513276165802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/1681163513276165802'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/01/magsafe-connector-disassembly.html' title='Magsafe Connector Disassembly'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ai4qK69BEF0/R8XnwT_Y6zI/AAAAAAAAAEs/LiSSMCviWWc/s72-c/magsafe_front.JPG' height='72' width='72'/><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4233858474371781873</id><published>2008-01-08T15:22:00.000-08:00</published><updated>2008-01-21T09:03:09.776-08:00</updated><title type='text'>mod_python under Leopard</title><content type='html'>OS upgrades break my workaround for compiling mod_python under OSX.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://mike.crute.org/blog/2007/11/08/mod_python-on-leopard/"&gt;This&lt;/a&gt; is a good guide for fixing mod_python under Leopard, but with a caveat: if you've upgraded your system from Tiger, the "missing symbol" problem might persist.  Run &lt;tt&gt;otool -L /usr/libexec/apache2/mod_python.so&lt;/tt&gt; -- if you see a reference to &lt;tt&gt;/Library/Frameworks/Python.framework/Versions/2.4/&lt;/tt&gt;, that's your problem.  I simply renamed &lt;tt&gt;/Library/Frameworks/Python.framework&lt;/tt&gt; to &lt;tt&gt;/Library/Frameworks/_Python.framework&lt;/tt&gt; and rebuilt.&lt;br /&gt;&lt;br /&gt;Update: I take it all back; mod_python essentially doesn't work under Leopard, at least on a 64-bit capable system.  See my &lt;a href="http://appliedprocrastination.blogspot.com/2008/01/modpython-leopard-and-trouble-w-64-bits.html"&gt;Jan 21&lt;/a&gt; post for more information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4233858474371781873?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4233858474371781873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4233858474371781873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4233858474371781873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4233858474371781873'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2008/01/modpython-under-leopard.html' title='mod_python under Leopard'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-282251482516129861</id><published>2007-12-17T15:07:00.000-08:00</published><updated>2007-12-17T15:14:54.834-08:00</updated><title type='text'>Merry Christmas, San Francisco Style</title><content type='html'>Macy's on Union Square, Saturday, 15 December 2007.  But a small portion of the March of Santas:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_ai4qK69BEF0/R2cCDhGZ9SI/AAAAAAAAACs/tHJRcG-pjWU/s1600-h/santas.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_ai4qK69BEF0/R2cCDhGZ9SI/AAAAAAAAACs/tHJRcG-pjWU/s320/santas.JPG" alt="" id="BLOGGER_PHOTO_ID_5145083358742181154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;(About the photo: my apologies, but the camera on the Sidekick 3 is almost worthless.  1.3 megapixel, sure, but you've gotta drop the rez to VGA to smooth out the noise ... what a mess.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-282251482516129861?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/282251482516129861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=282251482516129861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/282251482516129861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/282251482516129861'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/12/merry-christmas-san-francisco-style.html' title='Merry Christmas, San Francisco Style'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_ai4qK69BEF0/R2cCDhGZ9SI/AAAAAAAAACs/tHJRcG-pjWU/s72-c/santas.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-7748487173822455359</id><published>2007-11-27T13:32:00.000-08:00</published><updated>2007-11-27T14:57:08.945-08:00</updated><title type='text'>Re: the EMBOSS bioinformatics toolset, and the IEP utility in particular</title><content type='html'>The &lt;a href="http://emboss.sourceforge.net/developers/nucleus/embiep.html"&gt;iep.c&lt;/a&gt; codebase is supposed to predict Isoelectric Point for an amino acid sequence.   And it does this, but it also manages to serve as an object lesson in bad C code:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;AjPFile, AjPStr, and ajint types: your very own custom &lt;span style="font-style: italic;"&gt;integer&lt;/span&gt; type?? Really?&lt;/li&gt;&lt;li&gt;Put everything in global variables!  Thus, you wind up w/ void functions that take 0 parameters and do something incredibly important; the challenge is to track down what that important thing might be!  (Every programmer should be required to write code in a purely functional language for at least 3 months. By law.)  Take &lt;a href="http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+%5BEFUNCREL-ID:embIepPkRead%5D"&gt;void embIepPkRead()&lt;/a&gt; , for example.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+%5BEFUNCREL-ID:embIepIepS%5D"&gt;Functions that simply wrap other functions.&lt;/a&gt;  Code as treasure hunt!&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Biologists shouldn't code.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If anybody is interested in the basic algorithm used by EMBOSS IEP to calculate Pi, it basically calculates the charge of the protein iteratively across potential pH's until it hits 0 charge, or the upper and lower bounds converge.  The primary function can be found in &lt;a href="http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+%5BEFUNCREL-ID:embIepPhConverge%5D"&gt;embIepPhConverge&lt;/a&gt;.  &lt;tt&gt;ajint *c&lt;/tt&gt; holds a histogram of amino acid counts, &lt;tt&gt;double *K&lt;/tt&gt; is an array of dissociation constants for each amino acid, and &lt;tt&gt;double *pro&lt;/tt&gt; is the moneymaker -- it gets updated w/ a proton count for each amino acid as different pH's are tried.  The loop starts w/ max 14.0 and min 1.0, sets &lt;tt&gt;pro&lt;/tt&gt; for the midpoint pH, then sets either the upper or lower bound to the midpoint, depending upon whether the calculated charge is positive or negative.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-7748487173822455359?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/7748487173822455359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=7748487173822455359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7748487173822455359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/7748487173822455359'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/11/re-emboss-bioinformatics-toolset-and.html' title='Re: the EMBOSS bioinformatics toolset, and the IEP utility in particular'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-4940399860690768112</id><published>2007-11-16T16:40:00.000-08:00</published><updated>2007-11-16T16:46:28.081-08:00</updated><title type='text'>Java from the command line and GUI dependence</title><content type='html'>Calling a .jar file from the command-line in headless mode--say, from a web-server--seems to pose a problem under OS X Tiger, in that java requires communication w/ the GUI system. (&lt;a href="http://www.linuxquestions.org/questions/programming-9/exception-in-thread-main-java.lang.internalerror-cant-connect-to-x11-window-serve-175034/"&gt;This&lt;/a&gt; leads me to believe that the problem applies under Linux as well.)&lt;br /&gt;&lt;br /&gt;The solution is the "-Djava.awt.headless=true" parameter; for example, here's how I call the Batik SVG rasterizer:&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;  &lt;/span&gt;&lt;tt&gt;/usr/bin/java -Djava.awt.headless=true -jar /Library/WebServer/Documents/py/archive/batik-1.7/batik-rasterizer.jar -w 1000 -h 1000 -bg 255.255.255.255 xxx.svg&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;I knew I didn't trust that newfangled Java.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-4940399860690768112?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/4940399860690768112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=4940399860690768112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4940399860690768112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/4940399860690768112'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/11/java-from-command-line-and-gui.html' title='Java from the command line and GUI dependence'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-391541726977284859</id><published>2007-09-24T15:32:00.000-07:00</published><updated>2007-09-24T15:43:01.471-07:00</updated><title type='text'>Mac OS X Mirror: The RAID for disks that never fail</title><content type='html'>I built a mirrored array (RAID-1) on a Mac OS X machine, and a disk failed.  Which is why you mirror disks in the first place.&lt;br /&gt;&lt;br /&gt;The instructions for re-creating a mirror basically tell you to &lt;a href="http://www.markandjo.com/markblog/?p=372"&gt;drag a replacement disk into the array&lt;/a&gt; -- presto chango, you're done!  Except, I can't.  Because when I originally created the array, I didn't dig through the options and &lt;a href="http://discussions.apple.com/thread.jspa?messageID=5360225"&gt;enable "Auto-rebuilding"&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Or, as &lt;a href="http://www.procida.us/"&gt;Tom&lt;/a&gt; said, "Did you go into 'advanced' and deselect `corrupt randomly`?"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-391541726977284859?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/391541726977284859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=391541726977284859' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/391541726977284859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/391541726977284859'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/09/mac-os-x-mirror-raid-for-disks-that.html' title='Mac OS X Mirror: The RAID for disks that never fail'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3539290588996357208</id><published>2007-09-21T22:51:00.000-07:00</published><updated>2007-09-21T22:59:00.961-07:00</updated><title type='text'>Macbook evisceration</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_ai4qK69BEF0/RvSud0BxCkI/AAAAAAAAABE/LUFIcH5gN0Y/s1600-h/macbook_guts.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_ai4qK69BEF0/RvSud0BxCkI/AAAAAAAAABE/LUFIcH5gN0Y/s320/macbook_guts.JPG" alt="" id="BLOGGER_PHOTO_ID_5112903304177846850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Dumping a glass of water on your Macbook keyboard is double-plus ungood, but I got a lucky break: when I flipped it over to dump the water, I flipped it towards the DVD drive.  The machine was dead, to be sure, but the water went to the optical drive instead of the motherboard.&lt;br /&gt;&lt;br /&gt;If this happens to you, I'd recommend &lt;a href="http://www.ifixit.com/Guide/Mac/MacBook/Complete-Disassembly/86/1/Page-1/Complete-Disassembly"&gt;this &lt;/a&gt; guide to Macbook disassembly, and access to a &lt;a href="http://en.wikipedia.org/wiki/Desiccator"&gt;desiccator&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3539290588996357208?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3539290588996357208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3539290588996357208' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3539290588996357208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3539290588996357208'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/09/macbook-evisceration.html' title='Macbook evisceration'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_ai4qK69BEF0/RvSud0BxCkI/AAAAAAAAABE/LUFIcH5gN0Y/s72-c/macbook_guts.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-5142483009256228230</id><published>2007-09-15T18:52:00.000-07:00</published><updated>2007-09-15T18:54:36.981-07:00</updated><title type='text'>Archive</title><content type='html'>The post preceding this one is archival: the past few years of technical notes, minus the past couple months' worth.  Those months were lost when my previous host went away.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-5142483009256228230?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/5142483009256228230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=5142483009256228230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5142483009256228230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/5142483009256228230'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/09/archive.html' title='Archive'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-2566237256694648904</id><published>2007-09-15T18:50:00.000-07:00</published><updated>2007-09-15T18:52:16.175-07:00</updated><title type='text'></title><content type='html'>&lt;div class="heading"&gt;Thur, 31 May 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;SMB under OSX&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Wonderfully annoying: when you mount a Samba share under OSX, only root and the user who mounts the share can see the files, irrespective of file permissions and ownership.  So, if you want a web server to see a SMB mount, here's the magic: &lt;tt&gt;sudo -u www mount_smbfs //username:password@server.domain.com/share /share&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;   Note that /share must be owned by www, in this scenario&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Wed, 16 May 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Image Magick hints&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Convert x.gif to grayscale x.png: &lt;tt&gt;convert x.gif -type grayscale x.png&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;   Isolate the red channel from RGB image x.jpg: &lt;tt&gt;convert x.jpg -channel R -separate x.png&lt;/tt&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 8 May 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Python whinging&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   A couple of quick notes, for my own reference.  1. 16-bit grayscale images can be created from a binary string &lt;b&gt;s&lt;/b&gt;like so: &lt;tt&gt;Image.fromstring("I", (250,250), s, "raw", "I;16B")&lt;/tt&gt;  2. the python zipfile modules is SLOW.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 8 May 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;The vagaries of coincidence&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   The .cxi files generated by Applied Biosystems 8200 FMAT imaging software are NOT Clemex format images, though they share a file extension and are both used in biology.  No.  Instead, .cxi files are &lt;a href="http://base.google.com/base/a/hervold/1613733/D13005601656167848442"&gt;RAW image data.&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Sat, 7 April 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Ugly shell tricks&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   One particular shell incantation I've managed to remember for some years now: &lt;tt&gt;2&amp;gt;&amp;amp;1&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;   This redirects both STDERR and STDOUT to one channel, and is handy for piping things sensibly into &lt;tt&gt;less&lt;/tt&gt;.  But care of O'Reilly's, "Unix Power Tools," here's a discussion of why dumping the resulting stream into a file isn't intuitively done:&lt;br /&gt;&lt;br /&gt;   &lt;/p&gt;&lt;pre&gt;&lt;br /&gt;One of the common questions about the Bourne and Korn shells is why only&lt;br /&gt;the second command will redirect both stdout and stderr (13.1) to a file:&lt;br /&gt;&lt;br /&gt;   $ cat food 2&amp;gt;&amp;amp;1 &amp;gt; file&lt;br /&gt;   cat: can't open food&lt;br /&gt;   $ cat food &amp;gt; file 2&amp;gt;&amp;amp;1&lt;br /&gt;   $&lt;br /&gt;&lt;br /&gt;Although lots of sh manual pages don't mention this, the shell reads&lt;br /&gt;arguments from left to right.&lt;br /&gt;&lt;br /&gt;  1.  On the first command line, the shell sees 2&amp;gt;&amp;amp;1 first. That&lt;br /&gt;means "make the standard error (file descriptor 2) go to the same place&lt;br /&gt;as the standard output (fd1) is going." There's no effect because both&lt;br /&gt;fd2 and fd1 are already going to the terminal. Then &amp;gt; file redirects&lt;br /&gt;fd1 (stdout) to file. But fd2 (stderr) is still going to the terminal.&lt;br /&gt;&lt;br /&gt;  2.  On the second command line, the shell sees &amp;gt; file first and&lt;br /&gt;redirects stdout to file. Next 2&amp;gt;&amp;amp;1 sends fd2 (stderr) to the&lt;br /&gt;same place fd1 is going - that's to the file. And that's what you want.&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Mon, 2 April 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;Recommended to me by Tom: &lt;a href="http://isbn.nu/9781572316218"&gt;The Software Project Survival Guide&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Fri, 30 Mar 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;On installing linux on your cheapo Linksys router&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;    The Linsys WRT54G router can easily be had for $50 and converted to a &lt;a href="http://www.dd-wrt.com/"&gt;half-decent Linux router&lt;/a&gt;.  Most discussions of the Linsys WRT54G advise against buying the newer versions (v5 or v6), since they've cut the available flash RAM to 2M.  However, it CAN be made to work: first, only use &lt;a href="http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fdd-wrt.v23%20SP2%2Fmicro%2F&amp;amp;download=dd-wrt.v23_micro_generic.bin"&gt;v23_SP2&lt;/a&gt;, not the newer SP3.  The instructions are pretty good, but omit one important detail: when time comes to upload the firmware, you're computer's ethernet card has to be set to 10Mb/s / half-duplex. Auto-detect won't work, at least on my Intel Macbook.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 14 Mar 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;On JSON, Python, Javascript, and types&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;    A Python server and Javascript client interact pretty well, BUT: associative arrays in Javascript are a fragile hack.  To create an associative array (or "dictionary," or "hash table") in ECMAscript/Javascript, you treat a generic object, which necessarily has keys and values, as that's what an Object is, as an associative array.  But the keys are STRINGS; so a numeric associative array is now keyed off of STRINGS, not INTs.  Therefore, if your JS client receives a dictionary keyed off of ints, those ints will automatically be converted to ASCII representation.  If this dictionary is then sent back to the server, Python will maintain the string key representations, and everything goes to hell.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 6 Feb 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;De gustibus non disputandem est&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Fri, 12 Jan 2007&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Cell phones &amp;amp; Disappointment&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Ok, &lt;a href="http://www.apple.com/iphone/"&gt;Apple's iPhone&lt;/a&gt; has been unveiled, to much hoopla.  But wait: it doesn't support &lt;a href="http://www.engadget.com/2007/01/12/iphone-might-have-3g-switched-on-via-upgrade-probably-not/"&gt;3G&lt;/a&gt;!  That's livable, because it's not a cell phone, it's a COMPUTER, right?  It runs OS X! But it's NOT: &lt;a href="http://apple.slashdot.org/apple/07/01/12/0430200.shtml"&gt;it can't run the software I'd like it to&lt;/a&gt;.  I guess I'll have to buy a relatively ugly &lt;a href="http://www.linuxdevices.com/news/NS2986976174.html"&gt;linux-based phone&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Fri, 1 Dec 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;the &lt;tt&gt;cut&lt;/tt&gt; command&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   somehow, i've never seen the cut command before.  very useful: it returns the n'th field from a line, where the &lt;tt&gt;-d&lt;/tt&gt; option can set the delimeter (eg, the default of tab, or "|", or whatever you want).  handy!&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 21 Nov 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;A thought on the Macbook keyboard, with specific regard to Ubuntu Linux, the Parallels Virtualized Machine, and the &amp;lt;F1&amp;gt; key&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   By default, the &amp;lt;F1&amp;gt; key isn't a function key; it adjusts screen brightness.  Nor is the &amp;lt;F3&amp;gt; key a function key: it mutes the speakers.  And so on.  In order to access the &lt;tt&gt;F&lt;/tt&gt; functionality of those keys, hold down &lt;tt&gt;Fn&lt;/tt&gt;.  That is all.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Fri, 10 Nov 20006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Multi-value &lt;tt&gt;inserts&lt;/tt&gt; in Postgres&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   the basic syntax is as follows--and it's ugly:&lt;br /&gt;   &lt;/p&gt;&lt;pre&gt;copy xha_param(param_name,param_datatype) from STDIN delimiter '|';&lt;br /&gt;   Target identifier|var&lt;br /&gt;   Campaign name|var&lt;br /&gt;   Injection date|var&lt;br /&gt;   Injection type|var&lt;br /&gt;   \.&lt;/pre&gt;&lt;br /&gt;   &lt;p&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Thurs, 2 Nov 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Griping about Python&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   There really aren't many: Python feels more like a "real" language than a sloppy scripting language, and, frankly, I like it.  I'll restrain from doing my "it lacks functional language feature X" routine, as that's not very interesting, and to Python's credit, it has more functional features than you'd expect--including currying as of 2.5!&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;But: I've got a couple of small complaints.&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;    &lt;li&gt;Mutable types, eg, lists, should return the object in question when a class method is run.  For example, list.sort() doesn't return the sorted list, but ... nothing at all. so you can't do something like ",".join(list.sort())&lt;/li&gt;&lt;br /&gt; &lt;li&gt;The &lt;tt&gt;pass&lt;/tt&gt; statement.  This is a by-product of Python's whitespace-as-syntax design, but it doesn't feel NECESSARY.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;The lack of a tertiary operator.  This has been discussed at length elsewhere, so I won't belabour the point. [&lt;b&gt;UPDATE:&lt;/b&gt; one has been added: A if CONDITION else B -- 10 Nov 2006]&lt;/li&gt;&lt;br /&gt;   &lt;/ol&gt; More to come.&lt;p&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Mon, 2 Oct 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;mod_python on Mac OSX&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   First off, compilation of mod_python for the Mac OSX defaults--apache 1.3 and python 2.3--is described at &lt;a href="http://www.modpython.org/pipermail/mod_python/2004-August/015994.html"&gt;http://www.modpython.org/pipermail/mod_python/2004-August/015994.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;   Next, apache config is discussed at &lt;a href="http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking"&gt;http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking&lt;/a&gt;. the important bit is the &lt;tt&gt;AddHandler python-program .py&lt;/tt&gt; line: all the other guides only mention the newer syntax, which won't work w/ apache 1.3 (or, more accurately, the older version of mod_python, required for apache 1.3)&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Fri, 18 Aug 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Hammerhead, web server load tester&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   i used to use &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=15206&amp;amp;package_id=12315&amp;amp;release_id=143973"&gt;Hammerhead&lt;/a&gt; for stress testing web servers, and it was great.  but now i've switched from Debian Linux to Mac OSX, and fink doesn't include a hammerhead port ... much fun ensues, getting it to compile.  suck, sucky autoconf files.  first, add the line &lt;tt&gt;target_os=freebsd&lt;/tt&gt; before the &lt;tt&gt;case "$target_os" in&lt;/tt&gt; block in configure.  next, run &lt;tt&gt;./configure --host=x-y-freebsd&lt;/tt&gt;.  then, edit &lt;tt&gt;config.h&lt;/tt&gt; and replace &lt;tt&gt;#define HAVE_SSL 1&lt;/tt&gt; with &lt;tt&gt;#undef HAVE_SSL&lt;/tt&gt;.  edit &lt;tt&gt;hammer.mk&lt;/tt&gt; and remove &lt;tt&gt;-pthreads&lt;/tt&gt;. last, set &lt;tt&gt;LIBS=-lresolv&lt;/tt&gt; in &lt;tt&gt;hammer.mk&lt;/tt&gt;.  jesus.&lt;br /&gt;&lt;br /&gt;   Update: ultimately, i gave up on hammerhead and used &lt;tt&gt;time wget&lt;/tt&gt;.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Wed, 9 Aug 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;More on Postgres on Mac OSX (fink)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   to stop postgres, issue this command: &lt;tt&gt;/sw/bin/pg_ctl stop -D /sw/var/postgresql-8.0/data/&lt;/tt&gt; ... though i imagine your milage may vary depending upon your exactly version&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 8 Aug 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;PostgreSQL on Mac OSX Tiger&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   I used fink to install postgres.  The only major problem here is the postgres user, which is added by fink but unusable, as its login shell and home directory are set to &lt;tt&gt;/dev/null&lt;/tt&gt;.  Worse, OSX is non-traditional in its account setup, so you can't just edit &lt;tt&gt;/etc/passwd&lt;/tt&gt;, or &lt;tt&gt;/sw/etc/passwd-fink&lt;/tt&gt;.  Instead, use &lt;b&gt;NetInfo Manager&lt;/b&gt;, which can be found in /Applications/Utilities.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Mon, 17 July 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;A New Way to Waste Time&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Actually, it's an old way, made new again: &lt;a href="http://mac.softpedia.com/get/System-Utilities/DOSBox.shtml"&gt;DOSBox&lt;/a&gt; for Mac OSX.  And &lt;a href="http://syndicate.pc.cheatplaza.nl/"&gt;Syndicate,&lt;/a&gt; one of my favorite games from the early 1990s.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Thurs, 29 June 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;The &lt;tt&gt;find&lt;/tt&gt; Command&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   I finally bothered to read the &lt;tt&gt;find&lt;/tt&gt; man page.  Here's how you recursively grep for &lt;i&gt;string&lt;/i&gt;: &lt;tt&gt;find ~/ -type f -exec grep -l &lt;i&gt;string&lt;/i&gt; '{}' \;&lt;/tt&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Wed, 21 June 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Fun with mysqld&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   FARW left for Seattle today, to the best of my knowledge.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;Anyhow, two thoughts about mysqld: in &lt;tt&gt;my.cnf&lt;/tt&gt;, setting bind-address=0.0.0.0 allows connections from all hosts.  Also, to enable a user to connect from anywhere, when she is created, give her the name 'somename'@'%' -- that percent sign is the key, here.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 20 June 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Yet another reason to loath Windows&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Shiho's Windows XP machine once again Autoupdate'd (didn't i DISABLE that?!?), which renders the machine inoperative--it just reboot automatically ad infinidum, and gives the error message&lt;br /&gt;     &lt;tt&gt;STOP: c000021a {Fatal System Error}&lt;br /&gt;       Windows Logon Process system process terminated unexpectedly&lt;br /&gt; with a status of 0xc0000018&lt;br /&gt; &lt;/tt&gt;&lt;br /&gt;     The fix can be found &lt;a href="http://www.geekstogo.com/forum/Fatal_Errors_Upon_Loading_Windows-t19049.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;     &lt;p&gt;I'll copy it, for posterity:&lt;br /&gt;&lt;br /&gt;     &lt;tt&gt;The newest Critical Patches can be the reason for the error, please&lt;br /&gt;&lt;br /&gt;     uninstall KB893066, KB890923, KB890859 and KB893086&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     ----------------------------------------&lt;br /&gt;&lt;br /&gt;     Please follow the procedure suggested by microsoft to solve BSOD&lt;br /&gt;&lt;br /&gt;     problem from the latest windows update.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     1. Insert the Windows XP startup disk in your floppy disk drive or&lt;br /&gt;     insert&lt;br /&gt;&lt;br /&gt;     the Windows XP CD in the CD drive or in the DVD drive, and then restart&lt;br /&gt;&lt;br /&gt;     your computer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     Note When you receive the following message, press a key to start your&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     computer from the Windows XP CD:&lt;br /&gt;&lt;br /&gt;     Press any key to boot from CD&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     Note Your computer must be configured to start from the CD drive or the&lt;br /&gt;&lt;br /&gt;     DVD drive.&lt;br /&gt;&lt;br /&gt;     For more information about how to configure your computer to start from&lt;br /&gt;&lt;br /&gt;     the CD drive or the DVD drive, see the documentation that came with your&lt;br /&gt;&lt;br /&gt;     computer or contact the computer manufacturer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     2. When you receive the Welcome to Setup message, press R to start the Recovery Console.&lt;br /&gt;&lt;br /&gt;     Note Multiple options will appear on the screen.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     3. Select the Windows XP installation in question.&lt;br /&gt;&lt;br /&gt;     Note You must select a number before you press ENTER, or the computer&lt;br /&gt;&lt;br /&gt;     will restart. Typically, only the 1:&lt;br /&gt;&lt;br /&gt;     C:\Windows selection is available.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     4. If you are prompted to type an administrator password, do so. If you&lt;br /&gt;&lt;br /&gt;     do not know the administrator password, press ENTER. (Typically, the&lt;br /&gt;&lt;br /&gt;     password is blank.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     Note You will not be able to continue if you do not have the&lt;br /&gt;&lt;br /&gt;     administrator password.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     5. At the command prompt, type cd $ntuninstallKB.........HERE THE&lt;br /&gt;&lt;br /&gt;     NUMBER OF THE PATCH.....$\spuninst, and then press ENTER.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     Note After you complete this step, you cannot stop the removal&lt;br /&gt;&lt;br /&gt;     process.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     6. At the command prompt, type batch spuninst.txt, and then press&lt;br /&gt;&lt;br /&gt;     ENTER.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     7. After the Ptach is removed, type exit, and then press ENTER oo&lt;br /&gt;&lt;br /&gt;     Uninstall the Next&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     please uninstall&lt;br /&gt;&lt;br /&gt;     KB893066&lt;br /&gt;&lt;br /&gt;     KB890923&lt;br /&gt;&lt;br /&gt;     KB890859&lt;br /&gt;&lt;br /&gt;     KB893086&lt;br /&gt;&lt;br /&gt;     &lt;/tt&gt;&lt;br /&gt;     &lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 9 May 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Whoa.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   William Gibson's &lt;a href="http://lib.ru/GIBSON/"&gt;books &amp;amp; short stories,&lt;/a&gt; though mostly in cyrillic.  that can't be legal.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 9 May 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;SF, post global-warming&lt;/i&gt;&lt;br /&gt;&lt;br /&gt; care of &lt;a href="http://boingboing.net/"&gt;boingboing,&lt;/a&gt; it's &lt;a href="http://flood.firetree.net/?ll=37.7348,-122.4019&amp;amp;z=3"&gt;SF after a 7m rise in sea levels!&lt;/a&gt;  or, it should be, once their server recovers. things look suprisingly dry; we'll loose SOMA, but the outer sunset, where i live, is suprisingly unaffected.&lt;br /&gt;&lt;br /&gt; quick note on using google maps to find GPS coordinates: when you first text search for a spot on google maps, your "page link" URL will just have your search string.  to fix this, zoom in, then look at the "page link" URL--the coordinates are right there.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Thurs, 9 Feb 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;Accessing all 4G of memory on an AMD64 system&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   Setting up linux on an AMD64 system.  The BIOS has some kind of option which can reserve the upper 1G of memory for PCI DMA iff you have 4G loaded, leaving you w/ 3G accessable--but, oddly, it only demands this 1G tithe if you have all 4G installed.  Turning this feature off in the BIOS generates an unusable system spewing IOMMU errors, UNLESS the &lt;tt&gt;pci=nommconf&lt;/tt&gt; option is passed to the kernel.  Ugh.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 10 Jan 2006&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;On Subversion&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;    Switching to Subversion (svn) in lieu of CVS.  A couple of&lt;br /&gt; thoughts:&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;On debian, CVS comes w/ administrative niceties, eg, it  creates a /var/cvs, owned by group src ... svn just comes w/ binaries -- best to create an svn user &amp;amp; group, add a /var/svn, etc&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;Use fsfs.  When the repository is created, the syntax becomes &lt;tt&gt;svnadmin create --fs-type=fsfs /var/svn/REP_NAME&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;  &lt;li&gt;If you want to commit, checkout syntax looks like this: &lt;tt&gt;SVN_SSH="ssh -l kieran" svn co svn+ssh://your.fileserver/var/svn/REP_NAME&lt;/tt&gt;&lt;/li&gt;&lt;br /&gt;  &lt;/ol&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, 5 April 2005&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;&lt;i&gt;vsftpd &amp;amp; the linux kernel "security options":&lt;/i&gt;&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;   So, there i was, working on a new system, and having NO luck getting vsftpd, the "very secure" ftp daemon, working.  lots of these sorts of error messages from the ncftp client:&lt;br /&gt;&lt;br /&gt;   &lt;tt&gt;OOPS: cap_set_proc&lt;br /&gt;   OOPS: vsf_sysutil_recv_peek&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;   It turns out that i'd compiled the kernel w/ "different security models" enabled, and needed to load the "capability" module.  weird.&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Mon, 14 Mar 2005&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;Almost a year since my last post.  In deference to the technical-fix purpose of this page, I'll describe my recent struggles w/ a failed terabyte RAID:&lt;br /&gt;&lt;br /&gt;   I have 5x Maxtor 200g drives crammed into one machine, most of them sharing channels on a Promise IDE card.  The whole thing adds up to 0.75TB after parity, ext3 journal, etc.  One drive failed catastrophically.  This caused the other drive on that channel to irredeemably corrupt a number of sectors, which meant two drives were, in the eyes of the kernel, bad.&lt;br /&gt;&lt;br /&gt;   Bad bad bad.  This means the RAID is _dead_.  The fix went like this:&lt;/p&gt;&lt;ol&gt;&lt;br /&gt;   &lt;li&gt;purchase a new drive of exactly the same model, and copy the drive w/ bad blocks onto it via &lt;tt&gt;dd if=/dev/bad_drive of=/dev/new_drive conv=noerror,sync&lt;/tt&gt; .  The &lt;tt&gt;conv&lt;/tt&gt; portion tells dd to continue when it hits a bad block, and pad any missing data w/ the appropriate number of zeros.&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;reinitialize the RAID w/ the copy in place of the bad drive.  in my case, this went &lt;tt&gt;mdadm -A /dev/md0 -f /dev/hda1 /dev/hde1 /dev/hdf1 /dev/hdg1&lt;/tt&gt;, where &lt;b&gt;-f&lt;/b&gt; tells mdadm to continue w/ only 4 drives.  now you should have a functional device.&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;fsck the RAID&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;replace the missing drive--in my case, the drive w/ the bad blocks was fine once reformatted; only attempts to read the wonky blocks caused trouble&lt;/li&gt;&lt;br /&gt;   &lt;li&gt;at this point, everything seemed to be ok, but after a bit, the kernel started remounting the drive &lt;b&gt;ro&lt;/b&gt; after finding problems w/ the journal.  so, i recreated it: &lt;tt&gt;tune2fs -O '^has_journal' /dev/md0&lt;/tt&gt; removed the journal, turning the partition into an ext2 partition, and &lt;tt&gt;tune2fs -j /dev/md0&lt;/tt&gt; recreated the journal.&lt;/li&gt;&lt;br /&gt;   &lt;/ol&gt;&lt;br /&gt;   ugh.&lt;br /&gt;   &lt;p&gt;&lt;/p&gt;&lt;br /&gt;   &lt;div class="heading"&gt;Tues, May 25, 2004&lt;/div&gt;&lt;br /&gt;   &lt;p&gt;I'm extraordinarily happy w/ my newest laptop, a hand-me-down IBM Thinkpad 600e donated by Inf.  It's amazing how useful a PII 400mhz w/ 192meg, a 1024x768 TFT, and 6gig drive still is.  The only complication was getting sound working under linux: though &lt;tt&gt;lspci&lt;/tt&gt; reports a "Cirrus Logic CS 4610/11," using &lt;a href="http://alsa-project.org/"&gt;ALSA drivers,&lt;/a&gt; &lt;tt&gt;`modprobe snd-cs4231 port=0x530 irq=5 dma1=1 dma2=0`&lt;/tt&gt; did the trick.&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sun, Feb 29, 2004&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;Ahhh, now I can experience one of life's most satisfying treats from the comfort of my home--or, at least, my therapist's office.  It's the &lt;a href="http://radio.weblogs.com/0105910/2004/02/23.html"&gt;virtual crack house&lt;/a&gt;, under construction as part of a theraputic technique that uses simulated experiences to help people come to terms w/ the real ones.  In this case, the virtual crack house is supposed to help addicts learn to supress their cravings.  Good fucking luck, there.&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sat, Feb 14, 2004&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;I've spent various portions of the past month trying to get &lt;a href="http://www.merjis.com/developers/mod_caml/"&gt;mod_caml&lt;/a&gt;, the ML analog to apache's essential &lt;a href="http://perl.apache.org/"&gt;mod_perl&lt;/a&gt;, working under debian stable.  And I might finally have solved it.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;The big hurdle is OCaml's instability, as a language: the chances of a package written w/ version 3.07 of the compiler working on a system running 3.06 are pretty low.  And version 3.06 was the &lt;a href="http://www.bononia.it/%7Ezack/debian.en.html"&gt;backport&lt;/a&gt;, ferchristsake.  So I've created my own &lt;a href="http://digitalflock.org/%7Ekieran/backport/"&gt;OCaml backports&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;How?  I first added the testing source repository to &lt;tt&gt;/etc/apt/sources.list&lt;/tt&gt;: &lt;tt&gt;deb-src http://ftp.us.debian.org/debian/ testing main non-free contrib&lt;/tt&gt;. I then used the "&lt;tt&gt;apt-get build-dep &lt;i&gt;packagename&lt;/i&gt;&lt;/tt&gt;" command to get install those dependancies which could be found, and "&lt;tt&gt;apt-get source --compile &lt;i&gt;packagename&lt;/i&gt;&lt;/tt&gt;" to build those which needed backporting.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Mon, Jan 5, 2004&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;My species &lt;a href="http://antwrp.gsfc.nasa.gov/apod/image/0011/earthlights2_dmsp_big.jpg"&gt;astounds&lt;/a&gt; (care of Bruce Sterling's &lt;a href="http://engaged.well.com/engaged/engaged.cgi?c=inkwell.vue&amp;amp;f=0&amp;amp;t=204&amp;amp;q=0-"&gt;State of the World Interview&lt;/a&gt;).&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sun, Jan 4, 2004&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;Wonder what your &lt;a href="http://www.census.gov/cgi-bin/gazetteer"&gt;Latitude and Longitude&lt;/a&gt; are, but don't wanna buy a GPS?&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Thur, Jan 1, 2004&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;The NYT lists &lt;a href="http://www.nytimes.com/2003/09/07/magazine/07HAPPINESS.html?ex=1073106000&amp;amp;en=f2b216c2f4e5b382&amp;amp;ei=5070"&gt;"The Futile Pursuit of Happiness"&lt;/a&gt; as their &lt;a href="http://www.nytimes.com/2003/12/29/technology/29MOST.html?8dpc"&gt;most emailed Magazine article of 2003,&lt;/a&gt; and i can see why: it's probably provoked more conversation than any other article i've read lately.  (here's a &lt;a href="http://www.blogger.com/NYT-pursuit_of_happiness.html"&gt;cached copy&lt;/a&gt;, in case it falls back into pay-to-read land)&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Tues, Dec 30, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;Now that I've got a &lt;a href="http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=548172&amp;amp;Sku=S167-3140%20P"&gt;DVD+/-RW burner&lt;/a&gt;, it'd be nice to understand the difference between the two standards.  DVD+RW seems particularly suited to general computing, as it &lt;a href="http://fy.chalmers.se/%7Eappro/linux/DVD+RW/"&gt;supports true random write access,&lt;/a&gt; but that doesn't tell us what the underlying difference is.  Apparently, "[the] &lt;a href="http://www.dvddemystified.com/dvdfaq.html#4.3.5"&gt;+RW&lt;/a&gt; format uses phase-change media with a high-frequency wobbled groove that allows it to eliminate linking sectors," while "&lt;a href="http://www.dvddemystified.com/dvdfaq.html#4.3.3"&gt;-RW&lt;/a&gt; uses groove recording with address info on land areas for synchronization at write time."  Oh, well, that clears everything up.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;Unrelated: 802.11b/g cards w/ a &lt;a href="http://www.direct2data.com/d2d_2.asp"&gt;1 MILE range&lt;/a&gt;???&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sat, Dec 6, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;Alright, a bit of politics:  is it possible that the Neocons who pushed us into war buy into the crackpot idea that Saddam was not only a genocidal tyrant, but singly responsible for every terrorist attack on the US in the past decade, including, get this, the Oklahoma City bombing?  &lt;a href="http://www.washingtonmonthly.com/features/2003/0312.bergen.html%20"&gt;Oh my...&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sat, Nov 29, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;I've been certified an &lt;a href="http://slashdot.org/articles/03/11/29/1825220.shtml?tid=100&amp;amp;tid=126&amp;amp;tid=137&amp;amp;tid=172&amp;amp;tid=193"&gt;Anonymous Coward&lt;/a&gt;!!!&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sun, Sep 21, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;Just set up &lt;a href="http://www.mysql.com/"&gt;MySQL&lt;/a&gt;, requisite for &lt;a href="http://b2evolution.net/"&gt;b2evolution&lt;/a&gt;, a PHP-based blog engine &lt;a href="http://spinster.org/"&gt;my gf&lt;/a&gt; chose, apparently w/ one criterion in mind: it needs to support multiple, discrete blogs.  I'm not yet certain how well it does this, as it's pretty &lt;a href="http://digitalflock.org/b2evolution/blogs/"&gt;out-of-the-box&lt;/a&gt;. The &lt;a href="http://www.mysql.com/doc/en/Default_privileges.html"&gt;MySQL Manual&lt;/a&gt; was was pretty handy.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;unrelated: I really need to document how I moved a Windows 2000 Pro installation between drives w/ minimal pain. The key here is Sysprep.&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sun, Sep 14, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;&lt;a href="http://www.nat.org/dashboard/"&gt;Dashboard&lt;/a&gt;: the open source world's answer to MIT's &lt;a href="http://haystack.lcs.mit.edu/"&gt;Haystack&lt;/a&gt; project.  Both purport to automagically connect associated ideas from within one's individual data stream, thereby reminding one of that URL for the &lt;a href="http://opengov.media.mit.edu/"&gt;Government Information Awareness&lt;/a&gt; site while perusing, say, a discussion of the corrupting effects of campaign donations.  (Ok, that's a pretty odd example)&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;So, how to get it working on a Debian unstable system?  I'm not sure yet, but reasonable directions are available at &lt;a href="http://www.pipetree.com/space/GettingStartedWithDashboard"&gt;this wiki&lt;/a&gt;.  That'll refer you to an &lt;a href="http://www.debianplanet.org/mono/"&gt;apt source&lt;/a&gt;, which is really handy.  Except that the &lt;tt&gt;gtk-sharp&lt;/tt&gt; provided isn't new enough, so you wind up having to compile from CVS.  Which sounds fine, BUT:  I couldn't get the CVS version to provide &lt;tt&gt;gnome-sharp.dll&lt;/tt&gt;, so i first had to install the .deb version, then compile &amp;amp; install.  Not quite sure why that worked.  THEN, you need the &lt;tt&gt;at-spi&lt;/tt&gt; package, though noone mentions this.  And you need &lt;tt&gt;libgtkhtml3.0-2&lt;/tt&gt;.  Ok, but after all this work ... well, no, it still doesn't do anything.  Goddamnit.&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Sun, Aug 31, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;ok, a list of links re: achieving some sort of 'net telephony between either my &lt;a href="http://spinster.org/"&gt;gf&lt;/a&gt;'s win2k or linux box.  first off, the problem w/ using &lt;a href="http://www.fourmilab.ch/speakfree/"&gt;speakfreely&lt;/a&gt;, wonderful little unix/windows utility which worked wonders back in '99 but has apparently been killed by NATs:  MacOS X &lt;a href="http://www.omnigroup.com/mailman/archive/macosx-dev/2002-September/029897.html"&gt;doesn't have&lt;/a&gt; a &lt;tt&gt;/dev/audio&lt;/tt&gt;.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;next idea, care of inf: &lt;a href="http://www.gnomemeeting.org/index.php?rub=4&amp;amp;pos=0"&gt;GnomeMeeting&lt;/a&gt;, which is apparently compatable w/ M$' NetMeeting and runs under OS X.  Or so they say.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;this entry is much closer to my original idea for this blog... in that i'm really writing this for &lt;a href="http://google.com/"&gt;google&lt;/a&gt;'s sake.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Fri, Aug 8, 2003&lt;/a&gt;&lt;br /&gt;   &lt;p&gt;GAR.  Much wrestling w/ [Debian's version of] vsftp, the "very secure" FTP daemon.  No idea if it lives up to it's name, but the version packaged w/ Debian Stable, 1.0.0, has at least one signifigant shortcoming: whatever the man page says, you must call the anonymous FTP user, which gets an entry in &lt;tt&gt;/etc/passwd&lt;/tt&gt;, &lt;b&gt;ftp&lt;/b&gt;.  It's hard-coded in &lt;tt&gt;tunables.c&lt;/tt&gt;, so, you could alternately hack @ that and recompile.&lt;/p&gt;&lt;br /&gt;   &lt;a class="heading"&gt;Wed, July 30th, 2003&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;   &lt;p&gt;Wrestled, successfully, w/ two different wonky technologies over the past few days: 1. port forwarding w/ Linux 2.4 iptables routing, and, 2. the 2.6.0-test1 kernel.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;The voodoo necessary for Port Forwarding looks like this: &lt;tt&gt;iptables -t nat -A PREROUTING -p udp -d $PUBLIC_IP --dport $DESIRED_PORT -j DNAT --to-destination $INTERNAL_IP&lt;/tt&gt;&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;Oh, and there's a nice &lt;a href="http://iptables-tutorial.frozentux.net/scripts/rc.flush-iptables.txt"&gt;flush script&lt;/a&gt;, too.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;Now, onto 2.6: everything SEEMED to be working--X came up, mozilla loaded w/out a hitch--but there was one glaring omission: xterms.  No login prompt to speak of.  No virtual console, no ssh login, no xterm. An entry in &lt;tt&gt;/etc/fstab&lt;/tt&gt; instructing init to mount a new fake fs, type &lt;tt&gt;devpts&lt;/tt&gt;, under &lt;tt&gt;/dev/pts&lt;/tt&gt; brought my xterms back, while virtual consoles required that I enable "VGA Text Console" under "Graphics Support -&amp;gt; Console display."  That's it.  What do I think of 2.6 thus far?  Well, by and large, I haven't noticed a difference, except in one very tangible category: responsiveness.  Linux on the desktop (read: X) just got a lot friskier.&lt;/p&gt;&lt;br /&gt;   &lt;p&gt;One other rather big linux-related problem, though I'll address this some other time, is my recent discovery of the fallability of linux' software RAID implimentation.  It's Achilles heel is simple: bad blocks.  Now, everyone's experienced a bad block or two, and, so long as their numbers stay in the 1-2 range, they don't pose any serious problem.  It's only when they begin to multiply that you've got yourself a paperweight for a disk.  However, linux' RAID implimentation is a perfectionist: it can't tolerate a single bad block.  The second one is detected, the whole disk is booted from the array.  This is a Bad Idea (TM).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-2566237256694648904?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/2566237256694648904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=2566237256694648904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2566237256694648904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/2566237256694648904'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/09/thur-31-may-2007-smb-under-osx.html' title=''/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1757282266690627073.post-3033255430320347276</id><published>2007-09-10T17:22:00.001-07:00</published><updated>2007-09-10T17:22:20.750-07:00</updated><title type='text'>Machine readable format.</title><content type='html'>Much of my time is spent cajoling clunky technologies into submission, and I occasionally document the process for myself and any desperate search-engine users who stumble across this page.&lt;br /&gt;&lt;br /&gt;The rest of you can move along, there's nothing to see here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1757282266690627073-3033255430320347276?l=appliedprocrastination.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://appliedprocrastination.blogspot.com/feeds/3033255430320347276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1757282266690627073&amp;postID=3033255430320347276' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3033255430320347276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1757282266690627073/posts/default/3033255430320347276'/><link rel='alternate' type='text/html' href='http://appliedprocrastination.blogspot.com/2007/09/machine-readable-format.html' title='Machine readable format.'/><author><name>kieran hervold</name><uri>http://www.blogger.com/profile/10847348642960161406</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='15' src='http://bp0.blogger.com/_ai4qK69BEF0/R_he0i3k3yI/AAAAAAAAAFA/7EsJsGlEexU/S220/kj.JPG'/></author><thr:total>1</thr:total></entry></feed>
