Ask HN: How can I learn Haskell?
3 comments
I am also currently learning Haskell and went with LYAH. I think it is a good enough textbook to introduce the theoretical part while giving enough examples.
My problem was that I was able to understand the concepts but couldn't write functions that do what I want them to do. To gain some experience I am working through 99 Haskell [1] and HackerRank FP domain [2]. Quite a lot of exercises there.
[1] http://www.99haskell.org/ [2] https://www.hackerrank.com/domains/fp/intro
My problem was that I was able to understand the concepts but couldn't write functions that do what I want them to do. To gain some experience I am working through 99 Haskell [1] and HackerRank FP domain [2]. Quite a lot of exercises there.
[1] http://www.99haskell.org/ [2] https://www.hackerrank.com/domains/fp/intro
I haven't worked through it but the approach to Learn You a Haskell seems fun:
http://learnyouahaskell.com/
http://learnyouahaskell.com/
There are much better resources than LYAH.
Chris Allen has a good list and critique of different books/courses: http://bitemyapp.com/posts/2014-12-31-functional-education.h...
Chris Allen has a good list and critique of different books/courses: http://bitemyapp.com/posts/2014-12-31-functional-education.h...
LYAH is a phenomenal introductory resource. As companion material I would also recommend the lecture series on C9 by Dr. Erik Meijer, https://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Fun....
I second the C9 series. Dr. Erik Meijer does a great job of explaining a lot of concepts you need to understand.
Use Stack instead of installing Haskell platform, your distro's Haskell package:
https://github.com/commercialhaskell/stack
After installing stack and putting ~/.local/bin on your path here is how I start a project:
Learning:
https://github.com/bitemyapp/learnhaskell
http://haskellbook.com/
After those, just start writing crappy Haskell code to solve real tasks you need/want solved. The most important thing is to focus on creating working software with the language, since that's the fastest way to learn.
After you've done this a couple times start reading source code of libraries which solve the same problems you've implemented and see how they are different. This may include lots of learning before you understand the libraries.
Once you understand this library, start going down the most popular libraries and understanding how they work (You might want to skip lens though! I hear it's very difficult to understand the source code and sheer generality):
http://hackage.haskell.org/packages/top
Some papers I feel I'd do a disservice of not mentioning:
http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba...
http://www.cs.virginia.edu/~wh5a/personal/Transformers.pdf
Also, I use these as references while writing crappy (and sometimes not as I get more experienced) Haskell code:
https://en.wikibooks.org/wiki/Haskell
http://book.realworldhaskell.org/read/
http://book.realworldhaskell.org/read/
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
https://www.fpcomplete.com/school
https://www.fpcomplete.com/recent-content
https://github.com/commercialhaskell/stack
After installing stack and putting ~/.local/bin on your path here is how I start a project:
cabal init
< answer questions >
stack init
The above will be replaced by `stack new` in the future I think, but `stack new` doesn't work for what I'm doing atm.Learning:
https://github.com/bitemyapp/learnhaskell
http://haskellbook.com/
After those, just start writing crappy Haskell code to solve real tasks you need/want solved. The most important thing is to focus on creating working software with the language, since that's the fastest way to learn.
After you've done this a couple times start reading source code of libraries which solve the same problems you've implemented and see how they are different. This may include lots of learning before you understand the libraries.
Once you understand this library, start going down the most popular libraries and understanding how they work (You might want to skip lens though! I hear it's very difficult to understand the source code and sheer generality):
http://hackage.haskell.org/packages/top
Some papers I feel I'd do a disservice of not mentioning:
http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba...
http://www.cs.virginia.edu/~wh5a/personal/Transformers.pdf
Also, I use these as references while writing crappy (and sometimes not as I get more experienced) Haskell code:
https://en.wikibooks.org/wiki/Haskell
http://book.realworldhaskell.org/read/
http://book.realworldhaskell.org/read/
http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
https://www.fpcomplete.com/school
https://www.fpcomplete.com/recent-content
There's a ton of info online about this question that I'm feeling a bit overwhelmed.
Any tips or good resources that the community can recommend?