<?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:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D04GSH8yeyp7ImA9WhRXFEQ.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531</id><updated>2011-12-21T14:32:09.193-05:00</updated><category term="snap" /><category term="scripting" /><category term="happs" /><category term="heist" /><category term="analysis" /><category term="haskell" /><category term="screencast" /><title>Software Simply</title><subtitle type="html">Musings about software development, functional programming, haskell, haskell web development, the snap framework, the heist template system, and whatever else randomly catches my interest.</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://softwaresimply.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SoftwareSimply" /><feedburner:info uri="softwaresimply" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0UNQXoycCp7ImA9WhRQEUQ.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-967509699485871422</id><published>2011-12-06T11:20:00.001-05:00</published><updated>2011-12-06T12:08:10.498-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-06T12:08:10.498-05:00</app:edited><title>What's in a name?  A lot.</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/967509699485871422/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=967509699485871422" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/967509699485871422?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/967509699485871422?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/TVVPSNgRq40/whats-in-name-lot.html" title="What's in a name?  A lot." /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">One letter identifier names have been getting bad press recently. The other day a post entitled Name Your Type Variables! got some discussion on the Haskell reddit. I agree with the author's value of good names, but I disagree with the specific examples he uses as well as his sweeping condemnation of one letter names. Since I am the primary author of one of his examples and have contributed code 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x1S1pEoHxuiIIfPuo3qgky-SYqk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x1S1pEoHxuiIIfPuo3qgky-SYqk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x1S1pEoHxuiIIfPuo3qgky-SYqk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x1S1pEoHxuiIIfPuo3qgky-SYqk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/TVVPSNgRq40" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/12/whats-in-name-lot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAHSHk_eCp7ImA9WhZQEkQ.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-7626796958715243782</id><published>2011-04-20T06:52:00.000-04:00</published><updated>2011-04-20T06:52:19.740-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-20T06:52:19.740-04:00</app:edited><title>Patterns in Chess Square Enumerations</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/7626796958715243782/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=7626796958715243782" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7626796958715243782?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7626796958715243782?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/-4uvZGGTnqY/patterns-in-chess-square-enumerations.html" title="Patterns in Chess Square Enumerations" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">In my bit manipulation post awhile back I posed a problem involving "closed form" calculation of chess endgame table indices.  Back when I originally solved the problem, it was a big help to create some visualizations of some of the patterns embedded in the square numbering scheme.  I had mentioned that I thought the patterns were interesting, so I thought I'd come back and elaborate on that 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/U-y9sk1IdC1PeHUSJERzh-nNdhI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U-y9sk1IdC1PeHUSJERzh-nNdhI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/U-y9sk1IdC1PeHUSJERzh-nNdhI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/U-y9sk1IdC1PeHUSJERzh-nNdhI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/-4uvZGGTnqY" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/patterns-in-chess-square-enumerations.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9eip7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-155594810531647045</id><published>2011-04-18T10:18:00.014-04:00</published><updated>2011-05-18T16:42:31.562-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.562-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Splice Subtleties</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/155594810531647045/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=155594810531647045" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/155594810531647045?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/155594810531647045?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/mmtyoK8A77c/splice-subtleties.html" title="Splice Subtleties" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">In the recent release of Heist 0.5.1, there was performance bug in my implementation of head merging.  I turned off the head merging, and then fixed the bug but did not reenable head merging.  If you want to turn it back on, you need to bind the html tag to the htmlImpl function from the Text.Templating.Heist.Splices.Html module.  I think I'll continue to leave it off by default because it does 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/G4qraR1NvS2uaO4_Fu14p0_e4P8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G4qraR1NvS2uaO4_Fu14p0_e4P8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/G4qraR1NvS2uaO4_Fu14p0_e4P8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/G4qraR1NvS2uaO4_Fu14p0_e4P8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/mmtyoK8A77c" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/splice-subtleties.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9eip7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-2830720976625694476</id><published>2011-04-15T15:10:00.000-04:00</published><updated>2011-05-18T16:42:31.562-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.562-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Heist Template Abstractions in a Nutshell</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/2830720976625694476/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=2830720976625694476" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2830720976625694476?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2830720976625694476?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/-Pwi1xjkC1Y/heist-template-abstractions-in-nutshell.html" title="Heist Template Abstractions in a Nutshell" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">In the last post I discussed how logic and control flow can (and I argue should) be done in splices where types, higher order functions, and the full power of Haskell can be applied to the problem.  In this post I want to take some time to think about the raw materials that are available in templates.

