Live data from Hacker News

Category Theory for the Working Hacker [video]

infoq.com

41–45 of 45 posts

Re: Category Theory for the Working Hacker [video]

#41
post #34

Earlier quoted context omitted.

What other types of arrows are there?

State machines & object dependencies [and function composition, and... categories] are often drawn as directed graphs. When drawn like that, the circles/boxes represent objects, and the arrows represent arrows. The name comes from that kind of representation. You can call them morphisms, too.

Then from what I'm understanding it's not an "arrow", it's something closer to a "step" or a "process". Some method to get from one location to another. An arrow means nothing without background information. If I say it takes "10 arrows to get from A to x(A)" as a way to explain there are 10 things happening in the function X, then wouldn't it be better to say it takes "10 steps/processes to get from A to x(A)"?

> The name comes from that kind of representation.

The representation, the way I conceive it, is a mode for displaying computational or data in a spacial manor. As such relating a computational or mathematical process to a spacial terminology would be a "step" not a stick with a rock at the end of it.

Re: Category Theory for the Working Hacker [video]

#42

Earlier quoted context omitted.

wtf are you on about? That is not how math works.

I apologise for my drunken and incorrect silliness. Aside from that, would you please enlighten as to what you meant by "that's not how math works"?

Sorry for my harsh comment; here's what I'm thinking of...

In math, you are dealing with many different kinds of object, not just numbers. In fact, one of the big realizations that led to modern mathematics is that not all mathematical objects can even be coded as numbers!

Your remark about "arrow" being more general than function is correct; but functions do not map only between sets of numbers, but between arbitrary sets, some of which contain elements that are not numbers, or even encodable as such.

Re: Category Theory for the Working Hacker [video]

#43
post #34

Earlier quoted context omitted.

State machines & object dependencies [and function composition, and... categories] are often drawn as directed graphs. When drawn like that, the circles/boxes represent objects, and the arrows represent arrows. The name comes from that kind of representation. You can call them morphisms, too.

Then from what I'm understanding it's not an "arrow", it's something closer to a "step" or a "process". Some method to get from one location to another. An arrow means nothing without background information. If I say it takes "10 arrows to get from A to x(A)" as a way to explain there are 10 things happening in the function X, then wouldn't it be better to say it takes "10 steps/processes to get from A to x(A)"? > Th…

Does step help when thinking of the objects as individual data elements, the arrows as cons-links, map being a functor that respects cons-links [i.e. does not change the structure of the list]? The problem here is that implying process, ordering, or anything else is too narrow of a definition for what an arrow/morphism can be used to represent. That's why arrow (a thing that points to another thing), or morphism (a thing that helps define the shape) are actually better terms. Because Category Theory isn't about the things, it's about the relationships between the things, how these can be composed, and how higher-order operators that respect these relationships [and the new ones they represent for even higher-order operators] can form new relationships which can also be composed.

Re: Category Theory for the Working Hacker [video]

#44

Earlier quoted context omitted.

Functions are one kind of arrow. There are other arrows besides functions. Renaming "arrow" to "function" is like replacing "number" with "1".

What other types of arrows are there?

Given any set with a partial ordering you can construct a category whose objects are the elements of that set and that has an arrow from a to b if and only if a <= b.

Re: Category Theory for the Working Hacker [video]

#45
As a working programmer that is curious about category theory, I feel like this misses the mark completely. I watched this yesterday, and this is what I remember:

1) I will tell you why category theory is relevant to you, the working programmer.

2) Here are the 2 most important data structures that you don't use in your day job.

3) Look at how they relate in this mathy not applicable way.

4) Conclusion: lambda calculus is awesome.

What I would like to see is:

1) I will tell you why category theory is relevant to you, the working programmer.

2) Here is a realistic but simplified problem and a solution written in python that is obviously the wrong approach to solving the problem. With category theory, we know this is the wrong approach because the math is wrong (and don't go into the math).

3) Here is another example that seems like a decent approach to solving the problem. With category theory, we know this is the wrong approach because the math is wrong (and don't go into the math). Doing it our way has these benefits...

4) Conclusion: learn category theory to become a better programmer.

If you can't do that, find some other way to illustrate the concrete benefits of learning category theory. If there aren't any concrete benefits, it's like telling baseball players they should learn physics to have a better understanding of baseball.

Post reply on HN