meander

All things about https://github.com/noprompt/meander Need help and no one responded? Feel free to ping @U5K8NTHEZ
ikrimael 2020-07-30T22:38:19.282100Z

@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

ikrimael 2020-07-30T22:39:42.283200Z

context: my shallow mental model of specter == lenses/cursors

ikrimael 2020-07-30T22:40:59.284300Z

problem space: UI databinding - some bound data => change shape to match expected shape => apply widget_render() function

ikrimael 2020-07-30T22:42:53.285800Z

the challenge lying in making it bidirectional, specifically in the inverse, and in turn making it composable

ikrimael 2020-07-30T22:46:43.289300Z

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"}]

ikrimael 2020-07-30T22:48:44.290900Z

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"}]

ikrimael 2020-07-30T22:57:24.295700Z

note: i think this feels like a different enough problem domain that's orthogonal to meander. also concede to the fp folks that lenses do address this but i still find them "high cognitive load" (debugging, groking code weeks later, etc)

ikrimael 2020-07-30T23:00:57.297700Z

mostly curious if others have traversed this problem space before experimenting myself (current thought is using macros and m/rewrite to create that inverse mapping automatically from meander)