Learning Prolog




Learning Prolog

I first encountered Prolog while reading Seven Programming Languages in Seven Weeks. Prolog is a declarative language, rather than a procedural language, like Python or C++. I’ve continued to learn it in the hopes that it will improve my programming, similar to why I fitfully learn LiSP1.

The Basics

Videos to watch:

  1. Antipatterns in Prolog (I)
  2. Terms in Prolog. Part of a series on Prolog syntax.
  3. Formatting Output
  4. Writing Code in Prolog

Links:

  1. Integer Arithmetici n Prolog

One Desired Use Case

There are many opportunities for improvement in scheduling ER shifts. As an attending I find the schedule reliably suboptimal. Most schedulers use a program to help them make the schedule. These programs are proprietary, but almost certainly use simplistic procedural programming under the hood2.

Videos:

  1. Simple School Timetable
  2. The Social Golfer Problem
  3. How to Make a Simple Scheduling Program in Prolog

Footnotes:

  1. Those who view my repository will quikly note I use bash and python for my research. I’d like to use Prolog, but I have to choose a language that those I work with are facile in. Nor am I a Prolog guru. 

  2. In my experience programs marketed to non-technical end-users with perpetual needs emphasize UI/UX over flexibility of functionality.