This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-20
Channels
- # babashka (36)
- # beginners (26)
- # calva (1)
- # clj-kondo (10)
- # clojure (94)
- # clojure-europe (7)
- # clojure-uk (16)
- # clojurescript (5)
- # conjure (6)
- # data-science (8)
- # datomic (24)
- # events (1)
- # fulcro (11)
- # funcool (1)
- # graalvm (6)
- # malli (18)
- # nrepl (5)
- # off-topic (13)
- # parinfer (3)
- # reagent (3)
- # reitit (6)
- # shadow-cljs (14)
well that was fun... had some hours alone, wrote a sketch of a monad lib which fixes the principal difficulties i've been having with funcool/cats
(principally around lifting and cats' use of dynvars)
do you plan to share it?
yes - https://github.com/mccraigmccraig/mopr/blob/master/src/mopr/control/monad.cljc
still very much a work-in-progress though
no comments and all in one repl-driven ns 😬
but it lets me define some more complex monad types like promise-of-reader-and-writer, and can auto-lift from other types - which is roughly where i wanted to get to
the background being that i've got a load of code structured with a promise monad, but i would like to introduce a reader and a writer
the reader so i can pass around a log-context-value for easier tracing of production log messages, and also to pass around the system map
the writer so i can introduce some improved tracing of async code for debugging
and i wanted it to auto-lift so that i could incrementally add the new monads in to the old system, witthout being forced to refactor the whole thing in one hit
isn't the system map a pretty large context to carry around on every call?
it's just a reference
and we currently have to pass it around everywhere it might be needed as an explicit parameter anyway
ahh gotcha
okay yeah that makes sense
the debug-ctx stuff in liberator was super useful for that in the context of v complex http routing so can imagine having that extra info would make debugging all the wild promise stuff easier