From cda60553cd6ecb5c090e9a6ab4e9492828e8d500 Mon Sep 17 00:00:00 2001 From: Joe Lane Date: Tue, 30 Oct 2018 05:41:24 -0500 Subject: [PATCH 1/4] Upgrade dependencies --- project.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index 8aef1a3..b427d8e 100644 --- a/project.clj +++ b/project.clj @@ -1,5 +1,5 @@ (defproject logic-tutorial "1.0.0" :description "A Very Gentle Introduction to Relational and Functional Programming" - :dependencies [[org.clojure/clojure "1.5.1"] - [org.clojure/tools.macro "0.1.2"] - [org.clojure/core.logic "0.8.5"]]) + :dependencies [[org.clojure/clojure "1.9.0"] + [org.clojure/tools.macro "0.1.5"] + [org.clojure/core.logic "0.8.11"]]) From ea6e0a0d093d5016f1c23b3ea0b5bd9b93ee27d2 Mon Sep 17 00:00:00 2001 From: Joe Lane Date: Tue, 30 Oct 2018 06:35:54 -0500 Subject: [PATCH 2/4] Replace lein with deps --- README.md | 4 ++-- deps.edn | 5 +++++ project.clj | 5 ----- 3 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 deps.edn delete mode 100644 project.clj diff --git a/README.md b/README.md index 449a746..9786a61 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ However, I admit, the most important reason to learn the relational paradigm is First Steps ---- -1. Install `lein` following [instructions here](http://leiningen.org/#install) +1. Install `clojure` following [instructions here](https://clojure.org/guides/getting_started) if using mac or linux. Install `lein` if on Windows (following [instructions here](http://leiningen.org/#install)) 2. `git clone https://github.com/swannodette/logic-tutorial && cd logic-tutorial` -Ok, we're ready to begin. Type `lein repl`, which will drop you into the Clojure prompt. First let's double check that everything went ok. Enter the following at the Clojure REPL: +Ok, we're ready to begin. Type `clj` (or `lein repl`), which will drop you into the Clojure prompt. First let's double check that everything went ok. Enter the following at the Clojure REPL: ```clj user=> (require 'clojure.core.logic) diff --git a/deps.edn b/deps.edn new file mode 100644 index 0000000..0cf297a --- /dev/null +++ b/deps.edn @@ -0,0 +1,5 @@ +{:paths ["src"] + :deps {org.clojure/tools.macro {:mvn/version "0.1.5"} + org.clojure/clojure {:mvn/version "1.9.0"} + org.clojure/core.logic {:mvn/version "0.8.11"} + }} diff --git a/project.clj b/project.clj deleted file mode 100644 index b427d8e..0000000 --- a/project.clj +++ /dev/null @@ -1,5 +0,0 @@ -(defproject logic-tutorial "1.0.0" - :description "A Very Gentle Introduction to Relational and Functional Programming" - :dependencies [[org.clojure/clojure "1.9.0"] - [org.clojure/tools.macro "0.1.5"] - [org.clojure/core.logic "0.8.11"]]) From 8c4aaf2cfe7447af878ee1d3f61e63074b6ba3ba Mon Sep 17 00:00:00 2001 From: Joe Lane Date: Tue, 30 Oct 2018 06:36:33 -0500 Subject: [PATCH 3/4] Update conde example to demonstrate *OR* semantics more clearly --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9786a61..41ea165 100644 --- a/README.md +++ b/README.md @@ -301,10 +301,10 @@ But how to express logical **or**? (run* [q] (conde ((fun q)) - ((likes q 'Mary))))) + ((likes q 'Lucy))))) ``` -The above does exactly that - find `q` such that `q` is fun *or* `q` likes Mary. This is the essence of how we get multiple answers from `core.logic`. +The above does exactly that - find `q` such that `q` is fun *or* `q` likes Lucy. This is the essence of how we get multiple answers from `core.logic`. Magic Tricks ---- From fc364d281f5b3f6805756aafdcec21a608f2f80d Mon Sep 17 00:00:00 2001 From: Joe Lane Date: Tue, 30 Oct 2018 06:37:38 -0500 Subject: [PATCH 4/4] Update Resources with more recent urls and editions --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41ea165..413b2aa 100644 --- a/README.md +++ b/README.md @@ -423,8 +423,7 @@ Resources If you found this tutorial interesting and would like to learn more I recommend the following books to further you understanding of the relational paradigm. -* [The Reasoned Schemer](http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=10663) -* [Paradigms of Artificial Intelligence Programming](http://norvig.com/paip.html) +* [The Reasoned Schemer](http://mitpress.mit.edu/books/reasoned-schemer-second-edition) +* [Paradigms of Artificial Intelligence Programming](https://github.com/norvig/paip-lisp) * [Prolog Programming For Artificial Intelligence](http://www.amazon.com/Prolog-Programming-Artificial-Intelligence-Bratko/dp/0201403757) * [Concepts, Techniques, and Models of Computer Programming](http://www.info.ucl.ac.be/~pvr/book.html) -