This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-30
Channels
- # babashka (44)
- # beginners (29)
- # calva (80)
- # cider (11)
- # clara (1)
- # clj-kondo (9)
- # clojure (80)
- # clojure-europe (21)
- # clojure-france (13)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (6)
- # clojurescript (72)
- # code-reviews (43)
- # cursive (11)
- # datomic (27)
- # events (13)
- # figwheel-main (12)
- # fulcro (27)
- # graalvm (1)
- # jackdaw (2)
- # kaocha (1)
- # malli (4)
- # meander (13)
- # nrepl (2)
- # pathom (8)
- # re-frame (4)
- # reagent (7)
- # reitit (9)
- # remote-jobs (1)
- # reveal (56)
- # ring-swagger (2)
- # sci (5)
- # shadow-cljs (20)
- # slack-help (2)
- # tools-deps (96)
- # vim (7)
- # xtdb (30)
@noprompt this isn't necessarily in the scope of meander but saw some of your comments on specter but curious your thoughts on how you'd express something like creating lenses in clojure
It depends on what you mean by creating. I’m not sure what comments you saw in particular but I’m sure, whatever they are, my sentiment is probably the same regarding them — negative. Even in a statically typed setting where you can avoid the sort of bugs that come up in Clojure, they’re unappealing to me. Personally, I think the cognitive expense is too high. You have to learn how they work and then learn how they are used in practice.
tend to agree hence conflicted/searching for a better answer. the only other alternative i've found (and my current approach) is a boilerplate heavy conversion layer
for clarity: core problem is going from "unknown shape" => "known shape" => known shape modifications => "unknown shape"
"known shape" => "known shape modifications
: where meander shines
projecting the data modifications back out to the unknown shape
=> challenge
one thing i'm gonna try is just to see if in practice, i can switch the left/write clauses in meander and see if that automagically gives me the
lol, well that failed quickly. c'est la vie, battle to fight for another dayf^-1
projection
problem space: UI databinding - some bound data => change shape to match expected shape => apply widget_render() function
the challenge lying in making it bidirectional, specifically in the inverse, and in turn making it composable
ex: a listview widget
Change src shape:
[{:name "foo" :addr "123 bar"} {:name "baz" :addr "456 baz"}] => [{:header "foo" :title "123 bar"} {:header "baz" :title "456baz"}]
but then being able to reflect this change:
[{:header "new foo" :title "123 bar"} {:header "baz" :title "new address"}] => [{:name "new foo" :addr "123 bar"} {:name "baz" :addr "new address"}]