Live data from Hacker News

Category Theory: Lecture Notes and Online Books

logicmatters.net

1–10 of 27 posts

Re: Category Theory: Lecture Notes and Online Books

#3
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

Seven Sketches in Compositionality by Spivak and Fong (https://math.mit.edu/~dspivak/teaching/sp18/7Sketches.pdf) is supposed to be very practical. It includes many examples, but I'm not sure how useful category theory actually is in the example cases.

There is the theory of monotone co-design (https://co-design.science/index.html) which is formulated using category theory. It seems pretty practical.

Then there's topological data analysis, which is clearly a practical subject, and can be formulated in terms of category theory: https://en.wikipedia.org/wiki/Topological_data_analysis

I'm not very knowledgeful of any of these subjects, but I, like you, got somewhat interested in category theory and tried to find how and where it's used some time ago. These are the main things I found.

Re: Category Theory: Lecture Notes and Online Books

#4
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

This might be an unpopular opinion, but category theory isn't very useful at low levels of abstraction. It is an elegant mental framework/model that can be used to generalize many concepts, but in my experience such generalizations rarely give additional insights about the concept it is generalizing.

Re: Category Theory: Lecture Notes and Online Books

#5
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

I feel like Scott Wlaschin uses an effective model of teaching concepts closely related to category theory without intimidating learners with mathematical definitions and verbiage. Railway oriented programming is a good example.[1]

My personal opinion is that category theory's main contribution to computer science is aiding composability in strongly typed languages in a type-safe, elegant manner. In the end, software is about breaking down a problem into smaller pieces, implementing and testing them, and them putting the pieces back together. Concepts from category theory provide a rigorous foundation for such compositions.

[1] https://fsharpforfunandprofit.com/posts/recipe-part2/

Re: Category Theory: Lecture Notes and Online Books

#6
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

I find it most useful as a kind of conceptual organization. It's not something you'd directly solve problems with, but rather a way of organizing your work on the solutions. In that sense, it's much like software architecture -- you don't directly solve problems with architecture, either, but you do want an architecture that supports you when you need to make changes or grapple with a large or complex problem domain.

Unfortunately, that's also why most resources directly on category theory are deeply wedded to pure mathematics -- it's an architectural form that has been developed by mathematicians to organize their own constructions. Folks like Scott Wlaschin [0] and Mark Seemann [1] have, I think, much more success in teaching categorical concepts in a software context, but since their material is often so far removed from category theory "proper" (intentionally and for good reason), they don't really paint much of a path toward category theory themselves.

(I've recently been learning Agda, a dependently-typed language / proof assistant, and it's kind of shocking how often refactoring my proofs lead to more "obviously categorical" concepts. I really think there's something to this category-theory-as-mathematics-architecture angle.)

[0] https://fsharpforfunandprofit.com/rop/

[1] https://blog.ploeh.dk/2017/11/13/endomorphism-monoid/

Re: Category Theory: Lecture Notes and Online Books

#7
post #6
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

I find it most useful as a kind of conceptual organization. It's not something you'd directly solve problems with, but rather a way of organizing your work on the solutions. In that sense, it's much like software architecture -- you don't directly solve problems with architecture, either, but you do want an architecture that supports you when you need to make changes or grapple with a large or complex problem domain.…

That said, Spivak's work on framing databases in terms of categories [2] is pretty fascinating, and might be worth poking at.

[2] http://blog.ezyang.com/2010/06/databases-are-categories/

Re: Category Theory: Lecture Notes and Online Books

#8
post #4
post #2

I find this topic fascinating but hard to start with. Does anyone have any non-Haskell example of category theory? Something that shows why is useful with a use-case.

This might be an unpopular opinion, but category theory isn't very useful at low levels of abstraction. It is an elegant mental framework/model that can be used to generalize many concepts, but in my experience such generalizations rarely give additional insights about the concept it is generalizing.

This may be true if you take one concept (category) in isolation. But the power of category theory is in revealing hidden analogies between different concepts. Which is why it is an important tool in the areas like algebraic topology.
Post reply on HN