Menu:

Post History:

Animals Matter to Me

prologblog.com is up and running

I’m not going to write much to add to the chain tonight, other than to say that prologblog.com is now up and running. The server code is on GitHub. As is the code that generates the first post. The site’s not pretty, and the list of things to do is a mile long, but the basic goal has been achieved, the site is running on a Prolog application.

I’ll go through the code and explain each part in subsequent posts, but here is a small introduction. This piece of code gathers all the post/1 predicates and flattens them into a single list. Using this method, new posts can been added to the system just by loading another source file with one or more post predicates into the interpreter. I’ll be using this method to add posts until I get some form of database access working.

all_posts(List) :-
  setof(Post, post(Post), TempList),
  flatten(TempList, List).


To make this work properly the main server source file has to declare that the post/1 predicates can be found in multiple files, using the multifile/1 predicate:

:- multifile post/1.

Next up is adding some CSS to make the site look nicer, and working on a RSS feed. Feel free to try to break the Prolog Blog site with weird parameters and malformed requests, just be sure to let me know what happens.

3 comments


nicholas a. evans on March 16, 2009 9:55AM

Congrats!

Jeff Dallien on March 16, 2009 2:18PM

Thanks Nick :) I'm going to make adding comments to the Prolog Blog site a top priority as well. I am going to try to use Disqus rather than implement my own, only to want to replace them later (like here).

chris mungall on July 23, 2009 12:34AM

neat! the blog seems a little inactive. still using it? you could also have it aggregated via planetprolog: http://www.cs.kuleuven.be/~toms/PlanetProlog/

Adding new comments is currently disabled.