<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
   <title>Brad Ediger</title>
   <link rel="alternate" type="text/html" href="http://www.bradediger.com/blog/" />
   
   <id>tag:www.bradediger.com,2008:/blog//1</id>
   <updated>2008-04-13T06:56:55Z</updated>
   
   <generator uri="http://www.sixapart.com/movabletype/">Movable Type Publishing Platform 4.0</generator>


<link rel="self" href="http://feeds.feedburner.com/BradEdiger" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
   <title>I lead a typical, boring life</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/LdETwXMrrRA/i_lead_a_typical_boring_life.html" />
   <id>tag:www.bradediger.com,2008:/blog//1.20</id>
   
   <published>2008-04-13T06:55:40Z</published>
   <updated>2008-04-13T06:56:55Z</updated>
   
   <summary>~ $ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n ",a[i],i}}'|sort -rn|head 285 hg 51 script/server 32 cd 17 rm 15 ls 10 rake 8 vi 8 ps 8 mate 8 cap...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<pre>~ $ history|awk '{a[$2]++} END{for(i in a){printf "%5d\t%s\n ",a[i],i}}'|sort -rn|head
   285	hg
   51	script/server
    32	cd
    17	rm
    15	ls
    10	rake
     8	vi
     8	ps
     8	mate
     8	cap
</pre>]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2008/04/i_lead_a_typical_boring_life.html</feedburner:origLink></entry>

<entry>
   <title>A Modest Syntax Proposal: RBXML</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/jJmmByYOkUE/a_modest_syntax_proposal_rbxml.html" />
   <id>tag:www.bradediger.com,2008:/blog//1.19</id>
   
   <published>2008-04-01T21:33:42Z</published>
   <updated>2008-04-01T21:50:15Z</updated>
   
   <summary> Ruby is a wonderful language, but its syntax has some shortcomings. Inspired by Perl, the syntax of Ruby requires many special cases and is difficult to parse by anything but a full Ruby interpreter. We seek to fix this...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<style type="text/css">
<!--
      pre {
        font-family: monaco, Courier, sans-serif;
        font-size: 8pt;
        padding-left: 1em;
        border-left: 1px solid #666;
        color: #000000;
        color: #000000;
        background-color: #ffffff;
      }
  .comment {
    /* font-lock-comment-face */
    color: #b22222;
    color: #b22222;
  }
  .comment-delimiter {
    /* font-lock-comment-delimiter-face */
    color: #b22222;
    color: #b22222;
  }
  .ecb-tag-header {
    /* ecb-tag-header-face */
    background-color: #54ff9f;
  }
  .function-name {
    /* font-lock-function-name-face */
    color: #0000ff;
    color: #0000ff;
  }
  .keyword {
    /* font-lock-keyword-face */
    color: #a020f0;
    color: #a020f0;
  }
  .type {
    /* font-lock-type-face */
    color: #228b22;
    color: #228b22;
  }
  .string {
    /* font-lock-string-face */
    color: #bc8f8f;
    color: #bc8f8f;
  }
  .variable-name {
    /* font-lock-variable-name-face */
    color: #b8860b;
    color: #b8860b;
  }

-->
</style>

<p>Ruby is a wonderful language, but its syntax has some shortcomings. Inspired by Perl, the syntax of Ruby requires many special cases and is difficult to parse by anything but a full Ruby interpreter. We seek to fix this issue with a new, unambiguous syntax for Ruby: <strong>RBXML</strong>.</p>

<blockquote>"Business Reporting and XML go hand in hand. I plan to convert Ruport to RBXML as soon as I can!"<br/>
    -- Gregory Brown, Ruby Reports maintainer</blockquote>

<p>Consider the following Ruby code. While it is certainly concise, it achieves this goal through use of obscure symbols such as <tt>.</tt> and <tt>|</tt>. This makes it difficult to read, and more importantly, difficult to parse by machine.</p>

<pre>
<span class="keyword">class</span> <span class="type">Integer</span>
  <span class="keyword">def</span> <span class="function-name">factorial</span>
    (1..<span class="variable-name">self</span>).inject(1) {|p, x| p*x}
  <span class="keyword">end</span>
<span class="keyword">end</span>
</pre>

