News for hackers. Stuff that matters.
Re:Category Theory in Programming by Ericson2314 on Sunday December 01, 2024 @07:48PM (#42291999)
It's hard to write something that is both accessible and well-motivated.

The best uses of category theory is when the morphisms are far more exotic than "regular functions". E.g. it would be nice to describe a circuit of live queries (like https://materialize.com/ stuff) with proper caching, joins, etc. Figuring this out is a bit of an open problem.

Haskell's standard library's Monad and stuff are watered down to the point that they are barely category theory, but they are also quite useful and would not have been readily invented without category theory. See even if you have no taste for "abstract nonsense", maybe you can still accept the fact that its left a trail of more accessible "semi-abstract semi-nonsense" in its wake.

This stuff takes time. If it's not your cup of tea, no need to make yourself an early adopter. See also things like Lean where fancy type systems are finally reaching "regular non-CS" mathematicians with great success.

Re:Category Theory in Programming by Ericson2314 on Sunday December 01, 2024 @07:52PM (#42292017)
On the pure math side, Locales (https://ncatlab.org/nlab/show/locale) are so much more beautiful an axiomatization scheme than regular topological spaces, even if one is just doing regular classical rather than constructive math. We would have not discovered them except for category theory.
Re:Category Theory in Programming by Ericson2314 on Sunday December 01, 2024 @08:37PM (#42292277)
I would also check out https://en.wikipedia.org/wiki/Algebraic_logic#Algebras_as_mo...

The basic (pre-category theory) idea is instead of making up new weird math just for logical purposes, start thinking more abstractly and using "regular" math concepts. The section says "models" but it should work for syntax too not just semantics (the syntax is the "initial" semantics).

Category theory takes all that order/lattice stuff and generalizes it in the same way programming generalizes logic ("whether" true/false to "which" inhabitant of a type). So it is definitely useful for people trying to explore the space of programming language designs.

The reason category theory might be useful to "regular programmers" not programming language designers, basically boils down to the belief that programming and language design are not so different after all. I can't really argue that explicitly, but think "where does designing a library interface end, and designing a domain-specific language being?". That's the basic idea.

Re:Category Theory in Programming by nextaccountic on Monday December 02, 2024 @04:22PM (#42300546)
> The section says "models" but it should work for syntax too not just semantics (the syntax is the "initial" semantics).

Can you elaborate on that?

Do you mean initial in terms of initial objects? [0]

Is this related to Herbrand universes? [1] (in which we build an interpretation of first order logic where each symbol stands as themselves)

[0] https://en.wikipedia.org/wiki/Initial_and_terminal_objects

[1] https://en.wikipedia.org/wiki/Herbrand_structure

Re:Category Theory in Programming by Ericson2314 on Monday December 09, 2024 @11:56PM (#42373890)
Yes to 0, no idea but don't think so to 1
Re:Category Theory in Programming by dustingetz on Sunday December 01, 2024 @10:20PM (#42292786)