-
Notifications
You must be signed in to change notification settings - Fork 0
bullet log
Notes / Tasks (.) / Events (o) / Thoughts (-)
Collections:
It’s nice that in Clojure you can say (-> foo :a :b :c) takes advantage of -> adding parens if you don’t provide any cq would currently need (| foo (get :a) (get :b) (get :c)) So, should keywords eval to themselves (as do numbers, strings, etc.) or look themselves up in a map? We could change the default to lookup and require quote to eval to self: (| foo :a :b :c) and (| {‘:a 10, ‘:b 20} (get ‘:a)) bleh That’s ugly – try to make in context-sensitive
jq complains. Our new nav-based approach does a pretty useless degenerative result: (cq/eval 42 (cq/with-refer-all [cq] (modify 43 .))) ;; => (42) If we want to complain, we could check in:
- modify: as soon as we invoke the nav-mf, assert all items are navs
- or have the Object INavigation complain, but have nav-get (and all other nav ctors) check at construct time that their parent implements INavigation and wrap it in a terminal nav if not.
- In both cases, how to detect if an object is an nav or not when all objects have a default impl.
- Maybe use chart (empty vector is not a nav), or some new protocol method like `is-root?`?
Maybe don’t complain (Clojure complains on empty vectors for update, and we hate it), and for jq-compatiliby wrap modify in jq-modify that checks the naviness (still need to choose how)
Describing this to kids via Minecraft analogy Tension between parts and wholes oo says make an object (parts are hidden, “enapsulated”) functional programmers say it’s all data (you can see the data parts) jq/cq give us a different way to describe partial-wholes: compare to lazy seq pipelines and transducers?
o Discussed names of invoke (), eval, navigate o Reviewed assign o Discussed Callable keywords o Discussed value of pairing vs code reviews o Discussed bullet journaling method o How shall we communicate about this project? o Discussed modify on non-paths