<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Some concepts behind hvac</title>
	<atom:link href="http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/feed/" rel="self" type="application/rss+xml" />
	<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/</link>
	<description>intercalate " " . ("Haskell" :) . (:[]) $  "Blog"</description>
	<lastBuildDate>Fri, 12 Nov 2010 19:50:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Art Silver</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-245</link>
		<dc:creator><![CDATA[Art Silver]]></dc:creator>
		<pubDate>Wed, 18 Mar 2009 00:39:05 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-245</guid>
		<description><![CDATA[I&#039;m looking forward to more about templates.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m looking forward to more about templates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jochem Berndsen</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-242</link>
		<dc:creator><![CDATA[Jochem Berndsen]]></dc:creator>
		<pubDate>Fri, 26 Dec 2008 00:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-242</guid>
		<description><![CDATA[After some fiddling with hvac + lighttpd, I came to the conclusion that the lighttpd-packages in Debian testing are *broken*. (Maybe also in Ubuntu). The latest version on 1.4.20 works, however. My config, for the example, is as follows:

server.document-root = &quot;/var/www&quot;
server.modules = ( &quot;mod_fastcgi&quot; )
server.port = 3000

fastcgi.debug = 1
fastcgi.server = ( &quot;/test&quot; =&gt;
                   ( 
                     (
                       &quot;socket&quot; =&gt; &quot;/tmp/test.sock&quot;,
                       &quot;bin-path&quot; =&gt; &quot;/path/to/hvac-board&quot;,
                       &quot;min-procs&quot; =&gt; 1,
                       &quot;max-procs&quot; =&gt; 1,
                       &quot;check-local&quot; =&gt; &quot;disable&quot;
                     )
                   )
                 )]]></description>
		<content:encoded><![CDATA[<p>After some fiddling with hvac + lighttpd, I came to the conclusion that the lighttpd-packages in Debian testing are *broken*. (Maybe also in Ubuntu). The latest version on 1.4.20 works, however. My config, for the example, is as follows:</p>
<p>server.document-root = &#8220;/var/www&#8221;<br />
server.modules = ( &#8220;mod_fastcgi&#8221; )<br />
server.port = 3000</p>
<p>fastcgi.debug = 1<br />
fastcgi.server = ( &#8220;/test&#8221; =&gt;<br />
                   (<br />
                     (<br />
                       &#8220;socket&#8221; =&gt; &#8220;/tmp/test.sock&#8221;,<br />
                       &#8220;bin-path&#8221; =&gt; &#8220;/path/to/hvac-board&#8221;,<br />
                       &#8220;min-procs&#8221; =&gt; 1,<br />
                       &#8220;max-procs&#8221; =&gt; 1,<br />
                       &#8220;check-local&#8221; =&gt; &#8220;disable&#8221;<br />
                     )<br />
                   )<br />
                 )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sclv</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-94</link>
		<dc:creator><![CDATA[sclv]]></dc:creator>
		<pubDate>Fri, 23 May 2008 03:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-94</guid>
		<description><![CDATA[And now checked in at the darcs repo (http://code.haskell.org/~sclv/hvac/) we have such an api. Pleasantly for me, since its equivalent and simpler, it cleans up the code a bit. Import Network.Frameworks.HVAC.AltController and you get: path, meth, param, takePath, readPath, and endPath. The above code that gets a &quot;board&quot; from the path then a boardId, then &quot;new&quot; then checks that it is a post can be written (in a do block):


&#160;&#160;path &quot;board&quot;
&#160;&#160;boardId &lt;- readPath
&#160;&#160;newPost boardId &lt;&#124;&gt; showBoard boardId

newPost boardId = do
&#160;&#160;path &quot;new&quot;
&#160;&#160;(meth &quot;POST&quot; &gt;&gt; {- POST stuff-}) &lt;&#124;&gt; {- GET stuff -}

showBoard boardId = do {- other stuff -}&lt;/code&gt;


Wordier and more irritating in my opinion, although it makes the parser connection clear.

This can be condensed into e.g.:


path &quot;board&quot; &gt;&gt; readPath &gt;&gt;= \boardId -&gt; 
&#160;&#160;(path &quot;new&quot; &gt;&gt;
&#160;&#160;&#160;&#160;(meth &quot;POST&quot; &gt;&gt; {- POST stuff -}) &lt;&#124;&gt; {- GET stuff -})
&#160;&#160;&#160;&lt;&#124;&gt;
&#160;&#160;&#160;&#160;{- other stuff -}


which then looks more obviously like a wordier version of the code above, so the nature of how its condensed becomes more clear. All the ugly parens also make it clear why one wants to mix and match *&gt; as well, which is just &gt;&gt; with a precedence that&#039;s higher than &lt;&#124;&gt;.]]></description>
		<content:encoded><![CDATA[<p>And now checked in at the darcs repo (<a href="http://code.haskell.org/~sclv/hvac/" rel="nofollow">http://code.haskell.org/~sclv/hvac/</a>) we have such an api. Pleasantly for me, since its equivalent and simpler, it cleans up the code a bit. Import Network.Frameworks.HVAC.AltController and you get: path, meth, param, takePath, readPath, and endPath. The above code that gets a &#8220;board&#8221; from the path then a boardId, then &#8220;new&#8221; then checks that it is a post can be written (in a do block):</p>
<p>&nbsp;&nbsp;path &#8220;board&#8221;<br />
&nbsp;&nbsp;boardId &lt;- readPath<br />
&nbsp;&nbsp;newPost boardId &lt;|&gt; showBoard boardId</p>
<p>newPost boardId = do<br />
&nbsp;&nbsp;path &#8220;new&#8221;<br />
&nbsp;&nbsp;(meth &#8220;POST&#8221; &gt;&gt; {- POST stuff-}) &lt;|&gt; {- GET stuff -}</p>
<p>showBoard boardId = do {- other stuff -}</p>
<p>Wordier and more irritating in my opinion, although it makes the parser connection clear.</p>
<p>This can be condensed into e.g.:</p>
<p>path "board" &gt;&gt; readPath &gt;&gt;= \boardId -&gt;<br />
&nbsp;&nbsp;(path "new" &gt;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;(meth "POST" &gt;&gt; {- POST stuff -}) &lt;|&gt; {- GET stuff -})<br />
&nbsp;&nbsp;&nbsp;&lt;|&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;{- other stuff -}</p>
<p>which then looks more obviously like a wordier version of the code above, so the nature of how its condensed becomes more clear. All the ugly parens also make it clear why one wants to mix and match *&gt; as well, which is just &gt;&gt; with a precedence that's higher than &lt;|&gt;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sclv</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-93</link>
		<dc:creator><![CDATA[sclv]]></dc:creator>
		<pubDate>Fri, 23 May 2008 02:38:19 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-93</guid>
		<description><![CDATA[sigh. dbpatterson encouraged me not to, but on to Network.Frameworks.HVAC.AltController it is...]]></description>
		<content:encoded><![CDATA[<p>sigh. dbpatterson encouraged me not to, but on to Network.Frameworks.HVAC.AltController it is&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gwern</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-92</link>
		<dc:creator><![CDATA[gwern]]></dc:creator>
		<pubDate>Fri, 23 May 2008 02:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-92</guid>
		<description><![CDATA[sclv, I&#039;ve got to agree with Justin. The code may be elegant, but my eyes are hurting. I can&#039;t immediately figure out what&#039;s being escaped (if at all), what&#039;s adding a lambda binding, what&#039;s combinator A, what&#039;s combinator B...

I mean, just ow in general, y&#039;know?]]></description>
		<content:encoded><![CDATA[<p>sclv, I&#8217;ve got to agree with Justin. The code may be elegant, but my eyes are hurting. I can&#8217;t immediately figure out what&#8217;s being escaped (if at all), what&#8217;s adding a lambda binding, what&#8217;s combinator A, what&#8217;s combinator B&#8230;</p>
<p>I mean, just ow in general, y&#8217;know?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sclv</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-91</link>
		<dc:creator><![CDATA[sclv]]></dc:creator>
		<pubDate>Thu, 22 May 2008 14:42:50 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-91</guid>
		<description><![CDATA[The withValidation function stashes errors away elsewhere in the request scope. Then it &quot;falls though&quot; to the next possible action, just as a failed parse would. So a pattern that works pretty well I&#039;ve found for certain types of forms is to manage them as postbacks, where on failure of a POST they fall through to the GET handler, which in turn renders the errors as part of the form page. On success you either display a new page, or redirect.

There&#039;s also a handleValidation function that rather than falling through takes an explicit &quot;failure&quot; continuation that&#039;s a function of the errors.

I don&#039;t have named variants of the operators at the moment, but rather than an alternative more traditional &quot;parser-like&quot; api, it might be easier just to provide those. That&#039;s a nice idea.

ie. &#124;/ = `andPath`, &#124;// = `withMethod`, &#124;\ = `withUrlParam`.

On the other hand, I tried to give things names that were obvious mnemonics, but maybe the associations just work for me. The forward slash is as with a path, the two slashes are as with those following a protocol, the backslash is as with a lambda, etc.]]></description>
		<content:encoded><![CDATA[<p>The withValidation function stashes errors away elsewhere in the request scope. Then it &#8220;falls though&#8221; to the next possible action, just as a failed parse would. So a pattern that works pretty well I&#8217;ve found for certain types of forms is to manage them as postbacks, where on failure of a POST they fall through to the GET handler, which in turn renders the errors as part of the form page. On success you either display a new page, or redirect.</p>
<p>There&#8217;s also a handleValidation function that rather than falling through takes an explicit &#8220;failure&#8221; continuation that&#8217;s a function of the errors.</p>
<p>I don&#8217;t have named variants of the operators at the moment, but rather than an alternative more traditional &#8220;parser-like&#8221; api, it might be easier just to provide those. That&#8217;s a nice idea.</p>
<p>ie. |/ = `andPath`, |// = `withMethod`, |\ = `withUrlParam`.</p>
<p>On the other hand, I tried to give things names that were obvious mnemonics, but maybe the associations just work for me. The forward slash is as with a path, the two slashes are as with those following a protocol, the backslash is as with a lambda, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Bailey</title>
		<link>http://fmapfixreturn.wordpress.com/2008/05/21/some-concepts-behind-hvac/#comment-86</link>
		<dc:creator><![CDATA[Justin Bailey]]></dc:creator>
		<pubDate>Wed, 21 May 2008 21:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://fmapfixreturn.wordpress.com/?p=15#comment-86</guid>
		<description><![CDATA[I like the idea of parsing controlling what code gets run. Slick. The discussion on scopes was also intriguing and I&#039;d like to see where you go with that. What are some drawbacks you&#039;ve found when trying to work this way (that is, where current scope is very well defined). 

Just a comment on readability. I see &#124;\, /&#124; and &#124;//. Do you have equivalents that are named? I don&#039;t find your operators terribly readable. They probably make a lot of sense once you&#039;ve used the framework awhile, but consider adding some aliases to them for us newbs.

Finally, how do you deal with validation failures?]]></description>
		<content:encoded><![CDATA[<p>I like the idea of parsing controlling what code gets run. Slick. The discussion on scopes was also intriguing and I&#8217;d like to see where you go with that. What are some drawbacks you&#8217;ve found when trying to work this way (that is, where current scope is very well defined). </p>
<p>Just a comment on readability. I see |\, /| and |//. Do you have equivalents that are named? I don&#8217;t find your operators terribly readable. They probably make a lot of sense once you&#8217;ve used the framework awhile, but consider adding some aliases to them for us newbs.</p>
<p>Finally, how do you deal with validation failures?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