<p>Rubyists talk a lot about metaprogramming, but how are you supposed to introspect on a language like that? <a href="http://rubyforge.org/projects/parsetree/">Some</a> <a href="http://blog.zenspider.com/archives/2005/02/rubytoruby.html">projects</a> try to work around these limitations by letting Ruby code introspect on itself; however, the result can be unwieldy. Why reinvent the wheel when XML has been around for years? Consider the much more regular and understandable syntax in RBXML:</p>

    <pre>
&lt;<span class="function-name">class</span> <span class="variable-name">name</span>=<span class="string">"Integer"</span>&gt;
  &lt;<span class="function-name">def</span> <span class="variable-name">name</span>=<span class="string">"factorial"</span>&gt;
    &lt;<span class="function-name">method-call</span>&gt;
      &lt;<span class="function-name">name</span>&gt;inject&lt;/<span class="function-name">name</span>&gt;
      &lt;<span class="function-name">receiver</span>&gt;
        &lt;<span class="function-name">range</span> <span class="variable-name">exclude-end</span>=<span class="string">"false"</span>&gt;
          &lt;<span class="function-name">start</span>&gt;
            &lt;<span class="function-name">integer</span>&gt;1&lt;/<span class="function-name">integer</span>&gt;
          &lt;/<span class="function-name">start</span>&gt;
          &lt;<span class="function-name">end</span>&gt;self&lt;/<span class="function-name">end</span>&gt;
        &lt;/<span class="function-name">range</span>&gt;
      &lt;/<span class="function-name">receiver</span>&gt;
      &lt;<span class="function-name">argument</span>&gt;
        &lt;<span class="function-name">integer</span>&gt;1&lt;/<span class="function-name">integer</span>&gt;
      &lt;/<span class="function-name">argument</span>&gt;
      &lt;<span class="function-name">block</span>&gt;
        &lt;<span class="function-name">parameter</span> <span class="variable-name">name</span>=<span class="string">"p"</span> /&gt;
        &lt;<span class="function-name">parameter</span> <span class="variable-name">name</span>=<span class="string">"x"</span> /&gt;
        &lt;<span class="function-name">code</span>&gt;
          &lt;<span class="function-name">method-call</span>&gt;
            &lt;<span class="function-name">name</span>&gt;*&lt;/<span class="function-name">name</span>&gt;
            &lt;<span class="function-name">receiver</span>&gt;p&lt;/<span class="function-name">receiver</span>&gt;
            &lt;<span class="function-name">argument</span>&gt;x&lt;/<span class="function-name">argument</span>&gt;
          &lt;/<span class="function-name">method-call</span>&gt;
        &lt;/<span class="function-name">code</span>&gt;
      &lt;/<span class="function-name">block</span>&gt;
    &lt;/<span class="function-name">method-call</span>&gt;
  &lt;/<span class="function-name">def</span>&gt;
&lt;/<span class="function-name">class</span>&gt;
</pre>

<p>Just as languages in the Lisp family represent their parse trees with s-expressions, this regular syntax represents the parse tree <em>directly</em>, with only a small bit of XML parsing. Rubyists now have the advantage of not having an extra layer of syntax between them and their concepts.</p>

<p>But it doesn't stop there. We can add some simple syntactic sugar to condense our code further without making it significantly less readable. With a simple application of "duck typing," we infer a value of 1 from the string "1", thus eliminating the need for complex type annotations such as <tt>&lt;<span class="function-name">integer</span>&gt;1&lt;/<span class="function-name">integer</span>&gt;</tt>. This principle can be applied to the <tt>&lt;<span class="function-name">parameter</span>&gt;</tt> tag as well, using the well-known grammatical trick of a "comma splice". Here is the result:</p>

    <pre>
