HackerTubewatch
Surprise me
Frame from John Wiegley: Putting Lenses to Work Plays via YouTube's privacy-enhanced embed

John Wiegley: Putting Lenses to Work

Bay Area Haskell
Talks
YouTube
4 HN users recommended this talk4 months2020–2024 score 5
Years with an HN recommendation, 2007–2026

HN recommends it as the fastest way to learn lenses by example, with far-out examples later on.

John Wiegley's BayHac 2017 talk walks through Haskell lenses by example, showing many practical uses beyond simple record access. It is aimed at people who want to become productive with the lens library.

“you can learn enough lens to be productive in 1 hours with this talk without reading docs at all” (HN, 2020)

2 strong recommendations · 3 recommendations · Talks · intermediate

5 Hacker News comments

From the HN archive; up to 20 kept per video, favoring different commenters. Recommendations first.

@platz Jun 2020 Strongly recommends
on HN thread Haskell for a New Decade [pdf]
and you can learn enough lens to be productive in 1 hours with this talk without reading docs at all. You can skip the theory and go straight to usage: [this video]
Learn enough lens usage to be productive in an hour.
@turboponyy Jul 2024 Strongly recommends
on HN thread Ask HN: What resources do you recommend for learning Haskell?
As with anything Haskell, one could simply reply with "here's the formal definition." But in easily digestible terms, it's a way to narrow your view over a collection to a subset that satisfies some property, and perhaps perform some operations on that subset. This video presentation (with a very humorous audience dynamic, might I add) serves as a great introduction by example: [this video]
Great introduction to lenses by example, with humorous audience.
@ParetoOptimal Jun 2022 Recommends
on HN thread Dhall: A Gateway Drug to Haskell
Good examples in "Putting lenses to work" by John Weigley: [this video] Then for a great book that gives a great understanding see Chris Penner's amazing and fun "Optics by example: [link]
Good examples of lens usage.
@ParetoOptimal Jun 2022 Recommends
on HN thread Lenses
> Lenses let you do some amazing things, but I think most of their existence is just thanks to how truly horrible (nested) record field access and updates were. Only for the most basic uses. Architecting programs as folds or traversals can be powerful. One simple example of lenses i can think of being useful for more than record access is: > sumOf (folded . folded) [Just 1, Just 2] 3 More are in this presentation: [this video]
More examples of lenses beyond record access.
@lgas Nov 2022 Recommends
on HN thread Ask HN: What piece of code/codebase blew your mind when you saw it?
Definitely agree on lenses being one of the more mind blowing things I've encountered and eventually grokked in programming. I would also recommend [this video] as a good video on lenses in part because the latter portion has some pretty far-out examples of that deep well you mentioned.
Good lens video with far-out examples in the later portion.

Video list and Hacker News comment labels from HackerTube (prompted by @karpathy), released under ODC-By 1.0, built on the open-index/hacker-news archive. Hacker News data is provided by Y Combinator; comments remain the work of their authors. Video titles, channel names and thumbnails belong to their creators and are shown via YouTube. HackerTube Watch is an unofficial edition. Data export of 2026-10-31.

Keyboard shortcuts

/
Search
j k
Next / previous video
r
Surprise me
l
Like (video page)
w
Watch later (video page)
?
This help
Esc
Close