<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Secondhand Lederhosen: Category meta</title>
    <link>http://www.secondhandlederhosen.com/articles/category/meta</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A Series of Tubes</description>
    <item>
      <title>Shut 'er down, Edna!</title>
      <description>&lt;p&gt;I'm-a-thinkin' of discontinuing this blog in favor of posting my links to Blue Dot, as I've already been doing for a couple of weeks.  So if you read this, please go to &lt;a href="http://bluedot.us/users/masto"&gt;http://bluedot.us/users/masto&lt;/a&gt; (you can get an RSS feed there, too).&lt;/p&gt;

&lt;p&gt;Also please consider signing up and sending me a friend request so you can dot interesting links and we can get the whole social aspect going.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Nov 2006 11:02:10 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d4285a8d-21b5-4b67-a50d-d7ab39e69abb</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2006/11/15/shut-er-down-edna</link>
      <category>meta</category>
    </item>
    <item>
      <title>Editors Wanted</title>
      <description>&lt;p&gt;If:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I know you personally&lt;/li&gt;
&lt;li&gt;You'd be willing to contribute interesting links to this blog&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are not infected with bird flu&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;shoot me an e-mail.&lt;/p&gt;</description>
      <pubDate>Mon, 24 Apr 2006 10:58:01 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:4f7b6938-f4c3-4159-9cae-17aa9b8e96c2</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2006/04/24/editors-wanted</link>
      <category>meta</category>
      <trackback:ping>http://www.secondhandlederhosen.com/articles/trackback/203</trackback:ping>
    </item>
    <item>
      <title>Ooh, pretty</title>
      <description>&lt;p&gt;&lt;a href="http://www.height1percent.com/articles/2006/02/21/brighthouse-updated-and-im-off"&gt;Brighthouse Theme&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Love this theme.  I wish it'd been there before I went through the pain of converting my &lt;a href="http://blog.chrismasto.com/"&gt;other blog&lt;/a&gt;'s theme.  Maybe I'll use it here, since this one is the default that comes with Typo.&lt;/p&gt;</description>
      <pubDate>Tue, 21 Feb 2006 22:41:46 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d8a01f94-4b2b-48d9-9df1-c6fd7f2f803b</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2006/02/21/ooh-pretty</link>
      <category>meta</category>
    </item>
    <item>
      <title>Why Software Is Not There Yet</title>
      <description>&lt;p&gt;So when I tried to post the previous entry, I got a 500 error.  I don't really know ruby, but there was at least a nice backtrace in the typo log.  The operative bit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;RuntimeError (wrong dateTime.iso8601 format):
    /lib/xmlrpc_fix.rb:9:in `dateTime'
    /usr/local/lib/ruby/1.8/xmlrpc/parser.rb:538:in `tag_end'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It was also nice enough to log the incoming XML-RPC data.  The operative bit of that:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{"name"=&amp;gt;"dateCreated",
 "value"=&amp;gt;{"dateTime.iso8601"=&amp;gt;"20051210T08:28:40+0000"}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, thanks to open source and all that jazz, I could pretty easily find &lt;a href="http://typo.leetsoft.com/trac/file/trunk/lib/xmlrpc_fix.rb"&gt;this code&lt;/a&gt;, repeated here since it's short:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def self.dateTime(str)
  if str =~ /^(-?\d\d\d\d)(\d\d)(\d\d)T(\d\d):(\d\d):(\d\d)Z?$/ then
    a = [$1, $2, $3, $4, $5, $6].collect{|i| i.to_i}
    XMLRPC::DateTime.new(*a)
  else
    raise "wrong dateTime.iso8601 format"
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;For what it's worth, this is overriding a method from ruby's own xmlrpc library, the version of which on my system being very similar but not accepting the final "Z" (for Zulu AKA GMT AKA UTC).  That's not good enough, since MarsEdit has chosen to send the time zone, even though it's Zulu, as +0000.&lt;/p&gt;

