<?xml version="1.0"?>
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:foaf="http://xmlns.com/foaf/0.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://planet.trapexit.org">
	<title>Planet Trapexit - Erlang/OTP News</title>
	<link>http://planet.trapexit.org</link>
	<description>Planet Trapexit - Erlang/OTP News - http://planet.trapexit.org</description>

	<items>
		<rdf:Seq>
			<rdf:li rdf:resource="http://blogtrader.net/blog/FunctionalAbilityScalaComparingHaskell" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.558" />
			<rdf:li rdf:resource="http://steve.vinoski.net/blog/?p=554" />
			<rdf:li rdf:resource="http://www.ejabberd.im/3893 at http://www.ejabberd.im" />
			<rdf:li rdf:resource="http://erlang-factory.com/news/rss/c28c8b04ae47de0102bc8805cf30a20a" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/oneteam_xmpp_client_entering_private_alpha/" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.557" />
			<rdf:li rdf:resource="http://prog21.dadgum.com/64.html" />
			<rdf:li rdf:resource="http://erlanginside.com/?p=149" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.556" />
			<rdf:li rdf:resource="http://prog21.dadgum.com/63.html" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/talkr.im_xmpp_jabber_server_gets_apple_push_notifications/" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-4167999740082219489.post-3562133908906710729" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/ejabberd_tip_simple_health_check/" />
			<rdf:li rdf:resource="http://erlang-factory.com/news/rss/41beb9607e3b74dec0c150e593b6c154" />
			<rdf:li rdf:resource="http://tragicallyleet.com/2010/03/03/the-lizard-brain-the-dip-and-other-godinisms" />
			<rdf:li rdf:resource="http://prog21.dadgum.com/62.html" />
			<rdf:li rdf:resource="http://www.redhoterlang.com/web/58024b56bab3e66cea6994b46deef85f" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-4167999740082219489.post-4346585784085491941" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.555" />
			<rdf:li rdf:resource="http://www.lshift.net/blog/?p=481" />
			<rdf:li rdf:resource="http://tragicallyleet.com/2010/02/28/moving-my-blog-to-jekyll" />
			<rdf:li rdf:resource="http://www.redhoterlang.com/web/3a5df92bd3f8988b13c91c091592faba" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-4167999740082219489.post-1814526995021948570" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-2706443342944599131.post-7355340354614769648" />
			<rdf:li rdf:resource="http://www.erlang-solutions.com/news/1/entry/1136" />
			<rdf:li rdf:resource="http://www.erlang-solutions.com/news/1/entry/1139" />
			<rdf:li rdf:resource="http://kevin.scaldeferri.com/blog/2009/04/28/AlphaProgrammersAndWomen.html" />
			<rdf:li rdf:resource="http://kevin.scaldeferri.com/blog/2009/05/08/RailsRackResponse.html" />
			<rdf:li rdf:resource="http://www.trapexit.org/forum/viewtopic.php?p=50720#50720" />
			<rdf:li rdf:resource="http://www.trapexit.org/forum/viewtopic.php?p=47819#47819" />
			<rdf:li rdf:resource="http://erlang-factory.com/news/rss/bed8891c36d68c78282a3aa1bbceda03" />
			<rdf:li rdf:resource="http://erlang-factory.com/news/rss/c32ba4d29413abf71eb07e4bfd97917a" />
			<rdf:li rdf:resource="http://blog.ribomation.com/2009/08/06/generating-prime-numbers-with-erlang-and-java/" />
			<rdf:li rdf:resource="http://blog.ribomation.com/2009/07/31/the-critical-section-problem-in-erlang/" />
			<rdf:li rdf:resource="http://www.erlang-solutions.com/jobs/detail/20/" />
			<rdf:li rdf:resource="http://www.erlang-solutions.com/jobs/detail/21/" />
			<rdf:li rdf:resource="http://www.trapexit.org/forum/viewtopic.php?p=51128#51128" />
			<rdf:li rdf:resource="http://www.trapexit.org/forum/viewtopic.php?p=51124#51124" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-855944390206940143.post-8276989122488926253" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-855944390206940143.post-5533665012407705943" />
			<rdf:li rdf:resource="http://charpi.net/blog/?p=219" />
			<rdf:li rdf:resource="tag:damienkatz.net,2009://1.554" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.553" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.552" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/jingle_nodes_on_talkr.im/" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/oneteam_for_iphone_in_version_3.2.5_with_facebook_chat/" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-2706443342944599131.post-2172718065976708205" />
			<rdf:li rdf:resource="http://www.protest-project.eu/news.html#114" />
			<rdf:li rdf:resource="http://www.protest-project.eu/news.html#112" />
			<rdf:li rdf:resource="http://www.protest-project.eu/news.html#113" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.551" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-2706443342944599131.post-886960597645056359" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.549" />
			<rdf:li rdf:resource="http://prog21.dadgum.com/61.html" />
			<rdf:li rdf:resource="http://www.ejabberd.im/3861 at http://www.ejabberd.im" />
			<rdf:li rdf:resource="tag:damienkatz.net,2010://1.548" />
			<rdf:li rdf:resource="http://www.redhoterlang.com/web/10eba56758251baab8e1a657747da511" />
			<rdf:li rdf:resource="http://www.redhoterlang.com/web/09275a52574173c08fb500f84dab50be" />
			<rdf:li rdf:resource="http://www.process-one.net/en/blogs/article/processone_at_fosdem_and_xmpp_summit/" />
		</rdf:Seq>
	</items>
</channel>

<item rdf:about="http://blogtrader.net/blog/FunctionalAbilityScalaComparingHaskell">
	<title>Caoyuan's Blog: How the Functional Ability of Scala Comparing to Haskell - an Example</title>
	<link>http://blogtrader.net/blog/FunctionalAbilityScalaComparingHaskell</link>
	<content:encoded>&lt;p&gt;
About one and half year ago, it was my first time to consider Scala seriously, I wrote a blog about the &lt;a href=&quot;http://blogtrader.net/blog/an_example_syntax_in_haskell&quot;&gt;syntax example of Scala, Erlang and Haskell &lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
With more experience of Scala, I'd like to know how about the functional ability of Scala comparing to Haskell. I picked up &lt;a class=&quot;ext-link&quot; href=&quot;http://mult.ifario.us/p/perpubplat-now-on-github&quot;&gt;&lt;span class=&quot;icon&quot;&gt; &lt;/span&gt;Paul R. Brown's perpubplat blog engine&lt;/a&gt; again, and tried to port more code from Haskell to Scala, and here's the code example of Entry.scala in Scala comparing to Brown's original Entry.hs:
&lt;/p&gt;
&lt;h3 id=&quot;OriginalHaskellcodepiece&quot;&gt;Original Haskell code piece&lt;/h3&gt;
&lt;div class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;-- | Data structures for an item (post or comment) and the&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- overall structure in terms of parents and children.&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Blog.Model.Entry&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;where&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;qualified&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Blog.FrontEnd.Urls&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; U
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Utilities&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;qualified&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Blog.Constants&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; C
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Maybe&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;List&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sortBy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;isPrefixOf&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;intersperse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;qualified&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Data.Map&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; M
&lt;span class=&quot;kr&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Data.Map&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ISO8601DatetimeString&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Overall data model for the runtime.  &lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- | &lt;/span&gt;
                     by_permatitle &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                     by_int_id &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                     child_map &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                     all_items &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                     next_id &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;empty&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;empty&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;empty &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;empty &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;empty &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Kind&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Comment&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Trackback&lt;/span&gt;
            &lt;span class=&quot;kr&quot;&gt;deriving&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;build_model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;build_model&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; empty
&lt;span class=&quot;nf&quot;&gt;build_model&lt;/span&gt; items &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map_by permatitle sorted_items&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                    bid
                    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;build_child_map sorted_items&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;sorted_items&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;n&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;where&lt;/span&gt;
      sorted_items &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; sort_by_created_reverse items
      bid &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map_by internal_id sorted_items&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      n &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; fst &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;findMax &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; bid
&lt;span class=&quot;nf&quot;&gt;build_child_map&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;build_child_map&lt;/span&gt; i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; build_child_map_ &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;fromList &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;x &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id x&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; i&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; i
&lt;span class=&quot;c1&quot;&gt;-- Constructed to take advantage of the input being in sorted order.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;build_child_map_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;build_child_map_&lt;/span&gt; m &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; m
&lt;span class=&quot;nf&quot;&gt;build_child_map_&lt;/span&gt; m &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;parent i &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;then&lt;/span&gt;
                                build_child_map_ m is
                            &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt;
                                build_child_map_ &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insertWith &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;unwrap &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; parent i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;internal_id i&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; is
&lt;span class=&quot;c1&quot;&gt;-- | Insert an item, presuming that all of its data other than&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- internal identifier have been correctly set.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert&lt;/span&gt; m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i'&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; m &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; by_permatitle &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;permatitle i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i' &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; by_permatitle m
                    &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; by_int_id &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert n i' &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; by_int_id m
                    &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; child_map &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;
                                  &lt;span class=&quot;kr&quot;&gt;case&lt;/span&gt; parent i &lt;span class=&quot;kr&quot;&gt;of&lt;/span&gt;
                                    &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt;
                                        child_map m
                                    &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Just&lt;/span&gt; p_id&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt;
                                        &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert p_id &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;insert_comment_ m &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;item_by_id m p_id&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; child_map m
                    &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; all_items &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; insert_ after &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;all_items m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i'
                    &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; next_id &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; n &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;where&lt;/span&gt;
      n &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; next_id m
      i' &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; i &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; internal_id &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; n &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert_comment_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert_comment_&lt;/span&gt; m p c &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; map internal_id &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;insert_ before &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;children m p&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert_&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; y &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;y&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;insert_&lt;/span&gt; o s&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;xs&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; y &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x &lt;span class=&quot;p&quot;&gt;`&lt;/span&gt;o&lt;span class=&quot;p&quot;&gt;`&lt;/span&gt; y&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;then&lt;/span&gt;
                           &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;insert_ o xs y&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                       &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt;
                           &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;s&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;after&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;after&lt;/span&gt; a b &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created a&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created b&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;before&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;before&lt;/span&gt; a b &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created a&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created b&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Apply a structure-preserving function, i.e., one that does not&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- change parent/child relationships or ids, to a specific item.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;alter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;IO&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;alter&lt;/span&gt; f m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; ts &lt;span class=&quot;ow&quot;&gt;&amp;lt;-&lt;/span&gt; now
                 &lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;let&lt;/span&gt; i' &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;f i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; updated &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; ts &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
                 &lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; return &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; m &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; by_permatitle &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;permatitle i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i' &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; by_permatitle m
                              &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; by_int_id &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i' &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; by_int_id m
                              &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; child_map &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;parent i &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;then&lt;/span&gt;
                                                child_map m
                                            &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt;
                                                &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;insert p_id resort_siblings &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; child_map m
                              &lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; all_items &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; insert_ after all_but i' &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;where&lt;/span&gt;
      not_i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;item &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id item&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      all_but &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; filter not_i &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; all_items m
      p_id &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; unwrap &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; parent i
      p &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; item_by_id m p_id
      resort_siblings &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; map internal_id &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;insert_ before &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;filter not_i &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; children m p&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;cloak&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;IO&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;cloak&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; alter &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;i &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; i &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; visible &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;False&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;uncloak&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;IO&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;uncloak&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; alter &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;i &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; i &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; visible &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;True&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;permatitle_exists&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;permatitle_exists&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;flip &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;member&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; by_permatitle
&lt;span class=&quot;nf&quot;&gt;max_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;max_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; fst &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;findMax &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; by_int_id
&lt;span class=&quot;nf&quot;&gt;post_by_permatitle&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;post_by_permatitle&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; by_permatitle
&lt;span class=&quot;nf&quot;&gt;maybe_post_by_permatitle&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;maybe_post_by_permatitle&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;flip &lt;span class=&quot;kt&quot;&gt;M&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;lookup&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; by_permatitle
&lt;span class=&quot;nf&quot;&gt;item_by_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;item_by_id&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; by_int_id
&lt;span class=&quot;nf&quot;&gt;children&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;children&lt;/span&gt; m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; map &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;item_by_id m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;child_map m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;internal_id i&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;unwrap&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; a &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; a
&lt;span class=&quot;nf&quot;&gt;unwrap&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Just&lt;/span&gt; x&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; x
&lt;span class=&quot;nf&quot;&gt;unwrap&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;error&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Can't unwrap nothing!&quot;&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; name &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       uri &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       email &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       show_email &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
                     &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
              &lt;span class=&quot;kr&quot;&gt;deriving&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Eq&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | General purpose runtime data structure for holding a post or&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- comment.  For a comment, a number of the fields will be ignored&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- (e.g., comments and tags) until/if the presentation and syndication&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- system gets fancier.&lt;/span&gt;
&lt;span class=&quot;kr&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- | an internal unique number for this post&lt;/span&gt;
                   internal_id &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the kind of item that this represents&lt;/span&gt;
                   kind &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Kind&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the title of the post, as it should be rendered on&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the web or inserted in an Atom feed; this should be a&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- valid XHTML fragment.&lt;/span&gt;
                   title &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the summary of the post, as it should be rendered on&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the web or intersted into an Atom feed; this should be&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- a valid XHTML fragment.&lt;/span&gt;
                   summary &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the body of the post as an XHTML fragment.  This&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- will be wrapped in an XHTML @&amp;lt;div&amp;gt;@ when rendered on&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the web or in a feed.&lt;/span&gt;
                   body &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | tags for the post, if any, expected to be in&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- alphabetical order and consisting of letters, digits,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- dashes, and/or underscores.&lt;/span&gt;
                   tags &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | a generated UID for the post; this is expected to be&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- suitable for use as an Atom GUID.  The expectation is&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- that it will be supplied by the implementation when&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the post is ingested.&lt;/span&gt;
                   uid &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | a permanent title for the item, consisting of only&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- lowercase letters, digits, and dashes.&lt;/span&gt;
                   permatitle &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the timestamp, as an ISO8601 datetime, when the post&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- came into being.  This is never blank and would be&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- supplied by the implementation when the post is&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- ingested.&lt;/span&gt;
                   created &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ISO8601DatetimeString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the timestamp, as an ISO8601 datetime, when the post&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- was updated.  Initially, this is equal to the value of&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the 'created' field.&lt;/span&gt;
                   updated &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ISO8601DatetimeString&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | the author of the post, expected to be hardwired to&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- the author of the blog&lt;/span&gt;
                   author &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | whether or not the item is to be displayed.&lt;/span&gt;
                   visible &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                   &lt;span class=&quot;c1&quot;&gt;-- | this item's parent, if any.&lt;/span&gt;
                   parent &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;
                 &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;kr&quot;&gt;deriving&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Read&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Eq&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Compute a permalink for the item relative to the supplied base URL.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;permalink&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;
          &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ the item&lt;/span&gt;
          &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;permalink&lt;/span&gt; m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;U&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;post &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;relative_url m i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;relative_url&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;relative_url&lt;/span&gt; m &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; _form_permalink &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ancestors m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;_form_permalink&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;_form_permalink&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;_form_permalink&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt;  &lt;span class=&quot;kr&quot;&gt;let&lt;/span&gt; s &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; permatitle i &lt;span class=&quot;kr&quot;&gt;in&lt;/span&gt;
                       &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;kind i &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;then&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; s
                       &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;#&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; s
&lt;span class=&quot;nf&quot;&gt;_form_permalink&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;kind i &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;then&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; permatitle i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;_form_permalink is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
                        &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt;
                            &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;_form_permalink is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ancestor_path&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ancestor_path&lt;/span&gt; m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; concat &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;intersperse &lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map permatitle&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; ancestors m i
&lt;span class=&quot;nf&quot;&gt;ancestors&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ancestors&lt;/span&gt; m i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; ancestors_ m &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Just&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; internal_id i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ancestors_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Maybe&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ancestors_&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;_&lt;/span&gt; is &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; is
&lt;span class=&quot;nf&quot;&gt;ancestors_&lt;/span&gt; m is &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Just&lt;/span&gt; i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; ancestors_ m &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i'&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;parent i'&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;where&lt;/span&gt;
      i' &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; item_by_id m i
&lt;span class=&quot;nf&quot;&gt;lastUpdated&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ISO8601DatetimeString&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;lastUpdated&lt;/span&gt; ps &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; maximum &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map updated ps&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;drop_invisible&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;drop_invisible&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; filter visible
&lt;span class=&quot;nf&quot;&gt;sort_by_created&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;sort_by_created&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; sortBy created_sort
&lt;span class=&quot;nf&quot;&gt;created_sort&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Ordering&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;created_sort&lt;/span&gt; a b &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; compare &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created a&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created b&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;sort_by_created_reverse&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;sort_by_created_reverse&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; sortBy created_sort_reverse
&lt;span class=&quot;nf&quot;&gt;created_sort_reverse&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Ordering&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;created_sort_reverse&lt;/span&gt; a b &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; compare &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created b&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;created a&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Filter a list of items according to a date fragment&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;date_fragment_filter_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;ISO8601DatetimeString&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;date_fragment_filter_&lt;/span&gt; s &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; filter &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;s &lt;span class=&quot;p&quot;&gt;`&lt;/span&gt;isPrefixOf&lt;span class=&quot;p&quot;&gt;`)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; created&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Filter a list of posts for those made in a specific year.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;year_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ year&lt;/span&gt;
            &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;year_filter&lt;/span&gt; y &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; date_fragment_filter_ &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; show y
&lt;span class=&quot;c1&quot;&gt;-- | Filter a list of posts for those made in a specific month.              &lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;month_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ year&lt;/span&gt;
             &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ month&lt;/span&gt;
             &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;month_filter&lt;/span&gt; y m &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;m &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;13&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; date_fragment_filter_ &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;show y&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;pad_ m&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
                 &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; otherwise &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; const &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Filter a list of posts for those made on a specific day&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;day_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ year&lt;/span&gt;
           &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ month&lt;/span&gt;
           &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;-- ^ day&lt;/span&gt;
           &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;day_filter&lt;/span&gt; y m d &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; date_fragment_filter_ &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;show y&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;pad_ m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;pad_ d&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- | Utility function to zero pad months and days in date expressions.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;pad_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;pad_&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;-0&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;show i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
       &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; otherwise &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sc&quot;&gt;'-'&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;show i&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;-- to do: make this faster using the sortedness.&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;tags_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;tags_filter&lt;/span&gt; t p &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; foldl &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;flip &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; p &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map tag_filter t&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;tag_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;tag_filter&lt;/span&gt; t &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; filter &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;t &lt;span class=&quot;p&quot;&gt;`&lt;/span&gt;elem&lt;span class=&quot;p&quot;&gt;`)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; tags&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;plink_filterf&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Bool&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;plink_filterf&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; flip &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; permatitle