At the lowest level, we have just Text (...which is certainly /= Nothing).  The templates are 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dVaFZ-jtR67RUrAPGAE3n-gLSyM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dVaFZ-jtR67RUrAPGAE3n-gLSyM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dVaFZ-jtR67RUrAPGAE3n-gLSyM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dVaFZ-jtR67RUrAPGAE3n-gLSyM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/-Pwi1xjkC1Y" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/heist-template-abstractions-in-nutshell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9eyp7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-2977519394146965803</id><published>2011-04-14T08:20:00.003-04:00</published><updated>2011-05-18T16:42:31.563-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.563-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Looping and Control Flow in Heist</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/2977519394146965803/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=2977519394146965803" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2977519394146965803?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2977519394146965803?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/hk3fzRpln24/looping-and-control-flow-in-heist.html" title="Looping and Control Flow in Heist" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">One of the most frequent questions I get about Heist is how to do loops or control flow in Heist templates.  I usually respond that we've tried to avoid introducing these constructs into templates to encourage a better separation between view and model/controller.  In this post I want to discuss the issue in more detail so that my thoughts are stored and I can refer people here in the future.


&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XEbqoEtX6kXWteklWRrDVeNyBUA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XEbqoEtX6kXWteklWRrDVeNyBUA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XEbqoEtX6kXWteklWRrDVeNyBUA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XEbqoEtX6kXWteklWRrDVeNyBUA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/hk3fzRpln24" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/looping-and-control-flow-in-heist.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9eyp7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-1884004398045058304</id><published>2011-04-13T08:55:00.010-04:00</published><updated>2011-05-18T16:42:31.563-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.563-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Views, Controllers, and Heist</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/1884004398045058304/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=1884004398045058304" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1884004398045058304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1884004398045058304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/lOEXKvgSu4g/views-controllers-and-heist.html" title="Views, Controllers, and Heist" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">A very common question when using Heist is how to specify views in a splice.  There are three different approaches one can take:

1. Specify a splice's view in the Haskell code implementing the splice.
2. Get a splice's view from a template.
3. Pass the desired view to the splice as the spliced tag's child nodes.

Aproach #1 tends to be ugly and violates the principle of separating logic and view
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/q0AVsyMViMjsX1Ny69DPUn9snXQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q0AVsyMViMjsX1Ny69DPUn9snXQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/q0AVsyMViMjsX1Ny69DPUn9snXQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q0AVsyMViMjsX1Ny69DPUn9snXQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/lOEXKvgSu4g" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/views-controllers-and-heist.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9eyp7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-2467516771152608882</id><published>2011-04-11T09:04:00.088-04:00</published><updated>2011-05-18T16:42:31.563-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.563-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Heist in 60 Seconds</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/2467516771152608882/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=2467516771152608882" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2467516771152608882?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2467516771152608882?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/wKmekAmLzEo/heist-in-60-seconds.html" title="Heist in 60 Seconds" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><content type="html">A template system is a bridge between static data (templates) and dynamic data.

Heist is a template system bridging HTML templates and Haskell code.

A splice is code that Heist binds to an HTML tag.

Every time the tag appears in a template, Heist runs the splice bound to that tag and passes the tag (including its attributes and its children) as input to the splice.

A splice's output is a list
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wKtT3nIBHxyIOqx1yZwxeHSfn7M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wKtT3nIBHxyIOqx1yZwxeHSfn7M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wKtT3nIBHxyIOqx1yZwxeHSfn7M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wKtT3nIBHxyIOqx1yZwxeHSfn7M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/wKmekAmLzEo" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2011/04/heist-in-60-seconds.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QBQHs9fCp7ImA9WhZWF0g.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-228561531352029789</id><published>2010-12-26T10:36:00.004-05:00</published><updated>2011-05-18T16:42:31.564-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-18T16:42:31.564-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><title>Heist Gets Blaze Syntax</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/228561531352029789/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=228561531352029789" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/228561531352029789?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/228561531352029789?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/C48VE0xnKns/heist-gets-blaze-syntax.html" title="Heist Gets Blaze Syntax" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><content type="html">Update: Heist has switched from using hexpat to using xmlhtml as of version 0.5.  You can still use blaze syntax as described in this post, but you have to import Text.Blaze.Renderer.XmlHtml instead.

