<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>Inspired by my colleague "Chris Strom":http://twitter.com/eee_c and his "chain":http://japhr.blogspot.com/2009/03/my-chain.html of self-improvement, I am starting one of my own. Chris described the chain this way:

bq. The concept is that every day you produce something related to your craft. Each day you do this, you put an "X" through the day. After a little while, you have a chain of X's and you begin to be offended at the idea of breaking the chain.

My chain will be getting "prologblog.com":http://prologblog.com up and running as a Prolog news, tutorial, and promotion site written in Prolog itself. After having this project on the back burner for a while I started working on it again just "yesterday":http://jeff.dallien.net/posts/the-simplest-thing-that-could-possibly-fail-miserably but without making much progress. The news is a bit better today.

&lt;img src="/images/swipl.jpg" alt="SWI logo" style="float: right; margin: 1em;" /&gt;

h3. Connect to Prolog using... Prolog

In general I want to keep my code for prologblog.com written in standard, portable Prolog which doesn't depend on interpreter-specific libraries. That being said, it looks like "SWI-Prolog":http://www.swi-prolog.org/ has some pretty capable HTTP-related libraries that can act as the glue between my standard Prolog code and Apache.

There are many SWI-Prolog related packages in the Ubuntu repositories: the main interpreter itself, and then various libraries. Some of the packages might have missing dependencies because one can install the HTTP libraries without having the socket library installed, and the HTTP libraries failed to load without the socket library. This threw me off for a little while, since its not obvious which Ubuntu package includes the socket library (it's swi-prolog-clib).

The command below will install SWI-Prolog and the socket and HTTP libraries. I then referred to the discussion and examples in the "HTTP Support":http://www.swi-prolog.org/pldoc/package/http.html section of the SWI documentation. 

&lt;div class="CodeRay"&gt;&lt;source:plaintext&gt;sudo apt-get install swi-prolog swi-prolog-clib swi-prolog-http&lt;/source&gt;&lt;/div&gt;&lt;br/&gt;For my next step, I am working on building the connecting layer using the HTTP library and investigating SWI's "unit testing support":http://www.swi-prolog.org/pldoc/package/plunit.html.&lt;br/&gt;

</body>
  <created-at type="datetime">2009-03-12T02:13:00-04:00</created-at>
  <id type="integer">35</id>
  <published type="boolean">true</published>
  <title>A chain of my own and making progress</title>
  <updated-at type="datetime">2009-03-12T03:31:51-04:00</updated-at>
  <url-title>a-chain-of-my-own-and-making-progress</url-title>
</post>
