Live data from Hacker News

Applied Category Theory Course

math.ucr.edu

21–30 of 100 posts

Re: Applied Category Theory Course

#21
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

Loved your previous book, will the new book "Practical Math for Programmers" will be released this year?

Re: Applied Category Theory Course

#22
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

Programming is applied algebra, the choice is not using vs not using, but understanding what you are doing vs being ignorant about it. Relevance is in the eye of the beholder. In typical business the incentive is to have a good enough code ready "yesterday", and it will be thrown away tomorrow, as the code and whatever it does are only a means to generate profit and not a goal in itself, and spending time on making it profound is a waste. Wrt production examples, anything written in haskell used categorical constructs explicitly.

Re: Applied Category Theory Course

#23
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

> And when I talk to people who are actually on the front lines that try to use category theory to solve some problem, they tell me that it ended up being completely useless. I'm open to having my mind changed.

I aim to provide an example of applied category theory in computer science. Your understanding may differ due to the encompassing time frame, however, I ensure that even the most recent findings can rapidly transform into a practical programming concept.

The concept of 'monad' was initially introduced by Roger Godement in 1958, known as the 'standard construction'. The term 'monad' itself came into use later in 1967, credited to Jean Bénabou. The connection between monads and functional programming was first established in 1989 by computer scientist Eugenio Moggi. Moggi implemented monads in semantics to interpret the lambda calculus, a computational model that employs variable binding and substitution for function abstraction and application. The formal incorporation of monads into Haskell occurred in 1992 by Philip Wadler. Since then, monads are increasingly being integrated into mainstream programming languages, including JavaScript. For instance, JavaScript Promises can be viewed as a kind of monad. They encapsulate a value and allow its transformation with the .then method, which can be equated to the 'bind' operation in the realm of monads. Furthermore, a new Promise can be generated from any value using Promise.resolve, an operation analogous to the 'return' operation in monads. Promises have a very practical application and are used in programming by millions of developers every day.

The concept of a monad is one example that is well-understood; however, there are numerous other such ideas. One of these is the Functor, often referred to as "mappable" in mainstream programming languages. Research in this field is ongoing, with concepts like applicative functors, introduced by Conor McBride and Ross Paterson in 2008, already gaining popularity in languages such as Haskell.

Re: Applied Category Theory Course

#24
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

> When they talk about applications to databases it seems quite unrealistic I read a paper that claimed that the category of polynomial-like things ("Poly") was somehow useful for database migrations! Without a concrete example, that's just an absurd statement to make. If you don't explicitly connect the dots between SQL schemas and polynomials, then you're just hand-waving. It's the equivalent of: "I have a marvello…

here you go: https://arxiv.org/pdf/1009.1166.pdf

Re: Applied Category Theory Course

#25
post #5
post #4

How much time do you guys really need for such a course? I have then stacking up and have a list of a few dozen books and courses to go over. I am beginning to think I'm doing this wrong, or simply don't know how to prioritize, a common modern problem of course.

If you’re spending more than a few months on a topic you might be doing it wrong. I find that following a slightly stressful fast-paced schedule is actually kind of important for effective learning.

I'm working through a similar course with friends. We take two hours a week, and ocasionally do homework. We're about halfway since we started early this year. I feel its fine, no need to rush. The upside of taking it slow is that it stays with you for longer, I think. If you rush it and find no immediate application afterwards, you risk forgetting everything.

Re: Applied Category Theory Course

#27
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

I think the important idea from math for programming, and pretty much everything else, is that of a function that operates on functions. You can build on that important idea in different general ways, for example category theory, or type theory.

There is a much simpler way of making this idea the foundation of pretty much everything though, see my report "Logic is Algebra" [1]. I've simplified matters further since then (for example, instead of the somewhat unfamiliar notation

(lambda x. D P[x])

you write now

lambda(D, x. P[x])

(maybe I should even go as far as just writing "lambda(D, x => P[x])", as that triggers probably even more neurons, especially in programmers).

lambda is here nothing special, just another operator you can introduce yourself, much like "forall", "exists", "sum", etc.

So category theory is, in my opinion, a pretty complicated framework to think in, pushing a certain view of things, and I think there is a more general, yet simpler framework. And I think that will be of use to everyone doing anything vaguely math related, and that certainly includes programmers.

[1] https://arxiv.org/abs/2304.00358

(The above report also includes lots of theory, and looks therefore more complicated than it really is. I am working on something new that leaves out the theory, uses more familiar syntax, and emphasises applications)

Re: Applied Category Theory Course

#28
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

Programming is applied algebra, the choice is not using vs not using, but understanding what you are doing vs being ignorant about it. Relevance is in the eye of the beholder. In typical business the incentive is to have a good enough code ready "yesterday", and it will be thrown away tomorrow, as the code and whatever it does are only a means to generate profit and not a goal in itself, and spending time on making i…

Programming is also applied physics. But understanding the kinetic forces behind typing is no guide to improved programming.

To say that learning a field is useful is to say that knowing these abstractions is useful.

Much of Haskell's "category theory" is a reuse of terms. Replace Monoid by Appendable, Monad by Composable, Functor by Runnable, etc. and most programming languages are "category theory".

This says little about whether knowing the field of category theory will be useful to programming. Indeed, I think there's a good argument to say Haskell programming is much harmed by it.

If its authors hadnt used their knowledge of category theory, but rather named the abstractions in more ordinary terms, the language would be more useful to more people.

Re: Applied Category Theory Course

#29
post #11

I'm writing a book [1] about "bona fide" applications of mathematics to practical programming problems, where bona fide is my own personal definition [2]. I've had my eye on claims of applications of category theory for many years, and none of them have quite fit the bill (sorry, John, if you're reading this). When they talk about applications to databases it seems quite unrealistic or lacking in sufficient detail to…

Programming is applied algebra, the choice is not using vs not using, but understanding what you are doing vs being ignorant about it. Relevance is in the eye of the beholder. In typical business the incentive is to have a good enough code ready "yesterday", and it will be thrown away tomorrow, as the code and whatever it does are only a means to generate profit and not a goal in itself, and spending time on making i…

Programming is applied algebra just like tying your shoes is applied knot theory :)

Re: Applied Category Theory Course

#30

Earlier quoted context omitted.

> When they talk about applications to databases it seems quite unrealistic I read a paper that claimed that the category of polynomial-like things ("Poly") was somehow useful for database migrations! Without a concrete example, that's just an absurd statement to make. If you don't explicitly connect the dots between SQL schemas and polynomials, then you're just hand-waving. It's the equivalent of: "I have a marvello…

here you go: https://arxiv.org/pdf/1009.1166.pdf

This paper is actually interesting and talks about real-world schemas. I particularly like the concept of distinguishable nulls that define a sane equality operator, unlike the traditional SQL NULL.

The paper I was referring to used the category Poly, and literally just stated that Poly could be used for database migrations without elaborating further.

Post reply on HN