~/talk

Editing Trees with Zippers

Talkat Scala.IO 2017 · 2017-11-02..11-03· [frontend-architecture]
links:none on file
slides:none on file

Zippers let code traverse and mutate recursive trees without destructive updates by keeping a focus plus a context and implementing most moves as constant time pointer rearrangements, with the notable cost that O(1) operations except go-up which is O(n); improvement comes from changing the tree representation (scars, tripartite sections) or using indexed collections. Examples include a Scala implementation, uses in file systems and tiling window managers, and searcy JSON cursors using vectors for indices that keep original JSON immutable while enabling efficient edits.

AI-written summary · about

  1. 0:00Introduction
  2. 0:56What is Zipper
  3. 1:08What is Traverse
  4. 1:30Traverse Mutation
  5. 2:13Recursive
  6. 3:15Tree
  7. 4:37Subtree
  8. 4:57Zipper
  9. 5:26Zipper Scala
  10. 10:32Zipper FlatMap
  11. 11:15Insert Down
  12. 12:20Insert Left
  13. 12:37Insert Right
  14. 13:54Change
  15. 14:20Go Up
  16. 15:29Section
  17. 16:22Use Cases
  18. 17:48JSON Zippers
  19. 18:02Cursors
  20. 19:05Zipper with Focus
  21. 19:50Indexed Collections
  22. 24:17Traversal Mutation
  23. 25:04Derivative of Data Type
  24. 25:40Remove Recursion
  25. 28:43Visual Representation
  26. 29:36Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.