&lt;<span class="function-name">class</span> <span class="variable-name">name</span>=<span class="string">"Integer"</span>&gt;
  &lt;<span class="function-name">def</span> <span class="variable-name">name</span>=<span class="string">"factorial"</span>&gt;
    &lt;<span class="function-name">method-call</span> <span class="variable-name">name</span>=<span class="string">"inject"</span> <span class="variable-name">arguments</span>=<span class="string">"1"</span>&gt; <span class="comment-delimiter">&lt;!-- </span><span class="comment">quack! </span><span class="comment-delimiter">--&gt;</span>
      &lt;<span class="function-name">receiver</span>&gt;
        &lt;<span class="function-name">range</span> <span class="variable-name">exclude-end</span>=<span class="string">"false"</span> <span class="variable-name">start</span>=<span class="string">"1"</span> <span class="variable-name">end</span>=<span class="string">"self"</span> /&gt;
      &lt;/<span class="function-name">receiver</span>&gt;
      &lt;<span class="function-name">block</span> <span class="variable-name">parameters</span>=<span class="string">"p,x"</span>&gt;
        &lt;<span class="function-name">code</span>&gt;
          &lt;<span class="function-name">method-call</span> <span class="variable-name">name</span>=<span class="string">"*"</span> <span class="variable-name">receiver</span>=<span class="string">"p"</span> <span class="variable-name">arguments</span>=<span class="string">"x"</span> /&gt;
        &lt;/<span class="function-name">code</span>&gt;
      &lt;/<span class="function-name">block</span>&gt;
    &lt;/<span class="function-name">method-call</span>&gt;
  &lt;/<span class="function-name">def</span>&gt;
&lt;/<span class="function-name">class</span>&gt;</pre>

<p>With a special syntax (Integer#factorial) familiar to all Ruby coders, we can eliminate the <tt>&lt;<span class="function-name">class</span>&gt;</tt> tag that is really just a holdover from Ruby's original syntax. The <tt>&lt;<span class="function-name">block</span>&gt;</tt> tag also now contains a superfluous <tt>&lt;<span class="function-name">code</span>&gt;</tt> tag, which we can remove. In addition, the range/exclude-end parameter can be omitted and sensibly defaults to false. This tightens up the RBXML even more:</p>

    <pre>
&lt;<span class="function-name">def</span> <span class="variable-name">name</span>=<span class="string">"Integer#factorial"</span>&gt;
  &lt;<span class="function-name">method-call</span> <span class="variable-name">name</span>=<span class="string">"inject"</span> <span class="variable-name">arguments</span>=<span class="string">"1"</span>&gt;
    &lt;<span class="function-name">receiver</span>&gt;
      &lt;<span class="function-name">range</span> <span class="variable-name">start</span>=<span class="string">"1"</span> <span class="variable-name">end</span>=<span class="string">"self"</span> /&gt;
    &lt;/<span class="function-name">receiver</span>&gt;
    &lt;<span class="function-name">block</span> <span class="variable-name">parameters</span>=<span class="string">"p,x"</span>&gt;
      &lt;<span class="function-name">method-call</span> <span class="variable-name">name</span>=<span class="string">"*"</span> <span class="variable-name">receiver</span>=<span class="string">"p"</span> <span class="variable-name">arguments</span>=<span class="string">"x"</span> /&gt;
    &lt;/<span class="function-name">block</span>&gt;
  &lt;/<span class="function-name">method-call</span>&gt;
&lt;/<span class="function-name">def</span>&gt;</pre>

<p>Some community members have expressed the feeling that some Ruby syntax is "intuitive." As a transition aid for such people, we offer a compromise syntax. The <tt><span class="variable-name">code</span></tt> attribute will interpret code according to Ruby's old syntax rules, hopefully easing the transition to the new RBXML syntax:</p>

    <pre>
&lt;<span class="function-name">def</span> <span class="variable-name">name</span>=<span class="string">"Integer#factorial"</span>&gt;
  &lt;<span class="function-name">method-call</span> <span class="variable-name">name</span>=<span class="string">"inject"</span> <span class="variable-name">arguments</span>=<span class="string">"1"</span>&gt;
    &lt;<span class="function-name">receiver</span> <span class="variable-name">code</span>=<span class="string">"1..self"</span> /&gt;
    &lt;<span class="function-name">block</span> <span class="variable-name">code</span>=<span class="string">"|p, x| p * x"</span> /&gt;
  &lt;/<span class="function-name">method-call</span>&gt;
&lt;/<span class="function-name">def</span>&gt;</pre>

<p>However, users should be cautioned that the <tt><span class="variable-name">code</span></tt> attribute spins up a new Ruby interpreter process for every invocation, and thus should be used sparingly. It may be more efficient to use the <tt>&lt;<span class="function-name">code</span>&gt;</tt> tag at the toplevel, as all toplevel blocks are evaluated within one Ruby interpreter. This code should perform almost as well as current versions of MRI:</p>

    <pre>
&lt;<span class="function-name">code</span>&gt;
&lt;![CDATA[
  class Integer
    def factorial
      (1..self).inject(1) {|p, x| p*x}
    end
  end
]]&gt;
&lt;/<span class="function-name">code</span>&gt;</pre>

<p>RBXML is still under development. Unfortunately, we are unable to do a public release at this point, on the advice of our legal team. We hope to release the 1.0 version by April 1, 2009.</p>
]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2008/04/a_modest_syntax_proposal_rbxml.html</feedburner:origLink></entry>

