News for hackers. Stuff that matters.
Re:Learn You a Haskell for Great Good by ilovecaching on Tuesday August 21, 2018 @04:15PM (#17813344)
Terrible book. Please, please read Graham Hutton's Programming in Haskell. LYAH is full of incorrect definitions and broken analogies. Hutton on the other hand is up there with K&R for clear and concise definitions.
Re:Learn You a Haskell for Great Good by creichert on Tuesday August 21, 2018 @06:23PM (#17814376)
> Terrible book.

Definitely overstated and not good advice for beginners.

My advice to beginners would be:

- Read all the Haskell books available at your disposal. (In addition to LYAH and the Hutton book, I would say Learning Haskell From First Principles and Get Programming with Haskell are great, https://www.manning.com/books/get-programming-with-haskell, http://haskellbook.com/)

- When you hit something that doesn't make sense in one source, try referencing it in another source.

- When you have some experience writing programs in Haskell, refer to some older books like Real World Haskell. There may be a few issues compiling the examples, but nearly all the techniques in the book are still widely used and you learn about the language has progressed in the last few years. This gives you a compass to read and maintain older Haskell source code).

- Read as much Haskell code as you can from popular libraries (Pandoc, XMonad, and smaller libs as well).

Re:Learn You a Haskell for Great Good by ilovecaching on Tuesday August 21, 2018 @06:49PM (#17814563)
Beginners want a clear place to start learning from. All those things you said are overwhelming and unnecessary. Some of your recommendations would be fine as next steps, but to start with, just read Hutton's book. It is small enough to be read in just a few days.
Re:Learn You a Haskell for Great Good by derefr on Tuesday August 21, 2018 @07:31PM (#17814830)
I think there are two different definitions of "beginner" being used here.

1. Someone who has never programmed before, and is perhaps young. Someone who has to be guided. A novice.

2. Someone who is new to this particular language, but is experienced at programming generally; who is attempting to learn the language to use it "in anger" (i.e. with a specific goal in mind and a timeline for that goal); and who is willing to "do whatever it takes" to learn the skill. A journeyman beginning a new path.

A novice needs a definitive textbook. A journeyman-beginner, on the other hand, needs definitive primary sources, however scattered.

If you're a high-school student learning precalculus, what do you need? A math textbook.

If you're a post-graduate student learning some specific arcane sub-discipline of math to see whether it could be used to solve the novel problem you've decided to do your thesis on, what do you need? Primary sources. All the journal papers in that field you can get your hands on. There's no one textbook that could possibly help you; the only truth you will find is the truth "between the lines" of everything you read.

Re:Learn You a Haskell for Great Good by dorkwood on Tuesday August 21, 2018 @07:40PM (#17814881)
I think this is good advice for learning any topic in general. Learn from a diverse range of sources.

When I was first learning to code I can remember deciding to stick with one learning resource so as to not overwhelm myself. Eventually I hit a road block and wasn’t able to push past it. I blamed myself for not being able to understand what I was reading. I wasn’t smart enough.

When I tried again years later, instead of sticking with one resource I flicked between several different ones at once. Seeing how different people explained the same concept was extremely helpful in getting things to “click”.

Re:Learn You a Haskell for Great Good by f0rgot on Tuesday August 21, 2018 @07:59PM (#17814967)
It is uncanny how close to my own experience the process you just described is.
Re:Learn You a Haskell for Great Good by jbritton on Tuesday August 21, 2018 @05:36PM (#17814059)
Personally, I found LYAH to be a great book. If there are places where the book is incorrect, I didn't have the background knowledge to notice. I felt the book did a good job explaining applicatives and monads by starting at the very basics and very slowly ramping up the complexity to a complete understanding. I know with many math books I have had a problem where some transformation morphs equation A into equation B and the reader is left wondering how exactly B was obtained. I never felt that way reading LYAH. I could see where somebody already knowledgeable with Haskell would find the micro steps overkill, but it went at the pacing I needed.
Re:Learn You a Haskell for Great Good by ilovecaching on Tuesday August 21, 2018 @06:50PM (#17814569)
Have you read Hutton's book?
Re:Learn You a Haskell for Great Good by dom96 on Tuesday August 21, 2018 @04:48PM (#17813662)
> Terrible book.

While LYAH may not be ideal, isn't calling it "terrible" a tad too harsh?

FWIW I learned Haskell using LYAH and enjoyed it thoroughly. It was my first time learning a language with such a high focus on functional programming, but I think this book did a good job of teaching it.

Re:Learn You a Haskell for Great Good by andrepd on Tuesday August 21, 2018 @06:05PM (#17814252)
Agreed. Personally I hate these kinds of books. This style, long-winded "cheery" explanations, constantly "playful", as if I was a small child that couldn't hold my attention for 2 minutes before you had to dangle a colourful toy in front of me. Like they're afraid to be serious for a moment (so many exclamation marks). I'm not here for humour, or to have a pleasant conversation. I'm here to learn. Just give me clear and concise, with minimal fluff.

If anyone is familiar with it, Landau and Lifschitz is my kind of book ;)

EDIT: I've just skimmed the Hutton book. It looks great! That's what I mean. You don't have to be dense or incomprehensible or dry. Just stick to the point and explain as clear and concise as possible.

Re:Learn You a Haskell for Great Good by derefr on Tuesday August 21, 2018 @07:38PM (#17814872)
> Like they're afraid to be serious for a moment (so many exclamation marks).

I rarely speak with enthusiasm... but teaching or explaining programming to people just gets me really, really excited. Putting myself in the shoes of a novice who is about to have some realization about the nature of an algorithm makes me shiver with anticipatory glee.

It's hard not to put that into my writing. It's not fake in the slightest—it's the only time I can let it shine through just how much I love this stuff, and it'd be fake to hide it. Even the constant "cute analogies" are part-and-parcel of this exuberance—symptoms of temporary hypomania brought about during the writing process.

Certainly, I could go back and edit all this stuff away. But, really, should I? I never had a role-model who was as excited about programming as I am. I wish I had had one. I, therefore, find it hard to restrain myself from being that person for others.

Re:Learn You a Haskell for Great Good by sriram_sun on Tuesday August 21, 2018 @07:00PM (#17814637)
Can be cheery, playful and concise - The Little Schemer was a pleasure to read cover to cover.
Re:Learn You a Haskell for Great Good by andrepd on Tuesday August 21, 2018 @10:59PM (#17815930)
I can vouch for that! It's more the endless faffing about and the distracting interruptions that irk me. In TLS the whimsy never got in the way of the learning.
Re:Learn You a Haskell for Great Good by myegorov on Tuesday August 21, 2018 @06:46PM (#17814544)
I suspect few physics students would agree with you about the didactic value of LL. The audiences for the two types of books couldn't be more different.
Re:Learn You a Haskell for Great Good by zinclozenge on Tuesday August 21, 2018 @07:35PM (#17814847)
They're definitely not the books you want for your primary learning source, but as a 2nd source pretty good for sure as long as you're comfortable filling in computation details between equations.
Re:Learn You a Haskell for Great Good by andrepd on Tuesday August 21, 2018 @11:01PM (#17815939)
I learned Mechanics and Fluid Dynamics from Landau ;) It's a challenge to be sure. And it's dense. But actually the fact they tell you the ideas but not necessarily every detail sorta forces you to work things out in paper as you read, which I found very fruitful.
Re:Learn You a Haskell for Great Good by anon335dtzbvc on Tuesday August 21, 2018 @04:47PM (#17813650)
"LYAH is full of incorrect definitions and broken analogies."

Well it's fine for beginners, because beginners want easy explanations and many examples to start with, instead of very precise definitions which requires a precise math vocabulary.

Re:Learn You a Haskell for Great Good by ilovecaching on Tuesday August 21, 2018 @05:12PM (#17813885)
Graham has simple and precise definitions. They're not mutually exclusive properties. No mathematical background or vocabulary is required to read Grahams book. The book is used in introductory computer science courses for undergraduate freshman.
Re:Learn You a Haskell for Great Good by aye01 on Tuesday August 21, 2018 @06:38PM (#17814479)
i have never heard of haskell being a language used for teaching introductory computer science courses. that sounds like a nightmare. i'd imagine mid-to-upper div classes.
Re:Learn You a Haskell for Great Good by protomikron on Tuesday August 21, 2018 @06:44PM (#17814526)
Actually Haskell is excellent for an introduction. The problem with Haskell is that it may be hard hard to get "real stuff done" so to say, i.e. in an industry setting where you have to interact with many external services or libraries (and then miss those specific libraries).

If you're learning the basics of Computer Science you usually don't have to do this so Haskell is a great language then.

Re:Learn You a Haskell for Great Good by svat on Tuesday August 21, 2018 @07:58PM (#17814964)
Haskell was the first programming language taught at our college when I was a student, where some of the students hadn't even used a computer before. It went fine. (I think it was actually better than other languages would have been, as many of the students had a background in mathematics and might have been confused by things like "x = x + 1", while they were comfortable with the idea of a function, at least as used in mathematics.)

If you'd like to see for yourself what that course was like, here are lecture notes (and assignments, and mid-term exam): https://www.cmi.ac.in/~madhavan/courses/programming08/index....

Re:Learn You a Haskell for Great Good by gnufx on Wednesday August 22, 2018 @09:48AM (#17818621)
Right. Long ago a group of Oxford physicists with no computing experience were baffled by "LET X=X+1", which the demonstrator failed to explain in terms of a storage model.

Orwell (Haskell predecessor) was used later at Oxford, and I think ML at the other university. "Preparing to study Computer Science at Cambridge" once said "Teaching yourself to program can lead to your picking up bad habits that will hinder your progress later. In particular, you should avoid languages like C++."

Re:Learn You a Haskell for Great Good by thisrod on Tuesday August 21, 2018 @08:44PM (#17815217)
In the mid 90s, first year computer science at the Australian National University used Miranda, the proprietary language from which Haskell was forking at the time. It was great. When I read SICP later, the first half seemed like a long-winded demonstration of obvious ways to use recursion. Didn't everyone know this stuff?

Much of the language seemed like magic, but ANU had a culture of throwing students in the deep end to keep us humble about what we knew.

Re:Learn You a Haskell for Great Good by ilovecaching on Tuesday August 21, 2018 @06:45PM (#17814533)
Haskell is a great language to learn as an introductory language with the right teacher and text. Read Hutton's book and come back here and tell me you found it to be too difficult for a beginner.
Re:Learn You a Haskell for Great Good by khannate on Tuesday August 21, 2018 @07:37PM (#17814865)
UChicago's honors introductory sequence uses it: http://cmsc-16100.cs.uchicago.edu/
Re:Learn You a Haskell for Great Good by 0xCMP on Tuesday August 21, 2018 @04:23PM (#17813424)
Yes and there is a newer 2016 version (2007 one came up for me first) https://www.amazon.com/Programming-Haskell-Graham-Hutton-ebo...

(no referral link)

Re:Learn You a Haskell for Great Good by mesarvagya on Tuesday August 21, 2018 @04:29PM (#17813467)
Thanks just bought it.
Re:Learn You a Haskell for Great Good by reificator on Tuesday August 21, 2018 @04:41PM (#17813586)
I got LYAH in a Humble Bundle and didn't make it very far before getting bored and dropping it.

I've used Rust, SML, and a bit of Scala so I don't feel like it should be that difficult to pick up Haskell. Next time I get the urge, I'll try Hutton's book.

Re:Learn You a Haskell for Great Good by leshow on Tuesday August 21, 2018 @04:44PM (#17813620)
It probably won't be for you. I was picking up Rust in 2015 and my prior Haskell knowledge (just past beginner at the time), helped immensely. There's a good deal of crossover for the broad concepts.
Re:Learn You a Haskell for Great Good by reificator on Tuesday August 21, 2018 @06:07PM (#17814266)
Yeah SML helped a lot while learning Rust for the same reason.
Re:Learn You a Haskell for Great Good by btmiller on Tuesday August 21, 2018 @04:26PM (#17813448)
I have to echo this sentiment because LYAH came across as foreign and generally unhelpful. It seems that in educators' pursuits to make CS more accessible to a wider audience, this becomes one example of how not to do it.
Re:Learn You a Haskell for Great Good by solomatov on Tuesday August 21, 2018 @05:24PM (#17813978)
May be this book isn't ideal, but it explain the most important and complicated things in haskell such as Functors, Monads, Applicatives, etc.
Re:Learn You a Haskell for Great Good by sbjs on Tuesday August 21, 2018 @04:33PM (#17813514)
As unfortunate as that may be, I'm glad to hear that maybe it's not that I can't learn Haskell, maybe it's just that I chose the wrong book. So here's to trying again with Hutton's book!
Re:Learn You a Haskell for Great Good by 3rdAccount on Tuesday August 21, 2018 @05:11PM (#17813875)
HaskellBook is also highly recommended
Re:Learn You a Haskell for Great Good by wgerard on Tuesday August 21, 2018 @04:50PM (#17813677)
Seconding this opinion. Haven't read Graham Hutton's book, but LYAH was just really poorly structured IMO.

Some chapters are really basic and easy to read (like the chapter on recursion), and others are insanely dense and thick and basically unintelligible the first time through (like the chapter on functors).

We tried reading it for a book club once, and the weeks with the easy chapters there was no discussion to be had and the weeks with the difficult chapters ended up being "did anyone understand any of this?" and trying to figure it out together - which was somewhat helpful, but the book just really ended up being an excuse for us to learn together and not a resource in and of itself.

Re:Learn You a Haskell for Great Good by ahartmetz on Tuesday August 21, 2018 @04:47PM (#17813647)
Yeah, it tries to be funny but it's just annoying and disorganized.
Re:Learn You a Haskell for Great Good by gaius on Tuesday August 21, 2018 @05:04PM (#17813797)
I felt the same about “Why’s poignant guide”
Re:Learn You a Haskell for Great Good by hultner on Tuesday August 21, 2018 @05:41PM (#17814100)
I used this book to get introduced to Haskell and think it worked great, it’s also used as the course material in the first programming course for the CS-Program at Chalmers University of Technology (CTH) and have worked as a introduction to programming for hundreds of students every year.
Re:Learn You a Haskell for Great Good by aap_ on Tuesday August 21, 2018 @05:00PM (#17813767)
Agreed, Hutton's book is really cool. I found LYAH just boring.
Re:Learn You a Haskell for Great Good by zZorgz on Tuesday August 21, 2018 @09:00PM (#17815317)
I must be out of the loop or this is the first I've seen this (free!) book so widely criticized. I thought it was pretty good for getting me interested in the language.

Then again, Hutton's book seems legitimately criticized too for beginners looking at the reviews I'm seeing on Amazon with some preferring or suggesting LYAH as a needed complement. So to each their own.

Re:Learn You a Haskell for Great Good by samsonradu on Tuesday August 21, 2018 @05:29PM (#17814010)
Thanks, will give it a shot. I got stuck with the implementation of State monads while reading LYAH probably due to the older code samples (State vs StateT). The explainations were however quite easy to grasp and I believe I assimilated some good general coding practices while reading through.
Re:Learn You a Haskell for Great Good by dustingetz on Tuesday August 21, 2018 @04:31PM (#17813493)
I loved it!
Re:Learn You a Haskell for Great Good by davelee on Tuesday August 21, 2018 @06:43PM (#17814517)
Terrible opinion.
Re:Learn You a Haskell for Great Good by h4b4n3r0 on Tuesday August 21, 2018 @07:13PM (#17814727)
+1. I want a book that walks me through a real, well designed, functional (if you pardon the pun), useful piece of software, end to end. All these FP books are too enamored with language features, instead of showing you how a programmer proficient in the language would solve practical problems in it.
Re:Learn You a Haskell for Great Good by sridca on Tuesday August 21, 2018 @06:19PM (#17814344)
Hutton's book followed by something like https://intermediatehaskell.com/ should do the trick.