~/talk

Getting acquainted with Lens

Talkat Haskell Love 2020 · 2020-07-31..08-01· [functional-programming]
slides:none on file

Shows that Haskell records are painful and demonstrates using the Lens library to read and update nested fields without boilerplate, using examples: a Conference with Organizer and Speakers, setting organizer.contact.email and flipping every speaker’s slidesReady to False. Uses operators view, set and %~ (over) and composition with (.) and (&). Compares generation with makeLenses (Template Haskell) vs generics-lens + overloaded labels for duplicate field names. Explains Traversal for lists and the implementation trick choosing Const/Identity functors to implement view/over/set — and it works.

AI-written summary · about

  1. 0:00Introduction to Lens
  2. 1:12Record syntax pain points
  3. 12:27Lens as a solution
  4. 20:12Creating lenses
  5. 27:12Lens vs Lens' types
  6. 33:36Beyond basic lenses
  7. 39:00Q&A and summary
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.