~/talk

Ropes: An Alternative to Ruby's Strings

Talkat RubyConf 2007 · 2007-11-02..11-04· [ruby]
links:none on file
slides:none on file

Ropes are presented as a binary-tree string alternative with constant-time append and sharing that reduces memory; slicing is log n in the implementation but can be O(1) by adding partial nodes. Implementation maps leaves lazily to files or substrings (lazy file-backed leaves), uses a 1KB default block so a 5MB file needs ~5000 blocks ~12 levels, and provides iterators via Ruby blocks. A Ruby library (0.1 alpha on ruby forge) exists; regex support is unresolved and some operations need rebalancing or C for speed.

AI-written summary · about

  1. 0:00Introduction
  2. 2:07The Programming Contest
  3. 2:45Backstory
  4. 6:03How Ropes Work
  5. 7:52Append
  6. 14:23Lazy Nodes
  7. 15:45Ruby Code
  8. 17:45Compute Split
  9. 19:55Iterators
  10. 21:26Each Line
  11. 22:30Ruby Forge
  12. 23:39Ropes
  13. 25:15Summary
  14. 32:16Piece Table
  15. 33:28Append Buffer
  16. 35:18Block Size
  17. 36:06Skip Lists
  18. 37:03Other Questions
~/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.