What does HackerNews think of milewski-ctfp-pdf?

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

Language: TeX

#1 in C++
#2 in JavaScript
#1 in Haskell
#1 in LaTeX
#2 in Scala
Algebra-driven design (book):

https://algebradriven.design/

Category theory for programmers (free book):

https://github.com/hmemcpy/milewski-ctfp-pdf

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 have 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.

Another category theory resource you may find interesting is Category theory for programmers by Bartosz Milewski. He also has a great video course on youtube. If you want a taste of what category theory is, you can checkout his interview on corecursive.

https://github.com/hmemcpy/milewski-ctfp-pdf

You don't need a PhD, you just need the first few chapters of [Category Theory for Programmers](https://github.com/hmemcpy/milewski-ctfp-pdf) :)
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

See also Category Theory for Programmers[1] book.

[1] https://github.com/hmemcpy/milewski-ctfp-pdf

Also I personally recommend to take a look to this series before diving into his great introductory book about category theory [1]. Seeing the application of the theoretical concepts and deriving the code yourself makes it more approachable for completly begginers from my experience.

1. https://github.com/hmemcpy/milewski-ctfp-pdf

Bartosz Milewski's lectures on category theory are great. Also, the accompanying book is well written (and free)!

lectures -> https://www.youtube.com/user/DrBartosz

book -> https://github.com/hmemcpy/milewski-ctfp-pdf

Seems a good time for adding a Julia flavor for Category Theory for Programmers[1] book. Similar to what was done recently with Scala[2], and now work-in-progress OCaml[3] flavor.

[1] https://github.com/hmemcpy/milewski-ctfp-pdf/

[2] https://github.com/hmemcpy/milewski-ctfp-pdf/releases/tag/v1...

[3] https://github.com/hmemcpy/milewski-ctfp-pdf/issues/169#issu...

With some consistent dedicated effort you could maybe go through Category Theory for Programmers https://github.com/hmemcpy/milewski-ctfp-pdf
I watched Bartosz Milewski's videos https://m.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7F...

The pdf generated from his blog is also interesting :

https://github.com/hmemcpy/milewski-ctfp-pdf

These are the best resources I found about the subject.

AD is important to understand for ML practitioners in the same way as compilers are important to understand for programmers. You can get away without knowing all the details, but it helps to understand where your gradients come from. However this paper is probably not be a good place to start if you're new to AD. If you want a better introduction, here are a few good resources:

Autodidact is a pedagogical implementation of AD: https://github.com/mattjj/autodidact

A nice literature review from JMLR: http://www.jmlr.org/papers/volume18/17-468/17-468.pdf

This paper reinterprets AD through the lens of category theory, an abstraction for modeling a wide class of problems in math and CS. It provides a language to describe these problems in a simple and powerful way, and is the foundation for a lot of work in functional programming (if you're interested in that kind of stuff). There was a thread on HN recently that discusses why category theory is useful: https://news.ycombinator.com/item?id=18267536

"Category Theory for the Working Hacker" by Philip Wadler is a great talk if you're interested in learning more: https://www.youtube.com/watch?v=gui_SE8rJUM

Also recommend checking out Bartosz Milewski's "Category Theory for Programmers": https://github.com/hmemcpy/milewski-ctfp-pdf

> is category theory worth learning?

Yes. Very much so. Especially if you're programming functionally. It will explain why all this is the way it is. Why sum types and product types are what they are, the big picture on functors, monads, etc, etc.

I like Bartosz Milewski's introduction [1][2] where he states (paraphrasing) that he started programming back in the day with assembly, and as programs got more difficult we needed higher level abstractions, so he moved to procedural languages, and then after that another higher abstraction was OO, but he realised that OO has a fundamental problem: objects don't compose, and so he found himself functional programming with Haskell... each time looking for better abstractions.

Category Theory is the ultimate abstraction and although you can't write code with it, you can step outside of the detail of complex solutions and think about the bigger picture and then use that bigger picture to help you build your detail. And that's why I think it's valuable.

I particularly like his journey too, as it exactly reflects my own.

[1] Category Theory for Programmers - https://github.com/hmemcpy/milewski-ctfp-pdf

[2] https://www.youtube.com/user/DrBartosz/playlists

I also heartily recommend this. I’ve been watching the videos whilst ploughing through the PDF book version [1] on my Kindle. He really is a very good teacher.

[1] https://github.com/hmemcpy/milewski-ctfp-pdf