braveandtrue

https://www.braveclojure.com/
moo 2018-09-02T13:16:33.000100Z

Hello brave people, I have a little problem with the-divine-cheese-code part

moo 2018-09-02T13:16:38.000100Z

(refer isn’t working)

moo 2018-09-02T13:17:44.000100Z

even joker-linter doesn’t like it. So this code doesn’t work:

moo 2018-09-02T13:19:51.000100Z

(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location ;;SNIPPED OUT

(defn -main
  [& args]
  (println (points heists)))

moo 2018-09-02T13:20:22.000100Z

Whereas this code does work:

(ns the-divine-cheese-code.core)
;; Ensure that the SVG code is evaluated
(require 'the-divine-cheese-code.visualization.svg)
;; Refer the namespace so that you don't have to use the
;; fully qualified name to reference svg functions
(refer 'the-divine-cheese-code.visualization.svg)

(def heists [{:location "Cologne, Germany" ;; SNIPPED OUT

(defn -main
  [& args]
  (println (the-divine-cheese-code.visualization.svg/points heists)))

moo 2018-09-02T13:23:46.000100Z

also alias works. odd…

moo 2018-09-02T13:29:29.000100Z

actually, none of this is working right. I wonder what’s up…

moo 2018-09-02T13:48:28.000100Z

well, all the ns macro code examples work, so I suppose it doesn’t matter. Never mind. 🙂

moo 2018-09-02T13:59:18.000100Z

well… maybe not. I get nullpointerexception doing the example code for (min)

moo 2018-09-02T14:49:49.000100Z

never mind all the above, I figured it out. I just needed to reload the repl and clear the namespaces. 🙂

2