If yes, which one is the "simpler", category or graph?
Set theory is generally taught before category theory at universities. "Simpler" is very subjective, but set theory is often seen as more intuitive because some of the concepts start getting taught much earlier in school.
Category theory is the study of collections of mathematical of a give type. The category of groups, the category of sets, the category of vector spaces. The key facet of category theory is that you can have "functions" (called functors) between categories and the power of category theory is the study of these functors. I put "functions" in parentheses because most categories are not sets in the set-theoretic sense because they do not have a well-defined cardinality. Of course, some categories called "small categories" are sets.
[1] https://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_t... [2] https://en.wikipedia.org/wiki/Grothendieck_universe
I know sets well because well that's what I was taught in school. I'm just trying to understand where set theory fits in category theory or if they are two totally different things.
Both category theory and set theory use sets. But set theory tries to make absolutely everything into a set. It takes on a little complexity in this quest, because of Russel's paradox. Category theory can be seen as studying set theory, among other things, so it is "bigger" or more all-encompassing than set theory. Many things studied in category theory aren't possibly sets.
Set theory is more immediately intuitive, but category theory organizes things in a way that are ultimately more insightful, I think. Meaning that once you can get into the category theory headspace and learn to navigate it, it becomes a much better environment for thinking without mistakes. In my personal opinion.
Not looking for solutions. Ok with emotional support.
Broad consensus was it was a waste of time. Functional programming has taken the useful bits, and some of the less useful bits. The rest is arcanum, and as useful to programming as astronomy
Again, with a few exceptions, but if you are one of these exceptions, you will already know it.
Here's the kind of things I'm thinking of:
- Learn category theory
- Build an interpretter/compiler
- Develop your own programming language
- Learn about and built distributed systems
- Learn to write code for the GPU
- Understand assembly code
- Learn about CPU architecture
I think, especially since it's the holiday season, maybe lets take a step back and just accept these things probably will make you a better programmer, but there are lots of them. If you do all of them, you'll maybe become a very good programmer, but you'll definitely become a very tired human being.
If you have an interest in the mathematical underpinnings behind some of the ideas in Haskell et al, you might love category theory, but if you just want to do effective functional programming effectively, you're fine just doing that
Compilers? Used to produce executables form source code.
Programming language? Allows us to write code using higher abstraction.
Distributed systems? Allows us to build systems across multiple machines, users, continents, etc.
GPU? Allows us to speed up heavily parallel code for graphics and scientific applications.
Assembly? Allows us to write closer to the hardware.
CPU architecture? Allows us to understand what our code runs on.
If anything, this list shows how category theory is not like the other things programmers could spend time on. If the goal is “learn a bunch of math to expand your math skill”, then maybe category theory makes sense. If the goal is to become a better programmer then I think there are better uses of time.
My conclusion was that the goal was not to provide insight into databases but rather into category theory, which seemed backwards to me.
Instead I picked up some books on the relational algebra/logic for databases, and those books were actually useful — you could show that some set of transformations would be mathematically identical.
At some point, too high level of abstraction is not useful. For category theory, it seemed that the point was to show how all these different things were “similar” but in a way that didn’t allow you to do anything with it.
I think especially in our fast moving, low attention society, there's a tendency to reduce philosophers like Schopenhauer to a few bullet points. I definitely was really guilty of doing this when I studied philosophy in university a while back. But you get so much more out of spending time reading Schopenhauer than just those bullet points- you get insight into a whole person's way of seeing things. That's such a great thing to spend time doing!
I do realise I'm mostly arguing against a point that you didn't make, or at best, made only tangentially, but, as a pedant on the internet, I couldn't turn down the opportunity to give my unsolicited opinion.
First I'll say that I absolutely get this head-banging-on-desk feeling of no progress. Monads got me like that for a while but F-Algebras/recursion schemes got me like that much more, so make sure you keep your distance from them haha. I'm sorry to have contributed to your frustration.
It actually sounds like you've grasped monads quite well. flatMap is the essence. I won't try to explain it though, because I know that's not what you're looking for, and I don't want to contribute to your frustration even more!
I will say that my usual readership includes a lot of people who like designing type systems for programming languages. Category theory helps make sure you don't make mistakes in this process, though there are other techniques of course. I also find it helps my ability to think formally a lot, which has helped me a ton in studying and discussing philosophy, a separate interest of mine. Hopefully you can see from my post that I didn't really make an effort to justify or explain category theory for regular programmers much. Category theory is overhyped for that use case. I personally really hate reading overly mathematical Haskell code!! But if you just enjoy math or philosophy or learning or thinking, I hope you can have some fun with the beauty of these ideas. And since authoring the post I've added a wiki https://ryanbrewer.dev/wiki that can give more accessible background on things like monoids.
I could be wrong but I don't think I mentioned a monoid of endofunctors or flatMap a single time in the post. I did mention monads, as an example of natural transformations, but completely from the perspective of beautiful math, not from a programming perspective at all. And once you learn about adjunctions, monads get even more gorgeous! https://ryanbrewer.dev/wiki/adjunction
But all of this math takes a ton of patience. I'm someone who loves programming because the feeling of solving a hard bug is exhilarating and satisfying. The emotional payoff is bigger the longer it takes, and math is the same way for me. Don't beat yourself up about it, and don't feel bad if category theory just isn't helpful or enjoyable for you and your particular way of thinking! :)
I think GP was just quoting a meme there. See also [0], where the meme is said [1] to originate.
[0]: https://james-iry.blogspot.com/2009/05/brief-incomplete-and-...