&lt;span class=&quot;nf&quot;&gt;plink_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;plink_filter&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; filter &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; plink_filterf
&lt;span class=&quot;nf&quot;&gt;ymd_plink_finder&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;ymd_plink_finder&lt;/span&gt; y m d t &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;plink_filter t&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;day_filter y m d&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;all_posts&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;all_posts&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;filter &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;x &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; kind x&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; all_items
&lt;span class=&quot;nf&quot;&gt;all_comments&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;all_comments&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;filter &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;\&lt;/span&gt;x &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Comment&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; kind x&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; all_items
&lt;span class=&quot;nf&quot;&gt;flatten&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;flatten&lt;/span&gt; m &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; flatten_ &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;children m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;flatten_&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;a &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;a&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;a&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;a&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;flatten_&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;flatten_&lt;/span&gt; f &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;flatten_ f &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;f i&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;flatten_ f is&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;concat_comments&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;concat_comments&lt;/span&gt; m &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;foldr &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;map &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; children m&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;/&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;s&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;/&amp;gt;&lt;/span&gt; t &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; s &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sc&quot;&gt;'/'&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;t&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;to_string&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;to_string&lt;/span&gt; i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; concat &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;metadata i&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; body_block i&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; summary_block i&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;metadata&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;metadata&lt;/span&gt; i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; unlines &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; apply i &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;internal_id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;show &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; internal_id&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;parent&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; show &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; parent&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;title&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;show_no_quotes &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; tags&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;permatitle&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;permatitle&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;kind&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;show &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; kind&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;uid&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;uid&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;created&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;created&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;updated&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;updated&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;show &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; author&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                 &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;visible&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;show &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; visible&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;show_no_quotes&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;show_no_quotes&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; concat &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;intersperse &lt;span class=&quot;s&quot;&gt;&quot;, &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;[]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;apply&lt;/span&gt; i &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt;xs&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;concat &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;fst x&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;: &quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;snd x&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; i&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;apply i xs&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;body_block&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;body_block&lt;/span&gt; i &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; concat &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;--- START BODY ---&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;body i&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                       &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;--- END BODY ---&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;summary_block&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;summary_block&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; summary i &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;
                &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; otherwise &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; concat &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;--- START SUMMARY ---&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                      &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;unwrap &lt;span class=&quot;o&quot;&gt;$&lt;/span&gt; summary i&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                      &lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;--- END SUMMARY ---&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;default_author&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;default_author&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_name &lt;span class=&quot;kt&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_uri &lt;span class=&quot;kt&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_email &lt;span class=&quot;kt&quot;&gt;True&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&quot;InScala:&quot;&gt;In Scala:&lt;/h3&gt;
&lt;div class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.aiotrade.blog.model&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;java.util.Calendar&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;org.aiotrade.blog.&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Constants&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; C&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Entry&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;String&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Model&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; by_permatitle&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; by_int_id&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;, &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; child_map&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;, &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]],&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; all_items&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; next_id&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// call by name
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; apply&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;block&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Unit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;block&lt;span class=&quot;o&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Kind&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//deriving (Show, Read, Eq)
&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Kind&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Comment&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Kind&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Trackback&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Kind&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Author&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; name&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; uri &lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; email&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; show_email&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/** General purpose runtime data structure for holding a post or
   * comment.  For a comment, a number of the fields will be ignored
   * (e.g., comments and tags) until/if the presentation and syndication
   * system gets fancier.
   */&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// an internal unique number for this post
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; internalId&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the kind of item that this represents
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; kind&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Kind&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the title of the post, as it should be rendered on
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the web or inserted in an Atom feed; this should be a
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// valid XHTML fragment.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; title&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the summary of the post, as it should be rendered on
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the web or intersted into an Atom feed; this should be
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// a valid XHTML fragment.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; summary&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the body of the post as an XHTML fragment.  This
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// will be wrapped in an XHTML @&amp;lt;div&amp;gt;@ when rendered on
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the web or in a feed.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; body&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;XhtmlString&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// tags for the post, if any, expected to be in
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// alphabetical order and consisting of letters, digits,
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// dashes, and/or underscores.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; tags&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// a generated UID for the post; this is expected to be
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// suitable for use as an Atom GUID.  The expectation is
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// that it will be supplied by the implementation when
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the post is ingested.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; uid&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// a permanent title for the item, consisting of only
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// lowercase letters, digits, and dashes.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; permatitle&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the timestamp, as an ISO8601 datetime, when the post
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// came into being.  This is never blank and would be
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// supplied by the implementation when the post is
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// ingested.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; created&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;// the timestamp, as an ISO8601 datetime, when the post
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// was updated.  Initially, this is equal to the value of
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the 'created' field.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; updated&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//the author of the post, expected to be hardwired to
&lt;/span&gt;    &lt;span class=&quot;c1&quot;&gt;// the author of the blog
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; author&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Author&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//whether or not the item is to be displayed.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; visible&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//this item's parent, if any.
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; parent&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; apply&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;block&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Unit&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;block&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; empty &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; build_model&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; empty
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; sortedIs &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; sortByCreatedReverse&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; bid &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; sortedIs&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;map&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;x &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; x&lt;span class=&quot;o&quot;&gt;)}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; n &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; bid&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;keySet&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;max
      &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; sortedIs&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;map&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;x &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; x&lt;span class=&quot;o&quot;&gt;)},&lt;/span&gt;
                bid&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                buildChildMap&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;sortedIs&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
                sortedIs&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;
                n &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; buildChildMap&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; buildChildMap_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;map&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; buildChildMap_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;map&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;, &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]],&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    map &lt;span class=&quot;o&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;&amp;lt;-&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;isDefined&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// pid, cids definitions go into body // it's more efficient.
&lt;/span&gt;        &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; pid &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;get
        &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; cids &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; map&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;getOrElse&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;pid&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        pid &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; cids&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; sortByCreatedReverse&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;sortWith&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;cm&quot;&gt;/** Insert an item, presuming that all of its data other than
   internal identifier have been correctly set.
   */&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; insert&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; n &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;next_id
    i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; n
    &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_permatitle &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_int_id &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;n &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p_id&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p_id &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;insert_comment_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; item_by_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;p_id&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)))&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;})&lt;/span&gt;
        m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;after&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;next_id &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; n &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; insert_comment_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; c&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;before&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; children&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; c&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; map &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;o&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Boolean&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt; y&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; x &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; xs &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;o&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; x &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;o&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; xs&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; after &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; a&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; b&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; before&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; a&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; b&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created
  &lt;span class=&quot;cm&quot;&gt;/**
   * Apply a structure-preserving function, i.e., one that does not
   * change parent/child relationships or ids, to a specific item.
   */&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; alter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;// -&amp;gt; IO Model
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; not_i &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;item&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; item&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; all_but &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items filter not_i
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; p_id &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; unwrap &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; p &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; item_by_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;p_id&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; resort_siblings &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;before&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; children&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; filter not_i&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; map &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; ts &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;System&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;currentTimeMillis
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; i1 &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; f&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;updated &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; ts&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    m &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_permatitle &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i1&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; i1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_int_id &lt;span class=&quot;o&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i1&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; i1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map
        &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p_id &lt;span class=&quot;o&quot;&gt;-&amp;gt;&lt;/span&gt; resort_siblings&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; insert_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;after&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; all_but&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; cloak&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// -&amp;gt; IO Model
&lt;/span&gt;    alter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;visible &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;},&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; uncloak&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// -&amp;gt; IO Model
&lt;/span&gt;    alter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;visible &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;},&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; permatitle_exists&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_permatitle&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;contains&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; max_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_int_id&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;keySet&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;max
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; post_by_permatitle&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_permatitle&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; maybe_post_by_permatitle&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_permatitle&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; item_by_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;id&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;by_int_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;id&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; children&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;child_map&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; map &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;item_by_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; unwrap&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;](&lt;/span&gt;a&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; a &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; x
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; error&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Can't unwrap none!&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; relative_url&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    &lt;span class=&quot;nc&quot;&gt;_form_permalink&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;ancestors&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;_form_permalink&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; s &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;kind &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; s
      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
        &lt;span class=&quot;s&quot;&gt;&quot;#&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; s
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;kind &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;_form_permalink&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
        &lt;span class=&quot;nc&quot;&gt;_form_permalink&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; ancestors&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    ancestors_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; ancestors_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt; i_? &lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Option&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; i_? &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; is
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; i1 &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; item_by_id&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
      ancestors_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i1 &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i1&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; lastUpdated&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;ps&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Long&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    ps map &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;updated&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; max
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; drop_invisible&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is filter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;visible&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; sort_by_created&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is sortWith created_sort &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; created_sort&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    a&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; b&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; sort_by_created_reverse&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is sortWith created_sort_reverse &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; created_sort_reverse&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    b&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; a&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; date_fragment_filter_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt; ts&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int*&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; cal &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;getInstance
    ts &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Seq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; is filter &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; pad_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cal&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;`y`&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; `m`&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; `d`&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Seq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; is filter &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; pad_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cal&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;`y`&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; `m`&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Seq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; is filter &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; pad_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cal&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;`y`&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;
          &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; year_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    date_fragment_filter_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; month_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    date_fragment_filter_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; day_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    date_fragment_filter_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; y&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; pad_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cal&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; t&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Long&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    cal&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;setTimeInMillis&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Calendar._&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;cal&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;YEAR&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; cal&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;MONTH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; cal&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;get&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;DAY_OF_MONTH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; tags_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;ts&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is filter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/:&lt;/span&gt; ts&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;tags&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;contains&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;)})&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; tag_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is filter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;tags&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;contains&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;t&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; plink_filterf&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Boolean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; p
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; plink_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    is filter plink_filterf&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; ymd_plink_finder&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Int&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; p&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    plink_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;p&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;day_filter&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; d&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;is&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;/&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; t&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    s &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;sc&quot;&gt;'/'&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; t
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; all_posts&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items filter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;kind &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; all_comments&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; m&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;all_items filter &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;kind &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Comment&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; flatten&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    flatten_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;children&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; flatten_&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;](&lt;/span&gt;f&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;],&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; is &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; flatten_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; f&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:::&lt;/span&gt; flatten_&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; is&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; concat_comments&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Model&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; is&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;is map children&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:\&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]())(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:::&lt;/span&gt; _&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; metadata&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    apply&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;internal_id&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;internalId&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;parent&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;      show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;parent&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;       _&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;title&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;        show_no_quotes&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;tags&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;permatitle&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;  _&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;permatitle&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;kind&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;        show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;kind&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;uid&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;         _&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;uid&lt;span class=&quot;o&quot;&gt;),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;created&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;     show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;created&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;updated&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;     show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;updated&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;      show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author&lt;span class=&quot;o&quot;&gt;)),&lt;/span&gt;
                  &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;visible&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt;     show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;_&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;visible&lt;span class=&quot;o&quot;&gt;)))&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; mkString &lt;span class=&quot;s&quot;&gt;&quot;\n&quot;&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// curring
&lt;/span&gt;  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; show&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Any&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    f&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; toString
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; show_no_quotes&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;f&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;])(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    f&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; mkString &lt;span class=&quot;s&quot;&gt;&quot;, &quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; apply&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; xs&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)])&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; xs &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Nil&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; x &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; xs &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;_1 &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;: &quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; x&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;_2&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;::&lt;/span&gt; apply&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; xs&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; body_block&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;
    &lt;span class=&quot;s&quot;&gt;&quot;--- START BODY ---\n&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;body &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;\n--- END BODY ---\n&quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; summary_block&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;i&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;Item&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; i&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;summary &lt;span class=&quot;k&quot;&gt;match&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;None&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Some&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;--- START SUMMARY ---\n&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; x &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;\n--- END SUMMARY ---\n&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;val&lt;/span&gt; default_author &lt;span class=&quot;k&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Author&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;C&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_name&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; C&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_uri&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; C&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;author_email&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2010-03-15T21:06:29+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.558">
	<title>Damien Katz: O'Reilly's CouchDB: The Definitive Guide for $9.99 Today Only!</title>
	<link>http://damienkatz.net/2010/03/oreillys_couchdb_the_definitiv.html</link>
	<content:encoded>&lt;p&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596155902/&quot;&gt;&lt;img src=&quot;http://covers.oreilly.com/images/9780596155902/cat.gif&quot; /&gt;&lt;br /&gt;
CouchDB: The Definitive Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use this discount code: DDCDB&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-15T19:00:39+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://steve.vinoski.net/blog/?p=554">
	<title>Trapexit's Erlang Blog Filter: New Column on Webmachine</title>
	<link>http://steve.vinoski.net/blog/2010/03/15/new-column-on-webmachine/</link>
	<content:encoded>&lt;p&gt;&lt;a rel=&quot;nofollow&quot;&gt;&amp;#8220;The Functional Web&amp;#8221;&lt;/a&gt; column is finally back, this time with a column about &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://webmachine.basho.com/&quot;&gt;Webmachine&lt;/a&gt; co-authored with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.therestfulway.com/&quot;&gt;Justin Sheehy&lt;/a&gt;. The column title is &lt;a rel=&quot;nofollow&quot;&gt;&lt;em&gt;Developing RESTful Web Services with Webmachine&lt;/em&gt;&lt;/a&gt;, and you can follow that link to retrieve the PDF.&lt;/p&gt;
&lt;p&gt;Webmachine is a highly innovative web application framework, and it can teach you a great deal about the specifics of HTTP and the details of REST. It&amp;#8217;s also written in Erlang, which continues to be my favorite programming language of all time because of its incredible practicality, utility, and elegance.&lt;/p&gt;
&lt;p&gt;My column hiatus was due to extreme startup workload, which for better or worse is showing no sign of letting up anytime soon. But it&amp;#8217;s nice to get the column back on track for the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.computer.org/portal/web/csdl/abs/mags/ic/2010/02/mic201002toc.htm&quot;&gt;March/April Internet Computing issue&lt;/a&gt;, and one of my goals is to avoid missing any more issues this year. Many thanks to Justin for his contribution to this issue of the column.&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-15T06:19:06+00:00</dc:date>
</item>
<item rdf:about="http://www.ejabberd.im/3893 at http://www.ejabberd.im">
	<title>ejabberd@jabber.ru: ejabberd 2.1.3 - Third bugfix release</title>
	<link>http://www.ejabberd.im/ejabberd-2.1.3</link>
	<content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.process-one.net/en/blogs/article/ann_ejabberd_2.1.3_bugfix_release/&quot;&gt;ejabberd 2.1.3&lt;/a&gt; has been released. It contains many bugfixes and some improvements.&lt;/p&gt;
