Fundamentals 4 min read

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.

Bitu Technology
Bitu Technology
Bitu Technology
Cat Talks: Exploring Category Theory, Free Monads, and Functional Programming at Tubi

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

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Scalafree monadHaskellparser combinator
Bitu Technology
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.