<entry>
   <title>stealing from arc</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/SXB0u6f2kFU/stealing_from_arc.html" />
   <id>tag:www.bradediger.com,2008:/blog//1.18</id>
   
   <published>2008-03-05T05:41:52Z</published>
   <updated>2008-03-05T06:19:41Z</updated>
   
   <summary> Paul Graham's Arc language has been causing a commotion in the Lisp and web application communities. One of the stand-out features of Arc is its tidy syntax for simple anonymous functions. In Arc, the increment function can be expressed...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[    <style type="text/css">
    <!--
      pre {
        font-family: monaco, Courier, sans-serif;
        font-size: 8pt;
        padding-left: 1em;
        border-left: 1px solid #666;
        color: #000000;
        color: #000000;
        background-color: #ffffff;
      }
      .comment {
        /* font-lock-comment-face */
        color: #b22222;
        color: #b22222;
      }
      .comment-delimiter {
        /* font-lock-comment-delimiter-face */
        color: #b22222;
        color: #b22222;
      }
      .function-name {
        /* font-lock-function-name-face */
        color: #0000ff;
        color: #0000ff;
      }
      .keyword {
        /* font-lock-keyword-face */
        color: #a020f0;
        color: #a020f0;
      }
      .type {
        /* font-lock-type-face */
        color: #228b22;
        color: #228b22;
      }
      .slime-repl-input {
        /* slime-repl-input-face */
        font-weight: bold;
      }
      .slime-repl-inputed-output {
        /* slime-repl-inputed-output-face */
        color: #ff0000;
        color: #ff0000;
      }
      .slime-repl-output {
        /* slime-repl-output-face */
        color: #bc8f8f;
        color: #bc8f8f;
      }
      .slime-repl-prompt {
        /* slime-repl-prompt-face */
        color: #a020f0;
        color: #a020f0;
      }
    -->
    </style>


<p>Paul Graham's <a href="http://arclanguage.org">Arc</a> language has been causing a commotion in the Lisp and web application communities. One of the stand-out features of Arc is its tidy syntax for simple anonymous functions. In Arc, the increment function can be expressed thus, using square brackets:</p>

<pre>
[+ 1 _]
</pre>

Compare this to Common Lisp's completely readable, but less-than-fun, syntax for the same function:

<pre>
(<span class="keyword">lambda</span> (x) (+ x 1))
</pre>

<p>Arc's implementation of the bracket syntax is in <a href="http://pastie.caboo.se/161653">brackets.scm</a>, written by Eli Barzilay. Using Eli's Scheme code as a guide, I wrote the following Common Lisp reader macro:</p>

