Live data from Hacker News

Learn You a Haskell for Great Good (2008)

learnyouahaskell.com

21–30 of 123 posts

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

#21

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.

You don't need to really understand monads to use them. Not at first anyway. They're basically just containers that allow you to use side effects, hold state, etc... https://acm.wustl.edu/functional/io-monad.jpg

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

#22

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."

Clearly the author is going for a casual, conversational, jocular attitude. That's part of what makes LYAH so approachable. If you want dry, sanitized, bowdlerized instruction, LYAH is not the place to look.

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

#24
post #21

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.

You don't need to really understand monads to use them. Not at first anyway. They're basically just containers that allow you to use side effects, hold state, etc... https://acm.wustl.edu/functional/io-monad.jpg

>They're basically just containers that allow you to use side effects, hold state, etc...

No, that is one use for Monads. A Monad is just something that has a bind (>>=) function and a return function.

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

#25

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.

First, you are not alone. I also "hit the wall" when the discussion turned to functors, monoids, and monads. Now, let me be the token heretic here. I took an online Haskell course where the instructor said, "Now that you have learned about monads, please don't write yet another monad tutorial!" Perhaps the reason that there are so many tutorials about them is because the really are NOT easy to grasp.

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

#26
post #22

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."

Clearly the author is going for a casual, conversational, jocular attitude. That's part of what makes LYAH so approachable. If you want dry, sanitized, bowdlerized instruction, LYAH is not the place to look.

It seems as though individuals who don't want to feel bad about their weight and gender might also feel that LYAH is not the place to look.

I guess LYAH and I just aren't a good "culture fit."

It's a real shame too -- without these completely unnecessary comments that add no value, this is an excellent way to learn Haskell! I've become comfortable with my whale-like properties and I'm male, so I had the lovely privilege of learning from this particular resource. It would be great if people not in my position could too.

Maybe the author did some research and determined that the added "humor" and "casual attitude" engages more readers than it turns away. I'd still want to know the demographics of both groups involved, because I suspect one of the groups looks a lot like me and the other does not.

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

#28
post #24
post #21

Earlier quoted context omitted.

You don't need to really understand monads to use them. Not at first anyway. They're basically just containers that allow you to use side effects, hold state, etc... https://acm.wustl.edu/functional/io-monad.jpg

>They're basically just containers that allow you to use side effects, hold state, etc... No, that is one use for Monads. A Monad is just something that has a bind (>>=) function and a return function.

The something has to be a single argument type constructor, and bind and return need to abide by some laws.

I don't mean that as any sort of "gotcha", just some additional clarification - especially if people read your "just" too strong.

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

#29
post #20

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.

The original monad papers, by Philip Wadler. Accept no substitutes. http://homepages.inf.ed.ac.uk/wadler/topics/monads.html http://homepages.inf.ed.ac.uk/wadler/ Alternatively, if you really are allergic to LaTeX, or beards, the recently Oscared sigfpe’s “You Could Have Invented Monads! (And Maybe You Already Have.)” http://blog.sigfpe.com/2006/08/you-could-have-invented-monad... There are no other monad tutorials. J…

I highly recommend "You could have invented Monads", it helped me a lot. I also recommend the Haskell Wikibook:

http://en.wikibooks.org/wiki/Haskell/Understanding_monads

Post reply on HN