News for hackers. Stuff that matters.
Re:Are Monads a Waste of Time? by j2kun on Tuesday February 20, 2018 @01:20PM (#16422530)
> eventually you realize this is the ultimate abstraction (category theory), and it cannot go more abstract than that

This is exactly the kind of false sense of intellectual superiority to avoid. Mathematicians and category theorists don't talk like this. Even the parts of Haskell that have the flavor of category theory aren't really all that much like category theory.

Re:Are Monads a Waste of Time? by proc0 on Tuesday February 20, 2018 @02:18PM (#16423178)
Maybe you can expand on that, and/or show me something more abstract than category theory. Programming = abstracting information processing. Category theory = the mathematics of abstract functions (or morphisms a.k.a. changing something)... so it makes sense that CT captures something very fundamental about computation.
Re:Are Monads a Waste of Time? by j2kun on Wednesday February 21, 2018 @02:36PM (#16432260)
1. Just because we have not thought of something more abstract does not mean category theory is the "ultimate" abstraction that cannot be surpassed. You would have said the same thing about sets before category theory was invented. 100% guaranteed there will be another, more abstract paradigm when the need arises.

2. Just because one thing captures something fundamental about computation does not mean it captures everything fundamental about computation, nor does it mean nothing else can capture fundamental aspects of computation (disjoint from what may or may not be captured by category theory). For example, category theory does a terrible job representing the mathematical subfield of complexity theory, despite it being entirely about computation. For that matter, "how abstract" is not always comparable, and the intellectual dick measuring of what is the most abstract is counterproductive. Even basic questions in particle physics have no known model in mathematics that doesn't break under gentle prodding, so is particle physics more abstract than mathematics?

3. Haskell does a lousy job representing the majority of ideas that make category theory useful to mathematicians. For example, universal properties are neglected Haskell, and at best they're implicit. Nobody actually thinks about the math when they're writing Haskell programs, they just think about Haskell types and programs, which makes the "techniques and patterns" of Haskell programming just as arbitrary as the conventions in random Javascript libraries. It's just that there are fewer names for the same thing because fewer people write serious programs in Haskell.

Re:Are Monads a Waste of Time? by dsacco on Wednesday February 21, 2018 @04:56PM (#16433341)
> Haskell does a lousy job representing the majority of ideas that make category theory useful to mathematicians. For example, universal properties are neglected Haskell, and at best they're implicit. Nobody actually thinks about the math when they're writing Haskell programs, they just think about Haskell types and programs, which makes the "techniques and patterns" of Haskell programming just as arbitrary as the conventions in random Javascript libraries. It's just that there are fewer names for the same thing because fewer people write serious programs in Haskell.

That’s an excellent point. So many people think they’re doing category theory when they’re writing Haskell, but Haskell is essentially nothing like the mathematics it borrows terminology from. They’re really not comparable. Which is absolutely fine, but then people shouldn’t draw parallels to the actual mathematics when the terminology is similar in name only.

Re:Are Monads a Waste of Time? by Koshkin on Tuesday February 20, 2018 @02:54PM (#16423573)
Technically, category theory is not more abstract than the rest of (abstract) algebra.
Re:Are Monads a Waste of Time? by proc0 on Tuesday February 20, 2018 @03:46PM (#16424036)
You can derive all other math branches with CT, so yes, it is more abstract. It is "higher level" (in the same sense of programming languages) than other maths.
Re:Are Monads a Waste of Time? by fyi1183 on Tuesday February 20, 2018 @04:32PM (#16424396)
Please point out where somebody genuinely puts an effort to found math on category theory? The standard way to do so is set theory, and the more recent hype is type theory.

Category theory in itself is pretty useless. Categories are a bit like graphs in that: they are too general.

There are serious mathematical theories using category theory as their language (mostly commutative algebra and whatever it touches) just as there are serious theories using the language of graphs, but in both cases the meat of the math is not in the underlying language.

Re:Are Monads a Waste of Time? by mbid on Tuesday February 20, 2018 @06:09PM (#16425162)
There are serious efforts to found maths on elementary toposes, which are categories with certain properties. Much the same way that the axioms of ZFC model the properties of sets in terms of the "is element" relation, you can give first order axioms for how the morphisms and objects of an elementary topos behave. Then you may add more axioms to assert that the elementary topos you're talking about is really a category of sets in the sense of ZFC.

If you want to research more about this, I can recommend sheaves in geometry and logic by Maclane and Moerdijk. You can also search for "algebraic set theory" and go from there.

And btw, type theory is essentially the same thing. The axioms are IMO uglier and more ad-hoc, but there are (some proven, some conjectured) equivalence results.

Re:Are Monads a Waste of Time? by infty on Wednesday February 21, 2018 @09:06AM (#16429493)
>Please point out where somebody genuinely puts an effort to found math on category theory?

What about the following: https://ncatlab.org/nlab/show/foundation+of+mathematics#CFM

Even if the meat of the math is not in the categorical aspects of a theory, the categorical input can be useful - if nothing else, then as a convenient language.

Re:Are Monads a Waste of Time? by scentoni on Wednesday February 21, 2018 @01:25AM (#16427313)
Re:Are Monads a Waste of Time? by lmm on Wednesday February 21, 2018 @04:36AM (#16428154)
That is a) a great project b) not category theory.
Re:Are Monads a Waste of Time? by dsacco on Tuesday February 20, 2018 @06:12PM (#16425189)
No, you can’t. The vast majority of analysis cannot usefully be represented in category theory. You can’t express everything in analysis using morphisms and maps.

When you’re working with structures (algebra, geometry, topology, etc), sure, you can construct them in the language of categories. But that’s very far from “all of math”.

Re:Are Monads a Waste of Time? by FridgeSeal on Tuesday February 20, 2018 @07:38PM (#16425750)
CT exists at the same level as some other "fundamental level" fields of maths like topology and abstract algebra (/algerbraic topology).

It's certainly very abstract and fundamental, but it's definitely not the root field.

Re:Are Monads a Waste of Time? by madmax96 on Wednesday February 21, 2018 @01:41PM (#16431793)
You can't derive CT with CT. Though that has nothing to do with your point, just suggesting that we aren't there yet.
Re:Are Monads a Waste of Time? by Retra on Tuesday February 20, 2018 @07:09PM (#16425591)
You can derive all other math from any Turing complete system. Category theory is no more powerful than that.
Re:Are Monads a Waste of Time? by tathougies on Tuesday February 20, 2018 @07:46PM (#16425795)
Given that turing complete systems are not total, you can actually derive anything, including falsehood, from them. The point being that a general 'turing complete' system is about as useful to use as the basis of mathematics as a banana.

Category theory is not a great basis for mathematics, but at least it's not inconsistent.

Re:Are Monads a Waste of Time? by Eire_Banshee on Tuesday February 20, 2018 @03:32PM (#16423910)
You are missing his entire point.
Re:Are Monads a Waste of Time? by proc0 on Tuesday February 20, 2018 @03:45PM (#16424026)
I know, which is why I asked for some clarification. I actually think haskell is able to directly implement CT, there is HASK category after all. If it's that this is too pretentious to even mention in HN, then I'm completely lost.
Re:Are Monads a Waste of Time? by dragonwriter on Tuesday February 20, 2018 @04:07PM (#16424211)
> there is HASK category after all.

This is disputed and seems to be at best conjecture/intuition without adequate formal definition supporting it.

Re:Are Monads a Waste of Time? by jonnybgood on Tuesday February 20, 2018 @04:03PM (#16424179)
Hask is not a real category.
Re:Are Monads a Waste of Time? by runT1ME on Tuesday February 20, 2018 @04:42PM (#16424483)
>Even the parts of Haskell that have the flavor of category theory aren't really all that much like category theory.

Can you expound on this? Just because the type classes defined in Haskell can't represent a wider range of categorical structures they purport to capture, does not mean that more structure doesn't exist throughout a Haskell code base. For instance, many argue that the only type of functors used in Haskell are endofunctors, but thats not really true unless we have a narrow definition of 'functors used in haskell', no?

Re:Are Monads a Waste of Time? by tome on Tuesday February 20, 2018 @04:44PM (#16424497)
The typeclass Functor represents endofunctors from * to *. That's a pretty limited notion of "functor" when considered mathematically but also extremely useful for programming!