TLDR to copy and paste a clojure dev setup on MacOS.
Install packages
brew install openjdk rlwrap clojure leiningen borkdude/brew/babashka babashka/brew/neil visual-studio-code| ##-- Aliases --## | |
| alias ll='ls -l' | |
| alias k='kubectl' | |
| alias ke='kubectl exec -it' | |
| alias kc='kubectx' | |
| alias kn='kubens' | |
| ##-- Completions and Prompt --## |
Notes from watching Stuart Halloway's "Debugging with the Scientific Method" from Clojure/conj 2015.
Clear problem statement: steps you took, what you expected, what actually happened.
Efficient hypothesis: bisect the problem.
Clojure CLI tools (with deps.edn) allow for a built in way to create projects.
Official CLI/deps guide: https://clojure.org/guides/deps_and_cli
Official site: https://www.clojure.org/index
brew install openjdk clojure rlwrap| ;; Returns a function with retries. | |
| ;; retries: num of retries | |
| ;; delay: delay between retries in milliseconds | |
| ;; f: function to apply | |
| ;; ef: error function, determines if f should be retried | |
| ;; f and ef should not throw Exceptions | |
| (defn with-retry | |
| [retries delay f ef] | |
| (fn [& args] |