Live data from Hacker News

Basic Category Theory

arxiv.org

61–70 of 92 posts

Re: Basic Category Theory

#61
This is how you serve science. Thanks to Tom Leinster. "This electronic version is not only free; it is also freely editable. For instance, if you would like to teach a course using this book but some of the examples are unsuitable for your class, you can remove them or add your own. Similarly, if there is notation that you dislike, you can easily change it; or if you want to reformat the text for reading on a particular device, that is easy too."

Re: Basic Category Theory

#62
post #56
post #52

If I may ask, why is the HN community so interested in this particular topic? I studied Math and have basic understanding of Category Theory... could someone point me to a text relating Categories and... something related to computers? What am I missing?

Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. I have never been particularly impressed with their claims of applicability. It seems to just complicate things for very little benefit. It's a pretty abstraction, but I don't see actual results from it. People use ugly, practical things like git, not beautiful categorical abstractions like piju…

> Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory.

This point seems to be repeated with every new mathematics.

> It's a pretty abstraction, but I don't see actual results from it.

It has applications in physics and is widely used in computation, particularly for reasoning about composition of programs with side effects. With respect, if you don't see any actual results, you haven't been looking.

Re: Basic Category Theory

#63
post #56

Earlier quoted context omitted.

Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. I have never been particularly impressed with their claims of applicability. It seems to just complicate things for very little benefit. It's a pretty abstraction, but I don't see actual results from it. People use ugly, practical things like git, not beautiful categorical abstractions like piju…

> Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. This point seems to be repeated with every new mathematics. > It's a pretty abstraction, but I don't see actual results from it. It has applications in physics and is widely used in computation, particularly for reasoning about composition of programs with side effects. With respect, if you do…

> With respect, if you don't see any actual results, you haven't been looking.

With respect, if you think any category-theoretic results were necessary to author even 0.01% of the code executed in computation globally, you're willfully deluding yourself.

Re: Basic Category Theory

#64
post #60
post #49

Earlier quoted context omitted.

> In a proof, it is assumed to be known that if a compositiom of two maps is the identity map on one set, and the reverse composition is the identity on the other set, This is something math and computer science students typically learn in the first two weeks in their mandatory math lectures at least at German universities

In the US, I don't think I saw it until a course in set theory, although it could get rolled up in a topology course.

I mean: It really makes sense to put it at the beginning since otherwise it's ugly to understand why a diffeomorphism is defined as it is:

You surely know that an isomorphism of sets (bijective function) has an inverse that is also an isomorphism of sets.

For differentiable functions a similar statement does not hold in general (just consider [-1,1] -> [-1,1]; x \mapsto x^3; its inverse is not differentiable everywhere on [-1,1]; so its inverse exists as an isomorphism of sets, but not as a differentiable function). Since diffeomorphisms for R^d are introduced in the 2nd semester for math students (typically in the context of the inverse function theorem), one better has already understood the basics before.

Re: Basic Category Theory

#65
post #56
post #52

If I may ask, why is the HN community so interested in this particular topic? I studied Math and have basic understanding of Category Theory... could someone point me to a text relating Categories and... something related to computers? What am I missing?

Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. I have never been particularly impressed with their claims of applicability. It seems to just complicate things for very little benefit. It's a pretty abstraction, but I don't see actual results from it. People use ugly, practical things like git, not beautiful categorical abstractions like piju…

Have you never used a functional language?

Re: Basic Category Theory

#66
post #63

Earlier quoted context omitted.

> Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. This point seems to be repeated with every new mathematics. > It's a pretty abstraction, but I don't see actual results from it. It has applications in physics and is widely used in computation, particularly for reasoning about composition of programs with side effects. With respect, if you do…

> With respect, if you don't see any actual results, you haven't been looking. With respect, if you think any category-theoretic results were necessary to author even 0.01% of the code executed in computation globally, you're willfully deluding yourself.

Good thing I never made that claim. I will however claim that, despite being unnecessary in principle, quite a bit more than 0.01% of code executed globally did make use of category theoretic abstractions because they are so useful (depending on how you measure this of course). Pretty much any program written for .NET and Scala makes use of monadic composition.

