I am working through the tutorials on Purely Functional.
I got a bit hung up right away. I was trying to figure out how to reload files while working in the REPL as I updated the files. I followed this suggestion on StackOverflow by some guy named Dirk. At first, Dirk’s quirk did not work. Was Dirk a jerk? His burst was not voted first. SO at its worst? It made me so weak I could not speak. My REPL I could not tweak, putting an end to my learning streak. I do not want to sound pissed, but I do not wish to be dissed by Lisp. I am too tired for this.
Then I realized that while the files were reloaded, the new functions were not included in any aliases I used when I brought in the namespace with “require”. I could use the new functions, but I had to type out the ENTIRE namespace. O, the huge manatee! I did some googling, and I don’t think anyone mentions that.
Just so it is easy to copy and paste, here are the commands:
(require '[clojure.tools.namespace.repl :refer [refresh]]) (refresh)
Or you could do this:
(require '[clojure.tools.namespace.repl :as repl]) (repl/refresh)
You might have a function called “refresh”, but you will probably not have a namespace “repl”.
Do this after you follow the directions in the StackOverflow answer. It is better to bring in the clojure.tools namespace in your profile than in every stinkin’ project.