<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Adventures in parsing, part 3</title>
	<atom:link href="http://therning.org/magnus/archives/295/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus/archives/295</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Wed, 08 Aug 2012 00:21:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-56568</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Sun, 03 Jun 2007 22:17:47 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-56568</guid>
		<description><![CDATA[&lt;p&gt;Conal and Twan, thanks for your suggestions. I&#039;ll put them into practice and post the &quot;final&quot; result as soon as I find some time.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Conal and Twan, thanks for your suggestions. I&#8217;ll put them into practice and post the &#8220;final&#8221; result as soon as I find some time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-56560</link>
		<dc:creator>Magnus</dc:creator>
		<pubDate>Sun, 03 Jun 2007 22:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-56560</guid>
		<description><![CDATA[&lt;p&gt;Hmm, this increasing traffic and commenting are highlighting some shortcomings of my wordpress setup it seems :-)&lt;/p&gt;

&lt;p&gt;First, Conal, the boxes are due to the theme I&#039;m using, apparently list items are boxed. I don&#039;t like it either and I&#039;ll try to get around modifying the theme.&lt;/p&gt;

&lt;p&gt;Twan, I&#039;ve now added a preview plugin for wordpress. It seems to work quite well and hopefully it&#039;ll make it easier to avoid some of editing problems I&#039;ve seen in comments lately.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hmm, this increasing traffic and commenting are highlighting some shortcomings of my wordpress setup it seems <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>First, Conal, the boxes are due to the theme I&#8217;m using, apparently list items are boxed. I don&#8217;t like it either and I&#8217;ll try to get around modifying the theme.</p>

<p>Twan, I&#8217;ve now added a preview plugin for wordpress. It seems to work quite well and hopefully it&#8217;ll make it easier to avoid some of editing problems I&#8217;ve seen in comments lately.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twan van Laarhoven</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-56351</link>
		<dc:creator>Twan van Laarhoven</dc:creator>
		<pubDate>Sun, 03 Jun 2007 14:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-56351</guid>
		<description><![CDATA[&lt;p&gt;Damn markdown/lack of preview button. The code block in the previous post should be&lt;/p&gt;

&lt;pre&gt;
parseHex = hexStr2Int &lt;$&gt; many1 hexDigit
parseAddress = Address &lt;$&gt; parseHex &lt;* char &#039;-&#039; &lt;*&gt; parseHex
parseDevice  = Device  &lt;$&gt; parseHex &lt;* char &#039;:&#039; &lt;*&gt; parseHex
&lt;/pre&gt;
]]></description>
		<content:encoded><![CDATA[<p>Damn markdown/lack of preview button. The code block in the previous post should be</p>

<pre>
parseHex = hexStr2Int &lt;$&gt; many1 hexDigit
parseAddress = Address &lt;$&gt; parseHex &lt;* char '-' &lt;*&gt; parseHex
parseDevice  = Device  &lt;$&gt; parseHex &lt;* char ':' &lt;*&gt; parseHex
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twan van Laarhoven</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-56349</link>
		<dc:creator>Twan van Laarhoven</dc:creator>
		<pubDate>Sun, 03 Jun 2007 14:47:24 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-56349</guid>
		<description><![CDATA[&lt;p&gt;First of all, note that you don&#039;t need parentheses around &lt;code&gt;parseSomething &lt;* char &#039; &#039;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also simplify things a bit more by combining &lt;code&gt;hexStr2Int &lt;$&gt; many1 hexDigit&lt;/code&gt; into a function, then you could say:
    parseHex = hexStr2Int  many1 hexDigit
    parseAddress = Address  parseHex &lt;* char &#039;-&#039; &lt;&lt;em&gt;&gt; parseHex
    parseDevice  = Device   parseHex &lt;&lt;/em&gt; char &#039;:&#039; &lt;*&gt; parseHex&lt;/p&gt;

&lt;p&gt;Also, in &lt;code&gt;cA&lt;/code&gt;, should there be a case for character other than &#039;p&#039; or &#039;s&#039;? Otherwise the program could fail with a pattern match error.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>First of all, note that you don&#8217;t need parentheses around <code>parseSomething &lt;* char ' '</code>.</p>

<p>You can also simplify things a bit more by combining <code>hexStr2Int &lt;$&gt; many1 hexDigit</code> into a function, then you could say:
    parseHex = hexStr2Int  many1 hexDigit
    parseAddress = Address  parseHex &lt;* char &#8216;-&#8217; &lt;<em>&gt; parseHex
    parseDevice  = Device   parseHex &lt;</em> char &#8216;:&#8217; &lt;*&gt; parseHex</p>

<p>Also, in <code>cA</code>, should there be a case for character other than &#8216;p&#8217; or &#8216;s&#8217;? Otherwise the program could fail with a pattern match error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-55777</link>
		<dc:creator>Conal Elliott</dc:creator>
		<pubDate>Sun, 03 Jun 2007 05:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-55777</guid>
		<description><![CDATA[&lt;p&gt;hm.  i wonder why the boxes around list items in my previous reply.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>hm.  i wonder why the boxes around list items in my previous reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott</title>
		<link>http://therning.org/magnus/archives/295/comment-page-1#comment-55774</link>
		<dc:creator>Conal Elliott</dc:creator>
		<pubDate>Sun, 03 Jun 2007 05:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://therning.org/magnus/archives/295#comment-55774</guid>
		<description><![CDATA[&lt;p&gt;A thing of beauty!  I&#039;m glad you stuck with it, Magnus.&lt;/p&gt;

&lt;p&gt;Some much smaller points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The pattern &lt;code&gt;(== c) &lt;$&gt; anyChar&lt;/code&gt; (nicely written, btw) arises three times, so it might merit a name.&lt;/li&gt;
&lt;li&gt;Similarly for &lt;code&gt;hexStr2Int &lt;$&gt; many1 hexDigit&lt;/code&gt;, especially when you rewrite &lt;code&gt;f &lt;$&gt; (a &lt;* b)&lt;/code&gt; to &lt;code&gt;(f &lt;$&gt; a) &lt;* b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The pattern &lt;code&gt;(a &lt;* char &#039; &#039;) &lt;*&gt; b&lt;/code&gt; comes up a lot.  How about naming it also, with a nice infix op, say &lt;code&gt;a &lt;#&gt; b&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;The cA definition could use pattern matching instead (e.g., &lt;code&gt;cA &#039;p&#039; = Private&lt;/code&gt; and &lt;code&gt;cA &#039;s&#039; = Shared&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Some of your parens are unnecessary (3rd line of parseDevice and last of parseRegion), since application binds more tightly than infix ops.&lt;/li&gt;
&lt;/ul&gt;
]]></description>
		<content:encoded><![CDATA[<p>A thing of beauty!  I&#8217;m glad you stuck with it, Magnus.</p>

<p>Some much smaller points:</p>

<ul>
<li>The pattern <code>(== c) &lt;$&gt; anyChar</code> (nicely written, btw) arises three times, so it might merit a name.</li>
<li>Similarly for <code>hexStr2Int &lt;$&gt; many1 hexDigit</code>, especially when you rewrite <code>f &lt;$&gt; (a &lt;* b)</code> to <code>(f &lt;$&gt; a) &lt;* b</code>.</li>
<li>The pattern <code>(a &lt;* char ' ') &lt;*&gt; b</code> comes up a lot.  How about naming it also, with a nice infix op, say <code>a &lt;#&gt; b</code>?</li>
<li>The cA definition could use pattern matching instead (e.g., <code>cA 'p' = Private</code> and <code>cA 's' = Shared</code>).</li>
<li>Some of your parens are unnecessary (3rd line of parseDevice and last of parseRegion), since application binds more tightly than infix ops.</li>
</ul>
]]></content:encoded>
	</item>
</channel>
</rss>
