Skip to content

Slowly learning clingo, and writing notebooks that walk you through logic programs (under development)

Notifications You must be signed in to change notification settings

vsoch/clingo-lessons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clingo Lessons

Binder

Are you interested in learning Answer Set Programming (ASP), specifically with clingo ? I am too, but I learn best by interacting with code, and most of the learning materials:

This repository provides a Docker container that will build a container with Jupyter and clingo, and then notebooks that you can use to learn clingo. If you have a notebook example that you'd like to contribute, please don't hesitate to open an issue to either discuss contributing directly, or pointing me to the source so I can add it.

Getting Started

You can either use the bindr link at the top of the post to get interactive notebooks in your browser, or create a local environment on your host. If the first, then click the link and navigate to the folder with notebooks of interest. Otherwise, keep reading.

Local Notebooks

If you want to run notebooks locally, you need to first clone the repository:

$ git clone git@github.com:vsoch/clingo-lessons
$ cd cling-lessons

If you don't have Docker installed, do that first. Then build the container:

$ docker build -f Dockerfile.clingo -t clingo-lessons .

The Dockerfile is named with a prefix only so bindr doesn't automatically detect it and try to build (it instead uses the environment.yml and postBuild. You'll then want to run the container, binding port 8888 to your host so you can see jupyter.

$ docker run --rm --name clingo-lessons -p 8888:8888 -v $PWD/:/home/jovyan/work clingo-lessons

At that point, copy the link in your termal to open your browser to http://localhost:8888 with the provided token to see folders with notebooks. You can open any notebook to do the interactive tutorial. If at any point you want to shell into the running container, you can type the following in another terminal:

$ docker exec -it clingo-lessons bash

If you have any questions or would like to contribute a lesson or example, please open an issue. I'll be adding examples from the documentation slowly over time as a side project.

About

Slowly learning clingo, and writing notebooks that walk you through logic programs (under development)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published