From the hub, written by: "Paul Brown"

Homoiconic Prolog: Explain yourself!

Prolog is rather popular for Expert Systems. Why? Well because it's homoiconic and because we have DCG's, we can reify a query to make it explain itself. That's a lot of jargon, in this post we'll break it down and make some explanations.


Difference Lists Explored

Difference Lists are a very powerful and useful tool. They're also difficult to understand and can result in difficult to read code. In this post we'll address both of these issues.


Functional Prolog: Map, Filter and Reduce

Prolog programs have both logical and procedural meanings. In this post we'll take a look at procedural ideas more commonly associated with functional programming than Prolog, namely: map, filter and reduce (foldl and foldr). We'll code them and then query them.


Transitive relations, a deeper dive.

Transitive relations show up a lot in AI code, in this post we look at a couple of ways to code them that depend on what you can assume about your domain and what Prolog you're using.


"Hello, <name>!", the second program improved.

After "Hello, world!" it's typical to write a program that asks the user's name and greets them. In this post we learn how to do this in SWI-Prolog without requiring a full-stop.


Reification By Example

Reify: (v) To represent something abstract as a concrete thing.

Reification is a tool in the bag of tricks that can be quite tricky to understand. Rather than waffle on in the abstract, let's take a look at a few examples.


Hello, Tau Prolog!

Imagine an internet where you didn't need to write JavaScript...

Imagine an internet where you could write Prolog...

Imagine no more, write Tau Prolog!