Welcome to Bus Logic, the site that showcases Prolog with small usable applications, each of which can be easily readable on a bus ride!
If you want to know more about why this site was made, read here, if you are looking for more information about Prolog in general, view the resources, or if you have a suggestion for an improvement then contact me!
Posts
-
Purity: A Horn Clause Only library for Prolog
A set of predicates that helps write programs that use only Horn Clauses. The entire library uses only "pure" prolog operations and no inbuilt predicates.
-
Run a Prolog web server in Docker
Running apps in Docker allow for flexible deployment options to production options. I have included here how I build web server Docker images using Prolog.
-
Send SMS messages from Prolog using Twilio
A useful bit of code showing how to send and SMS using the Twilio APIs.
-
A simple script to backup remote git repositories
I have several git repositories, both private and for work and wanted a way to update them all at once to a local backup folder
-
A solution to Einstien's Riddle
There is a group of houses, and a set of clues to determine who lives where, but who owns the fish?
-
A solution to the Three Cards Puzzle
Given only parts of the cards and how they relate to each other, find the three cards...
-
Music Reference Tool in Pure Prolog
A small tool that can generate scales and chords of any type. Uses only horn clauses
-
Exploration of a simple example of how to enforce security rules for predicates after the predicates have already been written and used several times.
-
A little program that helps to assign Kris Kringle targets based on a set of rules.
-
At the start this site used a very simple generator program to add a consistent style across the site. This page explains the code behind this.
-
A client wanted a dump of the users in their system, but I didn't have access to the database, only to an API that spit out JSON.
-
A fun exercise to create a traffic light system that could be used for model trains, or whatever.
-
Prolog predicates often end up with more than one use, and append is a built in predicate that has a good number of subtle uses.
-
After an exercise to convert raw RGB values into a hex code (eg: #ff00ff) was raised on Reddit daily programmer, I thought a Prolog version was required.
-
A Simple Dungeons & Dragons Dice Roller
If you have played Dungeons and Dragons before then you would know that sometimes dice rolls can become a bit tedious, why not automate them?