<pre>
(<span class="keyword">defun</span> <span class="function-name">square-bracket-reader</span> (stream char)
  (<span class="keyword">declare</span> (ignore char))
  `(<span class="keyword">lambda</span> (<span class="type">&amp;optional</span> _ __)
    (<span class="keyword">declare</span> (ignorable _ __)) <span class="comment-delimiter">; </span><span class="comment">don't warn about unused variables
</span>    ,(read-delimited-list #\] stream t)))

(<span class="keyword">defun</span> <span class="function-name">use-square-bracket-readtable</span> ()
  <span class="comment-delimiter">; </span><span class="comment">Install #'square-bracket-reader as a reader macro for [
</span>  (set-macro-character #\[ #'square-bracket-reader)
  
  <span class="comment-delimiter">; </span><span class="comment">Make ] behave like ) to the reader so that [+ 1 _] works,</span>
  <span class="comment-delimiter">; </span><span class="comment">not just [+ 1 _ ].
</span>  (set-macro-character #\] (get-macro-character #\) nil)))
</pre>

<p>Usage is very simple:</p>

<pre>
<span class="slime-repl-prompt">CL-USER&gt; </span><span class="comment"><span class="slime-repl-input">(use-square-bracket-readtable)</span></span>
<span class="slime-repl-inputed-output">T</span>
<span class="slime-repl-prompt">CL-USER&gt; </span><span class="comment"><span class="slime-repl-input">([+ 1 _] 10)</span></span>
<span class="slime-repl-inputed-output">11</span>
<span class="slime-repl-prompt">CL-USER&gt; </span><span class="comment"><span class="slime-repl-input">([+ _ __] 1 2)</span></span>
<span class="slime-repl-inputed-output">3</span>
</pre>]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2008/03/stealing_from_arc.html</feedburner:origLink></entry>

<entry>
   <title>The Cover</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/cb5iR-39fDQ/the_cover.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.17</id>
   
   <published>2007-09-30T04:37:06Z</published>
   <updated>2007-09-30T04:41:37Z</updated>
   
   <summary>Advanced Rails officially has a zebra. Thanks to everyone who gave feedback on the original, especially to Jim Kane for his suggestion of a tagline which it appears we are going to use....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[Advanced Rails officially has a zebra. Thanks to everyone who gave feedback on the original, especially to Jim Kane for his suggestion of a tagline which it appears we are going to use.

<span class="mt-enclosure mt-enclosure-image"><img alt="advancedrails_cover.jpg" src="http://www.bradediger.com/blog/advancedrails_cover.jpg" width="500" height="500" class="mt-image-left" style="float: left; margin: 0 20px 20px 0;"/></span>]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/09/the_cover.html</feedburner:origLink></entry>

<entry>
   <title>The Limits of Search</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/DzTHwpfNUh0/the_limits_of_search.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.16</id>
   
   <published>2007-08-31T18:34:12Z</published>
   <updated>2007-08-31T18:41:46Z</updated>
   
   <summary>An interesting perspective on generalized search, with an informal but convincing conjecture on fundamental limitations to search problems. (In a word, TANSTAAFL.) To wit: If you’re going to find a needle in a haystack, then you’ve got to expend at...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<a href="http://scottaaronson.com/blog/?p=266">An interesting perspective</a> on generalized search, with an informal but convincing conjecture on fundamental limitations to search problems. (In a word, TANSTAAFL.) To wit:

<blockquote>If you’re going to find a needle in a haystack, then you’ve got to expend at least some computational effort sifting through the hay.</blockquote>

The author ties it in with computational complexity theory and the age-old question of whether P = NP:

<blockquote>Many people — even computer scientists — don’t appreciate just how profound the consequences would be if P=NP. They think it’s about scheduling airline flights better, or packing more boxes in your truck. Of course, it is about those things — but the point is that you can have a set of boxes such that if you could pack them into your truck, then you would also have proved the Riemann Hypothesis!</blockquote>

He postulates that these fundamental limitations constrain not only classical but also quantum computing, railing against the modern conception of quantum computers as generalized massively parallel solvers. All in all, quite an interesting perspective. Nothing fundamentally profound or groundbreaking here, but it all makes sense.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/08/the_limits_of_search.html</feedburner:origLink></entry>

<entry>
   <title>Ambition</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/d7zlXyiqWxs/ambition.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.15</id>
   
   <published>2007-08-31T04:58:43Z</published>
   <updated>2007-08-31T05:04:41Z</updated>
   
   <summary>Ambition by Chris Wanstrath is not only the coolest thing in Ruby since ruby-inline, it is also one of the best examples of practical functional programming that I have ever seen. Go check it out and be enlightened....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<a href="http://errtheblog.com/post/10722">Ambition</a> by Chris Wanstrath is not only the coolest thing in Ruby since <a href="http://www.zenspider.com/ZSS/Products/RubyInline/">ruby-inline</a>, it is also one of the best examples of practical functional programming that I have ever seen. Go check it out and be enlightened.
]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/08/ambition.html</feedburner:origLink></entry>

<entry>
   <title>Metric Spaces</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/W3iL_G4upAM/metric_spaces.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.14</id>
   
   <published>2007-08-26T03:39:17Z</published>
   <updated>2007-08-26T03:55:56Z</updated>
   
   <summary>Fascinating paper on vp-trees, useful for generalized BSP indexing over metric spaces. Like a kd-tree but more flexible and abstract, and more useful on non-Euclidean distance metrics. I've been thinking about using vp-trees over a Levenshtein-distance metric space for some...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<a href="http://www.pnylab.com/pny/papers/vptree/vptree/">Fascinating paper</a> on vp-trees, useful for generalized <a href="http://en.wikipedia.org/wiki/Binary_space_partitioning">BSP indexing</a> over metric spaces. Like a kd-tree but more flexible and abstract, and more useful on non-Euclidean distance metrics. I've been thinking about using vp-trees over a Levenshtein-distance metric space for some code complexity assessments--seems to have better performance than either a kd-tree, and more generality than a <a href="http://en.wikipedia.org/wiki/Bk-tree">bk-tree</a>.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/08/metric_spaces.html</feedburner:origLink></entry>

<entry>
   <title>Amazon</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/oc4mJSwBsMc/amazon.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.13</id>
   
   <published>2007-06-26T01:09:06Z</published>
   <updated>2007-06-26T01:10:19Z</updated>
   
   <summary>I'm on Amazon now. I guess I do exist, after all....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<a href="http://www.amazon.com/Advanced-Rails-Brad-Ediger/dp/0596510322/">I'm on Amazon now.</a> I guess I do exist, after all.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/06/amazon.html</feedburner:origLink></entry>

<entry>
   <title>Lisp from Rails</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/_WtdynoVvY0/lisp_from_rails.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.12</id>
   
   <published>2007-04-20T14:42:58Z</published>
   <updated>2007-04-20T14:57:29Z</updated>
   
   <summary>Rails-RLisp The Rails-RLisp plugin is a bridge from Rails to Tomasz Wegrzanowski's RLisp language. Using this plugin, any files with an .rl extension will be compiled as RLisp instead of Ruby. These files can be weaved into your Rails app...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<h3>Rails-RLisp</h3>

<p>The Rails-RLisp plugin is a bridge from Rails to Tomasz Wegrzanowski's RLisp language. Using this plugin, any files with an .rl extension will be compiled as RLisp instead of Ruby. These files can be weaved into your Rails app where you would normally use Ruby files.</p>

<p>Rails-RLisp is available from svn://svn.madriska.com/plugins/rlisp.</p>

<p>The plugin hacks Rails's Dependencies mechanism to autoload .rl files where needed.</p>

<p>.rl files will be compiled into Ruby files of the same name, with an .rlc (Ruby Lisp Compiled) extension. Files will automatically be recompiled if the corresponding .rl file is changed.</p>

<h3>Example</h3>

<p>1. Install the plugin:</p>
<pre>
$ script/plugin install svn://svn.madriska.com/plugins/rlisp
</pre>

<p>2. Create a test file, app/models/lisp_test.rl:</p>
<pre>
(defclass LispTest)
(class LispTest
  (method hello (name) 
    (print (+ "Hello, " [name to_s])))
  (method fib (x)
    (if (== x 0) 
      1
      (* x [self fib (- x 1)]))))
</pre>

<p>3. Test the class loading:</p>
<pre>
$ script/console 
Loading development environment.
>> LispTest.new.fib 12
=> 479001600
>> LispTest.new.hello "world"
Hello, world
=> nil
</pre>

<h3>References</h3>
<ol><li><a href="http://taw.chaosforge.org/rlisp/">RLisp Home Page</a></li>
<li><a href="http://t-a-w.blogspot.com/2007/04/compiler-for-rlisp.html">Compiler for RLisp</a></li></ol>


]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/04/lisp_from_rails.html</feedburner:origLink></entry>

<entry>
   <title>Dvorak</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/EXAE7SLCbmY/dvorak.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.11</id>
   
   <published>2007-03-27T19:28:27Z</published>
   <updated>2008-03-13T05:18:40Z</updated>
   
   <summary>Never thought it would happen, but I finally switched to the Dvorak keyboard layout. I've been wanting to switch for years, but there is never a good time for a programmer to have to re-learn how to type. It wasn't...</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[Never thought it would happen, but I finally switched to the <a href="http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard">Dvorak keyboard layout</a>. I've been wanting to switch for years, but there is never a good time for a programmer to have to re-learn how to type.

It wasn't nearly as bad as I expected. For a few days, it was utterly frustrating not to be able to communicate with a computer. The sacred bond between a developer and his tools had been broken. Oh, and I switched on a writing day. Probably not the smartest idea, but whatever.

I've been at it for about 2.5 weeks, and I'm at maybe 80% of my QWERTY speed. It's true what they say -- Dvorak is a lot more comfortable, and I didn't even have RSI symptoms before. August Dvorak, my future tendons thank you.

The worst part is retraining my <a href="http://en.wikipedia.org/wiki/Vi">vi</a> fingers. Years of muscle memory obliterated.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/03/dvorak.html</feedburner:origLink></entry>

<entry>
   <title>the -other- intelligent design</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/4HXRagcCN2c/the_other_intelligent_design.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.10</id>
   
   <published>2007-01-20T20:59:30Z</published>
   <updated>2007-01-20T21:00:23Z</updated>
   
   <summary>"It is idle to talk always of the alternative of reason and faith. Reason is itself a matter of faith. It is an act of faith to assert that our thoughts have any relation to reality at all." -- G....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      "It is idle to talk always of the alternative of reason and faith. Reason is itself a matter of faith. It is an act of faith to assert that our thoughts have any relation to reality at all."

-- G. K. Chesterton
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/01/the_other_intelligent_design.html</feedburner:origLink></entry>

<entry>
   <title>Intel Macs are awesome</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/kaMGpbYXqgg/intel_macs_are_awesome.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.9</id>
   
   <published>2007-01-12T17:52:08Z</published>
   <updated>2007-01-12T17:55:57Z</updated>
   
   <summary> I finally found a use case for two dual-core Xeons....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<img alt="handbrake-screenshot.jpg" src="http://www.bradediger.com/blog/handbrake-screenshot.jpg" width="787" height="70" />
<br />
I finally found a use case for two dual-core Xeons.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/01/intel_macs_are_awesome.html</feedburner:origLink></entry>

<entry>
   <title>christmas casualties</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/3p4zbORQ5qQ/christmas_casualties.html" />
   <id>tag:www.bradediger.com,2007:/blog//1.8</id>
   
   <published>2007-01-10T22:07:22Z</published>
   <updated>2007-01-10T22:21:44Z</updated>
   
   <summary> Christmas was good to me this year... though my family thinks I'm really weird for asking for Internet Core Protocols as casual reading....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<a href="http://www.bradediger.com/blog/gifts.jpg" target="_blank"><img alt="gifts.jpg" src="http://www.bradediger.com/blog/gifts.jpg" width="75%" height="75%" style="border: none" /></a>

Christmas was good to me this year... though my family thinks I'm really weird for asking for <i>Internet Core Protocols</i> as casual reading.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2007/01/christmas_casualties.html</feedburner:origLink></entry>

<entry>
   <title>new grinder</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/bUaLeZIW_a4/new_grinder.html" />
   <id>tag:www.bradediger.com,2006:/blog//1.7</id>
   
   <published>2006-12-09T16:10:38Z</published>
   <updated>2006-12-09T16:17:28Z</updated>
   
   <summary> The KitchenAid Pro Line grinder is downright sexy. It's going to look awesome once we get our black granite countertops put in....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      <![CDATA[<img alt="kitchenaid_web.jpg" src="http://www.bradediger.com/blog/kitchenaid_web.jpg" width="240" height="361" />

The KitchenAid Pro Line grinder is downright sexy. It's going to look awesome once we get our black granite countertops put in.]]>
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2006/12/new_grinder.html</feedburner:origLink></entry>

<entry>
   <title>eval.c</title>
   <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/BradEdiger/~3/ls9IeHN2wwA/evalc.html" />
   <id>tag:www.bradediger.com,2006:/blog//1.6</id>
   
   <published>2006-12-09T00:03:37Z</published>
   <updated>2006-12-09T00:04:55Z</updated>
   
   <summary>Spent a lot of time today digging through the Ruby source to get a crystal-clear picture of how method lookup works for the book. I think my brain is dead....</summary>
   <author>
      <name>Brad Ediger</name>
      
   </author>
   
   
   <content type="html" xml:lang="en" xml:base="http://www.bradediger.com/blog/">
      Spent a lot of time today digging through the Ruby source to get a crystal-clear picture of how method lookup works for the book. I think my brain is dead.
      
   </content>
<feedburner:origLink>http://www.bradediger.com/blog/2006/12/evalc.html</feedburner:origLink></entry>

</feed>
