<?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>Trail of Light &#187; lisp</title>
	<atom:link href="http://www.trailoflight.net/tag/lisp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trailoflight.net</link>
	<description>rantings of a geek</description>
	<lastBuildDate>Sun, 27 Nov 2011 12:09:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Running Multiple hunchentoot instances</title>
		<link>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/</link>
		<comments>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 18:12:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://www.trailoflight.net/blog/?p=22</guid>
		<description><![CDATA[Setting hunchentoot to offer several different website on the same common lisp implementation is not very intuitive, so this post tries to shed some light on the matter.]]></description>
			<content:encoded><![CDATA[<p>So if you are someone like me and interested in developing  web applications in Common Lisp then you have probably come across <a href="http://weitz.de/hunchentoot/" target="_blank">hunchentoot</a> by <a href="http://weitz.de" target="_blank">Dr Edi Weitz</a>. Now hunchentoot is not the only common lisp web-server out there and there are those who argue against its design concepts but it is one that I have found to well suit my need. Now I will be writing a list of posts about how to go around setting up things to work for a web application, but for this post i want to talk about multiple hunchentoot instances.</p>
<p>As you might know lisp hosting is not abundant so must of the time you need your own server instance to run your lisp on. However instances are relatively expensive when compare to other hosting options so it might be useful if you could run multiple websites of the same server. And it turns out you can do exactly that with hunchentoot and you do not need multiple instances of your common lisp running (I use SBCL).</p>
<p>Your first option is to visit <a href="http://www.cyrusharmon.org/" target="_blank">Cyrus Harmon website</a> and get his hunchentoot vhost code and run it on top of your hunchentoot. The code is clean and understandable and last i checked Cyrus uploaded a new version on 12 June 2009.</p>
<p>Your second option is to use hunchentoot built in capabilities and separate your websites on different ports (you could use a webproxy in front but that is another post). Start by creating your hunchentoot instance in the following manner:</p>
<blockquote><p>(hunchentoot:start (make-instance &#8216;hunchentoot:acceptor<br />
:port port<br />
:request-dispatcher dispatcher))</p></blockquote>
<p>Now the important part is that we started by telling this particular instance that we need hunchentoot to listen to the designated port. The key thing you need to take care of however is the parameter request-dispatcher. It turns out creating a hunchentoot acceptor this way you can no longer use any of hunchentoot built in dispatcher functionality (Which is the price you have to pay). So how to deal with that is to make sure that the <strong>dispatcher</strong> is actually a function that return the appropriate html.</p>
<p>This function needs to take one argument which is the response object and then return the proper html based on the response. There are different ways to do this that could be fast. One suggestion which I implemented was to create a hash table with the url as the key and the handler function as the value and i simply do a funcall on the handler function. it is that simple <img src='http://www.trailoflight.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Hope you enjoyed the above and stay tuned for some more information on lisp programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.trailoflight.net/2009/09/running-multiple-hunchentoot-instances/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>cl-cron, cron like lisp library</title>
		<link>http://www.trailoflight.net/2009/03/cl-cron-cron-like-lisp-library/</link>
		<comments>http://www.trailoflight.net/2009/03/cl-cron-cron-like-lisp-library/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 15:41:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[released code]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://www.trailoflight.net/blog/?p=7</guid>
		<description><![CDATA[

Hey everyone, I just released the cl-cron library that I have written during this week. The library with instructions on usage is found on the main website or directly by going here.I was pretty disappointed not to find such a library when I started searching a couple of days ago (apologies to the Clon author [...]]]></description>
			<content:encoded><![CDATA[<div class="entrytext">
<div class="snap_preview">
<p>Hey everyone, I just released the cl-cron library that I have written during this week. The library with instructions on usage is found on the main website or directly by going <a title="cl-cron" href="../cl-cron_help.html" target="_blank">here</a>.I was pretty disappointed not to find such a library when I started searching a couple of days ago (apologies to the Clon author but I just saw your entry after my release), so  I hope cl-cron is of use to someone.</p>
<p>Anyways, your opinion matters so if anyone uses it or wants some changes let me know.</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.trailoflight.net/2009/03/cl-cron-cron-like-lisp-library/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