&lt;p&gt;But also on the web, I found &lt;a href="http://www.ruby-doc.org/stdlib/libdoc/xmlrpc/rdoc/classes/XMLRPC/Convert.html#M010039"&gt;this&lt;/a&gt;, and if you click on the "Source" bit of the dateTime method, you see a much longer and fancier function that attempts to actually handle ISO8601, including the format MarsEdit sends.  There we see:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;when /^(-?\d\d\d\d)-?(\d\d)-?(\d\d)T(\d\d):(\d\d):(\d\d)(?:Z|([+-])(\d\d):?(\d\d))?$/
  a = [$1, $2, $3, $4, $5, $6].collect{|i| i.to_i}
  if $7
    ofs = $8.to_i*3600 + $9.to_i*60
    ofs = -ofs if $7=='+'
    utc = Time.utc(a.reverse) + ofs
    a = [ utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec ]
  end
  XMLRPC::DateTime.new(*a)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Thinking that was what I needed, I updated the overridden method in Typo to use it.  But alas:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;TypeError (cannot convert Array into Integer):
    /lib/xmlrpc_fix.rb:11:in `utc'
    /lib/xmlrpc_fix.rb:11:in `dateTime'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;What's the deal?  A little research, and it turns out that in ruby you write *a to get the list of elements in a, rather than the Array itself.  Don't ask me why it's written without the * in what appears to be official ruby library code -- my guess is that it's for a newer version of ruby where you can pass an Array to Time.utc.  In any case, I tried:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;utc = Time.utc(*a.reverse) + ofs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Behold, a new error!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ArgumentError (argument out of range):
    /lib/xmlrpc_fix.rb:11:in `utc'
    /lib/xmlrpc_fix.rb:11:in `dateTime'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Looking more closely, that a.reverse falls under suspicion.  Time.utc seems to want (year, month, day, hour, min, sec), and that is in fact how it's coming out of the regex.  So why reverse it?  I haven't the foggiest clue!  I took out the reverse:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;utc = Time.utc(*a) + ofs
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and voila!  The post went through.  I'm still totally stumped on how that could possibly ever work as written.  Maybe some reader will help me out here.  Of course, I only have the one reader (hi, Josh!), so maybe not.&lt;/p&gt;</description>
      <pubDate>Sat, 10 Dec 2005 04:06:24 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:426206b2-c98b-49f9-94ba-056d276683c8</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2005/12/10/why-software-is-not-there-yet</link>
      <category>software</category>
      <category>meta</category>
      <category>ruby</category>
      <category>typo</category>
      <category>bugs</category>
    </item>
    <item>
      <title>Xmas Links</title>
      <description>&lt;p&gt;I have added my &lt;a href="http://del.icio.us/masto/xmaslist"&gt;xmas list feed&lt;/a&gt; to the sidebar.  Watch for exciting and/or wacky products that you can buy me.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Nov 2005 14:58:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:c679b6bf-b03e-49c1-8e51-79731f9d9e28</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2005/11/30/xmas-links</link>
      <category>xmas</category>
      <category>meta</category>
    </item>
    <item>
      <title>The Look, The Feel.. Of Typo</title>
      <description>&lt;p&gt;I have changed ye old blog engine to Typo.  All the content is still here, but the old URLs are broken.  Sorry about that.  You can find the new RSS feed under "Syndicate" in the sidebar.&lt;/p&gt;

&lt;p&gt;I haven't bothered to port my lame rip-off of someone else's theme, because there are probably much nicer themes out there.  So I just picked one for now.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;[Update: The "nature" theme was relatively pretty, but it had some pretty nasty CSS that broke simple things like unordered lists.  So it's back to the default, since it at least works.]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Also, now there are comments and trackbacks.  When the spam starts appearing, I'll have to see if there's something to stop it.&lt;/p&gt;

&lt;p&gt;We now return to your regularly scheduled stale links.&lt;/p&gt;</description>
      <pubDate>Tue, 29 Nov 2005 16:21:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:607874de1966d3eb64ad80f0ff55767d</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2005/11/29/the-look-the-feel-of-typo</link>
      <category>meta</category>
    </item>
    <item>
      <title>Welcome Datacomp</title>
      <description>&lt;p&gt;This is a link blog.  That means I'll be posting links to things that I've most likely gotten from other blogs linking to things.  So if you read a lot of the same places I do, you'll probably have seen them.  Otherwise, if you follow along here, it will cut down on the number of times I have to say "did you see?" and you say "no" and I say "well, it's been going around the Internet."&lt;/p&gt;

&lt;p&gt;Also, let me know if you would like to be an "editor".  I.e. you find yourself sending me things and it would be easier to put them here.&lt;/p&gt;</description>
      <pubDate>Fri, 30 Sep 2005 00:00:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:7710d7da5f0489f422e371fb6f0624f6</guid>
      <author>chris@masto.com (Chris)</author>
      <link>http://www.secondhandlederhosen.com/articles/2005/09/30/welcome-datacomp</link>
      <category>meta</category>
    </item>
  </channel>
</rss>
