hoplon

The :hoplon: ClojureScript Web Framework - http://hoplon.io/
phronmophobic 2020-03-22T21:07:16.275400Z

@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!

phronmophobic 2020-03-22T21:09:26.276900Z

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)))

2020-03-22T23:47:46.277400Z

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?

2020-03-22T23:48:03.277600Z

It was actaully discussed about a week ago a little but

2020-03-22T23:49:08.277800Z

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.

2020-03-22T23:53:22.278600Z

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