Fork me on GitHub
#specter
<
2017-10-07
>
gdeer8102:10:13

ha, I love when I find holes in my understanding of how the code works. my new obsession is INDEXED-VALS on its own as a select it totally makes sense, but change it to a transform and compose it with another navigator and you blow my cognitive budget. I thought this code was going to return the collection unchanged (setval [INDEXED-VALS FIRST] 0 [1 2 3]) but to achieve that result you have to pass it length - 1 instead of 0

Drew Verlee02:10:19

So, i’m sure this has come up before. But i can’t find any discussion on it. Possible because its a nonsense idea. But isn’t HTML a deeply nested structure? Couldn’t Specter be used to manipulate it? Actual, come to think of it, is there any overlap in concept to something like jquery?

Drew Verlee02:10:24

Also is there a way to just navigate to something based not on the path but based off some predicate? like any map with the key :foo

Drew Verlee02:10:02

um, yea. its called walker

gdeer8102:10:02

I just realized that (setval [INDEXED-VALS FIRST] 0 [1 2 3]) actually reverses the collection

gdeer8103:10:40

well anyway, I'm going to put it in as a koan so it will be interesting to see how many people come to the channel to ask about this one ha

nathanmarz18:10:45

@james Great screencast! I'll add it as a link to the readme

nathanmarz18:10:28

@drewverlee yea, Specter is perfect for manipulating HTML

nathanmarz18:10:59

it would be easy to make compound navigators to re-create the various query capabilities of jquery