<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unfolded Mind &#187; programming</title>
	<atom:link href="http://blawg.unfoldedmind.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blawg.unfoldedmind.com</link>
	<description>&#34;Six Impossible Things Before Breakfast&#34;</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:55:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Monads and Spacesuits</title>
		<link>http://blawg.unfoldedmind.com/2010/07/30/monads-and-spacesuits/</link>
		<comments>http://blawg.unfoldedmind.com/2010/07/30/monads-and-spacesuits/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 16:54:16 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[coolness]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=86</guid>
		<description><![CDATA[Yet another monad tutorial, but this time with Major Tom!
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.iterasi.net/openviewer.aspx?sqrlitid=ixx7fcluvek_9lfolsxr_g">Yet another monad tutorial</a>, but this time with Major Tom!</p>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2010/07/30/monads-and-spacesuits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>klortho: fundamentally unsound</title>
		<link>http://blawg.unfoldedmind.com/2009/03/26/klortho-fundamentally-unsound/</link>
		<comments>http://blawg.unfoldedmind.com/2009/03/26/klortho-fundamentally-unsound/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:14:11 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[klortho]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=63</guid>
		<description><![CDATA[My bright idea, the one where I do a HEAD request, and then decide how to handle it?
Not gonna work. Things just get too confusing in the case of a POST.
I&#8217;ll have to do some major re-thinking, and revert some things back the way they were before.
Nobody said this would be easy, now, did they?
]]></description>
			<content:encoded><![CDATA[<p>My bright idea, the one where I do a HEAD request, and then decide how to handle it?</p>
<p>Not gonna work. Things just get too confusing in the case of a POST.</p>
<p>I&#8217;ll have to do some major re-thinking, and revert some things back the way they were before.</p>
<p>Nobody said this would be easy, now, did they?</p>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2009/03/26/klortho-fundamentally-unsound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>v8cgi: Everything Old is New Again</title>
		<link>http://blawg.unfoldedmind.com/2009/03/26/v8cgi-everything-old-is-new-again/</link>
		<comments>http://blawg.unfoldedmind.com/2009/03/26/v8cgi-everything-old-is-new-again/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 15:04:18 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=60</guid>
		<description><![CDATA[When the Netscape web server first came out, about 58 web-years ago, they touted the ability to write server-side scripts in a new language called &#8220;javascript&#8221;. Well, guess what? now there&#8217;s
v8cgi from from google, which lets you do the same thing.
Big deal? Maybe it is. Javascript has come a long long way from the days [...]]]></description>
			<content:encoded><![CDATA[<p>When the Netscape web server first came out, about 58 web-years ago, they touted the ability to write server-side scripts in a new language called &#8220;javascript&#8221;. Well, guess what? now there&#8217;s<br />
<a href="http://code.google.com/p/v8cgi/">v8cgi</a> from from google, which lets you do the same thing.</p>
<p>Big deal? Maybe it is. Javascript has come a long long way from the days when it was just used for rollover images. Imaging applying the power of <a href="http://jquery.com/">jQuery</a> to your server-side development. Is this an easy way to reach the nirvana of functional web programming I&#8217;ve been seeking?</p>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2009/03/26/v8cgi-everything-old-is-new-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>klortho: Much Accomplished, Much Remaining</title>
		<link>http://blawg.unfoldedmind.com/2009/03/12/klortho-much-accomplished-much-remaining/</link>
		<comments>http://blawg.unfoldedmind.com/2009/03/12/klortho-much-accomplished-much-remaining/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 18:38:49 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[klortho]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=55</guid>
		<description><![CDATA[Okay, the latest: I&#8217;ve fixed the incomplete headers problem, and found a solution to proxying non-XML resources: not to do it at all!
Here&#8217;s the way klortho now behaves. It parses the request URL, does a HEAD request on it with the original HTTP headers from the user&#8217;s browser, and then takes 1 of 3 actions. [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, the latest: I&#8217;ve fixed the incomplete headers problem, and found a solution to proxying non-XML resources: not to do it at all!</p>
<p>Here&#8217;s the way klortho now behaves. It parses the request URL, does a HEAD request on it with the original HTTP headers from the user&#8217;s browser, and then takes 1 of 3 actions. If the returned status code is anything other than &#8220;200 OK&#8221;, it returns the headers it receives. If it gets a &#8220;200 OK&#8221;, but the &#8220;Content-Type&#8221; is anything other than &#8220;application/xml&#8221; or &#8220;text/xml&#8221;, it sends a &#8220;301 Moved Permanently&#8221; status, with a &#8220;Location&#8221; header pointing the user&#8217;s browser to the URL parsed from the &#8220;PATH_INFO&#8221;. This tells the user&#8217;s browser that klortho is not interested in brokering this request, and to kindly just get the resource directly from now on, thankyouverymuch. Only if it has a &#8220;200 OK&#8221;, and the right XML content type does it go ahead and retrieve the body of the response, and process and return it.</p>
<p>Still unfinished: </p>
<ol>
<li>POST requests. This is a biggie. If the checks succeed, klortho will have to pass in the POSTed data it receives. libCurl has a good tutorial on this. It&#8217;s should be straightforward.</li>
<li>Some response headers may need to be adjusted on the way out, the ones that relate to proxying.</li>
<li>Authentication will need to be transparently passed through</li>
</ol>
<p>Keep checking back, I&#8217;ll keep you updated. If you feel like contributing, let me know.</p>
<p>The Links:</p>
<ul>
<li>
<a href="http://www.limulus.biz/bandname/dispatch.fcgi/Show">The &#8220;Show&#8221; script, without klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/klortho/bandname/dispatch.fcgi/Show">The &#8220;Show&#8221; script, with klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/bandname/dispatch.fcgi/Rate">The &#8220;Rate&#8221; script, without klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/klortho/bandname/dispatch.fcgi/Rate">The &#8220;Rate&#8221; script, with klortho</a>
</li>
<li><a href="http://www.unfoldedmind.com/darcsweb/darcsweb.cgi?r=klortho;a=tree;f=/src">klortho source</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2009/03/12/klortho-much-accomplished-much-remaining/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More progress, more setbacks on klortho</title>
		<link>http://blawg.unfoldedmind.com/2009/03/06/more-progress-more-setbacks-on-klortho/</link>
		<comments>http://blawg.unfoldedmind.com/2009/03/06/more-progress-more-setbacks-on-klortho/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 16:01:46 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[klortho]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=52</guid>
		<description><![CDATA[I have a version of klortho that&#8217;s able to parse its PATH_INFO, grab the XML that&#8217;s located there, and apply the transformation that&#8217;s in the processing instruction, if such exists. That&#8217;s cool.
I&#8217;ve been using this to work with my python band name generator, and I can get random band names to show, and that&#8217;s really [...]]]></description>
			<content:encoded><![CDATA[<p>I have a version of klortho that&#8217;s able to parse its PATH_INFO, grab the XML that&#8217;s located there, and apply the transformation that&#8217;s in the processing instruction, if such exists. That&#8217;s cool.</p>
<p>I&#8217;ve been using this to work with my python band name generator, and I can get random band names to show, and that&#8217;s really great, because I can use the needs I discover while working on this band name program to decide which as yet unimplemented parts of klortho I&#8217;ll need to implement, which brings us to my roadblock.</p>
<p>I&#8217;m writing the python script (called &#8220;Rate&#8221;) that will take in POSTed parameters to update the ratings for all the words in the previously displayed band name, and then redirect back to &#8220;Show&#8221;. klortho needs to do two things that it can&#8217;t do yet in order for this to work: it needs to understand POSTed data, and pass it to the sub-request, and it needs to recognize redirect status codes from the sub-request, and pass them back out, along with the appropriate headers. </p>
<p>I started small and modest. &#8220;Rate&#8221; just issues a redirect to &#8220;Show&#8221;. If you call the script directly, it works. Nothing I try in klortho will pass that redirect out. I run into a brick wall of of &#8220;500 Server Error&#8221;. The server error log reliably reports that FasctCGI is complaing that I&#8217;m sending incomplete headers. Is it a Dreamhost server config issue? What&#8217;s going on? What do I try next to learn more about what&#8217;s really happening?</p>
<p>I see two roads, and I may follow them both at the same time. I can create a little dummy FastCGI in c, that does nothing but issue hard-coded redirects. I&#8217;d leave out all the other things that klortho is doing, and tweak away at the stripped down version until I get it right, then put what I&#8217;ve come up with back into klortho. The other idea I&#8217;ve had is to write another version of klortho from scratch, and concentrate on acting as a fully transparent proxy, which will pass all the appropriate headers in and out, handle authentication and POST data and file uploads and any status code the sub-request might throw at it, and then add the XSLT transformations back into it. </p>
<ul>
<li>
<a href="http://www.limulus.biz/bandname/dispatch.fcgi/Show">The &#8220;Show&#8221; script, without klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/klortho/bandname/dispatch.fcgi/Show">The &#8220;Show&#8221; script, with klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/bandname/dispatch.fcgi/Rate">The &#8220;Rate&#8221; script, without klortho</a>
</li>
<li>
<a href="http://www.limulus.biz/klortho/bandname/dispatch.fcgi/Rate">The &#8220;Rate&#8221; script, with klortho</a>
</li>
<li><a href="http://www.unfoldedmind.com/darcsweb/darcsweb.cgi?r=klortho;a=tree;f=/src">klortho source</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2009/03/06/more-progress-more-setbacks-on-klortho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dangerous</title>
		<link>http://blawg.unfoldedmind.com/2009/02/07/dangerous/</link>
		<comments>http://blawg.unfoldedmind.com/2009/02/07/dangerous/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:14:53 +0000</pubDate>
		<dc:creator>ericg</dc:creator>
				<category><![CDATA[klortho]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://blawg.unfoldedmind.com/?p=43</guid>
		<description><![CDATA[
I don&#8217;t get it. How can a language as dangerous and fussy as C have  been used to create so much cool stuff? Linux, BSD, Apache, perl&#8230; you get the idea. I got spoiled by perl, python, lisp and other langauges where what you type generally does what you mean. C is like you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p><rant><br />
I don&#8217;t get it. How can a language as dangerous and fussy as C have  been used to create so much cool stuff? Linux, BSD, Apache, perl&#8230; you get the idea. I got spoiled by perl, python, lisp and other langauges where what you type generally does what you mean. C is like you&#8217;re stupid friend, who does what you say, literally, whether it makes any sense at all or not.<br />
</rant></p>
]]></content:encoded>
			<wfw:commentRss>http://blawg.unfoldedmind.com/2009/02/07/dangerous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.001 seconds -->
