<?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"
	>
<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?&amp;owa_from=feed&amp;owa_sid=</link>
	<description>Incoherent mumblings</description>
	<pubDate>Sat, 30 Aug 2008 04:21:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Magnus</title>
		<link>http://therning.org/magnus/archives/295#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>&lt;p&gt;Conal and Twan, thanks for your suggestions. I'll put them into practice and post the "final" 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-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>&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'm using, apparently list items are boxed. I don't like it either and I'll try to get around modifying the theme.&lt;/p&gt;

&lt;p&gt;Twan, I've now added a preview plugin for wordpress. It seems to work quite well and hopefully it'll make it easier to avoid some of editing problems I'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-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>&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 &#60;$&#62; many1 hexDigit
parseAddress = Address &#60;$&#62; parseHex &#60;* char '-' &#60;*&#62; parseHex
parseDevice  = Device  &#60;$&#62; parseHex &#60;* char ':' &#60;*&#62; 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-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>&lt;p&gt;First of all, note that you don't need parentheses around &lt;code&gt;parseSomething &#60;* char ' '&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also simplify things a bit more by combining &lt;code&gt;hexStr2Int &#60;$&#62; many1 hexDigit&lt;/code&gt; into a function, then you could say:
    parseHex = hexStr2Int  many1 hexDigit
    parseAddress = Address  parseHex &#60;* char '-' &#60;&lt;em&gt;&#62; parseHex
    parseDevice  = Device   parseHex &#60;&lt;/em&gt; char ':' &#60;*&#62; 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 'p' or 's'? 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:<br />
    parseHex = hexStr2Int  many1 hexDigit<br />
    parseAddress = Address  parseHex &lt;* char &#8216;-&#8217; &lt;<em>&gt; parseHex<br />
    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 &#8217;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-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>&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-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>&lt;p&gt;A thing of beauty!  I'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) &#60;$&#62; 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 &#60;$&#62; many1 hexDigit&lt;/code&gt;, especially when you rewrite &lt;code&gt;f &#60;$&#62; (a &#60;* b)&lt;/code&gt; to &lt;code&gt;(f &#60;$&#62; a) &#60;* b&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The pattern &lt;code&gt;(a &#60;* char ' ') &#60;*&#62; b&lt;/code&gt; comes up a lot.  How about naming it also, with a nice infix op, say &lt;code&gt;a &#60;#&#62; b&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;The cA definition could use pattern matching instead (e.g., &lt;code&gt;cA 'p' = Private&lt;/code&gt; and &lt;code&gt;cA 's' = 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>
