5 ms·
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 backgr
by Arnor 13y ago
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?
- pestaa 13y agoWell, I've been continously reassured that learning the theory is unneccessary if all you want is to use Haskell effectively.
- freyrs3 13y agoLearning 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.
- Arnor 13y agoSo lets assume I'm interested in deeper computer science :)
- nightski 13y agoI'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.
- awj 13y agoWell, 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.
- Arnor 13y agoWell said!
- asdasf 13y ago>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.
- jcurbo 13y agoWe had a discussion on this when Stephen's last post showed up here: https://news.ycombinator.com/item?id=6041726 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.
- davidcuddeback 13y agoThanks 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 https://news.ycombinator.com/item?id=6041726 [2] http://www.reddit.com/r/haskell/comments/1ht4mf/books_on_category_theory_for_beginners/ http://www.reddit.com/r/haskell/comments/1ht4mf/books_on_cat... [3] http://www.amazon.com/Conceptual-Mathematics-First-Introduction-Categories/dp/052171916X http://www.amazon.com/Conceptual-Mathematics-First-Introduct...
- jrokisky 13y agoI'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.
- ufo 13y agoIn 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 http://www.haskell.org/haskellwiki/Typeclassopedia
- polymatter 13y agoI 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 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/ 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-practical-category-theory http://mathoverflow.net/questions/903/resources-for-learning...)
- pasquinelli 13y agoi'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-Proofs-A-Transition-to-Advanced-Mathematics-2E/9780321390530.page 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.
- dllthomas 13y agoI'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.