Users of Heist, my Haskell templating system, got a very nice surprise for Christmas this year when Jasper Van der Jeugt uploaded a new package blaze-html-hexpat to Hackage.  If you're not familiar 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/a2cx-Hu8Nsq5U6brS_t8lPkXcP8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a2cx-Hu8Nsq5U6brS_t8lPkXcP8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/a2cx-Hu8Nsq5U6brS_t8lPkXcP8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/a2cx-Hu8Nsq5U6brS_t8lPkXcP8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/C48VE0xnKns" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2010/12/heist-gets-blaze-syntax.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUCSHY7eip7ImA9Wx9TE0Q.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-6854927992191057188</id><published>2010-11-21T13:49:00.002-05:00</published><updated>2010-11-21T22:24:29.802-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-21T22:24:29.802-05:00</app:edited><title>Numerical Sequence Puzzle</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/6854927992191057188/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=6854927992191057188" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6854927992191057188?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6854927992191057188?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/gGuYc9NFnmk/numerical-sequence-puzzle.html" title="Numerical Sequence Puzzle" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">What's the next number in this sequence, and how is it determined?

1, 3, 5, 9, 15, 31, 61, 125, 251, 503, 1015, 2035, 4081, 8177, 16367, 32747, 65511, ?

Years ago I spent some time playing around with integer sequence puzzles.  I ended up constructing a few puzzles based on ideas I had never seen used before.  Sometime between 1995 and 1998 I published four of them in my user profile on the 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dgl7IjoT2zLO3toKI7rhdMOLg-s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dgl7IjoT2zLO3toKI7rhdMOLg-s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dgl7IjoT2zLO3toKI7rhdMOLg-s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dgl7IjoT2zLO3toKI7rhdMOLg-s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/gGuYc9NFnmk" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2010/11/numerical-sequence-puzzle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ANRX44eCp7ImA9WxFVEUU.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-6914184555990221758</id><published>2010-06-10T06:21:00.005-04:00</published><updated>2010-06-10T13:09:54.030-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-10T13:09:54.030-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Log Analysis Commentary</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/6914184555990221758/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=6914184555990221758" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6914184555990221758?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6914184555990221758?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/JMZCIQ1GOCU/log-analysis-commentary.html" title="Log Analysis Commentary" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">I've hade some requests to explain some of the less common functions used in my log analysis screencast.  I think the most straightforward approach is to examine each of the lines in a literate Haskell style.  This is going to be a long-winded description of exactly what's going on.  If you understood everything in the screencast, this post will probably bore you.  But if you found yourself 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6fHnOizzD6vUUDZlqHQijJ8bgn4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6fHnOizzD6vUUDZlqHQijJ8bgn4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6fHnOizzD6vUUDZlqHQijJ8bgn4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6fHnOizzD6vUUDZlqHQijJ8bgn4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/JMZCIQ1GOCU" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2010/06/log-analysis-commentary.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQMQnc7cCp7ImA9Wx9QE00.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-5155760919464765222</id><published>2010-06-08T15:37:00.012-04:00</published><updated>2010-12-25T15:19:43.908-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-25T15:19:43.908-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="heist" /><category scheme="http://www.blogger.com/atom/ns#" term="snap" /><title>Heist 0.2 Released</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/5155760919464765222/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=5155760919464765222" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/5155760919464765222?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/5155760919464765222?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/rJpxIGzkSA4/heist-02-released.html" title="Heist 0.2 Released" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Yesterday I released version 0.2 of the Heist XML templating library.  This release makes some significant API changes, so it may break existing applications.  But if you're only using Heist for basic templating, then you probably won't have to change anything.  However, http://snapframework.com uses Heist extensively; and it did not require any code changes to upgrade.  Here is a summary of what
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NdzosaU8lluM24--3QzXBqrGgV0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NdzosaU8lluM24--3QzXBqrGgV0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NdzosaU8lluM24--3QzXBqrGgV0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NdzosaU8lluM24--3QzXBqrGgV0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/rJpxIGzkSA4" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2010/06/heist-02-released.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UHRng_fCp7ImA9WxFWGU8.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-4431024454478271959</id><published>2010-06-07T08:50:00.004-04:00</published><updated>2010-06-07T10:33:57.644-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-07T10:33:57.644-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="analysis" /><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="screencast" /><category scheme="http://www.blogger.com/atom/ns#" term="scripting" /><title>Haskell Scripting: Log Analysis</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/4431024454478271959/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=4431024454478271959" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/4431024454478271959?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/4431024454478271959?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/0vpnhqmI-Ys/haskell-scripting-log-analysis.html" title="Haskell Scripting: Log Analysis" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>8</thr:total><content type="html">The other day I wanted to analyze some of my website log files to get a better idea of how many active users I have.  I've been meaning to do this for quite some time, but have kept putting it off.  I decided to see what I could accomplish by just doing some experimenting in GHCI.  It was so easy and convenient that I decided to do a screencast demonstrating what I did and how easy it was.  The 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/I2etcvBspDQJP4FMZjMtnuKWwSI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I2etcvBspDQJP4FMZjMtnuKWwSI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/I2etcvBspDQJP4FMZjMtnuKWwSI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/I2etcvBspDQJP4FMZjMtnuKWwSI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/0vpnhqmI-Ys" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2010/06/haskell-scripting-log-analysis.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYNQH8-eip7ImA9WxNbEEo.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-6734590520066273939</id><published>2009-11-11T11:59:00.017-05:00</published><updated>2009-11-12T20:53:11.152-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-12T20:53:11.152-05:00</app:edited><title>Standardizing Go</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/6734590520066273939/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=6734590520066273939" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6734590520066273939?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6734590520066273939?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/XCnZi_8OD3M/standardizing-go.html" title="Standardizing Go" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><content type="html">The web is abuzz with the recent announcement of the Go Programming Language.  I've put a decent bit of thought into similar issues over the years, so I thought I'd chime in on the discussion.

