Fork me on GitHub
#gratitude
<
2022-09-27
>
pez13:09:59

Immense Gratitude to @plexus for his presentation about zippers: https://lambdaisland.com/blog/2018-11-26-art-tree-shaping-clojure-zip It was some weeks since I saw it, and right now I felt the gratitude extra strong because I was starting to think that I am crazy failing to edit a node. After some hour (yes, I am that thick) of stupid stuff at the REPL I recalled that Arne had something about this very situation ... : > The second thing I wanted to point out. So, I said, okay, when you do this complete depth first walk of your tree, you get this special end value. That end value is in a way a zipper, but not everything works on it the way that it works on regular zippers. For instance, if you try to go to the previous node, again it’s just gonna give you nil. > The main thing here, main advice here is, this end, either just treat it as a sentinel, just as a way to say, “Okay, now you’re done,” or to get the root value back. But that’s kind of it. Don’t try to do too much with that. Don't try to do too much with the end value, Peter! Like editing it. Haha. Thanks, Arne! ❤️ gratitude

gratitude 9
❤️ 6
🤐 3
lread13:09:44

Yeah thanks @plexus this really helped me out when I was resurrecting rewrite-clj/rewrite-cljs to birth rewrite-clj v1. And it is of course referenced in the rewrite-clj user guide!

plexus14:09:44

Awwww :heart_hands:

1
plexus16:09:09

I do miss the time that I had that much time to work on a presentation 😄 I always intended to turn zipper-viz into an interactive online thing, still hoping someone runs with that someday https://github.com/lambdaisland/zipper-viz

plexus16:09:46

might be quite doable to use it from clerk :thinking_face:

😍 1
lread16:09:05

I was thinking of writing some sort of visualizer for rewrite-clj for portal.

pez16:09:10

Might be fun to experiment with for a #visual-tools meet, right @U066L8B18? 😃