9 ms·
An invitation to category theory
- bojo 8y agoFor anyone that may want a deeper look into Category Theory from the perspective of a programmer I highly recommend - https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ https://bartoszmilewski.com/2014/10/28/category-theory-for-p... He also covers it all in few youtube series - https://www.youtube.com/user/DrBartosz/playlists https://www.youtube.com/user/DrBartosz/playlists
- jxub 8y agoSince yesterday, his blog posts are also available as a hardcover book: http://www.blurb.com/b/9008339-category-theory-for-programmers http://www.blurb.com/b/9008339-category-theory-for-programme...
- macmac 8y agoI wish it could be shipped from Europe too. Shipping makes it prohibitively expensive.
- bg4 8y agoThanks for this, just bought a copy. We watched his youtube series at work and it was great.
- mesarvagya 8y agoI purchased the book about 2 months ago from lulu, but it looks like it is not present there anymore.
- louthy 8y agoI 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 https://github.com/hmemcpy/milewski-ctfp-pdf
- theoh 8y agoJust another opinion on this: I don't think "Category Theory for Programmers" is that great from a pedagogical perspective. I get that its freely accessible, but like the "Haskell from First Principles" book, the quality of the exposition is a bit questionable. Call me old-fashioned, but when it comes to learning math, I believe it pays to seek out people who really know how to teach the subject, rather than (what might uncharitably be described as) self-promoters churning out half-baked introductory materials. This goes for the "Catsters" video series as well. Everybody points to them as if they're brilliant, but compared to what standard? Sometimes it feels as if the people who blithely link to these resources are indifferent to whether the teaching is good or bad. Even Mac Lane's book "Categories for the Working Mathematician" has been credibly criticised for being poorly written—but because it's so famous/prestigious it still gets loads of five-star reviews. Personally, I'd recommend Categories and Computer Science by RFC Walters, or Steve Awodey's Category Theory for a more general overview. (This might all sound peevish, but it feels like a real hazard of trying to learn difficult things from the web: the most conspicuous and superficially charismatic offerings/lecture notes/blogs don't always turn out to be reliable or well thought-out when it comes to an average person actually trying to learn the material. Monads are a good example of this bad situation. A good way to learn about monads would be to have a few, shortish, interactive conversations with an expert. Ten thousand cute online monad analogy tutorials is the opposite of this: it's actively counterproductive because each new analogy just creates more vagueness and FUD.)
- elbear 8y agoIt would help readers if you pointed out specifically what you think is wrong with Category Theory for Programmers.
- Legogris 8y agoComplementary: "The Catsters" on Youtube: https://www.youtube.com/user/TheCatsters https://www.youtube.com/user/TheCatsters
- mesarvagya 8y agoI also brought the book written by Bartosz titled "Category Theory for Programmers", to support his work in this field. Good book.
- kqr2 8y agoIt seems like the book is "unofficial" and published by someone else so not sure if the author actually gets any royalties.
- selimthegrim 8y agoAlso compelled to plug this by a friend of a friend - https://golem.ph.utexas.edu/category/2016/11/category_theory_in_context.html https://golem.ph.utexas.edu/category/2016/11/category_theory...
- adamch 8y agoMy team at work has been studying CT. Every week we read one chapter of Category Theory for Programmers. Then every Thursday we discuss the chapter and our problem solutions together. It's been very fun. Our discussions help forge links between the category world and our day-to-day programming. We're only 3 chapters in, so I can't say it's given me some huge insight into programming. But as we move from Go to Rust/Typescript, it gives us a useful way to think about the correctness of our programs and a useful shared vocabulary for talking about types in a language-agnostic way.
- kgc 8y agoWhy are you moving from Go to Rust/Typescript?
- stuxnet79 8y agoThis is fascinating. I would love to set up something like this at my current workplace. How much time do you allocate during Thursdays to review?
- crimsonalucard 8y agoMy workplace is the exact opposite. They scoff at types let alone categories. One guy literally told me, and I kid you not, that he doesn't need type checking, all he needs is to be "careful." We don't learn things together, instead what happens is if I present something new, another person stays silent looks it up at home on google and comes to work the next day pretending he's an expert on the topic. It's toxic.
- zmix 8y agoWow, that's must be some real uncompetitional place. Nobody likes to be called out on anything!
- jasim 8y agoTai-Danae Bradley, the author of this post, has also written an illustrated booklet (freely available) about Category Theory: https://johncarlosbaez.wordpress.com/2018/09/18/what-is-applied-category-theory/ https://johncarlosbaez.wordpress.com/2018/09/18/what-is-appl...
- ikfmpwdsoz 8y agoAnd, additionally, was a host on the YouTube series PBS Infinite Series, shortly before it was cancelled.
- laylomo2 8y agoI'm still sad that it was cancelled. She's a great presenter and I was really excited about the series they were planning on category theory.
- typon 8y agoThe way this book is so wonderfully illustrated and written is why we need more women in math/tech. I haven't read any paper/book on abstract math/category theory that wasn't extremely dry and boring
- sridca 8y agoHmm, on what factual basis did you come to the conclusion that there is a strong association between author's gender and illustrative nature of a math/science writing?
- sridca 8y agoShe has written introductory blog posts on CT as well: https://www.math3ma.com/blog/what-is-category-theory-anyway https://www.math3ma.com/blog/what-is-category-theory-anyway
- Bootvis 8y agoIf you’re in Amsterdam, FP-AMS is organizing a CT study group: https://www.meetup.com/nl-NL/fp-ams/ https://www.meetup.com/nl-NL/fp-ams/
- lolc 8y agoThis is the first explanation of Category Theory that I could relate to. I'd tried reading into it before, but quickly lost ground with all the theoremizing going on. As is typical with mathematics, once you understand it, it seems trivial. But getting there is not. So thanks for the map.
- tombert 8y agoIn the trend of showing other people introductions to category theory, I recommend Peter Smith's "Category Theory: A Gentle Introduction", available online: https://www.logicmatters.net/resources/pdfs/GentleIntro.pdf https://www.logicmatters.net/resources/pdfs/GentleIntro.pdf It assumes a bit more knowledge coming in, but it's really what made the entire thing stick for me.
- escherplex 8y agoI'd add to that a complementary text by Barr and Wells: Category Theory for Computing Science (Revised 2013) http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf http://www.math.mcgill.ca/triples/Barr-Wells-ctcs.pdf
- hazz99 8y agoAs someone interested in functional programming, but works almost entirely in imperative languages, is category theory worth learning? Function programming heavily impacted how I write imperative code. Would I have similar revelations with category theory – maybe write better abstractions?
- platz 8y agoIt generally is not going to help you write application code, no. Heavy FP folks sometimes study it out of natural curiosity though. There are a few examples of libraries that are directly influenced by category theory, but they are few in number.
- deleted 8y ago[deleted]
- empath75 8y agohttp://math.ucr.edu/home/baez/rosetta.pdf http://math.ucr.edu/home/baez/rosetta.pdf It's worth reading this if you've got a math background at all. It's a nice summary of what Category Theory is and potential applications for it.
- louthy 8y ago> 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 https://github.com/hmemcpy/milewski-ctfp-pdf [2] https://www.youtube.com/user/DrBartosz/playlists https://www.youtube.com/user/DrBartosz/playlists
- cosmic_quanta 8y agoWhat a wonderful introduction of category theory. I didn't know about it before reading this, but I must say I am intrigued.
- mkw5053 8y agoFor those in the SF area, a group[1] recently started working through Bartosz Milewski's Category Theory for Programmers [2]. [1] https://www.meetup.com/SF-Types-Theorems-and-Programming-Languages/events/255385123/ https://www.meetup.com/SF-Types-Theorems-and-Programming-Lan... [2] https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ https://bartoszmilewski.com/2014/10/28/category-theory-for-p...
- Koshkin 8y agoTruth to be told, learning Category Theory will make you a better software engineer in the same sense and to the same degree as learning Quantum Field Theory would make one a better electical engineer. It might get you more excited about your profession, but at the practical level it will be more of a distraction than an aid.
- Epenthesis 8y agoYMMV massively depending on what exactly you're working in. I've found when I'm writing libraries that will be leveraged by other programmers, especially in a modern/high level language, insights I've derived from my understanding of category theory have been incredibly valuable. If you're working very close to the metal (eg, embedded), very close to non-technical users (UI stuff, edge layer business logic), or in less featureful languages, then you'll get much less value.
- lordnacho 8y agoSo, category theory is the abstraction of abstractions? Is that what it's saying?
- mikorym 8y agoSet theory is a foundation for modeling abstract structures. Category theory is a foundation for modeling abstract structures together with structure preserving relationships between them. (Once one has identity relationships then in fact the structures themselves can be disregarded and one is left with a study of simply structure preserving relationships.)
- draw_down 8y agoIt is just unfortunately not very clear what sort of insights come from it. Or maybe I should say, the explanations of the insights that come from it are not things I recognize as useful, surely due to my lack of experience. Or to put it yet another way, as soon as one understands monads, one becomes unable to explain them to someone who doesn't. Groups have morphisms, okay great. I don't know what to do with that, even if I'm sure it's important.
- spinningslate 8y agoI found this really useful. I've had multiple, unsuccessful attempts at grokking category theory, and never really felt I got it. The closest was John Baez's online course [0]. I don't have a particular aptitude for maths (as an engineer by training, maths makes sense to me as a tool for solving problems - not as a source of study in and of itself). Most all the introductions to CT I've read get into the maths very early. That's entirely understandable. I personally find I need a more intuitive description of the concepts first, using non-mathematical exemplars. OP is, thus far, the introduction that best articulates things for me in those intuitive terms. That's in no way a criticism of more formal/abstract treatments: I've great admiration for those who naturally create and assimilate things that way. I wish I was one. [0]https://forum.azimuthproject.org/discussion/1717/welcome-to-the-applied-category-theory-course https://forum.azimuthproject.org/discussion/1717/welcome-to-...
- yenwel 8y agoAlso nice: Erik Meijer Explains it well: https://www.youtube.com/watch?v=JMP6gI5mLHc https://www.youtube.com/watch?v=JMP6gI5mLHc (check out FP101 on edx) Statebox guys doing stuff with category theory, blockchain and petrinets: https://www.youtube.com/user/wires0 https://www.youtube.com/user/wires0 https://statebox.org/ https://statebox.org/ Graphical linear algebra: https://graphicallinearalgebra.net/ https://graphicallinearalgebra.net/ Jules Hedges working on game theory : https://julesh.com/ https://julesh.com/