<?xml version="1.0"?><!-- RSS generated by Radio UserLand v8.2.1 on Sat, 02 Feb 2008 23:41:50 GMT --><rss version="2.0">	<channel>		<title>Doug Landauer: cs</title>		<link>http://radio.weblogs.com/0100945/categories/cs/</link>		<description>Computer Science -- stuff I&apos;m interested in but that doesn&apos;t necessarily relate directly to my job.</description>		<copyright>Copyright 2008 Doug Landauer</copyright>		<lastBuildDate>Sat, 02 Feb 2008 23:41:50 GMT</lastBuildDate>		<docs>http://backend.userland.com/rss</docs>		<generator>Radio UserLand v8.2.1</generator>		<managingEditor>landauer@got.net</managingEditor>		<webMaster>landauer@got.net</webMaster>		<category domain="http://rpc.weblogs.com/shortChanges.xml">rssUpdates</category> 		<skipHours>			<hour>3</hour>			<hour>4</hour>			<hour>2</hour>			<hour>5</hour>			<hour>6</hour>			<hour>1</hour>			<hour>17</hour>			<hour>18</hour>			</skipHours>		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>		<ttl>60</ttl>		<item>			<title>The Segway Programming Language</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2008/02/02.html#a776</link>			<description>On &lt;a href=&quot;http://lambda-the-ultimate.org/&quot;&gt;LtU&lt;/a&gt;, Koray Can &lt;a href=&quot;http://lambda-the-ultimate.org/node/2643#comment-39770&quot;&gt;writes&lt;/a&gt; about Paul Graham&apos;s recent preliminary release of &lt;a href=&quot;http://arclanguage.org/&quot;&gt;Arc&lt;/a&gt;:&lt;blockquote&gt;&lt;i&gt;It seems to me that the only people who are talking about it are those who have followed Paul Graham&apos;s writings over the years and wanted to see what it, the thing, the real deal would look like.&lt;/i&gt;&lt;/blockquote&gt;I call it &quot;Segway&quot;, due to the difference between the hype and the (current, pre-alpha) reality.  Note that the hype mostly did not come from PG.  My earlier &lt;a href=&quot;http://radio.weblogs.com/0100945/2002/07/01.html&quot;&gt;guess&lt;/a&gt; was overoptimistic by three years or so.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2008/02/02.html#a776</guid>			<pubDate>Sat, 02 Feb 2008 23:41:38 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=776&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2008%2F02%2F02.html%23a776</comments>			</item>		<item>			<title>It&apos;s 2008.  Do you know where your projects are?</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2008/01/05.html#a774</link>			<description>Mostly stalled, but here&apos;s a partial, cryptic list:&lt;ul&gt;&lt;li&gt;weblogs and pix coalescing at l6r (revive zia.pycs, extract data from Radio, etc)&lt;li&gt;finish out my OCaml version of Danvy&apos;s grand tour of SECD-like machines &lt;li&gt;mangle spj&apos;s sudoku solver&lt;li&gt;weblog engine in scala, including quarkup, my contribution to the babel of wikilike markup syntaxes, and maybe (im)port Pandoc&lt;li&gt;build the two ubuntu machines&lt;li&gt;prototype a streaker interface for gmail &amp;amp; reader&lt;li&gt;scala android experiments&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2008/01/05.html#a774</guid>			<pubDate>Sat, 05 Jan 2008 08:18:49 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=774&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2008%2F01%2F05.html%23a774</comments>			</item>		<item>			<title>Scala, conciseness, and higher-order functions</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/12/25.html#a773</link>			<description>It was nice to see &lt;a href=&quot;http://dlweinreb.wordpress.com/2007/12/25/the-scala-programming-language-my-first-impressions/&quot;&gt;Dan Weinreb&apos;s &quot;First Impressions&quot; article about Scala&lt;/a&gt;.  It&apos;s rare to see a programming language evaluation that&apos;s so well-informed and free of emotional reactions.Steve Yegge won&apos;t ever be accused of being that impartial, and his impassioned &lt;a href=&quot;http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html&quot;&gt;article about code size&lt;/a&gt; is entertaining, but could hardly be described as &quot;unemotional&quot;.   What I found appalling is that in 122 comments to an article about code size, not a single one mentioned the idea of higher order functions.  I think that these, and pattern matching, are among the most effective language features for making code more concise while preserving readability.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/12/25.html#a773</guid>			<pubDate>Wed, 26 Dec 2007 07:20:38 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=773&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F12%2F25.html%23a773</comments>			</item>		<item>			<title>PXSL, Scala Android, Giant Rat of Sumatra</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/12/18.html#a772</link>			<description>Cool stuff this week:&lt;ul&gt;&lt;li&gt;Tom Moertel&apos;s &lt;a href=&quot;http://blog.moertel.com/articles/2007/12/17/pxsl-tools-1-0-your-ticket-out-of-xml-hell&quot;&gt;PXSL&lt;/a&gt;, a Parsimonious XML Shorthand Language, which I&apos;d love to look more deeply into, later.  I think I posted something on Pyscerocha about the various XML shorthands, or alternate syntaxes, that people have come up with to ease the pain of using XML directly.&lt;li&gt;&lt;a href=&quot;http://article.gmane.org/gmane.comp.lang.scala/8680&quot;&gt;Scala Android&lt;/a&gt; &amp;mdash; my first thought upon hearing of Android was how long before I could play with it in Scala?&lt;li&gt;Silliness:  The &lt;a href=&quot;http://en.wikipedia.org/wiki/Firesign_Theatre&quot;&gt;Firesign Theatre&lt;/a&gt; had a 1974 album called &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Tale_of_the_Giant_Rat_of_Sumatra&quot;&gt;&quot;The Tale of the Giant Rat of Sumatra&quot;&lt;/a&gt;.  This week, it appears that the animal has &lt;a href=&quot;http://news.bbc.co.uk/2/hi/science/nature/7149569.stm&quot;&gt;been discovered&lt;/a&gt;.  Well it was on New Guinea, actually, but who can tell the difference from here?&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/12/18.html#a772</guid>			<pubDate>Wed, 19 Dec 2007 07:00:05 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=772&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F12%2F18.html%23a772</comments>			</item>		<item>			<title>Knuth&apos;s 2003 book tour</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/10/31.html#a769</link>			<description>About four years ago, I wrote about &lt;a href=&quot;http://radio.weblogs.com/0100945/2003/12/04.html&quot;&gt;Knuth&apos;s book &quot;tour&quot;&lt;/a&gt;.  Since the subject came up again, I thought I should update the LtU URLs that were mentioned in there:&lt;ul&gt;&lt;li&gt;&quot;&lt;acronym title=&quot;not sure, but I think Trabb-Pardo Knuth&quot;&gt;TPK&lt;/acronym&gt; algorithm&quot;:  &lt;a href=&quot;http://lambda-the-ultimate.org/classic/message7186.html&quot;&gt;Pointer&lt;/a&gt; to a &lt;a href=&quot;http://www.cs.fit.edu/~ryan/compare/&quot;&gt;page of implementations of the &quot;TPK algorithm&quot;&lt;/a&gt;.  The (Florida Institute of Technology) page is still there.&lt;li&gt;Knuth and the IBM-650:  &lt;a href=&quot;http://lambda-the-ultimate.org/classic/message8107.html&quot;&gt;this LtU classic thread&lt;/a&gt; mentions a restricted IEEE page.I remain astounded at the extent to which the IEEE and ACMboth still live in the dark ages.I suppose the alternative in both their cases would befor the organization to simply shrivel up and blow away.I have a vague recollection of having written somethingabout this (the gist:  using ACM to publish your paperthese days is like the *opposite* of publishing -- i.e.,it renders your paper *more private* than if you justput it on your own web page) ... but now I can&apos;t findit any more.&lt;li&gt;Knuth&apos;s 1974 Turing Award Lecture (PDF) is referenced &lt;a href=&quot;http://lambda-the-ultimate.org/classic/message4925.html&quot;&gt;in this LtU classic thread&lt;/a&gt;.  It points to &lt;a href=&quot;http://www.bluetail.com/~luke/misc/knuth-turingaward.pdf&quot;&gt;this PDF link&lt;/a&gt;, but that may have gone missing since 2002.  I was able       to snag a copy from the Wayback machine, though I haven&apos;t read it yet.&lt;li&gt;&lt;a href=&quot;http://lambda-the-ultimate.org/classic/message1655.html&quot;&gt;Here is a mention that Knuth has an online preview of some segments of Volume 4 of The Art of Computer Programming&lt;/a&gt;, and Whoa, it&apos;s still there, these 6+ years later!  It points to &lt;a href=&quot;http://sunburn.stanford.edu/~knuth/fasc2a.ps.gz&quot;&gt;this gzip&apos;d postscript&lt;/a&gt;.&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/10/31.html#a769</guid>			<pubDate>Wed, 31 Oct 2007 09:17:59 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=769&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F10%2F31.html%23a769</comments>			</item>		<item>			<title>Remarkable static vs dynamic discussion</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/07/11.html#a764</link>			<description>On Artima, Bill Venners kicked off one of the more interesting &lt;a href=&quot;http://www.artima.com/weblogs/viewpost.jsp?thread=209353&quot;&gt;discussions I&apos;ve seen&lt;/a&gt; on the subject of static type checking versus dynamically typed languages.  Bill&apos;s been active on the Scala mailing list lately, and it&apos;s nice to see folks mentioning Scala frequently as an example of a well-done statically typed language.As I read the discussion, I was thinking along the lines of making a translator for a subset of Ruby, into Scala, when I ran into Bill Pyne&apos;s suggestion to do just that (except starting with Python).  It&apos;d be nice to have such a tool for my work right now, since I have a compiler that I wrote completely in Ruby, but which is large enough now that it would IMHO benefit from a conversion to a language like Scala.  Pity that Scala is probably not politically feasible, since my management would prefer that everything were written in C++.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/07/11.html#a764</guid>			<pubDate>Thu, 12 Jul 2007 07:37:45 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=764&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F07%2F11.html%23a764</comments>			</item>		<item>			<title>Stalled SECD Work</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/07/10.html#a763</link>			<description>Being the ongoing but abridged saga of a translation of a deconstructedabstract machine (interpreter) for a fairly basic lambda calculus, due toPeter Landin (the original 1964 SECD machine) and Olivier Danvy (the 2003deconstruction), said translation starting with SML, detouring throughRuby, and stalling out for no intrinsic reason with a partially workingOCaml version.In our last episode (May 2007) I&lt;a href=&quot;http://radio.weblogs.com/0100945/2007/05/15.html#a753&quot;&gt;wrote&lt;/a&gt;:   &lt;i&gt;&quot;The machine part compiles; maybe I&apos;ll be able toget the test app running later this week.&quot;&lt;/i&gt;It being July now, that&apos;d have to be a heck of a week.Fact is, I&apos;ve been finding precious little time to workon it, with some major deadlines at work and other personal issues intruding.But I do recall that I never put the OCaml version up anywhere,and since I haven&apos;t even touched it in over three weeks, I figuredit must be time to put it up here so I can find it later.Caveats:  I&apos;ve only compiled it on my old Mac at home, withOcaml version 3.06.  And it&apos;s not fully debugged yet, either.But it does say helpful stuff like this:&lt;blockquote&gt;&lt;pre&gt;Evaluate 0 ... Evaluating     &amp;lt;LIT 7&amp;gt;      result   7Evaluating     &amp;lt;LIT 3&amp;gt;      result   3Evaluating     (\x -&amp;gt; [succ _ x])      result   (E:&amp;lt;[ succ =succ        ]&amp;gt;, V:x, T:[succ _ x]:)Evaluating     [(\x -&amp;gt; [succ _ x]) _ &amp;lt;LIT 8&amp;gt;]      result   9Evaluating     (\x -&amp;gt; (\y -&amp;gt; [succ _ x]))      result   (E:&amp;lt;[ succ =succ        ]&amp;gt;, V:x, T:(\y -&amp;gt; [succ _ x]):)Evaluating     [(\x -&amp;gt; [succ _ x]) _ &amp;lt;LIT 7&amp;gt;]      result   8Evaluate 3 ... Evaluating     &amp;lt;LIT 7&amp;gt;      result   7Evaluating     &amp;lt;LIT 3&amp;gt;      result   3Evaluating     (\x -&amp;gt; [succ _ x])      result   (E:&amp;lt;[ succ =succ        ]&amp;gt;, V:x, T:[succ _ x]:)Evaluating     [(\x -&amp;gt; [succ _ x]) _ &amp;lt;LIT 8&amp;gt;]      result   9Evaluating     (x -&amp;gt; (y -&amp;gt; [succ _ x]))      result   (E:&amp;lt;[ succ =succ        ]&amp;gt;, V:x, T:(y -&amp;gt; [succ _ x]):)Evaluating     [(\x -&amp;gt; [succ _ x]) _ &amp;lt;LIT 7&amp;gt;]      result   8&lt;/pre&gt;&lt;/blockquote&gt;At any rate, there are just two source files, so I didn&apos;tput together a Makefile or anything.  They&apos;re here:&lt;blockquote&gt;&lt;a href=&quot;http://got.net/~landauer/cs/ohdr.ml&quot;&gt;http://got.net/~landauer/cs/ohdr.ml&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://got.net/~landauer/cs/Danvy_SEC_M.ml&quot;&gt;http://got.net/~landauer/cs/Danvy_SEC_M.ml&lt;/a&gt;&lt;/blockquote&gt;Though the current result is of somewhat questionable utility,I found it to be worth my time, since I did learn:&lt;ul&gt;&lt;li&gt;more OCaml;&lt;li&gt;how much FP-style pattern matching helps code conciseness; and&lt;li&gt;how much extra but necessary infrastructure stuff can be  glossed over (i.e., omitted) in a technical paper like Danvy&apos;s.&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/07/10.html#a763</guid>			<pubDate>Wed, 11 Jul 2007 07:55:33 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=763&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F07%2F10.html%23a763</comments>			</item>		<item>			<title>Idle question</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/05/29.html#a756</link>			<description>Do &lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_calculus&quot;&gt;Lambda Calculus&lt;/a&gt; weenies call Java programmers &quot;&lt;a href=&quot;http://foldoc.org/foldoc.cgi?Weak+Head+Normal+Form&quot;&gt;weak-head normal&lt;/a&gt;s&quot;?</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/05/29.html#a756</guid>			<pubDate>Wed, 30 May 2007 07:55:46 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=756&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F05%2F29.html%23a756</comments>			</item>		<item>			<title>Barendregt&apos;s Lambda Cube</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/05/23.html#a754</link>			<description>In &lt;a href=&quot;http://programming.reddit.com/&quot;&gt;the programmingsubreddit&lt;/a&gt;,&lt;a href=&quot;http://alpheccar.org&quot;&gt;Alpheccar&lt;/a&gt;posted a link labeled &lt;a href=&quot;http://programming.reddit.com/info/1so2t/comments&quot;&gt;Lambda Calculi with Types - Barendregt&lt;/a&gt;, with the briefcomment &quot;Great description of the lambda cube&quot;.IMHO, that depends on how much time you have --that &quot;great description&quot; is 190 pages long!So I added a comment&lt;blockquote&gt;I was just looking at this stuff a week or two ago.  Barendregt&apos;s 190-pagedescriptions of the type systems that inhabit the vertices of the lambda cubeis indeed very detailed, thorough, and well-presented.  For those not wishingto wade through all the math, the cube&apos;s description starts in section 5; theillustration is on page &quot;78&quot; (79 of the PDF, according to Preview).Haskell heavyweights SPJ and/or Erik M named a typed intermediate language &quot;Henk&quot; after HB.That &lt;a href=&quot;http://citeseer.ist.psu.edu/peytonjones97henk.html&quot;&gt;(1997) paper&lt;/a&gt; hasa more understandable (to me, anyway) summary of the Lambda-cube than Henk B.&apos;s1992 compendium.  Possibly a benefit of five years of hindsight.Here is &lt;a href=&quot;http://en.wikipedia.org/wiki/Lambda_cube&quot;&gt;Wikipedia&apos;s briefentry&lt;/a&gt; about the lambda cube.  It describes the axes as&lt;ul&gt;&lt;li&gt;Terms depending on types, or polymorphism (as in System F),&lt;/li&gt;&lt;li&gt;Types depending on types, or type operators, and&lt;/li&gt;&lt;li&gt;Types depending on terms, or dependent types (as in LF).&lt;/li&gt;&lt;/ul&gt;And here&apos;s &lt;a href=&quot;http://www.rbjones.com/rbjpub/logic/cl/tlc001.htm&quot;&gt;RBJones&apos;s nicely drawn web page&lt;/a&gt; illustrating Barendregt&apos;s lambda cube.&lt;/p&gt;FWIW, RBJones&apos; cube loses Barendregt&apos;s arrowheads that represent inclusion.Those arrows clearly indicate that the upper right back corner, lambda-P-omega,includes all of the others.  Unfortunately, RBJones doesn&apos;t explain hisboxes-and-stars notation, nor does he correlate the cube&apos;s axes withwikipedia-style understandable explanations.On page 89, HB defines the &quot;sorts&quot; star and box though not in understandableEnglish.  The SPJ/EM paper&apos;s description is better, though the concepts remainquite abstract.&lt;/blockquote&gt;I wanted to add the reference to&lt;a href=&quot;http://www.cis.upenn.edu/~bcpierce/tapl/&quot;&gt;TaPL&lt;/a&gt;(at the end of chapter 30); add the stuffbelow the &amp;lt;HR&amp;gt; here, use real lambda&apos;s and boxes, and figure out what theheck box really means, and what SPJ/EM mean by this (near the end of section3.3 (&quot;Notation&quot;) of their paper):&lt;blockquote&gt;Each ... term has a type; each type has a kind.  ...&lt;br&gt;A &lt;acronym title=&quot;Pure Type System&quot;&gt;PTS&lt;/acronym&gt; may have &amp;gt;3 levels.&lt;br&gt;Lambda cube PTS&apos;s have &amp;lt;= 3 levels,&lt;br&gt;except that there is a solitary constant &quot;[]&quot; (box)&lt;br&gt;at the fourth level.&lt;/blockquote&gt;Hmmm...  So, if * &quot;means&quot; terms and [] &quot;means&quot; types,that&apos;s the place where * and [] live two levels abovetheir referents.   Or something like that, I read, butno longer can find that statement.  Will locate it later,and hopefully be able to explain it at that time.&lt;hr&gt;(I&apos;ll use &quot;[]&quot; to represent a box).Here&apos;s the connections, I think: System LF has dependent types.System LF is at (*,[]) vertex of RBJones&apos; cube.Omega is the most far-out, so it&apos;s gotta be type-operators,i.e., types depending on types.So:  [] means types, * means terms, and ( X, Y ) meansY depending on X.So, to expand wikipedia&apos;s axes list with RBJones&apos; notation:&lt;ul&gt;&lt;li&gt;Terms depending on types, or polymorphism (as in System F),&lt;br&gt;         ( [], * ) ... &quot;2&quot; as in &quot;second-order lambda calculus&quot;&lt;br&gt;         The vertical axis&lt;li&gt;Types depending on types, or type operators, and&lt;br&gt;         ( [], [] ) ... omega or &quot;w&quot;&lt;br&gt;         The axis that points directly away from us.&lt;li&gt;Types depending on terms, or dependent types (as in LF).&lt;br&gt;         ( *, [] ) ...  P&lt;br&gt;         The left-to-right axis&lt;/ul&gt;In in section 4 of HB&apos;s paper, lambda-&gt; is extended in three ways, to&lt;ul&gt;&lt;li&gt;L2 (&quot;second-order&quot;, aka &quot;polymorphic&quot;),&lt;li&gt;L-MU (&quot;recursive types&quot;),&lt;li&gt;L-INT (&quot;intersection types&quot;  -- a variable can have two types at the same time)&lt;/ul&gt;L2 (Girard/Reynolds): has other names&lt;ul&gt;  &lt;li&gt; polymorphic typed lambda calculus  &lt;li&gt; second-order typed lambda calculus  &lt;li&gt; second-order polymorphic typed lambda calculus  &lt;li&gt; system F&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/05/23.html#a754</guid>			<pubDate>Wed, 23 May 2007 08:00:26 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=754&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F05%2F23.html%23a754</comments>			</item>		<item>			<title>SECD machine into OCaml ... in progress</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/05/15.html#a753</link>			<description>One of my side projects this past winter has been to figure out what Landin&apos;s SECD machine was all about.  I started by reading Danvy&apos;s &quot;Rational Deconstruction&quot; paper, which implemented the core of the interpreter in ML, in several different ways.  Not having a handy ML compiler, nor knowing the language very well, I thought I&apos;d just translate it straight into Ruby.  When that was done, I couldn&apos;t easily tell whether it was really right, not having a decent set of test data.   I grabbed some from the net, but still lacked confidence.  So lately I&apos;ve been translating it into OCaml instead, for which I do have an already-installed compiler.  I don&apos;t know that language very well either, but it&apos;s more familiar to me than straight ML is.  The machine part compiles; maybe I&apos;ll be able to get the test app running later this week.Here are my previous Landin/Danvy SECD machine entries:&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://radio.weblogs.com/0100945/2007/02/20.html&quot;&gt;http://radio.weblogs.com/0100945/2007/02/20.html&lt;/a&gt;&lt;li&gt;&lt;a href=&quot;http://radio.weblogs.com/0100945/2007/02/25.html&quot;&gt;http://radio.weblogs.com/0100945/2007/02/25.html&lt;/a&gt;&lt;li&gt;&lt;a href=&quot;http://radio.weblogs.com/0100945/2007/03/11.html&quot;&gt;http://radio.weblogs.com/0100945/2007/03/11.html&lt;/a&gt;&lt;/ul&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/05/15.html#a753</guid>			<pubDate>Wed, 16 May 2007 07:38:06 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=753&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F05%2F15.html%23a753</comments>			</item>		<item>			<title>The type-system silhouette of the proto-program</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/05/01.html#a751</link>			<description>In an&lt;a href=&quot;http://totherme.livejournal.com/3845.html&quot;&gt;interesting description of typeful program development&lt;/a&gt;(Haskell-oriented in this case),&lt;a href=&quot;http://totherme.livejournal.com/&quot;&gt;totherme&lt;/a&gt;mentioned a nice metaphor for visualizing how one mightgo about creating a program in a typeful way.The situation is that we have a (most likely partial, and often only mental) spec of what the program should do, and wewrite down an approximation of some types that mighthelp solve the problem.The central image of the metaphor is that this approximationis the &lt;i&gt;silhouette of the spec on the type system&lt;/i&gt;.The activity then is to flesh out that silhouette,give it additional dimensions, depth and color (guidedby the type system), until it&apos;s tangible.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/05/01.html#a751</guid>			<pubDate>Tue, 01 May 2007 08:00:38 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=751&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F05%2F01.html%23a751</comments>			</item>		<item>			<title>Gwgl R3</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/04/27.html#a749</link>			<description>Been playing around with Google Earth a bit lately.I know, I&apos;m a little late to that party -- but it didtake them a while to get it ported to the Mac. Anyway, I&apos;ve managed to fly through the routes of most of themore memorable backpacking trips I&apos;ve taken andsome day hikes I&apos;ve done.  It&apos;suncanny how much the GwglR3 view can look like thereal terrain, sometimes.  But it&apos;s not an&lt;a href=&quot;http://en.wikipedia.org/wiki/Uncanny_valley&quot;&gt;&quot;uncanny valley&quot;&lt;/a&gt; -- it&apos;s just really cool.&lt;ul&gt;&lt;li&gt;1980 trip with Sheldon, Jeremiah, and the crippled Girl Scouts -- sort of a Rae Lakes Loop, but from the east -- Onion Valley, Kearsarge Pass, Charlotte Lake, Gardner Peak, Gardner Basin, Sixty Lakes Basin, Rae Lakes, Glen Pass&lt;li&gt;1994 hike to Grizzly Lake in the Trinity Alps    (see &lt;a href=&quot;http://tinyurl.com/yuhrq7&quot;&gt;http://tinyurl.com/yuhrq7&lt;/a&gt; )&lt;li&gt;Part of my 1999 PCT Solo Week   &lt;a href=&quot;http://got.net/~landauer/bp/990928-YoseHigh.html&quot;&gt;http://got.net/~landauer/bp/990928-YoseHigh.html&lt;/a&gt;&lt;li&gt;Most of the Y2K Emigrant Wilderness trek across Yosemite    &lt;a href=&quot;http://got.net/~landauer/bp/000729-EmW_Yosemite.html&quot;&gt;http://got.net/~landauer/bp/000729-EmW_Yosemite.html&lt;/a&gt;&lt;li&gt;The first day or two of the High Sierra Trail, from nearMoro Rock, up to the Hamilton Lakes.&lt;li&gt;The hike from Koke`e down along the Nu`alolo trail, toa viewpoint about 2000&apos; above the Nu`alolo Kai, then alongthe cliffs to the Awa`awapuhi trail, and another amazingviewspot.  Do also check out the Kalalau Valley viewpoint,it looks quite a lot like the postcards.&lt;li&gt;The incredible NFSJ trip (I&apos;ll have to restage thetrip report, I think Phil P.&apos;s pycs Radio server finally gave up the ghost.)&lt;li&gt;and the more recent trip along the route that parallels themain part of Kings Canyon, but just south of it (past theSugarloaf, Roaring River Ranger Station, Moraine Ridge,Avalanche Pass, and on down to Bubbs Creek).   One of theawesome views from that trip is from near the Ranger Station,looking up this pair of canyons -- Deadman Canyon andCloud Canyon -- and the GwglR3 view does not disappoint.&lt;/ul&gt;&lt;hr&gt;Now that GwglR3 has a hiking trails layer, it looks likeit&apos;s also an awesome tool for planning trips, and/or forvicariously following along on trips you never intend totake.   Everest, anyone?I can hardly wait for&lt;a href=&quot;http://www.google.com/mars/&quot;&gt;Google Mars&lt;/a&gt;to be converted to the same format.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/04/27.html#a749</guid>			<pubDate>Sat, 28 Apr 2007 07:58:07 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=749&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F04%2F27.html%23a749</comments>			</item>		<item>			<title>Python Snippets for the BayPIGgies</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/04/12.html#a746</link>			<description>&lt;a href=&quot;http://got.net/~landauer/images/gaP-PtLobos/gaP-PtLobos-Pages/Image14.html&quot;&gt;  &lt;img src=&quot;http://got.net/~landauer/images/gaP-PtLobos/gaP-PtLobos-Thumbnails/14.jpg&quot;   align=left alt=&quot;Point Lobos Piggie Sign&quot;&gt;&lt;/a&gt;I contributed a comment (about Ruby&apos;s &quot;Array#flatten&quot;method) in a mailing list thread about python code snippets,and as a result I was asked to present some python snippetsat tonight&apos;s meeting of the (SF) Bay Area Python Interest Group.So I picked four little bits of code.The code itself is at &lt;a href=&quot;http://got.net/~landauer/sw/snippets/dl_snippets.tgz&quot;&gt;http://got.net/~landauer/sw/snippets/dl_snippets.tgz&lt;/a&gt; ,or as separate python sources in that directory.&lt;hr&gt;&lt;h4&gt;1. Invert Color&lt;/h4&gt;This snippet is a whole command-line command;it takes a string representing a (hex) html color value,and prints out its bitwise inverse (one&apos;s complement).It&apos;s non-scientific and pretty much unrelated to any opticalnotion of color complements.  Inspired bya ruby version at &lt;a href=&quot;http://www.bigbold.com/snippets/posts/show/582&quot;&gt;http://www.bigbold.com/snippets/posts/show/582&lt;/a&gt; .There are only two bits of note here:&lt;ol&gt;&lt;li&gt;The join/map/lambda thing expands a three-hex-digit string into a six-digit string, by replicating each digit.&lt;li&gt;I thought of using the unary &quot;~&quot; complement operator, but it turns on too many other bits.&lt;/ol&gt;&lt;pre&gt;def invert_color (color):    if color[0] == &apos;#&apos;:        color = color[1:]    if len(color) == 3:        color = &apos;&apos;.join( map( lambda m,n: m+n, color, color ) )    return &quot;#%06X&quot; % (int(color, 16) ^ 0xFFFFFF)#import sysfor a in sys.argv[1:]:    print invert_color(a)&lt;/pre&gt;&lt;hr&gt;&lt;h4&gt;2. Undent (aka &quot;margin&quot;)&lt;/h4&gt;&lt;br clear=all&gt;&lt;a href=&quot;http://got.net/~landauer/images/gaP-PtLobos/gaP-PtLobos-Pages/Image10.html&quot;&gt;  &lt;img src=&quot;http://got.net/~landauer/images/gaP-PtLobos/gaP-PtLobos-Thumbnails/10.jpg&quot;   align=right alt=&quot;Point Lobos China Cove Arch&quot;&gt;&lt;/a&gt;This function &quot;undent&quot; is nice to have in a utility library.It allows you to use nice source-relative indentationin triple-quoted strings, and it will strip off the extra indentation.I posted this snippet of code on the BayPIGgies list in February (2007).It was inspired by Hal Fulton&apos;s &quot;margin&quot; method from his Ruby book&lt;a href=&quot;http://rubyhacker.com/coralbook/&quot;&gt;&lt;i&gt;The Ruby Way&lt;/i&gt;&lt;/a&gt;.This does its work at runtime, and isn&apos;t as strict as the&lt;a href=&quot;http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/145672&quot;&gt;similar recipe&lt;/a&gt;that&apos;s in the Python cookbook.It&apos;s short (just four lines of meat) and a bit easier to use (lesscluttered-looking at usage site) than other, more efficientcompile-time versions.The code is very straightforward except for maybethe &quot;rstrip&quot; -- that removes the last line (of spaces and a newline).&lt;pre&gt;import reundent_pat = re.compile( r&quot;^\s*\S(.*)$&quot;, re.M  )def undent (str):     return undent_pat.sub( r&apos;\1&apos;, str.rstrip() )######################################## Usage Example:#def getCustomerInfo(cust_id):     sql  = undent( &apos;&apos;&apos;\             |select customers.id as %s,             |        sum(invoices.amount) as amount_total,             |        blah as blah             |   from customer              |   etc...             &apos;&apos;&apos;)     return sql % cust_idprint getCustomerInfo( &apos;2345&apos; )&lt;/pre&gt;&lt;i&gt;Update: At the meeting, Drew pointed out that the standard library module &quot;textwrap&quot; has, since version 2.3, had a &quot;dedent&quot; function which does something similar (i.e., dedent does what the abovementioned cookbook recipe does).&lt;/i&gt;&lt;hr&gt;&lt;h4&gt;3. My time/date stamp&lt;/h4&gt;See my &quot;&lt;a href=&quot;http://radio.weblogs.com/0100945/2002/05/13.html&quot;&gt;GIGO beH&lt;/a&gt;&quot;posting for details.  This command prints out my time/date stamp.No tricky code here.&lt;pre&gt;import datetimefrom string import digits as d, lowercase as lc, uppercase as ucdom= &apos;!&apos; + d[1:] + uc[4:]      # Used for day of monthhms= d + uc + lc               # Used for mins, seconds.now = datetime.datetime.now()date_code= lc[ now.year - 2001 ] + lc[ now.month-1 ] + dom[ now.day ]time_code= hms[ now.hour + 10 ] + hms[ now.minute ] +  hms[ now.second ]print date_code + &apos;_&apos; + time_code&lt;/pre&gt;&lt;hr&gt;&lt;h4&gt;4. &quot;flatten&quot;&lt;/h4&gt;Because the flatten method was the subject of my contribution in theabovementioned email thread that got me into this trouble in the firstplace, I guess I ought to snip a bit of that here.  This is a very minortweak to Alex Martelli&apos;s cookbook version.  Slightly shorter, probablyslightly less clear, but I get to include a &quot;no_can_do&quot; function:&lt;pre&gt;def can_do ( fn, exc = Exception ):    try:          fn()    except exc:   return 0    else:         return 1#def no_can_do ( fn ):    return not can_do( fn )#def isScalar(obj):    return (    can_do( lambda: obj+&apos;&apos;, TypeError ) or             no_can_do( lambda: iter(obj) ) )#def flatten(sequence, scalarp=isScalar):    for item in sequence:        if scalarp(item):            yield item        else:            for subitem in flatten(item, scalarp):                yield subitem &lt;/pre&gt;&lt;hr&gt;&lt;br clear=all&gt;Finally, for no good reason, here&apos;s a link to the rest of those &lt;a href=&quot;http://got.net/~landauer/images/gaP-PtLobos/gaP-PtLobos.html&quot;&gt;Point Lobos pix&lt;/a&gt;.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/04/12.html#a746</guid>			<pubDate>Thu, 12 Apr 2007 08:52:53 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=746&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F04%2F12.html%23a746</comments>			</item>		<item>			<title>SECD machine ... a bit more</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/03/11.html#a735</link>			<description>Been super busy &amp;mdash; note the recent posting frequency :-( .  Major tree pruning and yard work this weekend.  Did a bit of work on the &lt;a href=&quot;http://radio.weblogs.com/0100945/2007/02/25.html&quot;&gt;SECD machine translation&lt;/a&gt;, but it&apos;s slow going.  I think I&apos;m going to have to do them all in sequence, since the opacity of my Ruby version of the simplest-looking one has made it somewhat tricky to debug in the dribs and drabs of time I&apos;ve given myself to work on it.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/03/11.html#a735</guid>			<pubDate>Mon, 12 Mar 2007 07:59:04 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=735&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F03%2F11.html%23a735</comments>			</item>		<item>			<title>vim insert multiple lines</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/03/03.html#a733</link>			<description>The question was:    &quot;In olden times, vi would allow you toinsert multiple lines with a &quot;:g/pattern/i...&quot; command.How does one do this in vim?My first answer was actually an answer to a question notquite asked:  &quot;How does one do &lt;i&gt;something like&lt;/i&gt; this in vim?&quot;And that answer was&lt;pre&gt;  :g/pattern/s/^/one-new-line^V^Manother^V^M/&lt;/pre&gt;But naturally, the question as actually asked gnawed atmy brain, and I tried a few things, including even (gasp!)vim&apos;s :help command!So, let me count the ways that ended up working for me:&lt;pre&gt;  :g/pattern/i|only-one-inserted-line-can-be-typed-here&lt;/pre&gt;Hmm, that worked at work, but not here at home.  (See below.):help :g helped me find this one -- I had never heardof the &quot;normal&quot; command before:&lt;pre&gt;  :g/^buz/normal ifirst-inserted-line^Msecond-one^M^[&lt;/pre&gt;I finally found the key here, under :help :insert&lt;pre&gt;  These two commands will keep on asking for lines, until you type a line  containing only a &quot;.&quot;.  Watch out for lines starting with a backslash, see  |line-continuation|.  When these commands are used with |:global| or |:vglobal| then the lines are  obtained from the text following the command.  Separate lines with a NL  escaped with a backslash: &gt;        :global/abc/insert\        one line\        another line  The final &quot;.&quot; is not needed then.&lt;/pre&gt;Without that, It would have taken a lot longer to think of using the backslash, or the actual control-J instead of control-M.Soooo, the oh-so-user-friendly escaping required, toget as close as is reasonable to the old vi behavior,is approximately the least intuitive thing that couldpossibly work:&lt;pre&gt;    :g/pattern/i\^v^jone-line\^v^janother&lt;/pre&gt;And, oh, by the way, the doubly-escaped newlinedisplays as &quot;^@&quot;.Dang, that again did not work at home.  &quot;Trailing characters.&quot;Aha, this appears to be something fixed between vim version 6.2and vim version 7.0.   (Mac OS X, in case that matters.)&lt;i&gt;(Edit:  I hadn&apos;t noticed that the backslashes disappearedupon publication.)&lt;/i&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/03/03.html#a733</guid>			<pubDate>Sun, 04 Mar 2007 07:33:44 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=733&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F03%2F03.html%23a733</comments>			</item>		<item>			<title>virtual server</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/28.html#a731</link>			<description>Cool, that was easy &amp;mdash; now I have my mac running both the new site and a virtual server for experimenting, the latter addressed via my old dyndns site zia dot mine dot nu.  Now to locate that layout/CSS that I came up with a few weeks ago.Downloaded liftweb, but haven&apos;t really had the time yet to try deploying something using it. </description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/28.html#a731</guid>			<pubDate>Wed, 28 Feb 2007 08:57:32 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=731&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F28.html%23a731</comments>			</item>		<item>			<title>liftweb framework</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/27.html#a730</link>			<description>David Pollak released version 0.1.0 of liftweb today.I think I&apos;ll try using that for my ell six arr dot you esssite when I start rehabilitating it. </description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/27.html#a730</guid>			<pubDate>Wed, 28 Feb 2007 07:58:59 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=730&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F27.html%23a730</comments>			</item>		<item>			<title>SECD machine into Ruby:  fragments</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/25.html#a728</link>			<description>As &lt;a href=&quot;http://radio.weblogs.com/0100945/2007/02/20.html&quot;&gt;I hinted last Tuesday&lt;/a&gt;, I&apos;ve been looking in to Olivier Danvy&apos;sexcellent paper dissecting Landin&apos;s SECD machine, the first influentialabstract machine for evaluating expressions in the lambda calculus.I made some progress on understanding Olivier Danvy&apos;s paper,in the guise of translating Danvy&apos;s ML into Ruby.  It broughtto my attention a couple of observations:&lt;ul&gt;&lt;li&gt;Man, this translation sure does get you to appreciate   the power of pattern matching!!!  I think I want to   try to do this in Scala next.  I do have one concern,   though, in that pattern matching in ML makes it hard to   tell what identifiers are being assigned due to a match.   I suspect that this is probably due mostly to my lack of   familiarity with ML. &lt;li&gt;Sheesh, there is an awful lot of infrastructure that gets   glossed over as &quot;obvious&quot; (or not even mentioned at all)   in formal papers like this.  By my count, the meat of the   section (2.4) of Danvy&apos;s paper that caught my eye is only   24 or so lines of very compact ML code, which I have translated   (so far) into 58 or so lines of Ruby.  The rest of the code I   wrote to support this experiment (parsing lambda expressions   and program arguments; defining classes; error-checking; and   testing and debugging) takes 300+ lines.&lt;/ul&gt;It doesn&apos;t quite work yet, so I&apos;ll not inflict it upon theworld, but I&apos;ll include (below) the &quot;meat&quot; section, in bothML and Ruby.  Landin&apos;s original SECD machine stood for&quot;Stack&quot;, &quot;Environment&quot;, &quot;Control&quot;, and &quot;Data&quot;.  Landin&apos;sabstract machine would have four registers, one for eachof those data structures.  The section 2.4 upon which Ifocused omits the &quot;D&quot; register.  The meat of this sectiondefines two functions:  &quot;eval&quot; and &quot;apply&quot;.Here&apos;s &quot;eval&quot; from Danvy&apos;s section 2.4 &quot;SEC machine&quot; (no D).I found the formatting and parameter naming of the APP branchutterly misleading, so I&apos;ve changed those for clarity:&lt;pre&gt;fun eval (LIT n, s, e, c) = c ((INT n) :: s, e)    | eval (VAR x, s, e, c) = c ((Env.lookup (x, e)) :: s, e)    | eval (LAM (x, t), s, e, c) = c ((CLOSURE (e, x, t)) :: s, e)    | eval (APP (t0, t1), s, e, c)       = eval (t1, s, e,               fn (s2, e2) =&gt; eval (t0, s2, e2,                                    fn (s3, e3) =&gt;                                        apply (s3, e3, c)                                   )              )&lt;/pre&gt;&lt;hr&gt;Here&apos;s my Ruby &lt;code&gt;eval&lt;/code&gt; translation for now(as I mentioned above, it does not quite work yet):&lt;pre&gt;def eval k, s, e, cfunc    case k     when St_LIT ;  n = k.val                    cfunc.call( s.push( Val_int.new(n), e ))     when St_VAR ;  x = k.id                    xv = e.lookup x                    cfunc.call( s.push( xv ), e )     when St_LAM ;  x = k.lambda_param                    t = k.lambda_body                    cls = Val_closure.new( e, x, t )                    cfunc.call( s.push( cls ), e )     when St_APP ;  t0 = k.fn_to_apply                    t1 = k.args                    # I don&apos;t get what the =&gt; symbols mean here.                    #  Oh, eww!  what ugly misleading formatting                    #  and identifier name choices, and convoluted                    #   expression!  Fixed those and unwound it.                    innerF = proc{|s3,e3| apply s3,e3,c }                    midF   = proc{|s2,e2| eval t0, s2, e2, innerF }                    eval( t1, s, e,  midF )    endend&lt;/pre&gt;&lt;hr&gt;Here&apos;s &lt;code&gt;apply&lt;/code&gt;, in Danvy&apos;s ML ...&lt;pre&gt;and apply (SUCC :: (INT n) :: s, e, c)                = c ((INT (n+1)) :: s, e)  | apply ((CLOSURE (e&apos;, x, t)) :: v&apos; :: s, e, c)    = let val (v :: nil) =            eval (t, nil, Env.extend (x, v&apos;, e&apos;),                   fn (s, _) =&gt; s)      in           c(v::s,e)      end &lt;/pre&gt;&lt;hr&gt; ... and here&apos;s my Ruby translation of &lt;code&gt;apply&lt;/code&gt;:&lt;pre&gt;def apply s, e, cfunc    s_top = s.pop    if s_top.is_a? Val_succ        s_nxt = s.pop        if s_nxt.is_a? Val_int            s.push( Val_int.new( s_nxt.val + 1 ) )            cfunc.call( s, e )        else            puts &quot;Apply error:  succ on non-INT&quot;            exit 1        end    elsif s_top.is_a? Val_closure        ep = s_top.env        x  = s_top.lambda_param        t  = s_top.lambda_body        vp = s.pop        v_colon_nil = eval(t,                           nil,                           ep.extend(x, vp, ep),                            proc{|s,_| s}                          )        just_v = v_colon_nil.pop        cfunc.call( s.push(just_v), e )    else        puts &quot;Apply error:  apply on a non-SUCC, non-Closure&quot;    endend&lt;/pre&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/25.html#a728</guid>			<pubDate>Mon, 26 Feb 2007 07:35:44 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=728&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F25.html%23a728</comments>			</item>		<item>			<title>UI Blunders:  Apple and Firefox</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/23.html#a727</link>			<description>Channeling &lt;a href=&quot;http://www.jroller.com/page/fate&quot;&gt;Hani&lt;/a&gt; today,but with fewer swearwords.IMHO, Apple has a well-deserved reputation as one of thebest UI design organizations on the planet.  But eventhe best err sometimes.  So here&apos;s a list of what Iconsider to be User Interface Blunders that Apple hasmade, despite that reputation.&lt;dl&gt;&lt;dt&gt;Page Setup  vs  the print dialog&lt;dd&gt;EVERY application should provide the option,    IN THE PRINT DIALOG, to switch between landscape    and portrait mode.   NO EXCEPTIONS.  THIS IS BASIC.    &lt;p&gt;    To force me to close the print dialog, and go    to Page Setup, just to get a page printed in the    desired orientation, is to admit that your APIs    are ossified, and cannot adapt to providing the    smooth and simple interaction that Apple was    once justly praised for.&lt;dt&gt;the one-button mouse&lt;dd&gt;Though it might have been    the right choice even as late as 1987, it was definitely    a mistake by 1997, and is a huge blunder in 2007.&lt;dt&gt;Not giving Text files special status    &lt;dd&gt;Apple innovation:  giving files types, and assigning    a specific preferred (&quot;creator&quot;) application to most    kinds of files.  This was actually a nice innovation.    &lt;p&gt;    Cool flexibility variation:  the &quot;open with&quot; menu item.    Nice for giving the user more choices.    &lt;p&gt;     Blunder:  Not giving text files special status.    Face it, dammit.  Text files matter &lt;b&gt;more&lt;/b&gt;.    &lt;blockquote&gt;       Ok, I read about a new programming language NML.      Its sources are in files named with a &quot;.nml&quot;      extension.      &lt;p&gt;       Even firefox suffers from Apple&apos;s precedent here --        instead of giving me the choice of treating NML        as if it *might* be a text file, it just asks        whether to save it, or open with ... no choices.        &lt;p&gt;         DAMMIT, just let me see what&apos;s in tha damn thing!!        I can tell better than you can, whether it might        just simply be plain text.        &lt;p&gt;         No, actually, YOU could do it.  It is all or mostly        ascii or valid unicode?   Does it have line-ender        characters every so often, like, say, within every        few hundred characters?  than DAMMIT offer a decent        text editor as one of the preferred options, no        matter what the filename extension says.  These        things are supposed to be for OUR benefit, Shit!    &lt;/blockquote&gt;     Now, maybe I&apos;m biased from thirty-plus years of Unix use,    but dammit, text files, as streams of characters, ARE more    relevant to what &lt;b&gt;&lt;big&gt;I&lt;/big&gt;&lt;/b&gt; care about on the    computer than just about ANYTHING else.    JUST LET ME SEE THE DAMN THING.  If I don&apos;t like that,    or it turns out to be gibberish, I am perfectly capable    of closing that window!!!&lt;dt&gt;Printer margins in 2-up mode.    &lt;dd&gt;This might just be a minor printer driver issue,    but it has persisted for a long time.    PLEASE allow me to choose margin sizes, percentage    magnification, etc., when doing 2-up printing.    Your drivers (or your printer-partners&apos; drivers)    ALL SUCK.  (Well, maybe it&apos;s just the cheap and    sucky drivers for the cheap printers that I&apos;ve been    able to afford.)&lt;dt&gt;Speaking of firefox ... but I suppose that&apos;s a different entry.    &lt;dd&gt;It sure would be nice to make it a better Mac OS X client.    Here are my two trivial improvements:    &lt;ol&gt;     &lt;li&gt;Fix the text selection behavior.  If I select a string        of text, and then hit the left-arrow button, then the        cursor should be *at the left edge of where that        selection was*.  Otherwise, &lt;b&gt;it is not a Mac        Application&lt;/b&gt;.        &lt;br&gt;        I&apos;m not sure what lame rules it does use, but ... well,        they&apos;re wrong.     &lt;li&gt;the dock-context menu currently has         &lt;ul&gt;         &lt;li&gt; show in finder         &lt;li&gt; hide         &lt;li&gt; quit         &lt;/ul&gt;        It needs to have &quot;New Window&quot;        &lt;p&gt;        Why?  Say I have a couple of Ffox windows full of tabs        full of stuff I&apos;m sorta reading.   Then I cmd-M minimize        them and do some work.  Now, when I have a work-related        question that I need to use FFox to solve, I just want a        new ffox window to come up.  Instead, if I click on the        Ffox in the dock, then one of my old surfing windows-full-of-tabs        slithers out of its crate, and whatever cow orker is peering        over my shoulder has to ask about all the interesting stuff        in there, instead of getting a clean-slate starter spot.        &lt;p&gt;        To get the effect I most often want, I have to cmd-Tab        as many times as necessary to get to Ffox, then hit cmd-N.        Feels like n different operations (with n unpredictable)        when it should be one (right click on Ffox dock icon, and        glide the cursor up to select the nonexistent        (but &lt;a href=&quot;http://web.archive.org/web/20060428080342/http://www.shouldexist.org/&quot;&gt;        should-exist&lt;/a&gt;) &quot;New Firefox Window&quot; menu item).     &lt;li&gt;(feature request):  when the user changes the text size, if some        text on the page is selected, then do your darnedest to        keep (at least the start of) that selected text visible.        &lt;p&gt;        my workaround for this is :        &lt;ul&gt;          &lt;li&gt;select some text          &lt;li&gt;cmd-+  (often as many as three times) to repair some             resolution-challenged bozo&apos;s teeny tiny text          &lt;li&gt;shift-down-arrow (extends the selection, which has            the side effect of bringing that end of the selection            into view)        &lt;/ul&gt;        It shouldn&apos;t have to be that cumbersome.    &lt;/ol&gt;&lt;/dl&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/23.html#a727</guid>			<pubDate>Sat, 24 Feb 2007 06:56:47 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=727&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F23.html%23a727</comments>			</item>		<item>			<title>Fixing Steve Yegge&apos;s rants</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/21.html#a726</link>			<description>I am among many who find&lt;a href=&quot;http://steve-yegge.blogspot.com/&quot;&gt;Steve Yegge&apos;s rants&lt;/a&gt;quite entertaining, but who also find them long enough to print ratherthan read online.  The problem with this is that there&apos;s a bug somewhere,in the CSS, in Mac OS X, or in Firefox, whose result is that printingone entry out leads to one page containing only a useless header page,one page of content, cut off as it falls off the page, and one uselesspage of comment entry form.  With some help from Eric Meyer and a bitof binary debugging, I tracked it down to a CSS property that says&lt;pre&gt;   overflow: hidden;&lt;/pre&gt;which makes me suspect that Firefox is doing exactly what it was toldto do -- hiding the &quot;rest&quot; of the page(s) because the entry overflowedwhat would fit on one (printed) page.  Since I don&apos;t really grokjavascript, &lt;a href=&quot;http://diveintogreasemonkey.org/&quot;&gt;greasemonkey&lt;/a&gt;,or &lt;a href=&quot;http://hoodwinkd.hobix.com/&quot;&gt;hoodwink&apos;d&lt;/a&gt; yet, I wrote ashell/ruby script to fix the rants to make them printable.  Finding thethings to fix is made vastly easier by the excellent&lt;a href=&quot;https://addons.mozilla.org/firefox/1843/&quot;&gt;Firebug&lt;/a&gt; pluginfor Firefox, which is roughly a WYSIWYG CSS editor and validator forremote web pages.Anyway, meanwhile, here&apos;s that script.  It&apos;s brittle, but works for today:&lt;pre&gt;#!/bin/sh# Later, make it ruby -i.bak# That first one is really the only thing needed to fix the printing problem.# (Which was that it would only print one page of the rant.  S.Y. could#  work around this bug by publishing normal-sized blog entries, but#  I&apos;m not holding my breath.)  The other gsub lines remove the sidebar#  and widen the main text.ruby         -p -e &apos;gsub( /overflow: *hidden;/ ) {|m| &quot;/* #{m} */&quot; }&apos;                      -e &apos;gsub( /width: *67%;/, &quot;width: 95%&quot; )&apos;                                  -e &apos;gsub( /width: *25%;/, &quot;width: 0%; display: none; &quot; )&apos;              &quot;$@&quot;&lt;/pre&gt;Sorry, I can&apos;t do much about the content, but I find them entertainingenough that I&apos;m not tempted to try.  :-)Usage:  save the page, and then run this script with the name of thatsaved file as an argument.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/21.html#a726</guid>			<pubDate>Thu, 22 Feb 2007 05:04:35 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=726&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F21.html%23a726</comments>			</item>		<item>			<title>M-expressions to Forth, Landin, SECD, Danvy, and Oleg</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/20.html#a725</link>			<description>My &lt;a href=&quot;http://radio.weblogs.com/0100945/2007/02/16.html&quot;&gt;mention a few days ago&lt;/a&gt; of the Lisp 1.5 manual was related toan intent &quot;to mess around some with M-expressions&quot;.  Namely, Ithought it would be nice to write up a moderately minimalimplementation in a more modern, concise, widely-available language.But then I gotsidetracked into thinking about minimal forth implementations,thinking about what a forth-like language would be like if thestack were a stack of lisp-ish cons cells, and finally decidedthat some of the early lisp guys must have done something similar.This eventually led me to read&lt;a href=&quot;http://www.brics.dk/~danvy/&quot;&gt;Olivier Danvy&lt;/a&gt;&apos;s 2003 paper&lt;a href=&quot;http://www.brics.dk/RS/03/Abs/BRICS-RS-03-Abs/BRICS-RS-03-Abs.html#BRICS-RS-03-33&quot;&gt;&quot;A Rational Deconstruction of Landin&apos;s SECD Machine&quot;&lt;/a&gt;.I had only vaguely ever heard of the SECD machine before,but it does indeed look like what I was wondering aboutas described above.Danvy&apos;s reconstruction without the &quot;D&quot;seems simplest to me.So this sidetrack will probably remaina thorn in my side until I can interpret some of&lt;a href=&quot;http://okmij.org/ftp/Computation/lambda-arithm-basic.scm&quot;&gt;Oleg&apos;s basic lambda-calculus expressions&lt;/a&gt; in some form.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/20.html#a725</guid>			<pubDate>Tue, 20 Feb 2007 08:25:39 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=725&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F20.html%23a725</comments>			</item>		<item>			<title>Haskell library docs and IDE-like website features</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/18.html#a723</link>			<description>As a perennial almost-fluent Haskell reader, I still finda couple of things making Haskell code harder to read thanit should have to be.One of them is operator precedence, though I think I mostlyhave a handle on it.  As I commented (on JJ&apos;s &lt;a href=&quot;http://jjinux.blogspot.com/2007/02/haskell-syntax.html&quot;&gt;critique of Haskell syntax&lt;/a&gt;):&lt;blockquote&gt;&lt;i&gt;I do think that operator precedence in Haskell is one of the harder thingsto get used to for beginners. Here&apos;s a feature I&apos;d like to see in a HaskellIDE: visually parenthesize code (upon request, or by default for novices)by putting the background of the innermost parts in one shade, and holdingthe next outer parts together with a slightly lighter shade, fading out tomatch the background color at the outermost level. Do this in particularwith the unfamiliar operators -- the ones that do not exist in the morepopular languages.&lt;/i&gt;&lt;/blockquote&gt;I think you could do this with CSS in an HTML page thatcontains Haskell source code.And along similar lines:Cale Gibbard wrote an excellent wiki entry about&lt;a href=&quot;http://cale.yi.org/index.php/How_To_Use_Monad_Transformers&quot;&gt;How To Use Monad Transformers&lt;/a&gt;.  What I found hardest tofollow was the times when he would use a library function withwhich I was (actually, still am) unfamiliar.In this case, none of &lt;code&gt;lift&lt;/code&gt;, &lt;code&gt;liftIO&lt;/code&gt;,the &lt;code&gt;=&amp;lt;&amp;lt;&lt;/code&gt; operator, nor &lt;code&gt;tell&lt;/code&gt;were explained (though &lt;code&gt;tell&lt;/code&gt; looks clearfrom the context, but I remain uneasy about it after looking at&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/mtl/Control-Monad-Writer.html#v:tell&quot;&gt;its type&lt;/a&gt;).I think it would be cool if instructive Haskell pages hadpop-up (aka &quot;tooltip&quot;) links attached to most usages oflibrary functions, so that if you hover over the name,you&apos;d get a pop-up showing the function&apos;s type and abrief description in English of what it does.These website feature ideas are probably old-hat to you folkswho actually use IDEs, but it seems like a strange omission forstuff on the web whose purpose is instruction.Unfortunately, looking at some of&lt;a href=&quot;http://haskell.org/ghc/docs/latest/html/libraries/doc-index.html&quot;&gt;the Haskell library docs&lt;/a&gt;, it does appear that most ofthose &quot;brief description in English&quot; texts are not actuallywritten yet.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/18.html#a723</guid>			<pubDate>Mon, 19 Feb 2007 07:51:12 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=723&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F18.html%23a723</comments>			</item>		<item>			<title>Haskell read/show hex</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/14.html#a719</link>			<description>Someone, somewhere wondered about converting integers to and from Hexadecimal in Haskell.  Their weblog had yet another &quot;sign up for a new account in order to comment&quot; form, and, well, I&apos;m all accounted out, so my reply is here:&lt;pre&gt;import Numericread_h :: String -&gt; Integer           -- inferrableread_h = fst . head . readHexmain = let iVal = 123456           hstr = showHex iVal &quot;&quot;           hiv  = read_h hstr in        do           putStrLn $ show iVal          putStrLn hstr          putStrLn $ show hiv&lt;/pre&gt;The weird thing about it was that I kept trying to assign to iVal inside the &quot;do&quot; section, and I never did figure out how to do it that way.  Seems like it ought to be easy, but it wasn&apos;t being easy for me.Part of the issue is that there doesn&apos;t appear to be a simple &quot;read one hex value from a string&quot; function.  Instead, there&apos;s this parser thing (readHex), that returns a List of Pairs.  That&apos;s what the &quot;fst . head . readHex&quot; is about -- head takes the first part of the List; and then fst takes the first element of the Pair.  (I think the second element of the Pair is the rest of the string that didn&apos;t get parsed.) </description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/14.html#a719</guid>			<pubDate>Wed, 14 Feb 2007 09:35:28 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=719&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F14.html%23a719</comments>			</item>		<item>			<title>Learning and Teaching via Programming</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/13.html#a718</link>			<description>&lt;a href=&quot;http://bitworking.org/news/113/Knowledge-Acquisition&quot;&gt;Joe Gregorio mentioned&lt;/a&gt;that John Panzer wrote about &lt;a href=&quot;http://journals.aol.com/panzerjohn/abstractioneer/entries/2007/02/05/the-essential-hardness-of-programming/1402&quot;&gt;Software development as knowledge acquisition&lt;/a&gt;.For decades, I&apos;ve heard that the&lt;a href=&quot;http://tinyurl.com/ys9wfj&quot;&gt;best way to learn about a subject is to teach&lt;/a&gt;it to someone.So, putting these suggestions together with a few of my own, we have:&lt;ul&gt;&lt;li&gt;Programming as learning (see above)&lt;li&gt;&lt;a href=&quot;http://tinyurl.com/ys9wfj&quot;&gt;teaching as learning&lt;/a&gt; (google search tinyurl link)&lt;li&gt;and my own&lt;a href=&quot;http://radio.weblogs.com/0100945/2005/02/26.html&quot;&gt;occasional&lt;/a&gt;&lt;a href=&quot;http://radio.weblogs.com/0100945/2005/03/31.html&quot;&gt;assertion&lt;/a&gt;that the most understandable programs are&lt;a href=&quot;http://radio.weblogs.com/0100945/2005/06/22.html&quot;&gt;written&lt;/a&gt;with the mindset of programming as&quot;teaching a person how this program solves that problem&quot;&lt;/ul&gt;There&apos;s some semi-related tangent here, but it&apos;ll have to waituntil it resurfaces.Oh, yes, and as SICP puts it (in the online&lt;a href=&quot;http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-7.html&quot;&gt;Preface to the First Edition&lt;/a&gt;):&lt;blockquote&gt;&lt;i&gt;Thus, programs must be written for people to read,and only incidentally for machines to execute. &lt;/i&gt;&lt;/blockquote&gt;</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/13.html#a718</guid>			<pubDate>Wed, 14 Feb 2007 07:45:24 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=718&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F13.html%23a718</comments>			</item>		<item>			<title>Forth, Yoda on</title>			<link>http://radio.weblogs.com/0100945/categories/cs/2007/02/12.html#a717</link>			<description>On pragprog last week,&lt;a href=&quot;http://tech.groups.yahoo.com/group/pragprog/message/8503&quot;&gt;Ged Byrne wrote&lt;/a&gt;:&lt;blockquote&gt;&lt;i&gt;Yoda forth program? if say .&quot; a powerful ally is the forth &quot; then&lt;/i&gt;&lt;/blockquote&gt;And on&lt;a href=&quot;http://mail.python.org/pipermail/python-list/2001-April/076963.html&quot;&gt;the python list&lt;/a&gt; about six years ago:&lt;blockquote&gt;&lt;b&gt;William Tanksley:&lt;/b&gt; Always doing things backwards, Forth programmers are.&lt;br&gt;&lt;b&gt;Greg Ewing:&lt;/b&gt; Ah, that explains it ... household programmers Forth of in Yoda up grew.&lt;br&gt;&lt;b&gt;Kragen Sitaker:&lt;/b&gt; household programmers Forth of of Yoda up grew in, think I.  This silly is but.&lt;/blockquote&gt;And someone with way too much time on his hands wrote&lt;a href=&quot;http://www.yodajeff.com/pages/talk/yodish.shtml&quot;&gt;an in-depth analysis of &quot;Yodish&quot;&lt;/a&gt;.Just thought I ought to bring these things together.</description>			<guid>http://radio.weblogs.com/0100945/categories/cs/2007/02/12.html#a717</guid>			<pubDate>Mon, 12 Feb 2007 16:38:44 GMT</pubDate>			<comments>http://radiocomments.userland.com/comments?u=100945&amp;amp;p=717&amp;amp;link=http%3A%2F%2Fradio.weblogs.com%2F0100945%2F2007%2F02%2F12.html%23a717</comments>			</item>		</channel>	</rss>
