HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
hmemcpy
milewski-ctfp-pdf
TeX2017–2026
hmemcpy / milewski-ctfp-pdf

milewski-ctfp-pdf

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source

32Distinct people
40Mentions
1Explicit recommenders
11.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Bartosz Milewski's 'Category Theory for Programmers' unofficial PDF and LaTeX source

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

This is such a great page, i love it and came across it multiple times while studying the matter. I still would vote to learn it from Milewski though. Learning this is a…

Krei-se used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year40 dated mentions

Observed mentions: 2017-09-30 13:53:10 UTC to 2026-07-14 20:08:44 UTC.

02468102017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 10 mentions; 2 submissions, 8 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC1028
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC936
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC413
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC404
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC303
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC211
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Category Theory For Programmers An unofficial PDF version of "Category Theory For Programmers" by Bartosz Milewski, converted from his blogpost series (with permission!). Buy the book Standard edition in full-color hardcover print Publish date: 12 August, 2019. Based off release tag v1.3.0. See errata-1.3.0 for changes and fixes since print. Scala Edition in paperback Publish date: 12 August, 2019. Based off release tag v1.3.0. See errata-scala for changes and fixes since print. Build the book The building workflow requires Nix. After installing Nix, you need to enable the upcoming "flake" feature which must be enabled manually the time being. This is needed to expose the new Nix commands and flakes support that are hidden behind feature-flags. Afterwards, type nix flake show in the root directory of the project to see all the available versions of this book. Then type nix build .#<edition> to build the edition you want (Scala, OCaml, Reason and their printed versions). For example, to build the Scala edition you'll have to type nix build .#ctfp-scala. For Haskell (the original version) that is just nix build .#ctfp. Upon successful compilation, the PDF file will be placed in the result directory. The command nix develop will provide a shell containing all the required dependencies to build the book manually using the provided Makefile. To build the ctfp-scala edition, just run make ctfp-scala. Contribute Contributors are welcome to contribute to this book by sending pull-requests. Once reviewed, the changes are merged in the main branch and will be incorporated in the next release. Note from Bartosz: I really appreciate all your contributions. You made this book much better than I could have imagined. Thank you! Find the list of contributors on Github. Acknowledgements PDF LaTeX source and the tools to create it are based on the work by Andres Raba. The book content is taken, with permission, from Bartosz Milewski's blogpost series, and adapted to the LaTeX format. The original blog post acknowledgments by Bartosz are consolidated in the Acknowledgments page at the end of the book. License The PDF book, .tex files, and associated images and figures in directories src/fig and src/content are licensed under Creative Commons Attribution-ShareAlike 4.0 International License. The script files scraper.py and others are licensed under GNU General Public License version 3.
Read the full README on GitHub

What Hacker News says

40 sources
In a different comment thread, someone mentioned the book, Category Theory for Programmers. Here's the Releases page with PDF files (click to open the Assets section). https://github.com/hmemcpy/milewski-ctfp-pdf/releases There are several versions with code examples in Haskell, OCaml, ReasonML, and Scala. These are all typically associated with functional programming and category theory. However, category theory is a much wider and deeper subject than any specific language, and deals with mathematical objects and concepts relevant to (more or less) all of programming.
In Actegories
Bartosz Milewski’s Category Theory for Programmers lectures [1] are good. Especially paired with his book [2]. I actually find that category theory is remarkably simple. At least at the level where it applies to day-to-day programming concepts. The one major benefit I got from it, was that it helped me reason about high level/abstract structure better (which helps my architectural designs/thinking). [1] https://youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7FMa... [2] https://github.com/hmemcpy/milewski-ctfp-pdf
In Why is it worth spending time on type theory? (2013)
Krei-se·Oct 25, 2024Recommendation phrase
This is such a great page, i love it and came across it multiple times while studying the matter. I still would vote to learn it from Milewski though. Learning this is a journey and the author of ct-illustrated is, i think, still in the middle of it. Milewski has made that trip multiple times already. The book and his blog are great places. https://github.com/hmemcpy/milewski-ctfp-pdf Book https://bartoszmilewski.com/2014/10/28/category-theory-for-p... Blog
In Category Theory Illustrated: Logic (2021)
I recently started reading Bartosz Milewski's Category Theory for Programmers[0] and while it's less about Haskell per se and more about the ideas behind it, I found it did a much better job at explaining Haskell to me than any other introduction I read before. At least I'm able to appreciate Typing the Technical Interview[1] now. :-) [0]: https://github.com/hmemcpy/milewski-ctfp-pdf [1]: https://aphyr.com/posts/342-typing-the-technical-interview
In Ask HN: What resources do you recommend for learning Haskell?
My method was to spend 25 years listening to colleagues mumble about Category Theory and slowly picking up the basics. Even I didn't really use Category Theory in my abstraction work. It's just that after months of effort to crack my problem, I showed my pages of work to the Category Theory folks and they were like "oh, it's simply Yoneda this and Yoneda that and your proof can be done in 4 lines.". That said, if I had to guess at what would be effective at getting up to speed without spending 25 years, would be to checkout https://github.com/hmemcpy/milewski-ctfp-pdf Category Theory for Programmers. Milewski was one of those people who were like "Oh, it's simply Yoneda this and Yoneda that", and he figured it out all himself in parallel without seeing my proof. But I doubt it will be like, knowing Category Theory will enable you to hav
Read the rest
e super powers for abstraction design. Rather it will be a matter of having enough mathematical tools at your disposal plus the right inspiration at the right time to realize that ones of those tools can happen to solve your abstraction programming problem you happen to be facing at some moment, in a way that is not obvious, if you are lucky. In fact, you likely have to first guess at what the right abstraction is and then fall back on Category Theory to verify the sanity of your guess.
In Why I am learning category theory
MIT's 18.S097: Programming with Categories with Brendan Fong, Bartosz Milewski and David Spivak is great: http://brendanfong.com/programmingcats.html All lectures from the course are in this playlist: https://www.youtube.com/playlist?list=PLhgq-BqyZ7i7MTGhUROZy... Milewski's free book Category Theory for Programmers is a "classic" as well https://github.com/hmemcpy/milewski-ctfp-pdf In general you can find videos on youtube of talks given at various industry functional programming conferences that often help since they start from the industry programmer point of view rather than the pure maths one. E.g. A practical introduction to Category Theory (for Scala devs) https://www.youtube.com/watch?v=GNG3Gk9KsoI
In Infinity Category Theory Offers a Bird’s-Eye View of Mathematics

Showing the 15 most recent of 40 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.