Cat Talks: Exploring Category Theory, Free Monads, and Functional Programming at Tubi
Cat Talks is Tubi’s internal bi‑weekly series where engineers discuss foundational topics such as category theory, functors, natural transformations, free monads, parser combinators, and lenses, using live coding in Haskell and Scala to deepen understanding of functional programming concepts.
At Tubi we run an interest group called “Cat Talks” that covers category theory, type theory, and various functional‑programming topics. Every two weeks colleagues gather to share and discuss a pre‑selected theme, sometimes inviting external speakers; Cat Talks is a series of sessions about category theory.
Many familiar concepts such as the Monad originate from category theory, and while many attempts exist to explain them with simple analogies, those explanations are often inaccurate or incomplete.
The most effective way to learn category‑theoretic concepts, we believe, is to discard preconceptions, start from the formal definitions, and then reinforce them with mathematical or functional‑programming examples. In Cat Talks we begin with the basics—Category, Functor, then Natural Transformation—and later move on to more playful topics such as “self‑functor monoids”.
The most recent Cat Talks session was a live‑coding demo of the Free monad. Building on the previously introduced Free‑forgetful adjunction and the earlier Free monoid concept, we used Haskell to define and derive the Free monad, illustrating its use with a simplified classic example—Teletype. We also touched on the relationship between Free monads and the currently hot topic of Algebraic effects.
Beyond the core category‑theory curriculum, the group has covered a variety of other subjects: Hailong showed how to implement a parser combinator from scratch and use it to build a simplified Emmet; Xusheng demonstrated a strongly‑typed CSV parser implemented with Scala generics; and an upcoming talk by Tristen will explore the principles and usage of Lenses.
We warmly welcome anyone interested in these topics to join the Cat Talks discussions; please contact [email protected] for details.
Author: Xinyuan Zhang, Tubi Backend Engineer
Bitu Technology
Bitu Technology is the registered company of Tubi's China team. We are engineers passionate about leveraging advanced technology to improve lives, and we hope to use this channel to connect and advance together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.