A monoid is a category, a category is a monad, a monad is a monoid
61–70 of 79 posts
Re: A monoid is a category, a category is a monad, a monad is a monoid
#62Earlier quoted context omitted.
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
#63For 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
#64Can somebody help with examples for the rest of structures? Additionally, it seems I don't really get concept of totality. I get what "total function" is, but what does this column really constraint in the context of different structures? I mean, what is a structure that lacks this "totality" thing?
Re: A monoid is a category, a category is a monad, a monad is a monoid
#65There's interesting table on wikipedia's Category[0] page, listing group-like structures. It is easy to find useful example of Abel group and useful example of Group which is not Abel group (say, string concatenation with negation defined as ab - b = a), but while I clearly understand definition of monoid, I cannot think of any useful example of monoid which is not group. Can somebody help with examples for the rest…
An example which may speak to a programmer more: the set of functions which take a 32-bit int as argument and return a 32-bit int, where the operation is composition of functions. The identity is the identity function. Since not all functions are invertible, this monoid is not a group.
Re: A monoid is a category, a category is a monad, a monad is a monoid
#66There's interesting table on wikipedia's Category[0] page, listing group-like structures. It is easy to find useful example of Abel group and useful example of Group which is not Abel group (say, string concatenation with negation defined as ab - b = a), but while I clearly understand definition of monoid, I cannot think of any useful example of monoid which is not group. Can somebody help with examples for the rest…
The natural numbers {0, 1, 2, ...} under addition are an example of a monoid which is not a group. Another example is natural numbers under multiplication. An example which may speak to a programmer more: the set of functions which take a 32-bit int as argument and return a 32-bit int, where the operation is composition of functions. The identity is the identity function. Since not all functions are invertible, this…
Re: A monoid is a category, a category is a monad, a monad is a monoid
#67I recently started going through Bartoz Milewski's Category Theory lectures [1]. I think they are a very nice place to start learning these things. [1] https://m.youtube.com/watch?v=I8LbkfSSR58
So you go to the Wikipedia and learn there is a word "class" (no more complex than a word "bunch" at all, in my opinion) and there exists simple, very much set-theoretical explanation of what is (or might be in different set-theory systems) a class, and why it might be not a set sometimes.
Then he starts with arrows, and again, from the explanation it isn't immediately obvious why he can't use a word "function" instead (and it is immediately obvious when you read definition of category on Wikipedia — and I got used to the fact Wikipedia isn't the best source by far when trying to learn math).
So, my real complaint is these guys are consciously not using mathematics (because math texts are "scary" — and, yeah, I agree, they often are) when essentially explaining mathematics. Category theory isn't some different discipline, it isn't "superset" of mathematics — it is mathematics. Informal is good when it isn't "imprecise", otherwise it's just useless and harmful. I sometimes think it might be easier to actually get used to (once more all over again) all math-talk and read something like "Categories for a working mathematician", instead of trying to decipher all these "simpler" informal explanations.
Re: A monoid is a category, a category is a monad, a monad is a monoid
#68Earlier quoted context omitted.
could you elaborate on the energy orgasms? I realize you've edited that part out but it was the most interesting for me personally because I had similar experiences after I learned Idris and understood the Curry-Howard isomorphism.
I took it out cause it seemed egregious, but since you're somewhat familiar with the topic, here's a little more to build on: Imagine yourself as a bounded poset if you don't make much money or a bounded proset if you do. By definition, you have both initial and terminal objects, called "bottom" & "top," respectively. For many, this concept may be tricky, as people's heads and asses are often indistinguishable. They'…
Re: A monoid is a category, a category is a monad, a monad is a monoid
#69Earlier quoted context omitted.
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 really find it difficult as well, and I think it is a lot to do with the nomenclature that surrounds the field. Sometimes I feel it's almost kept obtuse on purpose. The way I think about is to think of it is if "Design Patterns" helped show how to "engineer" software at the medium scale, category theory is a tool for helping us learn how to compose systems, and not just software. I wish it were a little more approa…
Re: A monoid is a category, a category is a monad, a monad is a monoid
#70Earlier quoted context omitted.
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…
Is this at the HQ in Minneapolis? I hope to move back to MN someday (to raise the younglings) and you make Target sound awesome!