4 ms·
I really want to get into Haskell, but I just don't understand it. The tutorial on the official site doesn't do it for me. Can anyone suggest alternative resour
by Sir_Cmpwn 13y ago
I really want to get into Haskell, but I just don't understand it. The tutorial on the official site doesn't do it for me. Can anyone suggest alternative resources for learning? I'm used to C-like languages.
Thanks for all the responses. I'll start with LYAH.
- bretthoerner 13y agohttp://learnyouahaskell.com/chapters http://learnyouahaskell.com/chapters
- Dewie 13y agoLearn You A Haskell For Great Good (free online book) is the most common recommendation for beginners.
- gamegoblin 13y agoI tried getting into haskell probably 3 times before it really stuck with me. After getting over the initial hump it's heavenly. I started with LYAH like others have recommended. Persistence!
- dmunoz 13y agoLearn You a Haskell for Great Good! has already been recommended, which I would have said if it had not yet been. There is also Real World Haskell [0]. It's a lot less long winded than LYaH, which is good or bad depending on how you like to digest information. Also, check out FP Complete's FP Haskell Center [1]. It contains community written tutorials with inline runnable code examples, so you can really get a feel for Haskell by manipulating and playing with the examples right on the site. [0] http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/ [1] https://www.fpcomplete.com/business/fp-haskell-center/ https://www.fpcomplete.com/business/fp-haskell-center/
- RaphiePS 13y agoI'm a big fan of http://learnyouahaskell.com/ http://learnyouahaskell.com/
- tel 13y agoOthers have linked tutorials. I'm going to leave some advice: pretend like you're learning to program from scratch. Not just mentally but in how you invest. It will likely take some amount of time, it will likely happen in stages of progressively receding complete astonishment and confusion, and you will be served to be proud of silly things like getting simple programs to even compile. Sounds kind of miserable, right? That's why you should also prepare for it with some of that early curiosity and wonder that drove us all to learn programming to begin with. Haskell is probably unlike anything you've used before.
- freyrs3 13y agoThis is most certainly the best advice you can give to someone coming from other languages. I constantly see people I very much respect for their skills in other programming disciplines get very angry and make otherwise irrational rants about Haskell because they can't translate their hard won skills over to this new model. Learning Haskell will make one feel like a beginner again, should just embrace that from the start.
- efnx 13y agoAfter LYAH I learned a lot from doing as many of the 99problems set for Haskell as possible. http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell...
- dengnan 13y agoWhen I learn something, I would like to simultaneously read several books on the same topic, so that I could learn same things from different perspective. It works great for me when I learn Haskell, Scala, and other things. Here is the list of materials I used to learn Haskell: 1. LYAH, http://learnyouahaskell.com/ http://learnyouahaskell.com/ 2. Real world Haskell: http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/ 3. Programming in Haskell: http://www.amazon.com/Programming-Haskell-Graham-Hutton/dp/0521692695 http://www.amazon.com/Programming-Haskell-Graham-Hutton/dp/0... (No one suggests this book, but I do think this book is well-written and concise.) 4. Video tutorial by Erik Meijer based on Programming in Haskell: http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Functional-Programming-Fundamentals http://channel9.msdn.com/Series/C9-Lectures-Erik-Meijer-Func... 5. Advanced topics: http://www.haskellforall.com/2014/03/introductions-to-advanced-haskell-topics.html http://www.haskellforall.com/2014/03/introductions-to-advanc... Edit: Format
- embwbam 13y agoOne thing to keep in mind: Haskell is different enough that it's almost as hard as learning to program the first time. To learn something that hard, you need to be exposed to it multiple times. You'll probably get overwhelmed even with LYAH, but give it some time and come back to it.
- lelf 13y agoI can recommend reading SICP first if you know nothing about functional programming. It will likely help a lot. And forget everything you know from C-like languages (I'm not joking).
- Buttons840 13y agoI recommend the 99 Haskel problems: http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell_Problems http://www.haskell.org/haskellwiki/H-99:_Ninety-Nine_Haskell... All questions have solutions you can learn from; most have multiple solutions. I have learned a lot from doing these problems and doing additional research where needed. (This is in addition to the other good learning resources like the oft mentioned LYAH.)
- SkyMarshal 13y agoMiran Lipovaca's LYAH is one of the best intro to programming, not just intro to Haskell, books I've read. He's great at explaining complicated technical concepts clearly.
- nnq 13y agoI sincerely recommend against LYAH! It takes sooooooooo loooooong to get to the interesting bits that actually make Haskell worth learning an has so many try-to-be-funny examples that it makes you run away screaming... I tried going through it but it was literally oscillating between putting my mind to sleep and making wish to grab a chainsaw :) And the "humor" and "pretty pictures" don't help either... they were more like poignant guide to ruby, something that you either love or they annoy the hel out of you (this was for me), but either way they don't help the learning experience at all. I suggest HFH ("Haskell Fast & Hard") as the introductory tutorial to start with instead. You can pick from 2 formats: - http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way... - static all-in-one-page format with pretty pictures - https://www.fpcomplete.com/school/to-infinity-and-beyond/pick-of-the-week/haskell-fast-hard https://www.fpcomplete.com/school/to-infinity-and-beyond/pic... - split version, but with the ability to open snippets in their web based IDE ...after this, Real World Haskell is probably the next step: http://book.realworldhaskell.org/read/ http://book.realworldhaskell.org/read/ (I'm still at this step).
- deleted 13y ago[deleted]
- rando289 13y agoI accidentally upvoted you, but I disagree. LYAH is a great book to actually read through, and I enjoyed the humor. real world haskell introduces things without explaining and it's quite confusing and inconsistent.
- pestaa 13y agoWhy would downvote for disagreeing? GP is actually a well written comment, and very much deserves the upvote.
- virtualwhys 13y agoI concur, LYAH was, for me, not a terribly useful intro to Haskell. Running through some chapters of Real World Haskell online, however, is proving to be a bit of an eye opener ;-) Might just be that I could care less about hand drawn illustrations and the occassional somewhat humerous aside. YMMV, many seem to love LYAH.
- tavoe 13y agoTo me, the core of Haskell is that: "Haskell is C with one semi-colon per function." This forces you to put all your code into method signatures. This, in turn, means Haskell (or C, if you follow the 1 semicolon rule in C) can understand almost everything about your program. If you actually follow the 1 semicolon rule in C, you'll get very verbose syntax. All of Haskell's syntax is in service of making programming in this style palatable.
- coolsunglasses 13y agoIf you want an alternative opinion from somebody who 1. Has taught a lot of Haskell 2. Thinks LYAH is better as a reference than a step-by-step method for learning Haskell Then see my Learning Haskell gist here (it includes Haskell Fast & Hard, and other things too). https://gist.github.com/bitemyapp/8739525 https://gist.github.com/bitemyapp/8739525 If anybody is learning Haskell and needs help, please email me. Edit: I agree with nnq, I think LYAH moves too slowly and fails to show you what about Haskell is truly different and worthwhile in a compact enough format. That said, it is great as a reference as the explanations of concepts are stand-alone. (unlike RWH which is more project-oriented) Edit2: You are going to feel a bit lost after Haskell Fast & Hard. This is natural. That's why I have you do the NICTA course. It firms things up. Edit3: I think RWH is a great reference as well, but the mid-to-late chapters have a bit of an "in media res" thing going on because there are projects being walked through cross-chapter. That said, it has a very nice and simple example of, "pre-monads, ugly code; post-monads, pretty code". RWH also covers topics that you'll care about if you're doing Haskell in production.
- mitchty 13y agoCool, i'm going to look at that gist for this years "try to learn haskell... again" attempt. :) I do it every year but hit io monads and my mind continually just has a core dump. Some year I hope to climb everest.
- coolsunglasses 13y ago>I do it every year but hit io monads and my mind continually just has a core dump Stop doing that. I explicitly say in my gist: "Most of all, don't sweat the stuff you don't understand immediately. Just keep moving." IO is not important. It behaves no differently at a basic level than any other monad. Monads themselves are just an interface. Don't put the knowledge on a pedestal, just keep hacking Haskell. It'll all come with time. This blog post of mine might lend some intuition for monads (including IO): http://bitemyapp.com/posts/2014-03-24-monads-bind-join-actions.html http://bitemyapp.com/posts/2014-03-24-monads-bind-join-actio... But don't get stuck. It doesn't matter. Just write Haskell code. The compiler won't let you do anything too crazy anyway.
- dllthomas 13y agoNo one's mentioned the wikibook. I've not read through it much, but a colleague found it far more readable than LYAH: http://en.wikibooks.org/wiki/Haskell http://en.wikibooks.org/wiki/Haskell (I loved LYAH myself, though, so YMWillProbablyV). Also, there's no substitute for talking to people. Hop on the Haskell Beginners mailing list (http://www.haskell.org/mailman/listinfo/beginners http://www.haskell.org/mailman/listinfo/beginners) or drop by the IRC channel (#haskell on freenode), where people couldn't be friendlier.
- joehillen 13y agoDon't bother with LYAH. I learned Haskell from a lecture created by one of the creators of the language, Philip Wadler: https://www.youtube.com/playlist?list=PL4C1D41CB47EED318 https://www.youtube.com/playlist?list=PL4C1D41CB47EED318
- TazeTSchnitzel 13y agoI'm enjoying Learn You a Haskell. Then again, that might be because when I looked into Haskell, I realised it was the language I wished to create.
- startling 13y ago(hi!) You might like this: http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Programmers http://www.haskell.org/haskellwiki/Haskell_Tutorial_for_C_Pr... And the Gentle Introduction is not very gentle but is a good reference: http://www.haskell.org/tutorial/ http://www.haskell.org/tutorial/
- stusmith1977 13y agoI've found the "24 Days of Hackage" series incredibly useful - each day is a brief introduction to a useful Haskell library, many of which show off features of Haskell that aren't available in 'standard' languages. Even better, each one comes with working example source on GitHub, so you've got a starting point if you do want to experiment. http://ocharles.org.uk/blog/ http://ocharles.org.uk/blog/ (I'm a Haskell beginner, currently experimenting with using Scotty, Persistent and Esqueleto to make a web API - and these articles have been so useful to me - I'm finally getting my head around monad transformers, using them to extend the standard Scotty one. Proud moment for me.)
- rasur 13y agoI'm lurching through the wikibook: http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_H... with a side order of the Haskell Report/Reference for when things are not clear to me. Both are helping my limited experience of Haskell greatly.