Live data from Hacker News

A monoid is a category, a category is a monad, a monad is a monoid

graphicallinearalgebra.net

11–20 of 79 posts

Re: A monoid is a category, a category is a monad, a monad is a monoid

#11
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I'd be surprised if there are more than a handful, but I often wonder the same thing about posts about systems programming and, well, basically anything that mentions Rust in the title.

For my own part, I find this kind of post fairly easy to digest, but that's almost certainly because I'm a Mathematician by training (PhD in numerical differential geometry, but did a lot of abstract algebra as an undergraduate). To me, a lot of the programming-related topics on HN seem to be written in some form of Ancient Greek, but they seem to be pretty popular and attract a lot of comments.

I think we have to simply assume that there are minorities of niche experts on HN, and that these minorities are large enough for such posts to do well.

Re: A monoid is a category, a category is a monad, a monad is a monoid

#12
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I work at Target and we have a weekly class on algebra, category theory and Haskell because people are interested. It's a mix of programmers learning some of the math and mathematicians learning some of the programming :).

It's actually a lot more accessible than it seems at first—these ideas are not complex, just abstract. Thinking at a high level of abstraction is very much a skill which requires specific training, but it's a skill worth training and, when you have it, learning things like this becomes much easier.

The same thing is true of programming, by the way: once you start "thinking like a programmer", it becomes much easier to learn a new programming language or to understand some low-level programming concepts. And thinking like a programmer is, in the grand scale of things, not that different from thinking like a mathematician!

Re: A monoid is a category, a category is a monad, a monad is a monoid

#13
post #4
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I only know this famous quote: http://stackoverflow.com/questions/3870088/a-monad-is-just-a... But I didn't really try to understand it.

It's hard to understand because it's utterly unenlightening. It's a restatement of the definition. It's like saying "the number two is just the sum of one and one." It's trivially true yet utterly fails as an explanation because it requires more concepts to convey the exact same content.

Re: A monoid is a category, a category is a monad, a monad is a monoid

#14
post #12
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I work at Target and we have a weekly class on algebra, category theory and Haskell because people are interested. It's a mix of programmers learning some of the math and mathematicians learning some of the programming :). It's actually a lot more accessible than it seems at first—these ideas are not complex , just abstract. Thinking at a high level of abstraction is very much a skill which requires specific training…

That sounds awesome!

Is Haskell (or other fp languages) commonly used at Target?

Re: A monoid is a category, a category is a monad, a monad is a monoid

#16
post #7
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I'd be more interested to know whether there's a practical use of understanding it on this level. I wanted to learn about monads and wrote some smaller Java examples using streams and flatmap. You can see the benefit and understand how it's implemented very easily. However, the academic explanations and notations were not helpful and I'd argue made understanding the concept needlessly complicated.

I'm slowly developing a systematic framework for programming the human brain with foundations in category theory. I've gotten a lot of useful mileage out of what little I've learned about category theory. It contributes to my intuition about how to reprogram my brain. I'm convinced we'll be teaching it to children in the future, once the programming framework is better developed and understood.

What could be more practical than self-improvement?

I'll answer my own question: learning how to apply the same kinds of reasoning to improve how people interact.

Re: A monoid is a category, a category is a monad, a monad is a monoid

#17
For those want a great intro and overview of category theory aimed at programmers, Bartosz Milewski's lecture series on YouTube [0] is worth the time investment. It covers the topics this post discusses and more, but crucially with plenty of context to help understand why any of it matters.

0: http://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7...

Re: A monoid is a category, a category is a monad, a monad is a monoid

#18
I've been studying Leibniz recently and I'm excited to get to his treatment of Monads. The following is a little irrelevant to this post, but the title of this post stirred a relationship.

So to Leibniz, in the conception of an entity's identity, he posits that one must include all propositions related to that entity. So when we try to consider a property of an object of our mind, we are basically saying "it is what it is." Saying that Einstein is German is like saying "Einstein is Einstein." Where this conception of including propositions in identities gets weird is that his formulation also includes future propositions. In this respect, only God can truly understand anything fully, because only he can tell the future and can get the full identity of things.

So "x is x" shows up a lot.

Edit: As mentioned, Leibniz Monad != the Monad of category theory. I suppose I'm just looking for any excuse to talk about Leibniz. Also, I did say I didn't even get to that topic yet. Consider this a peep about the duality of that term.

Re: A monoid is a category, a category is a monad, a monad is a monoid

#19

I've been studying Leibniz recently and I'm excited to get to his treatment of Monads. The following is a little irrelevant to this post, but the title of this post stirred a relationship. So to Leibniz, in the conception of an entity's identity, he posits that one must include all propositions related to that entity. So when we try to consider a property of an object of our mind, we are basically saying "it is what…

Different "monad", unfortunately.

Re: A monoid is a category, a category is a monad, a monad is a monoid

#20
post #2

Are there really that many people on NH that can understand this? I'm not trying to be snarky, I'm legitimately interested. It seems like this class of knowledge is highly specialized, yet I see posts like these high up on NH frequently.

I guess I'll raise my hand by commenting.

This stuff is a certain brand of abstract algebra. Abstract algebra is generally of a certain degree of usefulness to a programmer in that there's a similarity in discipline. Moreover, linear algebra can be very useful to many programers who do things related to applied mathematics---nearly all of it touches linear algebra. Linear algebra is a specific form of abstract algebra and this blog takes a particularly "abstract" approach to linear algebra.

The particular tools being used here are of a category theoretic flavor. Category theory is a sibling to abstract algebra especially popular in certain fields (topology, algebraic geometry, foundations and logic). It's furthermore pretty popular in the Haskell-like FP crowd since Haskell is a rich place for exploring very high-order abstraction and category theory helps provide some language for talking at very high abstraction. For that reason, a lot of Haskell hackers have some amount of experience with category theory.

Finally, hackers with any kind of pure math background have a decent chance at having been exposed to this stuff. Even if they weren't, there's a good chance they could read it with some fluency. Math is a lot like programming where once you get your water legs you have a significantly improved time digesting related subjects even without direct prior experience.

For myself I have a bit of a math background, was drawn to Haskell for that reason, discovered category theory via Haskell, then swung full circle and read about it as a branch of pure math to learn more about foundations and logic.

Post reply on HN