This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-05
Channels
- # adventofcode (138)
- # announcements (1)
- # babashka (4)
- # beginners (71)
- # biff (2)
- # calva (7)
- # cider (20)
- # clj-kondo (4)
- # cljsrn (4)
- # clojure (36)
- # clojure-europe (37)
- # clojure-nl (2)
- # clojure-norway (27)
- # clojure-portugal (1)
- # clojure-uk (4)
- # clojurescript (8)
- # emacs (3)
- # graphql (1)
- # hugsql (4)
- # humbleui (6)
- # hyperfiddle (1)
- # jobs-discuss (18)
- # joyride (2)
- # malli (17)
- # meander (7)
- # membrane (8)
- # off-topic (16)
- # pathom (14)
- # portal (4)
- # rdf (36)
- # reitit (4)
- # releases (2)
- # remote-jobs (1)
- # scittle (15)
- # shadow-cljs (13)
- # tools-deps (40)
Something I am observing in the https://github.com/raymcdermott/aoc22 ... the atoms do not seem to be respected per namespace .... for example each ns has this: (def part-1-visible? (r/atom false))
and the buttons toggle its value. But if its set in one ns, it's set in them all. Is that expected or am I holding it wrong?
@raymcdermott I debugged this locally and added to the home-screen:
(defn home-page
[]
(let [solution-data (edn/read-string @solutions)]
[:div.m-3.p-3.border-0
[days solution-data]
[:div
(str @day1/part-1-visible?)
(str @day3/part-1-visible?)]]))
You can quite clearly see that the values can be different at different times, so maybe there's something else going wrong. As you're having quite a lot of state scattered around, it's difficult to keep track of things. It's usually good to put more state together in one atom, e.g. for the entire app. Scittle also has a re-frame plugin which I think is quite good for this multi-screen type of thinghttps://aoc-rmc.github.io/aoc22/ <- here's @raymcdermott AoC solutions in scittle :)
what I find odd is that there is an atom called data
that is not polluted across the namespaces ... must be something else
as I've shown before, it is not a namespace cross-pollution problem, since the atoms can be set independently