~/talk

What a View! Building Your Own (Lazy) Range Adaptors (part 1 of 2)

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp]
links:none on file
slides:none on file

Three incremental C++ implementations parse Rust-style Unicode escapes like \U{...}: a raw loop, a range-based algorithm, then a lazy range adapters version that composes drop/take into a Unicode subrange and validates 1–6 hex digits. Key tools: C++20 ranges, sentinels, counted iterator, views (slice/stride), and iterator category upgrades (input→forward→random access). Benchmarks expose sharp costs — shuffling 5M elements is ~30ms for vector, ~38ms for deque, ~11.5 hours for list — and the lazy view approach succeeds in clearer, composable parsing.

AI-written summary · about

  1. 0:00Intro
  2. 6:55Agenda
  3. 8:32Definition
  4. 11:27Linear Search
  5. 14:10Iterators
  6. 15:14Span
  7. 18:02Counted Iterator
  8. 19:52Sentinel
  9. 21:50Input Range
  10. 22:51Common Range
  11. 24:53Forward Iterator
  12. 26:42Equal Iterator
  13. 29:47Naive Shuffle
  14. 31:00Random Access Iterator
  15. 32:10Continuous Ranges
  16. 34:10Collatz conjecture
  17. 36:16Range as equal
  18. 37:03Spinto views
  19. 38:29What is a view
  20. 39:06Which views are in the namespace
  21. 39:58What is the significance of enable view
  22. 43:09Slice view
  23. 44:30Take and drop
  24. 49:05Strap you
~/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.