News for hackers. Stuff that matters.
Re:Haskell for Web Developers by Arnor on Friday July 26, 2013 @11:44AM (#6108802)
I'm just getting started with Haskell and there will soon come a time where I need to jump in the deep end. When I'm ready to learn Category theory, what background will I need? Is elementary calculus and a little linear algebra enough? Or am I going to need some more advanced math concepts? Once I've got the right background, where should I go to learn Category theory?
Re:Haskell for Web Developers by jcurbo on Friday July 26, 2013 @12:17PM (#6108976)
We had a discussion on this when Stephen's last post showed up here: https://news.ycombinator.com/item?id=6041726

I've been looking into this myself and I have a similar background as you (elementary calculus and linear algebra; I also took number theory as part of a math minor). So far it looks like I should pick up a bit of abstract algebra/topology (rings, fields, groups, etc) then I should be able to start off on the shallow end of category theory and work from there. At the same time I need to improve my understanding of how monads, monad transformers, monoids, functors, etc work in Haskell from an operational standpoint; I have a basic understanding now but I'd like to dig deeper.

The thread I linked above has a lot of links to books and stuff like Reddit's r/haskell and other places, that you can sort through to see what works for you. I have yet to make that determination for myself, but there's plenty to choose from. I actually picked up a copy of Benjamin Pierce's "Basic Category Theory for Computer Scientists" a few years ago based on someone's recommendation, way before I got into Haskell, and didn't make the connection until I picked up his book on type theory recently (while researching a paper on FP) and thought his name looked familiar.

Ultimately I'm hoping to be able to get deep into type theory and go through that Homotopy Type Theory book that came out recently.

Re:Haskell for Web Developers by davidcuddeback on Friday July 26, 2013 @12:56PM (#6109154)
Thanks for the response. I was interested in the answer to this question as well. I read through the thread [1] that you linked to, and seems like the consensus is the same thing you said: it's best to learn abstract algebra and topology first. Does anyone know of some good sources for those topics? The other threads are understandably focused on category theory.

As for category theory, after reading through that thread [1] and the Reddit thread [2] that it links to, I think Conceptual Mathematics: A First Introduction to Categories [3] will be my first read on category theory (but probably followed by the Rosetta Stone paper). That book receives some strong recommendations as a first book in the Reddit thread [2].

[1] https://news.ycombinator.com/item?id=6041726

[2] http://www.reddit.com/r/haskell/comments/1ht4mf/books_on_cat...

[3] http://www.amazon.com/Conceptual-Mathematics-First-Introduct...

Re:Haskell for Web Developers by jcurbo on Friday July 26, 2013 @01:06PM (#6109201)
Not a problem. I'm interested in the abstract algebra question too, as I haven't actually done any research yet. Perhaps someone should start an r/categorytheory. :)
Re:Haskell for Web Developers by davidcuddeback on Friday July 26, 2013 @01:30PM (#6109344)
Digging deeper into the HN thread that you linked to, I came across this discussion [1] on Reddit which is focused more on the abstract algebra question. They recommend Algebra: Chapter 0 by Aluffi (Amazon [2] or PDF [3]).

[1] http://www.reddit.com/r/math/comments/1eiyid/category_theory...

[2] http://www.amazon.com/Algebra-Chapter-Graduate-Studies-Mathe...

[3] http://www.mimuw.edu.pl/~jarekw/pdf/Algebra0TextboookAluffi....

Re:Haskell for Web Developers by Arnor on Friday July 26, 2013 @02:52PM (#6109828)
Thanks for the Algebra Chapter 0 link! I think that's my next math book :)
Re:Haskell for Web Developers by jcurbo on Friday July 26, 2013 @07:44PM (#6111173)
Ah, I think I had seen that but forgotten to note it. Thanks.
Re:Haskell for Web Developers by davidcuddeback on Friday July 26, 2013 @01:18PM (#6109278)
This might become a recursive rabbit hole.
Re:Haskell for Web Developers by polymatter on Friday July 26, 2013 @12:58PM (#6109165)
I will echo the choir here that states that Category theory is not Haskell. Category theory gave Haskell some neat tricks, but its not necessary to understand it to do anything practical. Category theory is so abstract and general that it is unlikely to come up with any grand solutions unless you are phd'ing.

If you enjoy it anyway: I like (http://www.haskell.org/haskellwiki/Typeclassopedia) for how it discusses how the different type classes in Haskell relate. I found this a lot more practical coming from this direction but your taste may vary.

I'd also highly recommend going through Types and Progrmaming Languages by Pierce (http://www.cis.upenn.edu/~bcpierce/tapl/) if you are interested in the area. This gives you a good background on type system stuff.

There are tons more links to category theory stuff here (http://mathoverflow.net/questions/903/resources-for-learning...)

Re:Haskell for Web Developers by ufo on Friday July 26, 2013 @12:49PM (#6109119)
In my experience, reading the Typeclassopedia[1] is probably more than enough for most people.

Some people like thinking about category theory when they program but in the end its still just a bunch of (cleverly organized) abstract interfaces.

[1] http://www.haskell.org/haskellwiki/Typeclassopedia

Re:Haskell for Web Developers by pestaa on Friday July 26, 2013 @11:55AM (#6108848)
Well, I've been continously reassured that learning the theory is unneccessary if all you want is to use Haskell effectively.
Re:Haskell for Web Developers by freyrs3 on Friday July 26, 2013 @12:00PM (#6108877)
Learning category theory is about as important to programming in Haskell as denotational semantics are to programming in C. Which is to say, not very important unless you're interested in deeper computer science.
Re:Haskell for Web Developers by Arnor on Friday July 26, 2013 @12:02PM (#6108894)
So lets assume I'm interested in deeper computer science :)
Re:Haskell for Web Developers by nightski on Friday July 26, 2013 @12:11PM (#6108941)
I'd still just start with learning Haskell. It will not be nearly as intimidating and you'll see how the ideas work out in practice in the programming world. Then move on to category theory. But hey if you are ambitious by all means dive right in.
Re:Haskell for Web Developers by awj on Friday July 26, 2013 @12:49PM (#6109117)
Well, then I think you should either learn category theory directly or learn Haskell without it first. Learning two brand new things at once usually produces an incomplete understanding of both.
Re:Haskell for Web Developers by Arnor on Friday July 26, 2013 @02:49PM (#6109813)
Well said!
Re:Haskell for Web Developers by jrokisky on Friday July 26, 2013 @12:47PM (#6109111)
I'm in a similar situation. My math background consists of the required courses for a BA in CS. I tried to start with Mac Lane's "Categories for the Working Mathematician", but it was too dense for me. I switched to Awodey's "Category Theory" and that has been easier to follow. Wikipedia, Youtube, and other online sources have been very helpful. It's been a very rewarding experience so far.
Re:Haskell for Web Developers by dllthomas on Friday July 26, 2013 @09:41PM (#6111512)
I'm currently working my way through "Basic Category Theory For Computer Scientists" with a local meetup group. I don't have enough to compare it to, to say whether I'd recommend it as a book. I've been enjoying it, though. If you're in the Bay Area, join the meetup group - we're only just starting chapter 2.

As for background, I think some familiarity with set theory would be most useful, groups and rings and such a bonus. Calculus won't be of much help. Linear algebra might, depending.

Re:Haskell for Web Developers by pasquinelli on Friday July 26, 2013 @01:26PM (#6109318)
i'm not sure what you need to learn category theory (but i'm working on it). so far it seems you need a to be able to write and read proofs, and not much else.

of course, that doesn't have much to do with haskell, but if you have an interest in abstract algebra beyond its applicability in haskell, you're in luck, because it doesn't seem to require much background. all it needs is for your head asplode.

caveat: i've tried to learn category theory, and found that i could barely follow a proof, let alone write one. so i picked up a book: http://www.pearsonhighered.com/educator/product/Mathematical...

and i'm working through it now. i could come back to category theory and find that i'm still lost, but i don't think so.

i haven't really had much trouble writing haskell without a decent math background.

Re:Haskell for Web Developers by asdasf on Friday July 26, 2013 @12:07PM (#6108917)
>I'm just getting started with Haskell and there will soon come a time where I need to jump in the deep end

Your implication is that "jump in the deep end" means learn category theory. That is entirely unnecessary. If you are interested in category theory, by all means go for it. But don't think it is in any way a haskell requirement.