I will also claim that their use is only going to grow with Rust adoption and Java adopting lambdas and functional APIs.

Re: Basic Category Theory

#67
post #52

If I may ask, why is the HN community so interested in this particular topic? I studied Math and have basic understanding of Category Theory... could someone point me to a text relating Categories and... something related to computers? What am I missing?

Category Theory organizes mathematical concepts, and a lot of the concepts there are applicable to Computer Science.

As an example, consider the theory of Containers [0]. A container is an abtract mathematical model of some kind of data structures (such as lists, trees etc.). Like most mathematical structures they form a category. Further more, each container gives rise to a endo-functor Type → Type. In fact they form a full subcategory of such functors.

For instance the list endofunctor L : Type → Type can be seen as a generic data structure which takes a type parameter, A, and gives the type of lists of elements of A, namely L(A). The functor structure is the generic map function which to each f : A → B gives a function map f : L(A) → L(B). These kinds of generic maps are almost always natural transformations, which tells you a lot about their properties. Knowning these things makes it easier to reason about your code.

These are ofcourse very simple examples. For more elaborate applications of containers, see zippers — which involve an adjunction in the form of a differentiation structures. In layman's terms, zippers are datastructures with holes in context.[1]

[0]: http://www.cs.nott.ac.uk/~psztxa/publ/cont-tcs.pdf

[1]: This master thesis has a readable introduction: https://www.duo.uio.no/bitstream/handle/10852/10740/thesisgy...

Re: Basic Category Theory

#68
post #56

Earlier quoted context omitted.

Yeah, I also have a mathematics degree and don't really get the fascination that computer people have with category theory. I have never been particularly impressed with their claims of applicability. It seems to just complicate things for very little benefit. It's a pretty abstraction, but I don't see actual results from it. People use ugly, practical things like git, not beautiful categorical abstractions like piju…

Have you never used a functional language?

Yes. I don't think knowing about category theory makes you more proficient in using or designing functional languages either. Lambda calculus has much more obvious utility. Even things similar to monads can be described more simply without abstract nonsense: state is just another variable that you are passing along in your functions. The best books on Haskell do not dwell on category theory.

There's actually a bit of harm too: the abstract nonsense seems to make it harder to reason about execution speed and makes it very easy to write very slow code. I know a lot of people have a hard time being able to predict the speed with which, say, Haskell code will run.

Re: Basic Category Theory

#69
post #52

If I may ask, why is the HN community so interested in this particular topic? I studied Math and have basic understanding of Category Theory... could someone point me to a text relating Categories and... something related to computers? What am I missing?

Erik Meijer gave a talk called "Category Theory, The essence of interface-based design" https://m.youtube.com/watch?v=JMP6gI5mLHc

Fundamentally, category theory is seen as some sort of holy grail of programming. The hope is that learning about only one API will let you interact naturally and composably with any interface conforming to that design.

Re: Basic Category Theory

#70
post #63

Earlier quoted context omitted.

> With respect, if you don't see any actual results, you haven't been looking. With respect, if you think any category-theoretic results were necessary to author even 0.01% of the code executed in computation globally, you're willfully deluding yourself.

Good thing I never made that claim. I will however claim that, despite being unnecessary in principle, quite a bit more than 0.01% of code executed globally did make use of category theoretic abstractions because they are so useful (depending on how you measure this of course). Pretty much any program written for .NET and Scala makes use of monadic composition. I will also claim that their use is only going to grow w…

> Good thing I never made that claim.

You said "It has applications in physics and is widely used in computation". Category theory is not widely used by those who program computers and thus produce computation in them.

> I will however claim that, despite being unnecessary in principle, quite a bit more than 0.01% of code executed globally did make use of category theoretic abstractions because they are so useful (depending on how you measure this of course). Pretty much any program written for .NET and Scala makes use of monadic composition.

And like clockwork, you provide the bog-standard argument for why knowing category theory is important: you point out how many people productively write software without knowing anything about category theory (or even abstract algebra).

Saying that people use category theory to write software without knowing it is like saying they use Maxwell's Laws to write software: so reductive it loses all relevance to productive conversation. That's bad, unless your goal is to make the conversation unproductive.

Post reply on HN