This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-27
Channels
- # babashka (45)
- # beginners (44)
- # calva (3)
- # cider (14)
- # clara (4)
- # clj-commons (3)
- # clj-otel (4)
- # cljsjs (1)
- # cljsrn (111)
- # clojars (5)
- # clojure (62)
- # clojure-europe (14)
- # clojure-nl (2)
- # clojure-uk (4)
- # clojurescript (31)
- # community-development (16)
- # conjure (7)
- # cursive (9)
- # data-science (1)
- # datalevin (10)
- # docker (1)
- # emacs (20)
- # fulcro (7)
- # helix (10)
- # jobs (4)
- # lsp (22)
- # malli (35)
- # meander (12)
- # music (1)
- # nbb (2)
- # off-topic (5)
- # pathom (3)
- # quil (1)
- # re-frame (12)
- # react (6)
- # reagent (18)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (4)
- # ring (1)
- # shadow-cljs (10)
- # spacemacs (9)
- # tools-build (17)
Do you know an explanation of epochal time model? And how do clojure state primitives make time a first class object? I will rewatch are we there yet.
continuous time - changes just happen, you might hit "before change, during change, after change".
epochal time - there is no "during change". Either you are before the change, or after the change.
Example application of epochal time: atom
.
when you deref an atom, you either get the value before the change, or the value after the change. You don't get a partially applied change (which is often an invalid state)
Other examples of epocal time are #datascript, #datomic and #xtdb.
Expanding on this: you might want to check out [swap-vals!](https://clojuredocs.org/clojure.core/swap-vals!) if you don't know about it already. it's like swap!, except returns both the old and new value, so if your swap function does something maybe, you can compare old and new after the swap to see if it did in fact do something. (a deref and then swap!/reset! can lead to a race condition) I'm using it here for example: https://github.com/ivarref/mikkmokk-proxy/blob/0afe32ab7cbb6a7c3f8e56bd3849ceb14a7bbe24/src/com/github/ivarref/mikkmokk_proxy.clj#L237
why didn't the swap-vals! link work... because of !
?