practicalli

https://practicalli.github.io/ http://yt.vu/+practicalli (youtube)
2FO 2020-12-25T02:15:42.307700Z

Hi, this snippet runs in the ansi-term and bash REPL, but evaluating it with cider-clj whether from within a .clj file directly or the REPL[clj ] throws these exceptions. Code: (def base-year 2006) (def base-co2 382) (defn co2 [year] (let [base-diff (* 2 (- year base-year)) ] (+ 382 base-diff))) (co2 2020) .clj file exception: unhandled java.lang.IllegalStateException Attempting to call unbound fn: #'user/co2 REPL[clj] exception: unhandled clojure.lang.Compiler$CompilerException Caused by java.lang.RuntimeException unable to resolve symbol year in this context System: spacemacs 0.300.0@27.1. Set up according to the practicalli install guide.

practicalli-john 2020-12-25T11:13:52.307800Z

@hey2fo You should probably create a project when using Cider (Spacemacs Clojure layer commands). This will add a namespace definition, which is probably the issue here. There is a cider scratch buffer you could try if you don't create a project.

🙏 1
practicalli-john 2020-12-25T11:15:08.308Z

https://practicalli.github.io/spacemacs/clojure-projects/