&lt;p&gt;This is a short list of changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;New ejabberd_c2s option: max_fsm_queue&lt;/li&gt;
&lt;li&gt;ejabberdctl: Support concurrent connections with bound connection names&lt;/li&gt;
&lt;li&gt;Cross-domain HTTP-Bind support (&lt;a href=&quot;https://support.process-one.net/browse/EJAB-1168&quot;&gt;EJAB-1168&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Hibernate http-bind process after handling a request&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href=&quot;http://www.ejabberd.im/ejabberd-2.1.3&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-12T16:28:03+00:00</dc:date>
</item>
<item rdf:about="http://erlang-factory.com/news/rss/c28c8b04ae47de0102bc8805cf30a20a">
	<title>Erlang Factory News: New Speaker for the Erlang Factory SF Bay Area 2010</title>
	<link></link>
	<content:encoded>We would like to announce &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/speakers/geoffcant&quot;&gt;Geoff Cant &lt;/a&gt;as a Speaker for the Erlang Factory SF Bay Area. Geoff will give a talk on &quot;&lt;span&gt;Enet: TCP/IP in Pure(ish) Erlang&lt;/span&gt;&quot;.&lt;br /&gt;&lt;br /&gt;To see all Speakers please click &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/speakers&quot;&gt;here&lt;/a&gt;. The programme of the conference is available &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/speakers&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Reminder: &lt;span&gt;The Erlang Factory in SF Bay Area is just over a week away! &lt;/span&gt;Do not miss
out on what will be the biggest gathering of Erlang expertise in the USA, &lt;a href=&quot;https://www.erlang-factory.com/conference/SFBay2010/register&quot;&gt;register&lt;/a&gt; today!&lt;br /&gt;</content:encoded>
	<dc:date>2010-03-12T12:45:55+00:00</dc:date>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/oneteam_xmpp_client_entering_private_alpha/">
	<title>Process-one Blogs: OneTeam XMPP client entering private alpha</title>
	<link>http://www.process-one.net/en/blogs/article/oneteam_xmpp_client_entering_private_alpha/</link>
	<content:encoded>&lt;p&gt;Our OneTeam XMPP client for Linux, Mac OS X, and Windows is entering a private alpha period.&lt;/p&gt; &lt;p&gt;OneTeam is a multiplatform XMPP client for Linux, Mac OS X, and Windows. We have slowly worked on it during long months (and even years, it is being developed since 2006) but never had enough time and resources to release it properly.&lt;/p&gt;
&lt;p&gt;The time to launch OneTeam in the wild and interoperable internet is soon arriving. We believe we have achieved our goal to deliver some real enterprise-class user experience. As a proof, we are using it inhouse on a daily basis as a productivity tool, without any major glitch.&lt;/p&gt;
&lt;p&gt;For the record, OneTeam works as a Firefox extension, as well as a standalone application, on the three major platforms, thanks to the XUL technology. OneTeam has a nice dashboard-based interface, and handy user interactions improvements everywhere. This XMPP client supports a wide range of features, including chat and presence of course, but also Multi-User Chat (groupchat), message threading, history browsing, etc. It also features Jingle voice calls, as well as the exclusive Jingle Nodes feature demoed at FOSDEM, that works much like Skype. On the more technical side, there is the XML console, as well as a very interesting remote debugging console.&lt;/p&gt;
&lt;p&gt;So, we are now releasing OneTeam, but in alpha quality for now, to the  curious ones, and those willing to help and test. Please feel free to contact us, if you want to join the alpha testing, and report issues. Please e-mail nverite at process-one.net for a OneTeam ride.&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-11T14:00:21+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.557">
	<title>Damien Katz: Win a Nexus One from Couchio</title>
	<link>http://damienkatz.net/2010/03/win_a_nexus_one_from_couchio.html</link>
	<content:encoded>&lt;p&gt;Port CouchDB to an Android app and get our phone! &lt;a href=&quot;http://blog.couch.io/post/440148422/win-this-nexus-one-phone&quot;&gt;Details.&lt;/a&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-11T01:58:29+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://prog21.dadgum.com/64.html">
	<title>Programming in the 21st Century: Eleven Years of Erlang</title>
	<link>http://prog21.dadgum.com/64.html</link>
	<content:encoded>I've written about &lt;a href=&quot;http://prog21.dadgum.com/22.html&quot;&gt;how I started using Erlang&lt;/a&gt;. A good question is why, after eleven years, am I still using it?
&lt;br /&gt;&lt;br /&gt;For the record, I do use other languages. I enjoy writing Python code, and I've taught other people how to use Python. This website is statically generated by a Perl program that I had fun writing. And I dabble in various languages of the month which have cropped up. (Another website I used to maintain was generated by a script that I kept reimplementing. It started out written in Perl, but transitioned through at least REBOL, J, and Erlang before I was through.)
&lt;br /&gt;&lt;br /&gt;One of the two big reasons I've stuck with Erlang is because of its simplicity. The functional core of Erlang can and has been described in a couple of short chapters. Knowledge of four data types--numbers, atoms, lists, tuples--is enough for most programming problems. Binaries and funs can be tackled later. This simplicity is good, because the difficult part of Erlang and any mostly-functional language is in learning to write code without destructive updates. The language itself shouldn't pour complexity on top of that.
&lt;br /&gt;&lt;br /&gt;There are many possibilities for extending Erlang with new data types, with an alternative to &lt;a href=&quot;http://prog21.dadgum.com/60.html&quot;&gt;records&lt;/a&gt; being high on the list. Should strings be split off from lists into a distinct entity? What about arrays of floats, so there's no need to box each value? How about a &quot;machine integer&quot; type that's represented without tagging and that doesn't get automatically promoted to an arbitrarily sized &quot;big number&quot; when needed?
&lt;br /&gt;&lt;br /&gt;All of those additional types are optimizations. Lists work just fine as strings, but even the most naive implementation of strings as unicode arrays would take half the memory of the equivalent lists, and that's powerful enticement. When Knuth warned of premature optimization, I like to think he wasn't talking so much about obfuscating code in the process of micro-optimizing for speed, but he was pointing out that code is made faster by specializing it. The process of specialization reduces your options, and you end up with a solution that's more focused and at the same time more brittle. You don't want to do that until you really need to.
&lt;br /&gt;&lt;br /&gt;It may be an overreaction to my years of optimization-focused programming, but I like the philosophy of making the Erlang system fast without just caving in and providing C-style abilities. I &lt;em&gt;know&lt;/em&gt; how to write low-level C. And now I know how to write good high-level functional code. If I had been presented with a menu of optimization-oriented data types in Erlang, that might never have happened. I'd be writing C in the guise of Erlang.
&lt;br /&gt;&lt;br /&gt;The second reason I'm still using Erlang is because I understand it. I don't mean I know how to code in it, I mean I get it all the way down. I know more or less what transformations are applied by the compiler and the BEAM loader. I know how the BEAM virtual machine works. And unlike most languages, Erlang holds together as a full system. You could decide to ditch all existing C compilers and CPUs and start over completely, and Erlang could serve as a foundation for this new world of computing. The &lt;a href=&quot;http://www.erlang.org/euc/00/processor.ppt&quot;&gt;ECOMP project&lt;/a&gt; (warning: PowerPoint) proved that an FPGA running the Erlang VM directly gives impressive results.
&lt;br /&gt;&lt;br /&gt;Let me zoom in on one specific detail of the Erlang runtime. If you take an arbitrary piece of data in a language of the Lua or Python family, at the lowest-level it ends up wrapped inside a C struct. There's a type field, maybe a reference count, and because it's a heap allocated block of memory there's other hidden overhead that comes along with any dynamic allocation (such as the size of the block). Lua is unabashedly reliant on malloc-like heap management for just about everything.
&lt;br /&gt;&lt;br /&gt;Erlang memory handling is much more basic. There's a block of memory per process, and it grows from bottom to top until full. Most data objects aren't wrapped in structs. A tuple, for example, is one cell of data for the length followed by the number of cells in the tuple. The system identifies it as a tuple by tagging the &lt;em&gt;pointer&lt;/em&gt; to the tuple. You know the memory used for a tuple is always 1 + N, period. Were I trying to optimize data representation by hand, with the caveat that type info needs to be included, it would be tough to do significantly better.
&lt;br /&gt;&lt;br /&gt;I'm sure some people are correctly pointing out that this is how most Lisp and Scheme systems have worked since those languages were developed. There's nothing preventing an imperative language from using the same methods (and indeed this is sometimes the case).
&lt;br /&gt;&lt;br /&gt;Erlang takes this &lt;a href=&quot;http://prog21.dadgum.com/16.html&quot;&gt;further&lt;/a&gt; by having a separate block of memory for each process, so when the block gets full only that particular block needs to be garbage collected. If it's a 64K block, it's takes microseconds to collect, as compared to potentially traversing a heap containing the hundreds of megabytes of data in the full running system. Disallowing destructive updates allows some nice optimizations in the garbage collector, because pointers are guaranteed to reference older objects (this is sometimes called a &quot;unidirectional heap&quot;). Together these are much simpler than building a real-time garbage collector that can survive under the pressure of giant heaps.
&lt;br /&gt;&lt;br /&gt;Would I use Erlang for everything? Of course not. Erlang is clearly a bad match for some types of programming. It would be silly to force-fit Erlang into the iPhone, for example, with Apple promoting Objective C as the one true way. But it's the best mix of power and simplicity that I've come across.</content:encoded>
	<dc:date>2010-03-10T06:00:00+00:00</dc:date>
	<dc:creator>James Hague</dc:creator>
</item>
<item rdf:about="http://erlanginside.com/?p=149">
	<title>Erlang Inside: Zotonic destroys WordPress and rethinks the CMS with Erlang</title>
	<link>http://erlanginside.com/zotonic-destroys-wordpress-and-rethinks-the-cms-with-erlang-149</link>
	<content:encoded>A chat with Marc Worrell, Lead Architect of Zotonic - a new Content Management System written entirely in Erlang.</content:encoded>
	<dc:date>2010-03-09T18:50:24+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.556">
	<title>Damien Katz: CouchDB Case Study: Assay Depot</title>
	<link>http://damienkatz.net/2010/03/couchdb_case_study_assay_depot.html</link>
	<content:encoded>&lt;p&gt;&lt;a href=&quot;http://blog.couch.io/post/430899411/assay-depot-cio-chris-petersen-discusses-couchdb&quot;&gt;Apache CouchDB Case Study: Assay Depot&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;div&gt;...replication give this ability that would have been much more difficult to accomplish in MySQL. We could have done this in a relational manner but it would have been very challenging, very custom. CouchDB give a lot of the benefits for free.
&lt;/div&gt;&lt;/blockquote&gt;

&lt;blockquote&gt;&lt;div&gt;CouchDB has changed the way I think about developing web applications&lt;/div&gt;&lt;/blockquote&gt;</content:encoded>
	<dc:date>2010-03-06T23:40:35+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://prog21.dadgum.com/63.html">
	<title>Programming in the 21st Century: It Made Sense in 1978</title>
	<link>http://prog21.dadgum.com/63.html</link>
	<content:encoded>Whenever I see this list of memory cell sizes, it strikes me as antiquated:
&lt;pre&gt;BYTE = 8 bits
WORD = 16 bits
LONG = 32 bits
&lt;/pre&gt;Those names were standard for both the Intel x86 and Motorola 68000 families of processors, and it's easy to see where they came from. &quot;Word&quot; isn't synonymous with a 16-bit value; it refers to the fundamental data size that a computer architecture is built to operate upon. On a 16-bit CPU like the 8086, a word is naturally 16-bits.
&lt;br /&gt;&lt;br /&gt;Now it's 2010, and it's silly to think of a 16-bit value as a basic enough unit of data to get to the designation &quot;word.&quot; &quot;Long&quot; is similarly out of place, as 32-bit microprocessors have been around for over 25 years, and yet the standard memory cell size is still labeled in a way that makes it sound abnormally large.
&lt;br /&gt;&lt;br /&gt;The PowerPC folks got this right back in the early 1990s with this nomenclature:
&lt;pre&gt;BYTE = 8 bits
HALFWORD = 16 bits
WORD = 32 bits
&lt;/pre&gt;That made sense in 1991, and it's still rational today. (64-bit is now common, but the jump isn't nearly as critical as it was the last time memory cell size doubled. The PowerPC name for &quot;64-bits&quot; is &quot;doubleword.&quot;)
&lt;br /&gt;&lt;br /&gt;Occasionally you need to reevaluate your assumptions and not just cling to something because it's always been that way.</content:encoded>
	<dc:date>2010-03-04T06:00:00+00:00</dc:date>
	<dc:creator>James Hague</dc:creator>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/talkr.im_xmpp_jabber_server_gets_apple_push_notifications/">
	<title>Process-one Blogs: Talkr.IM XMPP/Jabber server gets Apple Push notifications</title>
	<link>http://www.process-one.net/en/blogs/article/talkr.im_xmpp_jabber_server_gets_apple_push_notifications/</link>
	<content:encoded>&lt;p&gt;The free public XMPP/Jabber server Talkr.IM gets Apple Push notifications for iPhone.&lt;/p&gt; &lt;p&gt;The ProcessOne's free, open, public XMPP/Jabber server Talkr.IM is gaining a new feature: Apple Push  notifications. This well enable users to get notified of offline messages when they arrive, as well as simulate a continued XMPP session on iPhone devices that still do not implement multitasking.&lt;/p&gt;
&lt;p&gt;For the latter feature, since the iPhone still does not accept to run applications in the background, if you want to use another application, you will have to shutdown your XMPP client and thus disconnect from Talkr.IM. With the Push feature enabled on your XMPP client (if this one supports Apple Push notifications), you can tell your contacts you are still online when you are using other applications. You will then automatically receive notifications of new messages. And when you re-open your XMPP client, you will receive these messages.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.process-one.net/en/solutions/oneteam_iphone/&quot;&gt;OneTeam for iPhone&lt;/a&gt; has the Apple Push feature enabled: you will be able to use it on you Talkr.IM account. Just use you Jabber ID, like username@talkr.im, and for a simple configuration, go to the &quot;Settings&quot; tab, then &quot;Push settings&quot;.&lt;/p&gt;
&lt;p&gt;The Talkr.IM XMPP server will stop at 10:00am CET. This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;01:00am Los Angeles&lt;/li&gt;
&lt;li&gt;04:00am New York&lt;/li&gt;
&lt;li&gt;12:00 Moscow&lt;/li&gt;
&lt;li&gt;18:00 Tokyo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: the Apple Push module is installed on Talkr.IM, and working fine. You can use it on &lt;a href=&quot;http://www.process-one.net/en/solutions/oneteam_iphone/&quot;&gt;OneTeam for iPhone&lt;/a&gt;. You can run a APNS module on your own ejabberd server with &lt;a href=&quot;http://www.process-one.net/en/imstore/#impush&quot;&gt;IMpush&lt;/a&gt;.&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-03T21:00:16+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-4167999740082219489.post-3562133908906710729">
	<title>Erlware: Erlware on R13B04</title>
	<link>http://erlware.blogspot.com/2010/03/erlware-on-r13b04.html</link>
	<content:encoded>Erlware tools are now running on R13B04 for Mac OSX Leopard  (Intel and PowerMac)Mac OSX Snow LeopardLinux i686Linux x86_64To install the 'erl' shell and start playing use 'faxien install-release erl'Note* escript still needs an update - contributions welcome.</content:encoded>
	<dc:date>2010-03-03T18:15:13+00:00</dc:date>
	<dc:creator>Martin J. Logan</dc:creator>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/ejabberd_tip_simple_health_check/">
	<title>Process-one Blogs: ejabberd tip: simple health check</title>
	<link>http://www.process-one.net/en/blogs/article/ejabberd_tip_simple_health_check/</link>
	<content:encoded>&lt;p&gt;An ejabberd health check mechanism might be useful in your deployments, but using the HTTP file server might be overkill...&lt;/p&gt; &lt;p&gt;Some people want to do regular health checks on ejabberd, which is always a good idea. Doing a health check over XMPP might not be the solution, here is at least two reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;with a pure ad-hoc solution like a cron script, you might need an XMPP library you might not want to install on your servers&lt;/li&gt;
&lt;li&gt;monitoring systems might not talk XMPP at all...&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So people first think of the internal ejabberd HTTP file server, which then they have to configure through a specific listener and the right module... possibly with logs, they would have to manage (rotate, parse, clean, etc.).&lt;/p&gt;
&lt;p&gt;Sometimes people just don't think there is already an HTTP listener on their internal BOSH Connection Manager. You would argue that BOSH uses the HTTP POST method. But the ejabberd BOSH Connection Manager replies to simple GET:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;wget &lt;a href=&quot;http://www.process-one.net/en?URL=http%3A%2F%2Fmyserver.net%2Fhttp-bind&quot;&gt;http://myserver.net/http-bind&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And ejabberd will answer:&lt;/p&gt;
&lt;h1&gt;ejabberd mod_http_bind v1.2&lt;/h1&gt;
&lt;p&gt;An implementation of &lt;a href=&quot;http://xmpp.org/extensions/xep-0206.html&quot;&gt;XMPP over BOSH  (XEP-0206)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This web page is only informative. To use HTTP-Bind  you need a Jabber/XMPP client that supports it.&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-03T16:30:28+00:00</dc:date>
</item>
<item rdf:about="http://erlang-factory.com/news/rss/41beb9607e3b74dec0c150e593b6c154">
	<title>Erlang Factory News: Countdown to the Erlang Factory SF Bay Area</title>
	<link></link>
	<content:encoded>There are&lt;span&gt; only 3 weeks left&lt;/span&gt; to the biggest Erlang gathering in the USA. We have &lt;span&gt;43 speakers&lt;/span&gt; giving &lt;span&gt;35 talks&lt;/span&gt; in &lt;span&gt;6 tracks&lt;/span&gt;! The programme of the conference can be viewed &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/programme&quot;&gt;here&lt;/a&gt;.&amp;nbsp; If you haven't registered yet, you can still do this by clicking &lt;a href=&quot;https://www.erlang-factory.com/conference/SFBay2010/register&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;'I'm attending', 'I'm speaking'&amp;nbsp; and 'See you there' &lt;/span&gt;banners are now available &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/community&quot;&gt;here&lt;/a&gt;.
You can add them to your blog, Twitter page or any website. You are also welcome to
follow &lt;a href=&quot;http://twitter.com/erlangfactory&quot;&gt;@erlangfactory&lt;/a&gt; on Twitter.&lt;br /&gt;</content:encoded>
	<dc:date>2010-03-03T15:46:07+00:00</dc:date>
</item>
<item rdf:about="http://tragicallyleet.com/2010/03/03/the-lizard-brain-the-dip-and-other-godinisms">
	<title>Tragically L33T: The Lizard Brain, the Dip, and other Godinisms</title>
	<link>http://tragicallyleet.com/2010/03/03/the-lizard-brain-the-dip-and-other-godinisms</link>
	<content:encoded>&lt;p&gt;&lt;a href=&quot;http://sethgodin.typepad.com/&quot;&gt;Seth Godin&lt;/a&gt; is a really smart guy. More importantly, he takes his ideas and does something with them.&lt;/p&gt;

&lt;p&gt;I came across Seth in &lt;a href=&quot;http://www.43folders.com/2010/01/26/godin-linchpin&quot;&gt;an interview&lt;/a&gt; he did with &lt;a href=&quot;http://43folders.com&quot;&gt;Merlin Mann&lt;/a&gt;. He talked a lot about fear and the &lt;a href=&quot;http://en.wikipedia.org/wiki/Lizard_brain&quot;&gt;lizard brain&lt;/a&gt;: the part of our brain that is only hungry, scared, selfish and horny. Its the part of our brains that ruled in high school.&lt;/p&gt;

&lt;p&gt;It will also sabotage us if we let it.&lt;/p&gt;

&lt;p&gt;Whenever we get close to completing something big or interesting or important to us, the lizard brain senses a threat. &amp;#8220;What if we fail?&amp;#8221; &amp;#8220;Ridicule is painful!&amp;#8221; &amp;#8220;Better to go along in life quietly, then do something that might get us noticed.&amp;#8221;&lt;/p&gt;

&lt;p&gt;The lizard brain tells us to quit when success is near. Seth mentioned in his interview that he listens to his lizard brain&amp;#8230; and then does the opposite. If his lizard brain is quiet, he probably isn&amp;#8217;t doing anything important. If his lizard brain is screaming bloody murder, he knows he is on the right track.&lt;/p&gt;

&lt;p&gt;I picked up a couple of Seth&amp;#8217;s books, including Tribes, The Dip, and his new book, Linchpin. As I come across more interesting tidbits I will share them.&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-03T08:00:00+00:00</dc:date>
</item>
<item rdf:about="http://prog21.dadgum.com/62.html">
	<title>Programming in the 21st Century: Dehumidifiers, Gravy, and Coding</title>
	<link>http://prog21.dadgum.com/62.html</link>
	<content:encoded>For a few months I did freelance humor writing. Greeting cards, cartoon captions, that sort of thing. My sole income was from the following slogan, which ended up on a button:
