specter

nathanmarz 2023-02-10T02:01:22.554949Z

i became aware of lenses probably about a year after I made the first version of specter

nathanmarz 2023-02-10T02:01:50.424139Z

i'm not an expert in all the lens libraries, but the haskell one I know makes distinctions between lenses that go to one element vs. many

nathanmarz 2023-02-10T02:02:13.640219Z

not sure what you mean by making a navigator that handles joins

chromalchemy 2023-02-15T06:54:44.988429Z

I use Specter as an ad-hoc query language, and for sticky transformations as needed. When I need to join data, I could write a fn that that does a a select and use that as a “joined value” accessor. But that would have to scan every time. So I end up building a “join” map, mapping one value to the other. I even have a convenience fn to create these. Then i used these join-maps as functions in a Specter path: Nakedly they function as a predicate filter

(select [ALL join-map] col)
Or you can traverse the join with this:
(select [ALL (view join-map)] col)

nathanmarz 2023-02-10T02:02:36.340969Z

i would say that's out of scope for specter