To start with, Go is targeting a niche which I think has been need of filling for a long time.  The Go home page bills it as "a systems programming language", but I don't think that name completely 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GvdtKbJyUfUgpx9MpmYc3q_Az1o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GvdtKbJyUfUgpx9MpmYc3q_Az1o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GvdtKbJyUfUgpx9MpmYc3q_Az1o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GvdtKbJyUfUgpx9MpmYc3q_Az1o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/XCnZi_8OD3M" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/11/standardizing-go.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYNRHkyeip7ImA9WxNTEE8.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-1690549768964510084</id><published>2009-08-11T15:33:00.009-04:00</published><updated>2009-08-11T15:49:55.792-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-11T15:49:55.792-04:00</app:edited><title>Dynamic List Formlets in Haskell</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/1690549768964510084/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=1690549768964510084" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1690549768964510084?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1690549768964510084?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/aU2skChBd5E/dynamic-list-formlets-in-haskell.html" title="Dynamic List Formlets in Haskell" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">
The Haskell Formlets library (described here) provides an elegant abstraction that takes the tedium out of HTML form generation, validation, and processing (not to mention make it less error prone).  This abstraction allows you to develop HTML form UIs while still thinking in and working with haskell's type system and data structures.  It also fits very naturally with Happstack's ideas about 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7uejnKhE44TRrv6LYxIUseSFHf8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7uejnKhE44TRrv6LYxIUseSFHf8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7uejnKhE44TRrv6LYxIUseSFHf8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7uejnKhE44TRrv6LYxIUseSFHf8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/aU2skChBd5E" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/08/dynamic-list-formlets-in-haskell.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YARn84fSp7ImA9WxJRE04.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-3706624513324568156</id><published>2009-05-14T16:21:00.010-04:00</published><updated>2009-05-14T17:05:47.135-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-14T17:05:47.135-04:00</app:edited><title>Bit Manipulation Problem</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/3706624513324568156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=3706624513324568156" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/3706624513324568156?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/3706624513324568156?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/WNN_WtmwxgE/bit-manipulation-problem.html" title="Bit Manipulation Problem" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>11</thr:total><content type="html">
This post is a bit different from my usual content.  It's not about Haskell or functional programming, and not strictly about software.  But I think it's a nice little brain teaser that may be of interest.  Some may view it as too much tedium (congruent to 3 or 4 mod 5 in Knuth's scoring system), but I found the multitude of beautiful patterns in this problem interesting enough that I didn't 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zN3bTtLfBIjX7b3vjboK-pcxwwo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zN3bTtLfBIjX7b3vjboK-pcxwwo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zN3bTtLfBIjX7b3vjboK-pcxwwo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zN3bTtLfBIjX7b3vjboK-pcxwwo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/WNN_WtmwxgE" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/05/bit-manipulation-problem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EEQXo4eyp7ImA9WxVaEUQ.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-1313474782712465407</id><published>2009-04-08T09:00:00.000-04:00</published><updated>2009-04-08T09:00:00.433-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-08T09:00:00.433-04:00</app:edited><title>Adding Authentication to the Blog App</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/1313474782712465407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=1313474782712465407" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1313474782712465407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/1313474782712465407?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/MV-4wvrb594/adding-authentication-to-blog-app.html" title="Adding Authentication to the Blog App" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">In the last post, we developed a very basic blog application using Happstack.  Now that we have a simple application without an authentication mechanism, let's see how much effort it takes to add authentication using the Happstack-Auth module mentioned here.

First let's make an outline of what needs to be done.  We need the following pieces of functionality:


Pages for login/registration

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2Q2_g7g9EoWmILKUMkMx16hsOWI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2Q2_g7g9EoWmILKUMkMx16hsOWI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2Q2_g7g9EoWmILKUMkMx16hsOWI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2Q2_g7g9EoWmILKUMkMx16hsOWI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/MV-4wvrb594" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/04/adding-authentication-to-blog-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UFSHw_fip7ImA9WxJVEEk.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-6297983824832366583</id><published>2009-04-07T11:00:00.010-04:00</published><updated>2009-06-26T16:46:59.246-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-26T16:46:59.246-04:00</app:edited><title>Basic Happstack Blog App</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/6297983824832366583/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=6297983824832366583" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6297983824832366583?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6297983824832366583?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/dGXK10RmHEQ/basic-happstack-blog-app.html" title="Basic Happstack Blog App" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><content type="html">Happstack is improving, and my old blog posts on HAppS are now out of date.  So we're in need of a bare-bones app to demonstrate functionality.  I also wanted a simple app without authentication capability to demonstrate how to integrate Happstack-Auth into a project.  Blog apps seem to be one of the canonical beginner's examples in the web framework world, so I thought that would be a good 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/YYnTX5QPKwLPqgoaq5cenm1YwhE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YYnTX5QPKwLPqgoaq5cenm1YwhE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/YYnTX5QPKwLPqgoaq5cenm1YwhE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/YYnTX5QPKwLPqgoaq5cenm1YwhE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/dGXK10RmHEQ" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/04/basic-happstack-blog-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUMQX0-eCp7ImA9WxVaEEs.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-5573375742725125220</id><published>2009-04-06T19:01:00.003-04:00</published><updated>2009-04-06T21:04:40.350-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-06T21:04:40.350-04:00</app:edited><title>A Standalone Auth Framework for Happstack</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/5573375742725125220/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=5573375742725125220" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/5573375742725125220?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/5573375742725125220?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/VqReTy31-QE/standalone-auth-framework-for-happstack.html" title="A Standalone Auth Framework for Happstack" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">It's been awhile since my series of posts outlining some of the basic ideas behind the HAppS Haskell web framework (which is since been renamed Happstack).  Ever since I started developing it I envisioned a standalone library, perhaps shipped as a part of happstack, that would make it trivial for anyone to add robust authentication to their application.  After doing some more work on Happs(tack) 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hVN0KHeG-Cud5Dj4dhtndIX7RcQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hVN0KHeG-Cud5Dj4dhtndIX7RcQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hVN0KHeG-Cud5Dj4dhtndIX7RcQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hVN0KHeG-Cud5Dj4dhtndIX7RcQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/VqReTy31-QE" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/04/standalone-auth-framework-for-happstack.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4DR3c5eip7ImA9WxVQEUs.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-7246873975156965934</id><published>2009-01-28T13:07:00.014-05:00</published><updated>2009-01-28T13:56:16.922-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-28T13:56:16.922-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="happs" /><title>Happstack: An Interview with Matthew Elder</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/7246873975156965934/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=7246873975156965934" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7246873975156965934?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7246873975156965934?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/PqZZj9CgXPY/happstack-interview-with-matthew-elder.html" title="Happstack: An Interview with Matthew Elder" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">HAppS development has been all but stopped for almost a year (as have my posts about it).  Recently Matthew Elder took up the flag with a new project called Happstack.  I thought this would be a good time to catch up with Matthew and find out why he is doing this and where he is going with it.  So without further ado, here is Matthew Elder on Happstack.

Is Happstack a fork or a rename?
Happstack
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Jc1OF2v_gh9DvD0cXFIi_Mvnids/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jc1OF2v_gh9DvD0cXFIi_Mvnids/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Jc1OF2v_gh9DvD0cXFIi_Mvnids/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Jc1OF2v_gh9DvD0cXFIi_Mvnids/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/PqZZj9CgXPY" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2009/01/happstack-interview-with-matthew-elder.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cEQXgyfip7ImA9WxZXGEg.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-4077314576762045038</id><published>2008-03-06T20:53:00.002-05:00</published><updated>2008-03-06T20:56:40.696-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-06T20:56:40.696-05:00</app:edited><title>To Template Or Not To Template</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/4077314576762045038/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=4077314576762045038" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/4077314576762045038?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/4077314576762045038?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/XbAjOV58zhw/to-template-or-not-to-template.html" title="To Template Or Not To Template" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>10</thr:total><content type="html"> Since developing the tutorial in the last few posts, I have been
working on developing a real web app in Haskell with HAppS.  Now that
I know my way around the basics of HAppS, I need to move on to
generating actual HTML (as opposed to the plaint text messages that
the tutorial used).  Before starting, I had to decide what methodology
I would use to generate the HTML.  I'm new to web development
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RbWKpNeXKeLioDyujYCRnf8VpSA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RbWKpNeXKeLioDyujYCRnf8VpSA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RbWKpNeXKeLioDyujYCRnf8VpSA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RbWKpNeXKeLioDyujYCRnf8VpSA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/XbAjOV58zhw" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/03/to-template-or-not-to-template.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIBRH09fyp7ImA9WxZXFUw.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-7152417088269234032</id><published>2008-03-02T21:08:00.002-05:00</published><updated>2008-03-02T21:15:55.367-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-02T21:15:55.367-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="happs" /><title>HAppS Demo</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/7152417088269234032/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=7152417088269234032" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7152417088269234032?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/7152417088269234032?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/IDCKcnbZ4H0/happs-demo.html" title="HAppS Demo" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><content type="html">Several people requested that I post a link to a running instance of the HAppS code that I developed here over several posts.  One person was nice enough to actually offer me the use of a server.  So the demo is now up and running.  It's not at all meant to be user friendly, since it's just a demo of the basic HAppS capabilities.  So here are a list of links that are useful.


http://
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dy4i4_EAdJmKkcpiJ4OjH1S57vM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dy4i4_EAdJmKkcpiJ4OjH1S57vM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dy4i4_EAdJmKkcpiJ4OjH1S57vM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dy4i4_EAdJmKkcpiJ4OjH1S57vM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/IDCKcnbZ4H0" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/03/happs-demo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE8AR3c8eSp7ImA9WxZXE00.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-8654449702434555682</id><published>2008-02-29T11:32:00.002-05:00</published><updated>2008-02-29T11:34:06.971-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-29T11:34:06.971-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><title>How I Learned to Stop Worrying And Love Haskell's Type Inference</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/8654449702434555682/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=8654449702434555682" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/8654449702434555682?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/8654449702434555682?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/6y_fUzGBbO4/how-i-learned-to-stop-worrying-and-love.html" title="How I Learned to Stop Worrying And Love Haskell's Type Inference" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>6</thr:total><content type="html">In developing the HAppS example that I have been posting here, I
came upon a problem that gave me new insight to Haskell.  I don't
think it was a particularly deep insight, but it is significant to me
as someone new to the language, and new to type inference.

Consider a user authentication function that retrieves a map from the
reader monad, looks up a username, and compares the password 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TPbI6mxPImH1KGTi4VJ1v3wd_Yo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPbI6mxPImH1KGTi4VJ1v3wd_Yo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TPbI6mxPImH1KGTi4VJ1v3wd_Yo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPbI6mxPImH1KGTi4VJ1v3wd_Yo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/6y_fUzGBbO4" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/02/how-i-learned-to-stop-worrying-and-love.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4HQXc_cSp7ImA9WxVUEU8.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-6332235586874456943</id><published>2008-02-28T11:48:00.001-05:00</published><updated>2009-03-15T10:38:50.949-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-15T10:38:50.949-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="happs" /><title>Transactional Integrity Problem</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/6332235586874456943/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=6332235586874456943" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6332235586874456943?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/6332235586874456943?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/3W3IEObigos/transactional-integrity-problem.html" title="Transactional Integrity Problem" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">An astute reader pointed out that there is a transactional integrity
problem with the HAppS application built over the last 4 posts.  The
function checkAndAdd in Finished
HAppS Application contains a call to "query $ IsUser" as well as a
call to "update $ AddUser".  This violates that ACID guarantee that
was desired from the checkAndAdd function.  If two people
simultaneously try to create the 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VOGwf9Hj6X3_9CLkHWy-VRhvksQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VOGwf9Hj6X3_9CLkHWy-VRhvksQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VOGwf9Hj6X3_9CLkHWy-VRhvksQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VOGwf9Hj6X3_9CLkHWy-VRhvksQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/3W3IEObigos" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/02/transactional-integrity-problem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMR3k4cCp7ImA9WxVbFEg.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-2612885994514032932</id><published>2008-02-26T21:36:00.007-05:00</published><updated>2009-03-30T18:06:26.738-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-30T18:06:26.738-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="happs" /><title>Finished HAppS Application</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/2612885994514032932/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=2612885994514032932" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2612885994514032932?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2612885994514032932?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/_hDnOMfPVzw/finished-happs-application.html" title="Finished HAppS Application" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><content type="html">Update:  Due to popular demand, I put the plain haskell code for this
app on hpaste.org.  Here are links for Session.hs,
Main.hs, and
login.html.

The past three posts have laid the groundwork for a full HAppS web
app.  We have built the infrastructure for an authentication system
that can store usernames and passwords as well as the session IDs for
active sessions.  Here we will tie everything 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nunROLxLvGab9T_wvswaHe8ZB_s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nunROLxLvGab9T_wvswaHe8ZB_s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nunROLxLvGab9T_wvswaHe8ZB_s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nunROLxLvGab9T_wvswaHe8ZB_s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/_hDnOMfPVzw" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/02/finished-happs-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAAQHk7eyp7ImA9WxZXFUw.&quot;"><id>tag:blogger.com,1999:blog-8768401356830813531.post-2074650434884141814</id><published>2008-02-25T17:41:00.002-05:00</published><updated>2008-03-02T21:19:01.703-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-02T21:19:01.703-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="haskell" /><category scheme="http://www.blogger.com/atom/ns#" term="happs" /><title>Using HAppS-State</title><link rel="replies" type="application/atom+xml" href="http://softwaresimply.blogspot.com/feeds/2074650434884141814/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8768401356830813531&amp;postID=2074650434884141814" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2074650434884141814?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8768401356830813531/posts/default/2074650434884141814?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/SoftwareSimply/~3/Ta__nDkpDRc/using-happs-state.html" title="Using HAppS-State" /><author><name>mightybyte</name><uri>http://www.blogger.com/profile/15198998578494149797</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><content type="html">Update: A demo of the finished application is now available.  See this post for more information.

In the last post, I outlined the requirements for making a data type
an instance of Component.  This is great, but not very useful without
a mechanism for accessing the state data.
HAppS persists its state by storing functions that operate on the
state.  This requires a way to serialize the 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u5ar7F8sHNxGopT9dgWRtAwApC0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u5ar7F8sHNxGopT9dgWRtAwApC0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u5ar7F8sHNxGopT9dgWRtAwApC0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u5ar7F8sHNxGopT9dgWRtAwApC0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/SoftwareSimply/~4/Ta__nDkpDRc" height="1" width="1"/&gt;</content><feedburner:origLink>http://softwaresimply.blogspot.com/2008/02/using-happs-state.html</feedburner:origLink></entry></feed>

