matrix

2023-01-28T02:12:02.327189Z

I’m not sure how to make cf-freeze play nicely with with-c-conj . Let’s say we have a rule like

:derived-vals (cF (with-c-conj []
                    (if-let [dep (mget me :some-slot)]
                      (next-derived-val dep)
                      (cf-freeze))))
The last value in the vector (mget md :derived-vals) will be a vector of all the values I made an alternative that ignores the cached val
(defmacro freeze-nil []
  `(do
     (rmap-setf [:optimize ~'_cell] :freeze)
     nil))

kennytilton 2023-01-28T04:32:46.628049Z

Sorry, a little woozy just now. I tried to give us the option to specify the frozen value:

(defmacro cf-freeze [& [value]]
  (let [value-ref (or value '_cache)]
    `(do
       (rmap-setf [:optimize ~'_cell] :freeze)
       ~value-ref)))
So (cf-freeze nil) should do what you want, if my wooze is not in the way. 🙂 Let me know if I misunderstood!

kennytilton 2023-01-28T04:34:18.713429Z

Or, of course, if that ^^^ is not working!!

kennytilton 2023-01-28T04:37:12.344029Z

Or maybe I never pushed the latest version?

kennytilton 2023-01-28T04:55:34.976899Z

Finally (?) your solution is fine. 🙂