Live data from Hacker News

Learn You a Haskell for Great Good (2008)

learnyouahaskell.com

41–50 of 123 posts

Re: Learn You a Haskell for Great Good (2008)

#41
post #4

I'm currently working through this book. Overall it seems like a good introduction but I wish it had exercises at the end of each section. I learn best by working through specific problems.

The recently released Thinking Functionally with Haskell by Richard Bird includes exercises. I like the fact that this book is a little more rigorous than LYAH.

Re: Learn You a Haskell for Great Good (2008)

#42

This book was excellent for helping me learn Haskell, but the gendered language and fat-shaming jokes made me feel very uncomfortable, eg: "You're fat! Lose some weight, fatty!","You're supposedly normal. Pffft, I bet you're ugly!" and "You're a whale, congratulations!", "Sure, we could just type them all out but obviously that's not a solution for gentlemen who demand excellence from their programming languages."

You're absolutely right, as a transfat HAES advocate genderqueer, I feel extremely triggered by the author's fat-phobic and gender-normative oppression. The author needs to check his privileges and rephrase to: "You're healthy at every size! Continue being body positive, healthy!", "You're supposed normal. Pfft, society has an unrealistic standard of beauty!" and "You're absolutely perfect with no flaws, defects, or…

Your cunning sarcasm has swayed me. By all means, continue the fat-shaming!

Re: Learn You a Haskell for Great Good (2008)

#43

What is a good online reference to learn about "Monads" for beginners? Someone posted a reference here on HN sometime ago but I lost it. Edit: The book was enjoyable and a delight to read, but I started struggling to keep up from Chapter 8. as it went into Monoids and Monads, I feel like I need to read other tutorials before coming back to it.

Theory is generally wasted on me until I bang my head against the code for a while. If you're like me, you'll probably find it easiest to try to use monads in real code over and over, mostly based on existing examples, and then it will finally click and you'll be able to go back and grok the underlying theory.

Re: Learn You a Haskell for Great Good (2008)

#44
post #6

[deleted]

I'd say it's pretty good. It's hard to give advice because I learned Haskell when I already had a decent college-student understanding of C++, so Haskell added diversity to my education where C wouldn't. It's good to learn languages that are different, and languages that make different things cheap -- Haskell made defining types and also made static type checking a lot cheaper than other languages in 2005. It's also…

Nice post. I just don't get the 2005 date, given the history of ML derived languages.

Re: Learn You a Haskell for Great Good (2008)

#45
Haskell is such a great language. I've been recommending this book for a while now. If you are in doubt whether you should start learning it, read this post by Jeff Bone:

http://www.xent.com/pipermail/fork/Week-of-Mon-20070219/0441...

After I read it, I immediately began learning Haskell. Since then, Haskell made my brain melt multiple times. But it has also enabled me to build an expression parser and analytic differentiator that I use every day (among other things, but that's what I'm most proud of). Such a program would be a lot harder to create, if it weren't for Haskell's ridiculously powerful type system and pattern matching.

Also, after learning the Haskell way of things, I recognized the reasons for many issues I had with code written in another programming language. Don't just go out there and do object-oriented programming because everybody else seems to do it, often it is imperative (pun intended) to use the declarative (functional) programming paradigm to keep you out of debugging hell.

edit: clarification

Re: Learn You a Haskell for Great Good (2008)

#47
For newcomers I'd suggest this introductory course by Erik Meijer: https://www.edx.org/course/introduction-functional-programmi... . It's about FP, not strictly Haskell, but it really helped me starting with it and really stimulated my curiosity (and he really can explain hard concepts in a simple way imo). I started reading the book after I completed the course and helped giving an answer to a lot of questions I had during the course.

Re: Learn You a Haskell for Great Good (2008)

#48

What is a good online reference to learn about "Monads" for beginners? Someone posted a reference here on HN sometime ago but I lost it. Edit: The book was enjoyable and a delight to read, but I started struggling to keep up from Chapter 8. as it went into Monoids and Monads, I feel like I need to read other tutorials before coming back to it.

They don't teach you number theory before they teach you addition and subtraction in primary school.

Don't read the "Monad tutorials" and especially do not stop programming in Haskell until you "learn monads". Find one of the respected books, read it and do the exercises.

You do not need to thoroughly understand monads in order to do some IO programming just like a violinist does not have to understand the physics of vibrating strings or you don't need to be an auto mechanic to drive to the grocery store.

Write the "Guess the Number" game in Haskell using IO and you should understand the basics and that gets you far. Reading and writing to/from files and network sockets, etc works pretty much the same as you're used to from imperative programming languages. "Guess the number" contains just enough control flow (repetition, conditionals) to get you started.

I've written tens of thousands of lines of Haskell code, including production code at work, and I still don't know what a Monoid is. I have only a faint theoretical understanding of monads, but I am fluent writing IO code and applying monads to other problems like parsing and error handling.

You should only study monads when you're fluent doing some basic imperative programming in Haskell or if you are a math student and have a keen interest in category theory.

Re: Learn You a Haskell for Great Good (2008)

#49
I always have been interested on haskell.... but it doesn't look to be enough practical. For example there is almost no information about how to write a smartphone videogame in haskell, even if it possible to trasnpile it to C or to Javascript. It is possible to interoperate with the host language? Does it perform well for high performance activities? Is it possible to isolate some kind of events in a thread?

Edit: This lack of practical approach is what makes me hesitate in contrast to clojure (just to mention a language), especially if the only goal is to become again a "better developer" rediscovering functional terms and abstractions also documented in other languages.

Re: Learn You a Haskell for Great Good (2008)

#50
I want to note that LYAH may not work for you if you have my kind of learning style. I need to solve concrete, realistic problems to creatively use the knowledge imparted on me. I can't just read stuff and understand. Real World Haskell [1], the course by Erik Meijer [2] and the courses referenced here [3] worked much better for me.

[1] http://book.realworldhaskell.org/

[2] https://www.edx.org/course/introduction-functional-programmi...

[3] https://github.com/bitemyapp/learnhaskell

Post reply on HN