specter

Latest version: 1.1.3
jsa-aerial 2019-08-06T16:39:37.006200Z

I think I'm confused.

nathanmarz 2019-08-06T16:55:40.007100Z

filterer navigates to a sequence of all "locations" in the sequence matching the predicate

nathanmarz 2019-08-06T16:55:53.007500Z

with index 0 being the first location, index 1 being the second, and so on

nathanmarz 2019-08-06T16:56:12.007900Z

transformations to the sequence navigated to by filterer can only affect those locations

nathanmarz 2019-08-06T16:56:51.008400Z

increasing the size of the sequence just causes indexes past the last location to be ignored

nathanmarz 2019-08-06T16:57:26.009100Z

there's a special case for when you reduce the size of the sequence to set the removed locations to NONE

jsa-aerial 2019-08-06T17:15:41.011600Z

Hmmmm, OK. So, there is no 'obvious / out of the box' way to insert? Using a combo of index-vals and before-index works fine, is that the 'right way' to do this?

nathanmarz 2019-08-06T17:29:43.012Z

zipper navigators are good for this use case

nathanmarz 2019-08-06T17:30:09.012200Z

com.rpl.specter.zipper

nathanmarz 2019-08-06T17:33:28.012400Z

user=> (setval [z/VECTOR-ZIP (z/find-first #(= "b" %)) z/INNER-LEFT] [77] ["a" "b" "c"])
["a" 77 "b" "c"]

jsa-aerial 2019-08-06T17:59:29.012600Z

😮

jsa-aerial 2019-08-06T18:00:42.013Z

Presumably that is much more efficient as well?

nathanmarz 2019-08-06T18:59:14.013200Z

unclear

nathanmarz 2019-08-06T18:59:28.013500Z

zippers do have overhead

nathanmarz 2019-08-06T19:00:05.014300Z

the com.rpl.specter.zipper namespace is not totally fleshed out, so there are other navigators that could be added to make it more efficient

✔️ 1
nathanmarz 2019-08-06T19:00:30.014900Z

such as the zipper equivalent of before-index instead of doing INNER-LEFT

lellis 2019-08-06T19:05:54.016200Z

Hi All, i have a question. Why when use this symbol ’[?e :a true] inside a select nav its resolve to [?e :a G__161070]? ex: (select [ALL (pred #(= (log/spy %) (log/spy '[?e true])))] ['[?e true]]) return [].