News for hackers. Stuff that matters.
Re:The Monad Challenges: Jump start your understanding of mo... by mrcactu5 on Tuesday January 19, 2016 @06:10PM (#10934835)
I found a math background is a disadvantage for learning Haskell, since most mathematicians don't really use a lot of category theory. Lately that is changing, http://math.stackexchange.com/questions/1617592/is-set-prime... There's a lot of confusion on how the math version of "functor" or "monad" maps to the CS definitions.

I found this tutorial on Monads and Applicatives helpful http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...

Re:The Monad Challenges: Jump start your understanding of mo... by Chinjut on Tuesday January 19, 2016 @06:44PM (#10935008)
I don't quite understand the relevance of the stackexchange link. Are you just pointing out that some mathematicians sometimes discuss categories, with this as an arbitrary example? I don't think anyone doubted that.
Re:The Monad Challenges: Jump start your understanding of mo... by LukeHoersten on Tuesday January 19, 2016 @06:25PM (#10934915)
Something that doesn't help the Math->CS understanding of Functors is, for example, that languages like C++ use "Functor" to mean other things (function pointer in this case).
Re:The Monad Challenges: Jump start your understanding of mo... by Chinjut on Wednesday January 20, 2016 @01:13PM (#10940078)
The C++ use of the word "functor" goes back to the original use of the word "functor" by Rudolf Carnap (to mean something like a word which combines with other words as arguments to produce a full term; a word that acts function-like, basically).

Saunders Mac Lane took the word "functor" from Carnap and gave it a particular definition in category theory (when founding category theory with Samuel Eilenberg). The ML languages and Haskell use the word "functor" in reference to this category theory sense of the word.

But category theory is not actually where the word "functor" originated. So perhaps we shouldn't say that C++ got its use of the word wrong, but rather, that there were simply two independent paths of evolution of technical uses of the word since its original creation by Rudolf Carnap for use in philosophy of language.

Re:The Monad Challenges: Jump start your understanding of mo... by kyllo on Wednesday January 20, 2016 @12:03AM (#10936178)
Functors also mean something different in OCaml than they do in Haskell. Two different applications of the same abstract concept.
Re:The Monad Challenges: Jump start your understanding of mo... by zmmmmm on Tuesday January 19, 2016 @07:04PM (#10935089)
I'm curious to know which came first?

In any case it's annoying to have different languages adopting the same word to mean vaguely related but actually completely different things. I suspect that is why a lot of tutorials about Monads skip talking about Functors altogether which ends up making the whole thing more confusing.

Re:The Monad Challenges: Jump start your understanding of mo... by archgoon on Tuesday January 19, 2016 @07:47PM (#10935274)
> I'm curious to know which came first?

The math definitions. These were invented by Saunders Mac Lane and Samuel Eilenberg back in 1945ish, about a year before ENIAC was built.

Re:The Monad Challenges: Jump start your understanding of mo... by Profan on Tuesday January 19, 2016 @06:32PM (#10934952)
It's not though, in C++ a functor is generally something which defines the operator which lets you treat it as a callable. (a thing which acts like a function)

Though the suppose the dissonance in naming point still applies.

Re:The Monad Challenges: Jump start your understanding of mo... by jfarmer on Tuesday January 19, 2016 @08:12PM (#10935364)
> a functor is generally something which defines the operator which lets you treat it as a callable

In mathematics, those things are just called "functions". :P