This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-22
Channels
- # announcements (2)
- # babashka (18)
- # beginners (87)
- # calva (22)
- # chlorine-clover (5)
- # cider (11)
- # clj-kondo (10)
- # clojure (71)
- # clojure-austin (1)
- # clojure-norway (6)
- # clojure-uk (13)
- # clojurescript (3)
- # core-async (10)
- # data-science (17)
- # datascript (1)
- # datomic (22)
- # emacs (10)
- # fulcro (32)
- # hoplon (8)
- # jobs-discuss (2)
- # malli (5)
- # meander (5)
- # nrepl (35)
- # off-topic (8)
- # pathom (38)
- # planck (21)
- # re-frame (10)
- # reagent (17)
- # reitit (7)
- # shadow-cljs (26)
- # tools-deps (3)
- # xtdb (7)
@jjttjj, I finally got all setup with jvm version of javelin. it took a while since I’m new to both javelin and boot. thanks for the help!
Have you seen formula-of
of formulet
? (aka fn=
and let=
) where you specify the cells to be deref'd and then can use others as normal in the expression?
but I don't think you're supposed to be able to do
(def x (cell 123))
(def y (cell= (reset! ~x 122))
Or at least that has never worked for me in regular javelin.not sure if this helps. I know I tried to do stuff like that before and it never worked but now I just use the other formula functions in those situations
I was having an issue with unquoted expressions being derefed if they returned refs. I wrote a fix at https://github.com/phronmophobic/javelin/commit/61c6fd784295760e5ed4018c5a8a9325a8add35b , but I’m not sure if those are the desired semantics below are the relevant tests:
;; modified test
(let [a (cell 100)
b (cell 200)
c (cell= (when (odd? b) (reset! ~a (* b 2))))]
(is (= @a 100))
(swap! b inc)
(is (= @a 402)))
;; new test
(let [a (cell 100)
c (cell= ~a)]
(is (identical? @c a))
(swap! a inc)
(is (identical? @c a)))