This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-14
Channels
- # aleph (3)
- # announcements (1)
- # babashka (36)
- # babashka-sci-dev (4)
- # beginners (62)
- # biff (2)
- # calva (13)
- # cider (4)
- # clj-kondo (6)
- # cljdoc (17)
- # clojure (142)
- # clojure-dev (6)
- # clojure-europe (62)
- # clojurescript (20)
- # core-async (26)
- # cursive (18)
- # data-oriented-programming (9)
- # data-science (1)
- # datahike (18)
- # events (4)
- # fulcro (4)
- # graalvm (2)
- # hyperfiddle (15)
- # interop (1)
- # jobs-discuss (8)
- # leiningen (2)
- # lsp (91)
- # malli (1)
- # missionary (11)
- # nbb (65)
- # off-topic (50)
- # practicalli (2)
- # programming-beginners (4)
- # re-frame (18)
- # remote-jobs (1)
- # shadow-cljs (53)
- # spacemacs (1)
- # specter (2)
- # sql (17)
- # tools-build (63)
- # web-security (1)
- # xtdb (15)
This is interesting:
(defn ^:no-doc clock* [Hz]
#?(:cljs
(fn [n t]
(let [c (->Clock Hz 0 nil t)]
(set! (.-callback c)
(fn [_] (set! (.-raf c) 0) (n)))
(n) c))))
(p/defn clock
"The number of milliseconds elapsed since January 1, 1970, with custom `Hz` frequency.
If `Hz` is 0, sample at the browser Animation Frame speed."
[Hz] (new (clock* Hz)))
What's new
on a fn [n t]
?
"new on a p/fn calls the fn (aka boots the DAG). new on a missionary flow is basically “await” for flows" This doesn't look like either of those.fn n t is a flow
I'm not positive that I'm reading this correctly. It's calling new on the fn, right? (new (fn [n t] ,,, ))
You're saying that (fn [n t] ,,,)
is a flow or it returns a flow?
you're reading it correctly; missionary flows concretely are encoded as fn notify terminate
photon does not change the rules of clojure.core/fn
here, the clojure.core/fn is defined outside of a photon block anyway; and btw if you put a clojure.core/fn in a Photon block the compiler will assert as we haven't implemented it yet
https://github.com/leonoel/flow this is the flow spec that missionary implements; leo likes using functions to encode flows (no deftype) because it is a portable zero dependency interface
Has pagination been (at least sorta) figured out? We have some internal admin dashboards that kinda suck to implement on account of needing to make one off apis for everything so this would be pretty convenient - just obviously need to page through a lot of stuff
In particular "if you refresh you stay on the same page w/ the same sort conditions" has been a feature we are always too lazy to implement and becomes annoying
sure, the basics are in place and pagination state is indeed routable, we just need to make a good UI widget for it with infinite scroll or something
so the photon side is kinda all set then? (i'm still fuzzy on the boundary between hyperfiddle the product and photon the library/product)
everything that a clojure programmer would want is open source, the product will be a notebook or replit type code playground – opt-in managed experience
sorry when i said the pagination basics are in place – let me clarify, they are designed and live in our production pilot but on the last gen of our stack from two years ago. Pagination and routing is at the UI modeling DSL layer. The photon layer is just client/server managed network, fullstack app all in one file.
Photon has some rough edges but is working and increasing in maturity rapidly. The next version of the UI modeling language (based on Photon) is half baked