&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Once I've gathered enough information for the almighty Zontaar, I'm outta here!&lt;/i&gt;
&lt;br /&gt;&lt;br /&gt;Sitting down and cranking out dozens of funny lines was hard. Harder than I expected. I gave it up because it was too draining (and because I wasn't making any money, but I digress).
&lt;br /&gt;&lt;br /&gt;Periodically I decide I want to boost my creativity. I carry around a notebook and write down conversations, lists, brainstormed ideas, randomness. I recently found one of these notebooks, so I can give some actual samples of its contents. Below half a page of &quot;Luxury Housing Developments in Central Illinois Farmland&quot; (e.g., &lt;i&gt;Arctic Highlands&lt;/i&gt;), there's a long list titled &quot;Ridiculous Things.&quot; Here are a few:
&lt;br /&gt;&lt;br /&gt;salads&lt;br /&gt;
spackle&lt;br /&gt;
key fobs&lt;br /&gt;
wine tastings&lt;br /&gt;
mulch&lt;br /&gt;
hair scrunchies&lt;br /&gt;
asphalt&lt;br /&gt;
Fry Daddy&lt;sup&gt;TM&lt;/sup&gt;&lt;br /&gt;
cinder blocks&lt;br /&gt;
relish&lt;br /&gt;
Frito Pie&lt;br /&gt;
aeration shoes
&lt;br /&gt;&lt;br /&gt;Okay, okay, I'll stop. But you get the idea.
&lt;br /&gt;&lt;br /&gt;As with the humor writing, I remember this taking lots of effort, and it took real focus to keep going. Did this improve my creativity? I'd like to think so. It certainly got me thinking in new directions and about different topics. It also made me realize something fundamental: technical creativity, such as optimizing code or thinking up clever engineering solutions, is completely different from the &quot;normal&quot; creativity that goes into writing stories or taking photos.
&lt;br /&gt;&lt;br /&gt;Years ago, I followed the development of an indie game. This was back when writing 3D games for non-accelerated VGA cards was cutting edge. The author was astounding in his coding brilliance. He kept pulling out trick after trick, and he wasn't shy about posting key routines for others to use. Eventually the game was released...and promptly forgotten. It may have been a technical masterpiece, but it was &lt;b&gt;terrible&lt;/b&gt; as game, completely unplayable.
&lt;br /&gt;&lt;br /&gt;I still like a good solution to a programming problem. I still like figuring out how to rewrite a function with half the code. But technical creativity is only one form of creativity.</content:encoded>
	<dc:date>2010-03-03T06:00:00+00:00</dc:date>
	<dc:creator>James Hague</dc:creator>
</item>
<item rdf:about="http://www.redhoterlang.com/web/58024b56bab3e66cea6994b46deef85f">
	<title>RedHotErlang: Returning a file with Nitrogen</title>
	<link>http://www.redhoterlang.com/web/plink?id=58024b56bab3e66cea6994b46deef85f</link>
	<content:encoded>&amp;lt;p&amp;gt;Let's say I want to create a file download link in my Nitrogen application. First I create a &amp;lt;em&amp;gt;src/pages/web_file.erl&amp;lt;/em&amp;gt; file, and fill it with some code:&amp;lt;/p&amp;gt;

&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;-module(web_file).
-export([main/0, title/0, body/0, event/1]).
-include...</content:encoded>
	<dc:date>2010-03-02T19:41:01+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-4167999740082219489.post-4346585784085491941">
	<title>Erlware: How to create and Erlware repository with Portius</title>
	<link>http://erlware.blogspot.com/2010/03/how-to-create-and-erlware-repository.html</link>
	<content:encoded>Erlware tools, primarily Faxien, pull Erlang packages (Applications and Releases) from a repository.  The Portius release makes it trivial for any group, company, or individual to host their own repository for their private resources. This video shows you how to use Portius to create an Erlware Erlang/OTP Package repository in just a few minutes.</content:encoded>
	<dc:date>2010-03-02T07:31:12+00:00</dc:date>
	<dc:creator>Martin J. Logan</dc:creator>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.555">
	<title>Damien Katz: BBC and CouchDB</title>
	<link>http://damienkatz.net/2010/03/bbc_and_couchdb.html</link>
	<content:encoded>&lt;blockquote&gt;&lt;div&gt;Vaguely interesting KV/#couchdb stat from the BBC - 3.3 billion requests handled since last summer, running at about 150-170 million per day&lt;/div&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://twitter.com/endafarrell/status/9820160677&quot;&gt;http://twitter.com/endafarrell/status/9820160677&lt;/a&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-03-01T22:11:06+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://www.lshift.net/blog/?p=481">
	<title>LShift on Erlang: Memory matters - even in Erlang</title>
	<link>http://www.lshift.net/blog/2010/02/28/memory-matters-even-in-erlang</link>
	<content:encoded>&lt;p&gt;
Some time ago we got an interesting bug report for &lt;a href=&quot;http://www.rabbitmq.com/&quot; id=&quot;y62y&quot; title=&quot;RabbitMQ&quot;&gt;RabbitMQ&lt;/a&gt;. Surprisingly, unlike other complex bugs, this one is easy to describe:&amp;nbsp;&lt;br /&gt;
&lt;p&gt;&lt;i&gt;At some point basic.get suddenly starts being very slow - about 9 times slower!&lt;/i&gt;&lt;/p&gt;
&lt;span id=&quot;more-481&quot;&gt;&lt;/span&gt;

&lt;p&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Basic.get doesn&amp;#8217;t do anything complex - it just pops a message from a queue. This behaviour was quite unexpected. Our initial tests confirmed that we have a problem when a queue contains thousands of elements:&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;
&lt;pre&gt;queue_length: 90001  basic_get 3333 times took: 1421.250ms
queue_length: 83335  basic_get 3333 times took: 1576.664ms
queue_length: 60004  basic_get 3333 times took: 1403.086ms
queue_length: 53338  basic_get 3333 times took: 9659.434ms [ look at that! ]
queue_length: 50005  basic_get 3333 times took: 9885.598ms
queue_length: 46672  basic_get 3333 times took: 8562.136ms&lt;/pre&gt;
&lt;p&gt;
Let me repeat that. Usually popping a message from a queue takes Xms. At some point, it slows down to 9*Xms.
&lt;/p&gt;

&lt;p&gt;It turned out that the problem is with the &lt;i&gt;&lt;a href=&quot;http://ftp.sunet.se/pub/lang/erlang/doc/man/queue.html#len-1&quot; id=&quot;d89l&quot; title=&quot;queue:length()&quot;&gt;queue:len()&lt;/a&gt;&lt;/i&gt; function, which is executed during the &lt;i&gt;basic.get&lt;/i&gt;. Actually, &lt;i&gt;queue:len()&lt;/i&gt; calls only &lt;i&gt;&lt;a href=&quot;http://www.erlang.org/doc/man/erlang.html#length-1&quot; id=&quot;somh&quot; title=&quot;erlang:length()&quot;&gt;erlang:length()&lt;/a&gt;&lt;/i&gt; builtin. At some point it switches to the &amp;#8220;slow&amp;#8221; mode.&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;i&gt;Erlang:length()&lt;/i&gt; is a builtin that iterates through a linked list and counts it&amp;#8217;s length. It&amp;#8217;s complexity is&amp;nbsp;&lt;i&gt;O(N)&lt;/i&gt;, where N is the length of the list. This function is implemented in the VM so it&amp;#8217;s expected to be very, very fast.&lt;/p&gt;

&lt;p&gt;The problem is not with &lt;i&gt;erlang:length()&lt;/i&gt; being slow. It&amp;#8217;s about being unpredictably slow. Let&amp;#8217;s take a look at Erlang interpreter source code (&lt;a href=&quot;http://github.com/yrashk/erlang/blob/master/erts/emulator/beam/erl_bif_guard.c#L328&quot; id=&quot;ii56&quot; title=&quot;erl_bif_guard.c:erts_gc_length_1&quot;&gt;erl_bif_guard.c:erts_gc_length_1&lt;/a&gt;). Here&amp;#8217;s the main loop for &lt;i&gt;erlang:length()&lt;/i&gt;:&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;i=0
while (is_list(list)) {
    i++;
    list = CDR(list_val(list));
}&lt;/pre&gt;

&lt;p&gt;It does nothing unusual - it just iterates through &lt;a href=&quot;http://en.wikipedia.org/wiki/Cons&quot; id=&quot;ag6g&quot; title=&quot;Cons&quot;&gt;list elements&lt;/a&gt;. However, recompiling Erlang with some debugging information confirms that the problem is indeed here:&lt;/p&gt;
&lt;pre&gt;clock_gettime(CLOCK_REALTIME, &amp;amp;t0);
while (is_list(list)) {
    i++;
    list = CDR(list_val(list));
}
clock_gettime(CLOCK_REALTIME, &amp;amp;t1);
td_ms = TIMESPEC_NSEC_SUBTRACT(t1, t0) / 1000000.0;
if (i &amp;gt; 200000 || td_ms &amp;gt; 2.0) {
    fprintf(stderr, &quot;gc_length_1(%p)=%i %.3fms\n\r&quot;, reg[live], i, td_ms);
}&lt;/pre&gt;

&lt;pre&gt;gc_length_1(0x7f4dbfa7fc19)=499999 2.221ms
gc_length_1(0x7f4dbfa7fc19)=499999 2.197ms
gc_length_1(0x7f4dbfa7fc19)=499999 2.208ms
(hibernation)
gc_length_1(0x7f4db0572049)=499999 13.793ms
gc_length_1(0x7f4db0572049)=499999 12.806ms
gc_length_1(0x7f4db0572049)=499999 12.531ms&lt;/pre&gt;&lt;p&gt;
This confirms Matthias&amp;#8217; initial guess - the slowdown starts after Erlang process hibernation.
&lt;/p&gt;

&lt;p&gt;For those who aren&amp;#8217;t Erlang experts:&amp;nbsp;&lt;a href=&quot;http://www.erlang.org/doc/man/erlang.html#hibernate-3&quot; id=&quot;g:63&quot; title=&quot;Hibernation&quot;&gt;Hibernation&lt;/a&gt;&amp;nbsp;is an operation that compacts an Erlang process. It does aggressive garbage collection and reduces the memory footprint of a process to absolute minimum.&lt;/p&gt;

&lt;p&gt;The intended result of hibernation is recovering free memory from the process. However its side effect is a new memory layout of objects allocated on the heap.&lt;/p&gt;

&lt;p&gt;Ah, how could I have forgotten! The &lt;a href=&quot;http://norvig.com/21-days.html#Answers&quot; id=&quot;uk7i&quot; title=&quot;memory access is slow&quot;&gt;memory is nowadays slow&lt;/a&gt;! What happens, is that before hibernation list elements are aligned differently, more dense. Whereas after hibernation they are sparse. It&amp;#8217;s easy to test it - let&amp;#8217;s count the average distance between pointers to list elements:&lt;/p&gt;
&lt;pre&gt;gc_length_1(0x7f5c626fbc19)=499999 2.229ms avg=16.000 dev=0.023
gc_length_1(0x7f5c626fbc19)=499999 3.349ms avg=16.000 dev=0.023
gc_length_1(0x7f5c626fbc19)=499999 3.345ms avg=16.000 dev=0.023
(hibernation)
gc_length_1(0x7f5c61f7d049)=499999 13.800ms avg=136.000 dev=0.266
gc_length_1(0x7f5c61f7d049)=499999 12.726ms avg=136.000 dev=0.266
gc_length_1(0x7f5c61f7d049)=499999 12.367ms avg=136.000 dev=0.266
&lt;/pre&gt;
&lt;p&gt;
&lt;div&gt;Confirmed! Standard deviation is surprisingly small, so we can read the numbers as:&lt;/div&gt;
&lt;ul&gt;&lt;li&gt;Before hibernation list elements are aligned exactly one after another, values are somewhere else.&lt;/li&gt;
&lt;li&gt;After hibernation list elements are interleaved with values.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;This behavior does make sense. In most cases when you traverse the list, you actually do something with the values. After hibernation, when you access list item, the value will be already loaded to the CPU cache.&lt;/p&gt;

&lt;p&gt;Knowing the mechanism, it&amp;#8217;s easy to write a &lt;a href=&quot;http://ai.pjwstk.edu.pl/~majek/dump/erlang-prefetch-length-test.erl&quot; id=&quot;cb:0&quot; title=&quot;test case that reproduces this behavior&quot;&gt;test case that reproduces the problem&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The average distance between pointers in my case is constant - the standard deviation is negligible. This information has a practical implication - we can &amp;#8220;predict&amp;#8221; where the next pointer will be. Let&amp;#8217;s use that information to &amp;#8220;fix&amp;#8221; the Erlang VM by &lt;a href=&quot;http://gcc.gnu.org/projects/prefetch.html&quot; id=&quot;wv5_&quot; title=&quot;prefetching memory&quot;&gt;prefetching memory&lt;/a&gt;!&lt;/p&gt;

&lt;pre&gt;while (is_list(list)) {
    i++;
    list2 = CDR(list_val(list));
    __builtin_prefetch((char*)list2 + 128*((long)list2-(long)list));
    list = list2;
}
&lt;/pre&gt;
&lt;div&gt;Test script running on original Erlang VM:&lt;/div&gt;
&lt;pre&gt;length: 300001  avg:0.888792ms dev:0.061587ms
length: 300001  avg:0.881030ms dev:0.040961ms
length: 300001  avg:0.875158ms dev:0.019436ms
hibernate
length: 300001  avg:14.861762ms dev:0.150635ms
length: 300001  avg:14.833733ms dev:0.017405ms
length: 300001  avg:14.884861ms dev:0.220119ms
&lt;/pre&gt;
&lt;div&gt;&lt;a href=&quot;http://ai.pjwstk.edu.pl/~majek/dump/erlang-R13B04-prefetch-length.diff&quot; id=&quot;n_0l&quot; title=&quot;Patched&quot;&gt;Patched&lt;/a&gt; Erlang VM:&lt;/div&gt;
&lt;pre&gt;length: 300001  avg:0.742822ms dev:0.029322ms
length: 300001  avg:0.739149ms dev:0.012897ms
length: 300001  avg:0.739465ms dev:0.014417ms
hibernate
length: 300001  avg:7.543693ms dev:0.284355ms
length: 300001  avg:7.342802ms dev:0.330158ms
length: 300001  avg:7.265960ms dev:0.053176ms
&lt;/pre&gt;
&lt;p&gt;
The test runs only a tiny bit faster for the &amp;#8220;fast&amp;#8221; case (dense &lt;a href=&quot;http://en.wikipedia.org/wiki/Cons&quot; id=&quot;khsh&quot; title=&quot;conses&quot;&gt;conses&lt;/a&gt;) and twice as fast for the &amp;#8220;slow&amp;#8221; case (sparse conses).&lt;/p&gt;

&lt;p&gt;Should this patch be merged into mainline Erlang? Not really. I have set the prefetch multiplier value to 128 and I don&amp;#8217;t even know if it&amp;#8217;s optimal. This was only an experiment. But it was fun to see how low-level system architecture can affect high-level applications.&lt;/p&gt;
&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-28T21:42:43+00:00</dc:date>
</item>
<item rdf:about="http://tragicallyleet.com/2010/02/28/moving-my-blog-to-jekyll">
	<title>Tragically L33T: Moving my Blog to Jekyll</title>
	<link>http://tragicallyleet.com/2010/02/28/moving-my-blog-to-jekyll</link>
	<content:encoded>&lt;p&gt;In the past I have not blogged very often. In fact I seem to blog less often than &lt;a href=&quot;http://wordpress.org/&quot;&gt;Wordpress&lt;/a&gt; releases a security patch. This was making me nervous and, combined with the issues of writing posts offline at events like NFJS, I decided a change was in order.&lt;/p&gt;

&lt;p&gt;Enter &lt;a href=&quot;http://github.com/mojombo/jekyll&quot;&gt;Jekyll&lt;/a&gt;, the static page blog generator behind &lt;a href=&quot;http://pages.github.com/&quot;&gt;Github Pages&lt;/a&gt;. So far the workflow of managing text files in a Git repository is working well for me. Not being able to leave well enough alone I created a Rakefile to manage certain tasks like create a tagcloud for the sidebar, creating tag specific pages listing posts, and creating a draft post.&lt;/p&gt;

&lt;p&gt;Creating a draft post was pretty straightforward:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'create a new post in draft mode'&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;task&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:new&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:require_input&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ask&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Title: &amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;downcase&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gsub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/[^a-z0-9]/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;lib/post_template.markdown&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;_drafts/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.markdown&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;'w+'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;f&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; 
    &lt;span class=&quot;n&quot;&gt;f&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gsub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/POST_TITLE/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;sh&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;git add _drafts/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.markdown&amp;quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Publishing a draft to the blog will consist of a &lt;code&gt;git mv&lt;/code&gt; of the draft file to the _posts directory with the data appended to the filename.&lt;/p&gt;

&lt;p&gt;As for comments I have switched over to Disqus, which allowed me to import my Wordpress comments and link to them on my Jekyll blog.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-28T08:00:00+00:00</dc:date>
</item>
<item rdf:about="http://www.redhoterlang.com/web/3a5df92bd3f8988b13c91c091592faba">
	<title>RedHotErlang: Nurturing creativity and the passionate programmer</title>
	<link>http://www.redhoterlang.com/web/plink?id=3a5df92bd3f8988b13c91c091592faba</link>
	<content:encoded>&amp;lt;p&amp;gt;I happened to read an article in the Harvard Business Review the other day. &amp;lt;br /&amp;gt;
The article was about how Pixar was fostering creativity among their employees. &amp;lt;br /&amp;gt;
I realized that I've been nurturing my creativity for years by spending a &amp;lt;br...</content:encoded>
	<dc:date>2010-02-27T09:11:02+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-4167999740082219489.post-1814526995021948570">
	<title>Erlware: Create an Erlang Mochiweb Web Application in Minutes Video</title>
	<link>http://erlware.blogspot.com/2010/02/create-erlang-mochiweb-web-application.html</link>
	<content:encoded>This video describes how to create a web application in Erlang/OTP with Mochiweb. This is done very quickly leveraging common OTP standards and the Erlware toolchain.This was made possible by leveraging the work to OTPify Mochiweb done at the last Chicago Erlang User Group code sprint.</content:encoded>
	<dc:date>2010-02-25T08:01:29+00:00</dc:date>
	<dc:creator>Martin J. Logan</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-2706443342944599131.post-7355340354614769648">
	<title>Chicago Erlang User Group: Erlang Development Cycles Presentations</title>
	<link>http://chicagoerlangusergroup.blogspot.com/2010/02/heres-video-from-development-cycles.html</link>
	<content:encoded>Here's the video from the Development Cycles Talk given on February 17, 2010.  Lots of great ideas in here!Development Cycles Part 1


tools used can be found at http://code.google.com/p/faxienthe github erlware accountand sinan can be found with faxien by running &quot;faxien install-release sinan&quot;Also, check out http://ecb.sourceforge.net/ for the emacs IDE mode and http://cedet.sourceforge.net/ and</content:encoded>
	<dc:date>2010-02-24T13:54:00+00:00</dc:date>
	<dc:creator>Barry Nicholson</dc:creator>
</item>
<item rdf:about="http://www.erlang-solutions.com/news/1/entry/1136">
	<title>Erlang Training and Consulting &lt;br/&gt;- News: 02 February 2010: Erlang Solutions at QCon London 2010</title>
	<link>http://www.erlang-solutions.com/news/1/entry/1136</link>
	<content:encoded>Erlang Solutions Ltd. sponsors&amp;#160; &lt;a href=&quot;http://qconlondon.com/&quot; target=&quot;_blank&quot;&gt;QCon London 2010&lt;/a&gt;, hosts the track, gives the talks and organises Erlang User Group meeting there.&lt;br /&gt;&lt;br /&gt;Qcon&amp;#160; is an annual London enterprise software development conference designed for team leads, architects and project management. It gathers Java, .NET, Ruby, SOA, Agile, Erlang and architecture communities. &lt;br /&gt;&lt;br /&gt;Erlang Solutions will be present at QCon on &lt;span&gt;Friday, 12th March 2010&lt;/span&gt;, when Ulf Wiger (CTO of Erlang Solutions) will be hosting the &lt;a href=&quot;http://qconlondon.com/london-2010/tracks/show_track.jsp?trackOID=333&quot; target=&quot;_blank&quot;&gt;Concurrency Challenge&lt;/a&gt; track. He will also give an introductory talk &lt;a href=&quot;http://qconlondon.com/london-2010/presentation/Introduction%3A+The+Concurrency+Challenge&quot; target=&quot;_blank&quot;&gt;The Concurrency Challenge&lt;/a&gt; at &lt;span&gt;10:20&lt;/span&gt; and a presentation on &lt;a href=&quot;http://qconlondon.com/london-2010/presentation/Death+by+accidental+complexity&quot; target=&quot;_blank&quot;&gt;Death by accidental complexity&lt;/a&gt; at&lt;span&gt; 4:30&lt;/span&gt; pm. &lt;br /&gt;&lt;br /&gt;Also, Francesco Cesarini (founder of Erlang Solutions) will be giving two tutorials: &quot;&lt;a href=&quot;http://qconlondon.com/london-2010/presentation/Practical+Erlang+Programming&quot; target=&quot;_blank&quot;&gt;Practical Erlang Programming&lt;/a&gt;&quot; on Monday, &lt;span&gt;8th March&lt;/span&gt; and &quot;&lt;a href=&quot;http://qconlondon.com/london-2010/presentation/Erlang%2FOTP+System+Principles&quot; target=&quot;_blank&quot;&gt;Erlang/OTP System Principles&lt;/a&gt;&quot; on Tuesday, &lt;span&gt;9th March&lt;/span&gt;. These are an all- day events,&amp;#160; will start at 9:00 and finish at 16:00.&amp;#160; &lt;br /&gt;&lt;br /&gt;A day before, on &lt;span&gt;11th March 2010 from 18:30 until 20:30&lt;/span&gt; Erlang Solutions organises special free &lt;a href=&quot;https://secure.trifork.com/london-2010/freeevent/register.m?eventOID=2344&quot; target=&quot;_blank&quot;&gt;London Erlang User Group Meeting&lt;/a&gt; at QCon. Everyone is welcome, even if you do not participate in QCon London 2010, just register &lt;a href=&quot;https://secure.trifork.com/london-2010/freeevent/register.m?eventOID=2344&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.There will be four talks:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Francesco Cesarini&lt;/span&gt; presents &quot;Erlang community around the world&quot; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;Ulf Wiger&lt;/span&gt; talks about &quot;Erlang in the Clouds&quot; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;Justin Sheehy&lt;/span&gt; will present &quot;Introduction to RIAK&quot; &amp;#38; &lt;/li&gt;
&lt;li&gt;&lt;span&gt;Joe Armstrong&lt;/span&gt; talks about &quot;Erlang Libraries&quot;&lt;/li&gt;&lt;/ul&gt;QCON 2010 will be held in &lt;a href=&quot;http://www.qeiicc.co.uk/&quot; target=&quot;_blank&quot;&gt;The Queen Elizabeth II Conference Centre&lt;/a&gt;, in London from &lt;span&gt;8th until 12th March 2010.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&amp;#160;&lt;span&gt;See you there! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://www.qconlondon.com/&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://www.erlang-consulting.com/../../upload/images/42/logo_qcon.gif&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Tutorials: March 8-9, 2010&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Conference:&amp;#160; March 10-12, 2010&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;When registering for the QCon, use the Discount Code &quot;erlangug&quot; and save&amp;#160; &amp;#163;50 off the price!&lt;br /&gt;
 

&lt;/span&gt;&lt;/div&gt;








  


      &lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:57:16+00:00</dc:date>
</item>
<item rdf:about="http://www.erlang-solutions.com/news/1/entry/1139">
	<title>Erlang Training and Consulting &lt;br/&gt;- News: 22 February 2010: Call for Summer 2010 Internships!</title>
	<link>http://www.erlang-solutions.com/news/1/entry/1139</link>
	<content:encoded>Erlang Solutions regularly provides summer internships for qualified IT students. Many former interns have said that it was the best learning experience they have ever had. We are currently interviewing for this year's summer
internships.&lt;br /&gt;&lt;br /&gt;We are located in the heart of
London. See &lt;a href=&quot;http://www.erlang-consulting.com/section/60/office-locations&quot; target=&quot;_blank&quot;&gt;contact us&lt;/a&gt; section. Applicants from all over the world are encouraged to seek the positions
(we have 9 nationalities represented in our offices) but to apply, you
have to be eligible to work in the EU. &lt;br /&gt;&lt;br /&gt;The Internships run from June 1 until the end of August, and can continue through September, depending upon student availability and interest.&lt;br /&gt;&lt;br /&gt;For more information and to apply, please visit our Jobs section &lt;a href=&quot;http://www.erlang-consulting.com/jobs/detail/21/undergraduate-summer-interns&quot; target=&quot;_self&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:57:16+00:00</dc:date>
</item>
<item rdf:about="http://kevin.scaldeferri.com/blog/2009/04/28/AlphaProgrammersAndWomen.html">
	<title>Kevin Scaldeferri's Weblog: Alpha Male Programmers &lt;em&gt;Are&lt;/em&gt; Driving Women Out</title>
	<link>http://kevin.scaldeferri.com/blog/2009/04/28/AlphaProgrammersAndWomen.html</link>
	<content:encoded>&lt;p&gt;Yesterday, DHH made an argument that &lt;a href=&quot;http://www.loudthinking.com/posts/40-alpha-male-programmers-arent-keeping-women-out&quot;&gt;alpha
  male programmers aren’t keeping women out&lt;/a&gt; of the tech field.
  I’m of the opinion that he’s wrong and that his argument is flawed,
  and in a moment I’ll explain why, but let me get a few things out of
the way so they don’t distract from the rest of my argument.&lt;/p&gt;
&lt;p&gt;First, I don’t think that “alpha males” or the “rockstar” mentality
are the only causes of under-representation of women in technology. As
far as I can tell, the causes are many, varied, generally difficult to
  deal with, and in one or two cases may even be valid reasons why we
  might ultimately accept some degree of imbalance in the
  field. Second, this is not strictly a gender issue.  Some men are
  also driven away by this behavior, although I think women are more
  likely to be; and also some “alpha males” happen to be female.
  Third, this is not a personal attack on DHH or any other individual,
although some people might read parts of it in that way.  But my goal
  here is that the range of individuals who find themselves
  uncomfortably reflected in what I say, but don’t simply reject it
  all out of hand, might view that discomfort as an opportunity for
  personal growth.  Finally, I am certainly not claiming that I am
  perfect in this regard.  I’ve made mistakes in the past; I will make
them again.  I simply hope that my friends will be kind enough to
  point out my mistakes to me, so that I can try to do better.&lt;/p&gt;
&lt;p&gt;Okay, now that that’s all out of the way...&lt;/p&gt;
&lt;p&gt;I first claim that DHH is wrong.  My proof is empirical and
  anecdotal, but fortunately for me, I’m on the side of this debate
  that gets to use those techniques.  I.e., I’m asserting existence of
a phenomenon, rather than non-existence.  I know numerous women who
  have been driven away by alpha male behavior.  In some cases, they
  simply moved to a different team, or a different company.  In other
  cases, they switched to non-programmer roles.  And some left the
  industry entirely.  I know this because they told me.  They
  described specific individuals and specific behaviors which drove
  them away.&lt;/p&gt;
&lt;p&gt;With some frequency in these debates, male programmers
  will claim that they don’t know any women who have left the field
  for this reason (or who have experienced sexism in the field, or who
  were offended by the example under discussion, or even just the
  milder claim that DHH makes, that no one has any idea what to do).
  I can explain this in only one of two ways: either they don’t know
  any women in the field to begin with or don’t talk with them beyond
  the minimal professional requirements, or women are not telling them
because they are part of the problem.  Perhaps it would be more
  effective if these women directly confronted the people causing the
  problem, but the fact of the matter is that most people, men and
  women, dislike conflict.  We’re much more comfortable griping to a
  sympathetic friend than to the cause of our unhappiness.  So
  consider me something akin to an anonymizing proxy.  Without
  revealing names or too many of the specifics, please trust me when I
say that almost every woman in the field experiences and complains
  about this.&lt;/p&gt;
&lt;p&gt;Now I also said that DHH’s argument is flawed, and I will spend the
rest of this post pointing out the various flaws I see.&lt;/p&gt;
&lt;p&gt;DHH claims alpha males cannot be a problem in programming because
  the average male programmer is “meek, tame, and introverted”
  compared to other fields.  First off, “alpha males” are by definition
not average; they are the most dominant individuals of a group.  And,
  it may even be possible that the general meekness or introversion of
programmers makes it easier for a small set of individuals to dominate
the interaction, rather than reaching a condition of detente between a
group of uniformly assertive individuals.  Second, presumably DHH does
not interact with these people from other fields in a professional
  context.  A point repeatedly stressed in this recent “pr0n star”
  controversy is that it’s not an issue of people being anti-sex or anti-porn; it’s
  about what’s appropriate in the workplace, or in a professional
  context.  Standards for behavior in a social context are different.
Third, he speaks in terms of whether these other men are more or less
  “R-rated”.  This is not the point.  Women are just as “R-rated” as
  men.  They curse.  They talk about sex (often more explicitly than
  men).  The issue is not about whether we say or do adult things,
  it’s about whether we respect each other as human beings and whether
we understand the societal norms of what is and is not appropriate in
  particular contexts.  In fact, in this regard, I’ll defend DHH.
  Saying “fuck” (in the exclamatory, non-sexual usage) in the course
  of a technical presentation is not problematic in this day and age
  within the technology community.  I think most of us swear freely in
the course of struggling with a nasty bug or production problem.  This
is a normative expression of frustration within our community, and it
  does not oppress or disrespect other members of the community.  (As
  far as I know.  It’s possible that people just aren’t telling me
  that it upsets them when I curse at my monitor.  If that’s the case,
  I hope someone will tell me.)  Finally, DHH observes that these
  other fields have a more even mix of men and women.  What he misses
  is that when the distribution is relatively equal it is generally
  easier and more comfortable for men to be men and women to be
  women.  It is perhaps counterintuitive, but environments which are
  heavily skewed call for greater sensitivity to gender or other
  cultural differences simply because it is so easy to
  unintentionally create an oppressive or exclusionary atmosphere.&lt;/p&gt;
&lt;p&gt;In the final paragraphs of his post, DHH suggests that somehow by
  respecting women we are squashing some other sort of “edge” and
  diversity in the community.  I’m a little puzzled by what he means
  by this, and I’m sort of afraid that he thinks that being a
  heterosexual male who likes to look at scantily-clad women (or who
  openly admits as much) is somehow “edgy”.  It’s not.  By
  definition, hetero males like women; and it’s well established that
  men tend to be visually oriented.  Pointing out that you fall in
  this category does not make you “diverse”, it makes you a completely
  typical representative of your gender and orientation.  No one needs
to be reminded of it.&lt;/p&gt;
&lt;p&gt;Moreover, it might be true that maximal gains are had by pushing
  the edges (although I don’t think that one should naively assume
  that analogy from physics or economics applies to social
  endeavors), but for this to be work there has to be negative
  feedback when boundaries are crossed.  If the edge-walkers want
  society to accept their behavior, they must be prepared to
  apologize, to make reparations, and to correct their course when
  they go over the line.  This is the difference between a
  trend-setter and a sociopath.&lt;/p&gt;
&lt;p&gt;There’s quite a bit more that I could say on this issue, but I fear
this may be becoming too long already, and I think it’s probably best
  to focus only on the arguments presented in this particular post at
  the moment.  To summarize things in a couple of sentences, the
  phenomenon of women being discouraged by alpha male behavior is
  real.  You merely need to talk, and listen, to women in the field to
verify this.  (But you might have to earn some trust first.)
  Comparisons with men in other fields in non-professional settings do
not have much relevance to the matter at hand.  Claims that respecting
the feelings and experiences of a minority group is damaging to the
  community overall are extraordinary and require extraordinary
  support.  Being a thought leader and being offensive are two very
  different things.&lt;/p&gt;
&lt;p&gt;It’s really quite discouraging that so much of this discussion
  still seems mired in the question of whether a problem even exists,
  or whether it is desirable and possible to address the problem.
  This lack of acceptance leads both to the explicit refusals to
  acknowledge the validity of the complaints of the offended, as well
  as the phenomena of false apologies and insincere claims that “I
  would help if only I knew how (and if it doesn’t require any actual
  change of behavior on my part)”.  Male programmers need to pull
  their heads out of the sand.  The evidence, both hard statistical
  data and anecdotal, is overwhelming.  It also is not hard to find
  advice about what can be done differently.  The hard part is moving
  from a vague desire for diversity and balance to serious,
  meaningful, sometimes painful self-examination and commitment to
  change and improvement.  It’s not easy to admit flaws in yourself,
  to acknowledge when you’ve hurt another person, or to make a true
  apology.  Change doesn’t happen overnight or simply because you say
  that you want it to.  It takes work, but it’s an important part of
  being a human being and being a member of a community.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;http://kevin.scaldeferri.com/blog/2009/04/28/AlphaProgrammersAndWomen.html#comments&quot;&gt;Comments&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-24T10:57:04+00:00</dc:date>
</item>
<item rdf:about="http://kevin.scaldeferri.com/blog/2009/05/08/RailsRackResponse.html">
	<title>Kevin Scaldeferri's Weblog: Speeding up a Rails request by 150ms by changing 1 line</title>
	<link>http://kevin.scaldeferri.com/blog/2009/05/08/RailsRackResponse.html</link>
	<content:encoded>&lt;p&gt;We’re pretty obsessed with performance at &lt;a href=&quot;http://www.gilt.com/&quot;&gt;Gilt Groupe&lt;/a&gt;.  You can get a taste
  for what we’re dealing with, and how we’re dealing with it, from our
  recent &lt;a href=&quot;http://en.oreilly.com/rails2009/public/schedule/detail/8505&quot;&gt;presentation at RailsConf&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;One of the techniques we’re using is to precompute what certain
  high-volume pages will look like at a given time in the future, and
  store the result as static HTML that we serve to the actual users at
that time.  For ease of initial development, and because there’s still
  a fair bit of business logic involved in determining &lt;em&gt;which
  version&lt;/em&gt; of a particular page to serve, this was done inside our
  normal controller actions which look for a static file to serve,
  before falling back to generating it dynamically.&lt;/p&gt;
&lt;p&gt;We’re now running on Rails 2.3 and, of course, Rails Metal is the
  new hotness in 2.3.  I spent the last couple days looking into how
  much improvement in static file serving we would see by moving it
  into the Metal layer.  Based on most of what I’ve read, I expected
  we might shave off a couple milliseconds.  This expectation turned
  out to be dramatically wrong.&lt;/p&gt;
&lt;p&gt;Metal components operate outside the realm of the usual Rails
  timing and logging components, so you don’t get any internal
  measurements of page performance.  Instead, I fired up &lt;a href=&quot;http://httpd.apache.org/docs/2.0/programs/ab.html&quot;&gt;ab&lt;/a&gt; to measure
the serving times externally.  What I found for the page I was
  benchmarking was that the Metal implementation took about 5ms.  The
  old controller action took 170ms.  But, wait... the Rails logs were
  only reporting 8ms for that action.  Something was fishy.&lt;/p&gt;
&lt;p&gt;I started inserting timers at various places in the Rails stack,
  trying to figure out where the other 160ms was going.  A little bit
  was routing logic and other miscellaneous overhead, but even setting
a timer around the very entry points into the Rails request serving
  path, I was only seeing 15ms being spent.  This was getting really
  puzzling, because at this point where a Rack response is returned to
the web server, I expected things to look identical between Metal and
  ActionController.  However, looking more closely at the response
  objects I discovered the critical difference.  The Metal response
  returns an &lt;code&gt;[String]&lt;/code&gt;, while the controller returned an
  ActionController::Response.&lt;/p&gt;
&lt;p&gt;I went into the Rails source and found the &lt;code&gt;each&lt;/code&gt; method
for ActionController::Response.  Here it is:&lt;/p&gt;
&lt;pre&gt;
   def each(&amp;amp;callback)
     if @body.respond_to?(:call)
       @writer = lambda { |x| callback.call(x) }
       @body.call(self, self)
     elsif @body.is_a?(String)
       @body.each_line(&amp;amp;callback)
     else
       @body.each(&amp;amp;callback)
     end

     @writer = callback
     @block.call(self) if @block
   end
&lt;/pre&gt;
&lt;p&gt;The critical line is the case where the body is a String.  The code
iterates over each line in the response.  Each line is written
  individually to the network socket.  In the case of the particular
  page I was looking at, that was 1300 writes.  Ouch.&lt;/p&gt;
&lt;p&gt;To confirm this was the problem, I changed that line to&lt;/p&gt;
&lt;pre&gt;
      yield @body
&lt;/pre&gt;
&lt;p&gt;With the whole body being sent in a single write, ab reported 15ms
  per request, right in line with what I measured inside Rails.&lt;/p&gt;
&lt;p&gt;1 line changed.  150ms gained.  Not too bad.&lt;/p&gt;
&lt;p&gt;This sort of performance pessimization we uncovered is particularly insidious
  because it’s completely invisible to all the usual Rails
  monitoring tools.  It doesn’t show up in your logged response time;
  you won’t see it in NewRelic or TuneUp.  The only way you’re going
  to find out about it is by running an external benchmarking tool.
  Of course, this is always a good idea, but it’s easy to forget to do
  it, because the tools that work inside the Rails ecosystem are so
  nice.  But the lesson here is, if you’re working on performance
  optimizations, make sure to always get a second opinion.&lt;/p&gt;

  &lt;p&gt;&lt;a href=&quot;http://kevin.scaldeferri.com/blog/2009/05/08/RailsRackResponse.html#comments&quot;&gt;Comments&lt;/a&gt;&lt;p&gt;&lt;/p&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-24T10:57:04+00:00</dc:date>
</item>
<item rdf:about="http://www.trapexit.org/forum/viewtopic.php?p=50720#50720">
	<title>Trapexit News Feed: Trapexit News :: Erlang Open Source crawler!</title>
	<link>http://www.trapexit.org/forum/viewtopic.php?p=50720#50720</link>
	<content:encoded>Author: &lt;a href=&quot;http://www.trapexit.org/forum/profile.php?mode=viewprofile&amp;u=2&quot; target=&quot;_blank&quot;&gt;admin&lt;/a&gt;&lt;br /&gt;
Subject: Erlang Open Source crawler!&lt;br /&gt;
Posted: Thu Nov 19, 2009 4:22 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class=&quot;postbody&quot;&gt;Trapexit is proud to announce its own Erlang open source crawler. We crawl the web for you, gathering searchable information on all open source Erlang projects from all the major repositories. You can discuss these projects in the forum, add documentation in the trapexit wiki or rate the various contributions. To view our new project index repository, visit &lt;a href=&quot;http://projects.trapexit.org&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://projects.trapexit.org&lt;/a&gt;.
&lt;/span&gt;&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:56:53+00:00</dc:date>
</item>
<item rdf:about="http://www.trapexit.org/forum/viewtopic.php?p=47819#47819">
	<title>Trapexit News Feed: Trapexit News :: Navigating The Erlang Source!</title>
	<link>http://www.trapexit.org/forum/viewtopic.php?p=47819#47819</link>
	<content:encoded>Author: &lt;a href=&quot;http://www.trapexit.org/forum/profile.php?mode=viewprofile&amp;u=183&quot; target=&quot;_blank&quot;&gt;francesco&lt;/a&gt;&lt;br /&gt;
Subject: Navigating The Erlang Source!&lt;br /&gt;
Posted: Thu Aug 20, 2009 2:24 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class=&quot;postbody&quot;&gt;While trapexit user zghst was looking at the erlang source, there was quite a bit of information about it he felt was missing or hard to find. As a result, he started a wiki page to help new people like him find their way around it: &lt;a href=&quot;http://www.trapexit.org/A_Guide_To_The_Erlang_Source&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;A Guide To The Erlang Source&lt;/a&gt;. Why not give him a hand in improving it?
&lt;/span&gt;&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:56:53+00:00</dc:date>
</item>
<item rdf:about="http://erlang-factory.com/news/rss/bed8891c36d68c78282a3aa1bbceda03">
	<title>Erlang Factory News: Early Bird Saver - only two weeks left!</title>
	<link></link>
	<content:encoded>You only have two weeks left to take advantage of our &lt;span&gt;Early Bird &lt;/span&gt;special offers. &lt;a href=&quot;https://www.erlang-factory.com/conference/SFBay2010/register&quot;&gt;Sign-up&lt;/a&gt; for the &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010&quot;&gt;Erlang Factory&lt;/a&gt; &lt;span&gt;before 28th February 2010&lt;/span&gt; and &lt;span&gt;SAVE $200&lt;/span&gt; off the standard price! &lt;br /&gt;&lt;br /&gt;When registering, you can also sign up for the Erlang University courses and choose from: &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/university/ErlangExpress&quot;&gt;Erlang Express&lt;/a&gt;, &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/university/OTPExpress&quot;&gt;Erlang OTP Express&lt;/a&gt;, &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/university/QuickCheck&quot;&gt;QuickCheck for Erlang developers&lt;/a&gt; and &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/university/WebProgrammingwithErlang&quot;&gt;Web Programming with Erlang&lt;/a&gt;. The discount applies to the courses as well. &lt;br /&gt;&lt;br /&gt;&lt;span&gt;Don't miss out - &lt;a href=&quot;https://www.erlang-factory.com/conference/SFBay2010/register&quot;&gt;book&lt;/a&gt; your place today!&lt;/span&gt;&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:56:23+00:00</dc:date>
</item>
<item rdf:about="http://erlang-factory.com/news/rss/c32ba4d29413abf71eb07e4bfd97917a">
	<title>Erlang Factory News: Book your hotel room for the Erlang Factory!</title>
	<link></link>
	<content:encoded>The 2010 Erlang Factory will be held at the &lt;a href=&quot;http://www.erlang-factory.com/conference/SFBay2010/venue&quot;&gt;Hilton San Francisco Airport&lt;/a&gt;. You can now book your hotel room there for the &lt;span&gt;GREAT CONFERENCE RATE&lt;/span&gt;! For rooms with a Kingsize bed, delegates will pay only &lt;span&gt;$109.00 per night&lt;/span&gt; – room only, with &lt;span&gt;FREE PARKING&lt;/span&gt; and &lt;span&gt;FREE WI-FI &lt;/span&gt;in the rooms for delegates.&lt;br /&gt;&lt;br /&gt;To book for the special Erlang Factory rate click &lt;a href=&quot;http://www.hilton.com/en/hi/groups/personalized/SFOAPHF-EFB-20100322/index.jhtml&quot;&gt;HERE&lt;/a&gt;.&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:56:23+00:00</dc:date>
</item>
<item rdf:about="http://blog.ribomation.com/2009/08/06/generating-prime-numbers-with-erlang-and-java/">
	<title>RiboComments/Erlang: Generating prime numbers with Erlang and Java</title>
	<link>http://blog.ribomation.com/2009/08/06/generating-prime-numbers-with-erlang-and-java/</link>
	<content:encoded>During my work with the course-ware of a new Erlang course, I experimented with one of the programming assignments to compare the threading performance of Erlang versus Java. The assignment is one of the classical programs from teaching concurrent programming: How to generate prime numbers using a pipeline of sieve ...</content:encoded>
	<dc:date>2010-02-24T10:56:23+00:00</dc:date>
</item>
<item rdf:about="http://blog.ribomation.com/2009/07/31/the-critical-section-problem-in-erlang/">
	<title>RiboComments/Erlang: The critical section problem in Erlang</title>
	<link>http://blog.ribomation.com/2009/07/31/the-critical-section-problem-in-erlang/</link>
	<content:encoded>The programming language Erlang is based on micro-threads and asynchronous message passing. There is a (naive) belief that critical section problems cannot arise in languages based solely on message passing. The justification for this stand-point is the absence of mutex synchronization primitives, which is absolutely essential in shared-data based concurrent ...</content:encoded>
	<dc:date>2010-02-24T10:56:23+00:00</dc:date>
</item>
<item rdf:about="http://www.erlang-solutions.com/jobs/detail/20/">
	<title>Erlang Training and Consulting &lt;br/&gt;- Jobs: Junior and senior superhackers wanted, Sweden</title>
	<link>http://www.erlang-solutions.com/jobs/detail/20/</link>
	<content:encoded>&lt;span&gt;&lt;/span&gt;Facebook, Google and Amazon have with great success been using new technologies and tools to build high performance and reliable services on the Internet. Now our client is looking for great programmers who want to take these technologies even further. These positions are especially interesting to those of you wishing to join an exceptional development team with some of the worlds most renown Erlang programmers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The position&lt;br /&gt;&lt;br /&gt;Our client is looking for new colleagues who can help develop the system which is the core of our client services that serve millions of consumers around Scandinavia. You will have the opportunity to learn Erlang - a functional and concurrent programming language which makes it easy to program in mulitcore and distributed environments.&lt;br /&gt;&lt;br /&gt;As a developer your work will help our client reach 1,5 million consumers and support the 4000 e-stores that daily work in the system. Your code will analyse and process transactions for several billion kronor per year in a complex and distributed environment.&lt;br /&gt;&lt;br /&gt;In your work you will cooperate closely with the rest of the development department in an atmosphere of performance and entrepreneurship. If you have the ambition to grow and learn then we have the tools and desire to help you do so. We have chosen to create a development department that stimulates every developer and gives them great personal freedom. We develop using the Scrum agile methodology with two week iterations, or sprints, and each team has great freedom to organise it's own work.&lt;br /&gt;&lt;br /&gt;Our client is looking for those of you who are very talented programmers with a love of writing high-quality code have a strong desire to get things done want to work with the latest technologies within web (e.g. Erlang, Ajax and Google-wave) are creative and innovative are analytical can work independently are interested in usability have an academic qualification, preferably within Computer Science or a similar subject love to program in functional languages (e.g. Erlang, Haskell, Scheme) or modern high level languages such as Scala, Ruby and Python.&lt;br /&gt;&lt;br /&gt;We look positively on candidates with experience of: GUI-development, internet banks, distributed databases, Scrum, electronic payment methods, statistical analysis, Erlang, XML, HTML, Yaws, OTP, Mnesia.&lt;br /&gt;&lt;br /&gt;To qualify for the position you are expected to pass several tests most of which are designed to test your ability as a programmer. A typical test question could be &quot;write a function which compares two strings containing persons full names and checks to see if they are identical except for the order of the names&quot;.&amp;#160;</content:encoded>
	<dc:date>2010-02-24T10:55:33+00:00</dc:date>
</item>
<item rdf:about="http://www.erlang-solutions.com/jobs/detail/21/">
	<title>Erlang Training and Consulting &lt;br/&gt;- Jobs: Undergraduate Summer Interns, London, UK</title>
	<link>http://www.erlang-solutions.com/jobs/detail/21/</link>
	<content:encoded>Erlang Solutions is currently interviewing for its summer
internships. As in previous years, we are looking for bright,
dedicated, motivated, curious and self-driven individuals in their
second to fourth year of studies the field of Computer Science.
Exposure to Erlang and Unix derivatives (preferably Linux) are a must.
The right candidates will be working with exciting new projects (SMS,
Telecom, E-Commerce, Instant Messaging, Banking) with some of the best
Erlang developers around. And as a bonus, you will be in the heart of
London. Applicants from all over are encouraged to seek the positions
(We have 9 nationalities represented in our offices), but to apply, you
have to be eligible to work in the EU. Let us have your CVs and a
covering letter, letting us know about yourselves, your hobby projects,
and why you want to work with us at Erlang Solutions. We
need your application at the latest on the &lt;span&gt;30th of April.
&lt;/span&gt;</content:encoded>
	<dc:date>2010-02-24T10:55:33+00:00</dc:date>
</item>
<item rdf:about="http://www.trapexit.org/forum/viewtopic.php?p=51128#51128">
	<title>Erlang Announce List: Erlang announce mailing list :: Erlang/OTP now at Github</title>
	<link>http://www.trapexit.org/forum/viewtopic.php?p=51128#51128</link>
	<content:encoded>Author: Anonymous&lt;br /&gt;
Subject: Erlang/OTP now at Github&lt;br /&gt;
Posted: Wed Nov 25, 2009 2:14 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class=&quot;postbody&quot;&gt;The official git repository for Erlang/OTP can now be found at Github:
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://github.com/erlang/otp&quot; target=&quot;_blank&quot;&gt;http://github.com/erlang/otp&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
Build instructions can be found at:
&lt;br /&gt;

&lt;br /&gt;
&lt;a href=&quot;http://wiki.github.com/erlang/otp&quot; target=&quot;_blank&quot;&gt;http://wiki.github.com/erlang/otp&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
We plan to add more wiki pages with additional information in the
&lt;br /&gt;
near future.
&lt;br /&gt;

&lt;br /&gt;
-- 
&lt;br /&gt;
Björn Gustavsson, Erlang/OTP, Ericsson AB
&lt;br /&gt;

&lt;br /&gt;
________________________________________________________________
&lt;br /&gt;
erlang-announce mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;
&lt;br /&gt;
erlang-announce (at) erlang.org
&lt;br /&gt;

&lt;br /&gt;
 Post received from mailinglist
&lt;/span&gt;&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:55:04+00:00</dc:date>
</item>
<item rdf:about="http://www.trapexit.org/forum/viewtopic.php?p=51124#51124">
	<title>Erlang Announce List: Erlang announce mailing list :: Erlang/OTP R13B03 has been released</title>
	<link>http://www.trapexit.org/forum/viewtopic.php?p=51124#51124</link>
	<content:encoded>Author: Anonymous&lt;br /&gt;
Subject: Erlang/OTP R13B03 has been released&lt;br /&gt;
Posted: Wed Nov 25, 2009 1:56 pm (GMT 0)&lt;br /&gt;
Topic Replies: 0&lt;br /&gt;&lt;br /&gt;
&lt;span class=&quot;postbody&quot;&gt;Bug fix release : otp_src_R13B03
&lt;br /&gt;
Build date      : 2009-11-23
&lt;br /&gt;

&lt;br /&gt;
This is R13B03, the third maintenance release for the R13B major release.
&lt;br /&gt;

&lt;br /&gt;
You can find the README file for the release at
&lt;br /&gt;

&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_src_R13B03.readme&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_src_R13B03.readme&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
The source distribution and binary distribution for Windows can be
&lt;br /&gt;
downloaded from
&lt;br /&gt;

&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_src_R13B03.tar.gz&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_src_R13B03.tar.gz&lt;/a&gt;
&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_win32_R13B03.exe&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_win32_R13B03.exe&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
The distribution can also be downloaded using the BitTorrent
&lt;br /&gt;
protocol. Use the following torrent files to download the source
&lt;br /&gt;
distribution and binary distribution for Windows:
&lt;br /&gt;

&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_src_R13B03.tar.gz.torrent&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_src_R13B03.tar.gz.torrent&lt;/a&gt;
&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_win32_R13B03.exe.torrent&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_win32_R13B03.exe.torrent&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
Note: To unpack the TAR archive you need a GNU TAR compatible program.
&lt;br /&gt;

&lt;br /&gt;
For installation instructions please read the README file that is part
&lt;br /&gt;
of the distribution.
&lt;br /&gt;

&lt;br /&gt;
The on-line documentation can be found at: &lt;a href=&quot;http://www.erlang.org/doc/&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/doc/&lt;/a&gt;
&lt;br /&gt;
You can also download the complete HTML documentation or the Unix manual files
&lt;br /&gt;

&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_doc_html_R13B03.tar.gz&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_doc_html_R13B03.tar.gz&lt;/a&gt;
&lt;br /&gt;
  &lt;a href=&quot;http://www.erlang.org/download/otp_doc_man_R13B03.tar.gz&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/download/otp_doc_man_R13B03.tar.gz&lt;/a&gt;
&lt;br /&gt;

&lt;br /&gt;
We also want to thank those that sent us patches, suggestions and bug
&lt;br /&gt;
reports,
&lt;br /&gt;

&lt;br /&gt;
The OTP Team
&lt;br /&gt;

&lt;br /&gt;
-- 
&lt;br /&gt;
Björn Gustavsson, Erlang/OTP, Ericsson AB
&lt;br /&gt;

&lt;br /&gt;
________________________________________________________________
&lt;br /&gt;
erlang-announce mailing list. See &lt;a href=&quot;http://www.erlang.org/faq.html&quot; target=&quot;_blank&quot;&gt;http://www.erlang.org/faq.html&lt;/a&gt;
&lt;br /&gt;
erlang-announce (at) erlang.org
&lt;br /&gt;

&lt;br /&gt;
 Post received from mailinglist
&lt;/span&gt;&lt;br /&gt;</content:encoded>
	<dc:date>2010-02-24T10:55:04+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-855944390206940143.post-8276989122488926253">
	<title>EazyErl!: Filtering lines efficiently</title>
	<link>http://easyerl.blogspot.com/2010/02/filtering-lines-efficiently.html</link>
	<content:encoded>Whenever you are dealing with log lines or that you're program is filtering data you always have to handle 'escaping' efficiently.&lt;br /&gt;&lt;br /&gt;While developing a log module using a gen_event, I needed to escape simple quotes.&lt;br /&gt;Sometime thoses quotes were already escaped...&lt;br /&gt;&lt;br /&gt;I've found this regexp to handle gracefully the case:&lt;br /&gt;&lt;pre&gt;re:replace( Bin, &quot;(?&amp;lt;!\\\\)'&quot;, &quot;\\\\'&quot;, [ global ] ).&lt;br /&gt;&lt;/pre&gt;&lt;a name=&quot;more&quot;&gt;&lt;/a&gt;&lt;br /&gt;Not so easy to read, and because of the various backslashes, this regexp needed some tests&lt;br /&gt;before being fully usable.&lt;br /&gt;Basically this regexp only filter simple quote when they're not already escaped...&lt;br /&gt;&lt;br /&gt;Now that I've my filter for quotes and I need a filter for newline characters.&lt;br /&gt;Everytime you find some newlines in your log files, you can be sure that many tools already in your network will not treat them efficiently, worse this may break everything after ...&lt;br /&gt;&lt;br /&gt;So I came across this regexp:&lt;br /&gt;&lt;pre&gt;re:replace( Bin, &quot;[\\n\\r]+&quot;, &quot; &quot;, [ global ] ).&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Finally having two filter functions for every line, I wanted to be able to add or remove easily any function.&lt;br /&gt;You can reference functions with this notation:&lt;br /&gt;&lt;pre&gt;fun filterquotes/1&lt;br /&gt;&lt;/pre&gt;Or a list of functions:&lt;br /&gt;&lt;pre&gt;[ fun filterquotes/1, fun filternewlines/1 ]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;With this notation and the famous 'lists:foldl', I can filter a line with many functions quite nicely:&lt;br /&gt;&lt;pre&gt;% Data is the accumulator, but we don't change it :)&lt;br /&gt;        lists:foldl( fun( Fun, Data ) -&gt;&lt;br /&gt;                         Fun(Data) &lt;br /&gt;        end, Bin, [ fun filterquotes/1, fun filternewline/1 ]).&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here's the code:&lt;br /&gt;&lt;pre&gt;filter( Bin ) when is_atom(Bin) -&gt;&lt;br /&gt;        Bin;&lt;br /&gt;filter( Bin ) when is_integer(Bin) -&gt;&lt;br /&gt;        Bin;&lt;br /&gt;filter( Bin ) -&gt;&lt;br /&gt;        lists:foldl( fun( Fun, Data ) -&gt;&lt;br /&gt;                         Fun(Data) &lt;br /&gt;        end, Bin, [ fun filterquotes/1, fun filternewline/1 ]).&lt;br /&gt;&lt;br /&gt;filterquotes(Bin) -&gt;&lt;br /&gt;        re:replace( Bin, &quot;(?&amp;lt;!\\\\)'&quot;, &quot;\\\\'&quot;, [ global ] ).&lt;br /&gt;&lt;br /&gt;filternewline( Bin ) -&gt;&lt;br /&gt;        re:replace( Bin, &quot;[\\n\\r]+&quot;, &quot; &quot;, [ global ] ).&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/855944390206940143-8276989122488926253?l=easyerl.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2010-02-24T09:00:02+00:00</dc:date>
	<dc:creator>rolphin</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-855944390206940143.post-5533665012407705943">
	<title>EazyErl!: Reading an openssl .priv.key file and extracting the key</title>
	<link>http://easyerl.blogspot.com/2010/02/reading-openssl-privkey-file-and.html</link>
	<content:encoded>Extracting the private key from a .priv.key file is simple.&lt;br /&gt;The private key is encrypted using a AES-128 with your passphrase.&lt;br /&gt;&lt;br /&gt;The initial vector is also stored in the file, you can extract it directly from the first line:&lt;br /&gt;&lt;pre&gt;get_salt( &quot;Salted__&quot;, Salt:8/binary, Rest/binary&gt;&gt; ) -&gt;&lt;br /&gt;        {Salt, Rest}.&lt;br /&gt;&lt;/pre&gt;&lt;a name=&quot;more&quot;&gt;&lt;/a&gt;&lt;br /&gt;The last part is handled by some md5() of your passphrase and the initial vector:&lt;br /&gt;&lt;pre&gt;Key = crypto:md5([ Password, Salt ]),&lt;br /&gt;        IV = crypto:md5([ Key, Password, Salt ]),&lt;br /&gt;        crypto:aes_cbc_128_decrypt( Key, IV, Rest).&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now the full module:&lt;br /&gt;&lt;pre&gt;-module(priv_key).&lt;br /&gt;&lt;br /&gt;-compile(export_all).&lt;br /&gt;&lt;br /&gt;priv_key_file( File, Password ) -&gt;&lt;br /&gt;        {ok, Bin} = file:read_file(File),&lt;br /&gt;        {Salt, Rest} = get_salt(Bin),&lt;br /&gt;        Key = crypto:md5([ Password, Salt ]),&lt;br /&gt;        IV = crypto:md5([ Key, Password, Salt ]),&lt;br /&gt;        crypto:aes_cbc_128_decrypt( Key, IV, Rest).&lt;br /&gt;        &lt;br /&gt;get_salt( &quot;Salted__&quot;, Salt:8/binary, Rest/binary&gt;&gt; ) -&gt;&lt;br /&gt;        {Salt, Rest}.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/855944390206940143-5533665012407705943?l=easyerl.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2010-02-23T22:23:26+00:00</dc:date>
	<dc:creator>rolphin</dc:creator>
</item>
<item rdf:about="http://charpi.net/blog/?p=219">
	<title>Nicolas Charpentier's blog: Code availability on git-hub</title>
	<link>http://charpi.net/blog/2010/02/21/code-availability-on-git-hub/</link>
	<content:encoded>Bored to switch code between my private subversion repository and git-hub for my open-source projects, I decided to use exclusively git-hub for them.
My trac wiki pages are also moved to git-hub for improve the documentation of those projects.

Selenium-RC Erlang binding 
Rake tasks to build erlang code
Small mock library for erlang (Please don&amp;#8217;t use mock to test [...]</content:encoded>
	<dc:date>2010-02-21T08:54:32+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2009://1.554">
	<title>Damien Katz: About Me</title>
	<link>http://damienkatz.net/2009/12/about_me.html</link>
	<content:encoded>&lt;p&gt;&lt;img src=&quot;http://damienkatz.net/MyPicture.jpg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
All about me. Me me me me me.&lt;/p&gt;

&lt;p&gt;Vitals:&lt;br /&gt;
Birth date - October 24, 1973&lt;br /&gt;
Height - 6'1&quot;&lt;br /&gt;
Eyes - brown&lt;br /&gt;
Hair - dark brown&lt;br /&gt;
Complexion - fair and freckly&lt;br /&gt;
Brain - wrinkly&lt;br /&gt;
Spouse - Laura Ann Katz (maiden name Toenjes)&lt;br /&gt;
Kids - Gwendolyn, Roseanna and Zack&lt;br /&gt;
Religion - unapologetically atheist&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;damien4.jpg&quot; src=&quot;http://damienkatz.net/pics/damien4.jpg&quot; width=&quot;640&quot; height=&quot;480&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I live in Piedmont CA.&lt;/p&gt;

&lt;p&gt;I am the creator of &lt;a href=&quot;http://couchdb.org/&quot;&gt;CouchDB&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I am the CEO of &lt;a href=&quot;http://couch.io/&quot;&gt;Couchio&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;CouchDB&quot; src=&quot;http://damienkatz.net/pics/logo.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;My good points:&lt;br /&gt;
I am very devoted, loving and supportive of my wife and daughters. I have a very positive attitude and am energetic. I am smart and a fast learner, especially when it comes to math, science and engineering stuff. I love solving really hard problems. I am a hard worker, and I am very passionate about my work. I am very honest. I like to make lots of jokes, sometimes they are even funny. I take good care of myself and exercise regularly. I am athletic. I read constantly (always non-fiction). I have good eye for aesthetics. I am good with my hands and like to make things. I like to bake. I generally try not to take life too seriously.&lt;/p&gt;

&lt;p&gt;My bad points:&lt;br /&gt;
I am egotistical, judgmental and sometimes have a bad temper (but I'm working on those things). I am vain and self conscious. I don't take very good care of my teeth (but I do floss regularly: once every 4 months, whether I need it or not). I am messy and disorganized. I have a short attention span in meetings and lectures. I take my work too seriously. I am brutally honest (but I'm convinced it's not really a bad point). My self-created list of bad points is oddly short, hmmmm.&lt;/p&gt;

&lt;p&gt;My weird points:&lt;br /&gt;
While I am pretty athletic (strong, fast, can jump, etc), I'm physically uncoordinated and hence suck at nearly every sport (except basketball, I'm decent at that). I am somewhat shy around new people, sometimes it comes off as being as being a snob. I spend waaay too much time in front of the computer, but that's the way I like it. I drink lots of diet soda, lots. I can't whistle. Sometimes my feet smell like hot buttered popcorn. I once was the proprietor of liquidpoop.com -- the internet's largest repository of diarrhea-related poetry. Although I'm vain, my wardrobe mostly consists of stained, freebie t-shirts and a few pairs of jeans.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-20T04:53:36+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.553">
	<title>Damien Katz: Chris demos CouchApps</title>
	<link>http://damienkatz.net/2010/02/chris_demos_couchapps.html</link>
	<content:encoded>&lt;p&gt;Here is a &lt;a href=&quot;http://blog.couch.io/post/399191405/screencast-demoing-some-new-couchapp-jquery&quot;&gt;Chris Anderson screencast demoing some new CouchApp jQuery plugins&lt;/a&gt;. He's a smooth criminal.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://blog.couch.io/post/399191405/screencast-demoing-some-new-couchapp-jquery&quot;&gt;&lt;img alt=&quot;Thumbnail image for Screen shot 2010-02-19 at 5.13.38 PM.png&quot; src=&quot;http://damienkatz.net/pics/Screen shot 2010-02-19 at 5.13.38 PM-thumb-400x249.png&quot; width=&quot;400&quot; height=&quot;249&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-20T01:25:35+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.552">
	<title>Damien Katz: Migrating Notes/Domino to CouchDB</title>
	<link>http://damienkatz.net/2010/02/migrating_notesdomino_to_couch.html</link>
	<content:encoded>&lt;p&gt;I've been talking to some IT shops who are migrating away from Lotus Notes and Domino. More than wanting to use something else, it seems the reasons they are migrating away is that people in management just don't like Lotus Notes.&lt;/p&gt;

&lt;p&gt;The problem these IT shops face is they don't have many good options to migrate to. Sharepoint works for very generic collaborative activities, but not so much for custom business apps that are so pervasive in large Notes installs. That doesn't mean people don't try.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://2sharepoint.com/lotusnotes-to-sharepoint-migration-visimigrate.html&quot;&gt;&lt;img alt=&quot;visimigrate-enterprise-architecture-thumb.jpg&quot; src=&quot;http://damienkatz.net/pics/visimigrate-enterprise-architecture-thumb.jpg&quot; width=&quot;380&quot; height=&quot;255&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So these IT shops are interested in migrating to Apache CouchDB for obvious reasons. CouchDB is largely inspired by the Lotus Notes backend. CouchDB has a document database, peer based replication, views, full text indexing add-ons, security, and HTTP client access. It also has a very active and growing open source community.&lt;/p&gt;

&lt;p&gt;So in theory, migrating to CouchDB from Notes/Domino should be easier than migrating to any other technology. But what we don't yet have is many tools, documentation and examples for migrating from Notes to CouchDB.&lt;/p&gt;

&lt;p&gt;Anyone out there have experience with this type of thing for Notes? Anyone interested in helping us develop the tools and documentation for migrating to CouchDB? There is a lot of business opportunity here, and we are looking for partners and VARs to help customers with tools and migrations. If interested, have some ideas or feedback, feel free to email me at damien@couch.io.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-19T23:17:26+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/jingle_nodes_on_talkr.im/">
	<title>Process-one Blogs: Jingle Nodes on Talkr.IM</title>
	<link>http://www.process-one.net/en/blogs/article/jingle_nodes_on_talkr.im/</link>
	<content:encoded>&lt;p&gt;A Jingle Nodes relay has been installed on the &lt;a href=&quot;https://www.talkr.im/&quot;&gt;Talkr.IM&lt;/a&gt; XMPP service.&lt;/p&gt; &lt;p&gt;The &lt;a href=&quot;https://www.talkr.im/&quot;&gt;public XMPP server Talkr.IM&lt;/a&gt; has received its own &lt;a href=&quot;http://code.google.com/p/jinglenodes/&quot;&gt;Jingle Nodes&lt;/a&gt; relay on: &lt;a href=&quot;http://www.process-one.net/en2_p1adm/xmpp:jn.talkr.im&quot;&gt;xmpp:jn.talkr.im&lt;/a&gt;. You can browse the Talkr.IM services via your Service Discovery interface in your XMPP client.&lt;/p&gt;
&lt;p&gt;This new exclusive feature on Talkr.IM XMPP server enables Jingle calls by providing a public service for media relaying. Basically, this means that XMPP clients which can handle Jingle Nodes, will be able to join other Jingle Nodes enabled clients to establish voice calls even when both are hidden behind network barriers (like NAT, for the techies).&lt;/p&gt;
&lt;p&gt;One many entities of the XMPP federated network (clients, servers) will have Jingle Nodes enabled, this will be possible to establish calls, in a totally P2P manner, much like Skype, but with much more features like the control of who can use your relay. Read the &lt;a href=&quot;http://code.google.com/p/jinglenodes/&quot;&gt;Jingle Nodes website&lt;/a&gt; and the &lt;a href=&quot;http://xmpp.org/extensions/inbox/jingle-nodes.html&quot;&gt;Jingle Nodes XEP&lt;/a&gt; to know more.&lt;/p&gt;
&lt;p&gt;This Talkr.IM Jingle Nodes relay is one of the very first step to a simpler Jingle user experience worldwide.&lt;/p&gt;
&lt;p&gt;Visit the &lt;a href=&quot;https://www.talkr.im/&quot;&gt;Talkr.IM website&lt;/a&gt;, and create &lt;a href=&quot;https://www.talkr.im/signup&quot;&gt;your own Talkr.IM XMPP account&lt;/a&gt; freely: &lt;a href=&quot;https://www.talkr.im/signup&quot;&gt;https://www.talkr.im/signup&lt;/a&gt;.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-18T14:00:00+00:00</dc:date>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/oneteam_for_iphone_in_version_3.2.5_with_facebook_chat/">
	<title>Process-one Blogs: OneTeam for iPhone in version 3.2.5, with Facebook chat</title>
	<link>http://www.process-one.net/en/blogs/article/oneteam_for_iphone_in_version_3.2.5_with_facebook_chat/</link>
	<content:encoded>&lt;p&gt;OneTeam for iPhone has been published on the AppStore in version 3.2.5, bringing bugfixes, and Facebook chat based on XMPP.&lt;/p&gt; &lt;p&gt;The version 3.2.5 of our XMPP client OneTeam for iPhone has hit the shelves of the Apple's application store. It is recommended that you upgrade it.&lt;/p&gt;
&lt;p&gt;OneTeam 3.2.4 for iPhone had already fixed bug related to Multi-User Chats (also known as groupchats): in some cases, OneTeam used to crash on joining password-protected and members-only MUC.&lt;/p&gt;
&lt;p&gt;OneTeam 3.2.5 for iPhone now allows OneTeam users to connect to the XMPP interface to Facebook chat. You can now connect with Jabber-ID set your &quot;your_username@chat.facebook.com&quot;, and password set to your Facebook password.&lt;/p&gt;
&lt;p&gt;Be careful, Facebook's XMPP chat interface does not offer MUC services, nor is federated, which means you still cannot chat with your friends on Talkr.IM or Google's Talk/GMail, but only with Facebook friends.&lt;/p&gt;
&lt;p&gt;Check out &lt;a href=&quot;http://www.process-one.net/en/solutions/oneteam_iphone/&quot;&gt;OneTeam for iPhone&lt;/a&gt; on our website, as well as &lt;a href=&quot;http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=292511942&amp;mt=8&quot;&gt;Apple's AppStore&lt;/a&gt;.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-17T16:08:11+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-2706443342944599131.post-2172718065976708205">
	<title>Chicago Erlang User Group: OTP Packaging Video 12/16/2009</title>
	<link>http://chicagoerlangusergroup.blogspot.com/2010/02/otp-packaging-video-12162009.html</link>
	<content:encoded>Here's the video from the December 16, 2009 Erlang/OTP Packaging talk given to the Chicago Erlang Users Group by Martin Logan.Part 1


Part 2


Part 3</content:encoded>
	<dc:date>2010-02-16T15:36:00+00:00</dc:date>
	<dc:creator>Barry Nicholson</dc:creator>
</item>
<item rdf:about="http://www.protest-project.eu/news.html#114">
	<title>ProTest news: QuickCheck for testing C programs</title>
	<link>http://www.protest-project.eu/news.html#114</link>
	<content:encoded>&lt;div&gt;Quviq developed an extension to QuickCheck that enables easy
testing of C code from the Erlang shell and therewith enable the use of
QuickCheck on C code.&lt;/div&gt;&lt;div&gt;This library is now evaluated on C libraries in the GNU package as well as on some real automotive software.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2010-02-16T00:00:00+00:00</dc:date>
</item>
<item rdf:about="http://www.protest-project.eu/news.html#112">
	<title>ProTest news: Message Sequences Charts help formulating properties</title>
	<link>http://www.protest-project.eu/news.html#112</link>
	<content:encoded>&lt;div&gt;Quviq developed a new library to express relationships between
events that happen in a system. This allows the testers to specify
things like &quot;this message should be delivered if the receiver was
logged in around the time the message was sent&quot;. Message sequence
charts are often used to give examples of possible ways in which
messages may arrive. The newly developed library allows to specify a
number of examples as one general property on message sequences.&lt;/div&gt;&lt;div&gt;The
library was successfully used in a case study at ProcessOne and a paper
describing this case has been submitted for publication.&lt;/div&gt;</content:encoded>
	<dc:date>2010-02-16T00:00:00+00:00</dc:date>
</item>
<item rdf:about="http://www.protest-project.eu/news.html#113">
	<title>ProTest news: PhD thesis with part on property based testing</title>
	<link>http://www.protest-project.eu/news.html#113</link>
	<content:encoded>&lt;div&gt;Laura Castro from the University of A Coruna finished her PhD
thesis, which is to be defended on April 15, 2010. In her thesis she
describes advantages of using functional programming for the
development of software systems. Part of the thesis is devoted to
testing these systems and property based testing plays an important
rôle.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2010-02-16T00:00:00+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.551">
	<title>Damien Katz: Wanted: Hosting/Infrastructure Engineer</title>
	<link>http://damienkatz.net/2010/02/wanted_hostinginfrastructure_e.html</link>
	<content:encoded>&lt;p&gt;We are looking to hire someone with strong hosting or infrastructure experience to help us develop a CouchDB hosting platform.&lt;/p&gt;

&lt;p&gt;Experience with CouchDB is nice but not necessary. We most want someone who is passionate about infrastructure with large scale hosting experience and with open source contributions.&lt;/p&gt;

&lt;p&gt;We offer competitive pay, stock options, great health benefits and 6 weeks vacation, and an opportunity to change the world.&lt;/p&gt;

&lt;p&gt;Email inquiries to damien@couch.io&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-12T00:18:26+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="tag:blogger.com,1999:blog-2706443342944599131.post-886960597645056359">
	<title>Chicago Erlang User Group: Chicago Erlang User Group Meeting Februrary 17th</title>
	<link>http://chicagoerlangusergroup.blogspot.com/2010/02/chicago-erlang-user-group-meeting.html</link>
	<content:encoded>The time and location:We are confirmed for Wednesday February 17th at 6:00PM. Orbitz has agreed again to let us use their office space for the meetup. We need all the names of the people that will attend so we can place them on the security list. Please email to RSVP at martinjlogan -at- gmail.The address for the talk is 500 W. Madison St, Chicago IL (the Olgilvie transportation center). Come up</content:encoded>
	<dc:date>2010-02-11T12:59:00+00:00</dc:date>
	<dc:creator>Jordan Wilberding</dc:creator>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.549">
	<title>Damien Katz: Thoughts on an Open Source Company</title>
	<link>http://damienkatz.net/2010/02/thoughts_on_an_open_source_com.html</link>
	<content:encoded>&lt;p&gt;I wrote this almost a year ago. It's something we want &lt;a href=&quot;http://couch.io&quot;&gt;Couchio&lt;/a&gt; live by, to build a company we all want to be a part of.&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Our companies mission to make the world a better place through open source software.&lt;/p&gt;

&lt;p&gt;People are hired based on contributions to open source. Code, documentation, advocacy, community help, legal help, etc. People who work to make the world better for everyone through open source are the people we hire.&lt;/p&gt;

&lt;p&gt;Every employee has an equity stake in the company. The decision to hire will be partially based on &quot;do we think giving this person this % of the company is worth it to us all&quot; Bad hiring decisions impact us all, so we are all motivated to hire those who will add value.&lt;/p&gt;

&lt;p&gt;How do we make money? By providing hosting and services. Rock solid apps, hosting and service. We give away our software, but we provide services people want and need at a healthy profit.&lt;/p&gt;

&lt;p&gt;If the company is in the shitter, never have layoffs, decrease pay % across the board. If we have to drop pay below levels that can support people, we can't be a company.&lt;/p&gt;

&lt;p&gt;Stress kills. Kills motivation, creativity, and in the long run it literally kills people. Most people want to do good. A few try really hard to do good. We make sure people know once they are hired, they never have to worry about their job. We will try hard to not be a source of stress to our employees.&lt;/p&gt;

&lt;p&gt;Never fire. We constantly emphasize you can't get fired for lack of productivity or being stupid or foolish. You can get fired for ethical reasons. We should strive for openness and honesty in all matters.&lt;/p&gt;

&lt;p&gt;Never ever ever have a hiring binge. We hire based on contributions to open source. Always. When we have the resources, we hire the best contributors. Otherwise we don't hire.&lt;/p&gt;

&lt;p&gt;We don't want people who tend to ask &quot;How can I contribute? What should I do?&quot;. We want people who identify for themselves what needs to be done and how they can contribute, and then do it. Our employees want to contribute to make things better, not for a paycheck, not for validation from a manager or even the community. They do it because they think it will make things better.&lt;/p&gt;

&lt;p&gt;We don't have managers. Everyone who we hire is already a productive contributor on their own. People can take leadership and mentoring roles, but these roles are granted by those being led and mentored. No one ever has control over someone else's time.&lt;/p&gt;

&lt;p&gt;We don't hire for positions like HR, sales, etc. We either outsource, or a person we have already hired for their contributions to open source fills the position.&lt;/p&gt;

&lt;p&gt;We don't encourage or discourage project or code ownership. In the case of disagreements, working code always has a place. We encourage forks internally and externally. There can be no reals rules beyond this guidance. We acknowledge this is messy and imperfect, and will always be source of friction and disagreement.&lt;/p&gt;

&lt;p&gt;How do we ensure people are productive and don't goof off?  We don't.&lt;/p&gt;

&lt;p&gt;We don't measure productivity? Smart people can always appear to be productive while goofing off, making it seem they are working hard when wasting time, causing stress for themselves and often for others who want to be seen to be strong contributors. We don't monitor people's productively. We let people goof off if they want. It's okay to goof off. I'm goofing off right now as write this.&lt;/p&gt;

&lt;p&gt;Then why do our people work?&lt;/p&gt;

&lt;p&gt;Our people are hired based on contributions to open source, their contributions make the world a better place. Our company mission is to do that, and we are filled with people who've already done that. We all want it to succeed and make a profit, so we can make ever greater contributions to the world. People contribute how they see fit: By working on profitable projects, by developing new projects, by doing work that will never make a profit but makes the world better for us all. Sometimes it's by taking some time off to recharge so you can contribute later.&lt;/p&gt;

&lt;p&gt;If the company becomes unprofitable, or sick, it's everyone's responsibility to make it healthy. No one has to ask permission how to make it better, how to make things profitable, they just do it.&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

&lt;p&gt;Already this has been put to the test, as we were presented an eminently qualified hire with a very positive energy. The problem was no open source involvement or contributions. I wanted to make an exception but I realized if we really want to give this idea of an open source company shot, we can't compromise already on the 4th hire we make. So I had to say no, which was hard.&lt;/p&gt;

&lt;p&gt;I don't yet know if this will work in the long run, but for now I want us to give it a real shot and see what happens.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-10T19:20:13+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://prog21.dadgum.com/61.html">
	<title>Programming in the 21st Century: Optimizing for Fan Noise</title>
	<link>http://prog21.dadgum.com/61.html</link>
	<content:encoded>The first money I ever earned, outside of getting an allowance, was writing assembly language games for an 8-bit home computer magazine called &lt;a href=&quot;http://www.cyberroach.com/analog/&quot;&gt;ANALOG Computing&lt;/a&gt;. Those games ended up as pages of printed listings of lines like this:
&lt;pre&gt;1050 DATA 4CBC08A6A4BC7D09A20986B7B980
0995E895D4B99E099DC91C9DB51CA90095C0C8
CA10E8A20086A88E7D1D8E7E,608
&lt;/pre&gt;A typical game could be 75 to 125+ of those lines (and those &quot;three&quot; lines above count as one; it's word-wrapped for a 40-column display). On the printed page they were a wall of hex digits. And people typed them in by hand--I typed them in by hand--in what can only be described as a painstaking process. Just try reading that data to yourself and typing it into a text editor. Go ahead: 4C-BC-08-A6...
&lt;br /&gt;&lt;br /&gt;Typos were easy to make. That's the purpose of the &quot;608&quot; at the end of the line. It's a checksum verified by a separate &quot;correctness checker&quot; utility.
&lt;br /&gt;&lt;br /&gt;There was a strong incentive for the authors of these games to optimize their code. Not for speed, but to minimize the number of characters that people who bought the magazine had to type. Warning, 6502 code ahead! This:
&lt;pre&gt;   LDA #0
   TAY
&lt;/pre&gt;was two fewer printed digits than this:
&lt;pre&gt;   LDA #0
   LDY #0
&lt;/pre&gt;Across a 4K or 6K game, those savings &lt;i&gt;mattered&lt;/i&gt;. Two characters here, four characters there, maybe the total line count could be reduced by four lines, six lines, ten lines. This had nothing to do with actual code performance. Even on a sub-2MHz processor those scattered few cycles were noise. But finding your place in the current line, saying &quot;A6,&quot; then typing &quot;A&quot; and &quot;6&quot; took time. Measurable time. Time that was worth optimizing.
&lt;br /&gt;&lt;br /&gt;Most of the discussions I see about optimization are less concrete. It's always &quot;speed&quot; and &quot;memory,&quot; but in the way someone with a big house and a good job says &quot;I need more money.&quot; Optimization only matters if you're optimizing something where you can &lt;em&gt;feel&lt;/em&gt; the difference, and you can't feel even thousands of bytes or nanoseconds. Optimizing for program understandability...I'll buy that, but it's more of an internal thing. There's one concern that really does matter these days, and it's not abstract in the least: power consumption.
&lt;br /&gt;&lt;br /&gt;It's more than just battery life. If a running program means I get an hour less work done before looking for a place to plug in, that's not horrible. The experience is the same, just shorter.  But power consumption equals heat and that's what really matters to me: if the CPU load in my MacBook cranks up then it gets hot, and that causes the fan to spin up like a jet on the runway, which defeats the purpose of having a nice little notebook that I can bring places. I can't edit music tracks with a roaring fan like that, and it's not something I'd want next to me on the plane or one table over at the coffee shop. Of course it doesn't loudly whine like that most of the time, only when doing something that pushes the system hard.
&lt;br /&gt;&lt;br /&gt;What matters in 2010 is optimizing for fan noise.
&lt;br /&gt;&lt;br /&gt;If you're not buying this, take a look at Apple's &lt;a href=&quot;http://support.apple.com/kb/HT3559&quot;&gt;stats&lt;/a&gt; about power consumption and thermal output of iMacs (which, remember, are systems where the CPU and fan are right there on your desk in the same enclosure as the monitor). There's a big difference in power consumption, and corresponding heat generated, between a CPU idling and at max load. That means it's &lt;em&gt;the programs you are running&lt;/em&gt; which are directly responsible for both length of battery charge and how loudly the fan spins.
&lt;br /&gt;&lt;br /&gt;Obvious? Perhaps, but this is something that didn't occur with most popular 8-bit and 16-bit processors, because those chips never idled. They &lt;em&gt;always&lt;/em&gt; ran flat-out all the time, even if just in a busy loop waiting for interrupts to hit. With the iMacs, there's a trend toward the difference between idle and max load increasing as the clock speed of the processor increases. The worst case is the early 2009 24-inch iMac: 387.3 &lt;a href=&quot;http://en.wikipedia.org/wiki/British_thermal_unit&quot;&gt;BTU/h&lt;/a&gt; at idle, 710.3 BTU/h at max load, for a difference of 323 BTU/h. (For comparison, that difference is larger than the entire maximum thermal output of the 20-inch iMac CPU: 298.5 BTU/h.)
&lt;br /&gt;&lt;br /&gt;The utmost in processing speed, which once was the goal, now has a price associated with it. At the same time that manufacturers cite impressive benchmark numbers, there's also the implicit assumption that you don't really want to hit those numbers in the everyday use of a mobile computer. Get all those cores going all the time, including the vector floating point units, and you get rewarded with forty minutes of use on a full battery charge with the fan whooshing the whole time. And if you optimize your code purely for speed, you're getting what you asked for.
&lt;br /&gt;&lt;br /&gt;Realistically, is there anything you can do? Yes, but it means you have to break free from the mindset that all of a computer's power is there for the taking. Doubling the speed of a program by moving from one to four cores is a win if you're looking at the raw benchmark numbers, but an overall loss in terms of computation per watt. Ideas that sounded good in the days of CPU cycles being a free resource, such as anticipating a time-consuming task that the user might request and starting it in the background, are now questionable features. Ditto for persistent &lt;a href=&quot;http://www.bashflash.com/&quot;&gt;unnecessary animations&lt;/a&gt;.
&lt;br /&gt;&lt;br /&gt;Nanoseconds are abstract. The sound waves generated by poorly designed applications are not.</content:encoded>
	<dc:date>2010-02-10T06:00:00+00:00</dc:date>
	<dc:creator>James Hague</dc:creator>
</item>
<item rdf:about="http://www.ejabberd.im/3861 at http://www.ejabberd.im">
	<title>ejabberd@jabber.ru: ejabberd and exmpp source code are moved from SVN to Git</title>
	<link>http://www.ejabberd.im/node/3861</link>
	<content:encoded>&lt;p&gt;After many months of planning, ejabberd and exmpp have been fully migrated to Git.&lt;/p&gt;
&lt;p&gt;During the last 7 years, ejabberd source code was hosted at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CVS at Jabber.Ru
&lt;/li&gt;&lt;li&gt;CVS at JabberStudio.org
&lt;/li&gt;&lt;li&gt;SVN at ProcessOne
&lt;/li&gt;&lt;li&gt;Git preliminarly built with git-svn, at Github
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Starting now, ejabberd source code is natively in Git, and hosted at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://git.process-one.net/ejabberd&quot; title=&quot;https://git.process-one.net/ejabberd&quot;&gt;https://git.process-one.net/ejabberd&lt;/a&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://github.com/processone/ejabberd&quot; title=&quot;http://github.com/processone/ejabberd&quot;&gt;http://github.com/processone/ejabberd&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The minimal instructions to start using it are mentioned in:&lt;br /&gt;
&lt;a href=&quot;http://www.process-one.net/en/ejabberd/downloads&quot; title=&quot;http://www.process-one.net/en/ejabberd/downloads&quot;&gt;http://www.process-one.net/en/ejabberd/downloads&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.ejabberd.im/node/3861&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-09T16:15:00+00:00</dc:date>
</item>
<item rdf:about="tag:damienkatz.net,2010://1.548">
	<title>Damien Katz: First week in the new office</title>
	<link>http://damienkatz.net/2010/02/first_week_in_the_new_office.html</link>
	<content:encoded>&lt;p&gt;Last week was our first week in our new office in Old Downtown Oakland. It's a really neat area with lots of restaurants and bars, and hardly any murders.&lt;/p&gt;

&lt;p&gt;Oh yeah, we've changed our name to Couchio. Our new blog will be here &lt;a href=&quot;http://couch.io&quot;&gt;http://blog.couch.io/&lt;/a&gt; soon.&lt;/p&gt;

&lt;p&gt;Our office:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%204.jpg&quot;&gt;&lt;img alt=&quot;office - 4.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 4-thumb-400x267.jpg&quot; width=&quot;400&quot; height=&quot;267&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Our office manager Claire:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%206.jpg&quot;&gt;&lt;img alt=&quot;office - 6.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 6-thumb-400x472.jpg&quot; width=&quot;400&quot; height=&quot;472&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Chris and Mikeal:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%201.jpg&quot;&gt;&lt;img alt=&quot;office - 1.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 1-thumb-400x267.jpg&quot; width=&quot;400&quot; height=&quot;267&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Claire and Jan:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%202.jpg&quot;&gt;&lt;img alt=&quot;office - 2.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 2-thumb-400x267.jpg&quot; width=&quot;400&quot; height=&quot;267&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Nitin:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%208.jpg&quot;&gt;&lt;img alt=&quot;office - 8.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 8-thumb-400x598.jpg&quot; width=&quot;400&quot; height=&quot;598&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Super Awesome Art by &lt;a href=&quot;http://www.juliearmbruster.net/&quot;&gt;Julie Armbruster&lt;/a&gt;:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%203.jpg&quot;&gt;&lt;img alt=&quot;office - 3.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 3-thumb-400x309.jpg&quot; width=&quot;400&quot; height=&quot;309&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;Me:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%207.jpg&quot;&gt;&lt;img alt=&quot;office - 7.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 7-thumb-400x374.jpg&quot; width=&quot;400&quot; height=&quot;374&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;My Office:&lt;br /&gt;
&lt;span class=&quot;mt-enclosure mt-enclosure-image&quot;&gt;&lt;a href=&quot;http://damienkatz.net/pics/office%20-%205.jpg&quot;&gt;&lt;img alt=&quot;office - 5.jpg&quot; src=&quot;http://damienkatz.net/pics/office - 5-thumb-400x267.jpg&quot; width=&quot;400&quot; height=&quot;267&quot; class=&quot;mt-image-none&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;So far we are really disorganized and discombobulated. But I'm are working on it! I even bought Management for Dummies. Things will be running smoothly in no time ;)&lt;/p&gt;

&lt;p&gt;Also we are looking hard for someone to help us offer CouchDB support and hopefully build a whole support organization. Email me damien@couch.io if you are interested or know someone who is.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-09T00:40:32+00:00</dc:date>
	<dc:creator>Damien Katz</dc:creator>
</item>
<item rdf:about="http://www.redhoterlang.com/web/10eba56758251baab8e1a657747da511">
	<title>RedHotErlang: inotify for erlang</title>
	<link>http://www.redhoterlang.com/web/plink?id=10eba56758251baab8e1a657747da511</link>
	<content:encoded>&amp;lt;p&amp;gt;inotify is a cool linux kernel service, that lets you subscribe to file system events. For example, if you are interested in reacting to changes in the file &quot;~/.emacs&quot;, and since you are not a lamer you abhor polling, you would like to be able to ...</content:encoded>
	<dc:date>2010-02-06T16:44:06+00:00</dc:date>
</item>
<item rdf:about="http://www.redhoterlang.com/web/09275a52574173c08fb500f84dab50be">
	<title>RedHotErlang: Dialyzer</title>
	<link>http://www.redhoterlang.com/web/plink?id=09275a52574173c08fb500f84dab50be</link>
	<content:encoded>&amp;lt;p&amp;gt;At times you sit there at the typical Erlang conferences and hear Kostis Sagonis speak of dialyzer, typer and all the funky tools. It sounds just so great. The downside is of course that all the tools require an effort on your part. You need to re...</content:encoded>
	<dc:date>2010-02-05T21:59:19+00:00</dc:date>
</item>
<item rdf:about="http://www.process-one.net/en/blogs/article/processone_at_fosdem_and_xmpp_summit/">
	<title>Process-one Blogs: ProcessOne at FOSDEM and XMPP Summit</title>
	<link>http://www.process-one.net/en/blogs/article/processone_at_fosdem_and_xmpp_summit/</link>
	<content:encoded>&lt;p&gt;ProcessOne will be present at FOSDEM and XMPP Summit.&lt;/p&gt; &lt;p&gt;This week-end, we will be joining the XMPP community at Brussels, for the FOSDEM, as well as the XMPP-specific events: &lt;a href=&quot;http://xmpp.org/summit/summit8.shtml&quot;&gt;XMPP hackfest and XMPP Summit&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href=&quot;http://fosdem.org/2010/&quot;&gt;FOSDEM&lt;/a&gt;, or Free and open source software developers' european meeting, will be held on Saturday, as well as Sunday, at ULB Campus Solbosch, with myriads of FOSS people for different countries and profiles.&lt;/li&gt;
&lt;li&gt;Before and after this event, the XMPP community will gather on Friday for the XMPP hackfest, and Monday for the XMPP Summit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The XMPP hackfest is the place where coders can code and test interop, while the XMPP Summit is more oriented towards specifications improving.&lt;/p&gt;
&lt;p&gt;ProcessOne will be there and demo three of our software products:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OneTeam, our Firefox extension, providing interesting features&lt;/li&gt;
&lt;li&gt;OneTeam for iPhone, enabling the always-on XMPP experience to a pocket near you&lt;/li&gt;
&lt;li&gt;IMGateways, our transports, especially our Twitter gateway, as well as our Google Wave gateway&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Feel free to join, as we would like to show you our software, and we would like to have your opinion on these.&lt;/p&gt;</content:encoded>
	<dc:date>2010-02-04T17:19:01+00:00</dc:date>
</item>

</rdf:RDF>
