When developing SPA applications using SWI-Prolog on the backend, Cross-Origin Resource Serving (CORS) can cause you all kinds of bother. In this post we look at how to develop your SPA on a single Origin, like how you’ll serve it in production, so all that bother vanishes away.
Using Tau-Prolog to generate chord inversions for 3 and 4 string fretted instruments: an application.
Emacs was a great operating system, it just lacked a good text editor like Vim. Well times have moved on, now you can use Emacs as your window manager with Vim text editing. Let's try it out on a Raspberry Pi.
Golog is a logic programming language for dynamic domains based in Situation Calculus with an interpreter written in Prolog. The classic example from the book is that of an elevator. Here we present an interactive version of that program.
We exploit the Python eco-system to make a GUI for a Prolog program, run with SWI-Prolog, in under 10 minutes
Simple, classic games like Rock, Paper, Scissors are good to code when learning a new language. The lovely thing about making this game in Prolog is you’re just encoding what it is, not how it is. It’s a subtle difference, but I’ll point it out during this explanation.
Some folks don’t make their data available through RDF formats, or nice SPARQL endpoints, instead they provide a (REST/RESTFUL) API and will return JSON data for your request. It can be a little tricky figuring out how to get this data into your SWI-Prolog program. So in this post I demonstrate with a simple example.
Reading the docs for plunit, it can be quite tricky to figure out how to setup a nice unit testing environment and actually run those tests. In this post I demonstrate how I do it, keeping my tests separate from my code, and running them with a handy command.
Another little known Python feature that deserves more love. This time we’re looking at the send function that lets you input values into your generator as it’s running. It works through yield and is awesome!