jeff @ dallien.net
March 16, 2009 01:47
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.
nicholas a. evans on March 16, 2009 9:55AM
Jeff Dallien on March 16, 2009 2:18PM
chris mungall on July 23, 2009 12:34AM
ChavezRebecca29 on June 15, 2010 12:16PM
thesis on June 18, 2010 3:30AM
essays on June 18, 2010 10:11AM
buy essays on June 19, 2010 9:34PM
ringtones on June 21, 2010 2:03PM
research paper on June 22, 2010 8:29PM
american history essays paper on July 22, 2010 8:51AM