Live data from Hacker News

Learn You a Haskell for Great Good (2008)

learnyouahaskell.com

71–80 of 123 posts

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

#71
post #24

Earlier quoted context omitted.

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

> A Monad is just something that has a bind (>>=) function and a return function. You realise that this is the most useless description ever? While I'm sure it's right, it doesn't actually mean anything. Why's it a good abstraction for doing , better than any other abstraction? If it abstracts over a gazillion different things, why not have special-purpose abstractions like other languages (and thus probably make the…

The point, I think, is that the original description leaves out the easiest monads, which makes learning about them a lot more difficult. See: List, Maybe, etc.

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

#72
post #60

Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).

Facebook is also creating tools with Haskell: https://github.com/facebook/Haxl My 2 cents: definitely _also_ learn OCaml down the line. But: - my pet peeve with OCaml is the lack of a builtin type for Unicode strings (the only other language still commonly used with this shortcoming is PHP), and this could be an issue if you plan to write some web app code that needs to be internationalized - OCaml is strict, Haskell…

Is there a free, light tutorial book like "For Great Good" for OCaml?

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

#73
post #60

Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).

If you want to dive onto ocaml, I would highly recommend the "Real World Ocaml" book.

That said, I agree with berdario that you should learn both languages instead of only one of them. There is lots of terminology that is shared between FP languages too so it shouldn't be very hard either.

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

#74

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.

I highly recommend watching Tom Stuart's talk "Refactoring Ruby with Monads": https://www.youtube.com/watch?v=J1jYlPtkrqQ

Thanks! There’s a transcript at http://codon.com/refactoring-ruby-with-monads.

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

#75
post #60

Should I learn oCaml instead ? Looks appealing because companies like Facebook are using it create tools like Flow ( https://github.com/facebook/flow ).

Why do people choose programming languages based upon which big companies are using them? Learn a programming language because it is interesting, not because Facebook uses it.

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

#76

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.

If you want to start right at the concept level before jumping into code, this is a great intro to functors, applicatives, and monads.

http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...

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

#77

Earlier quoted context omitted.

> A Monad is just something that has a bind (>>=) function and a return function. You realise that this is the most useless description ever? While I'm sure it's right, it doesn't actually mean anything. Why's it a good abstraction for doing , better than any other abstraction? If it abstracts over a gazillion different things, why not have special-purpose abstractions like other languages (and thus probably make the…

The point, I think, is that the original description leaves out the easiest monads, which makes learning about them a lot more difficult. See: List, Maybe, etc.

Fully agreed that those are the easiest monads, far easier than IO, state and side-effects. But the post is still unhelpful, because how do List and Maybe relate to this:

> A Monad is just something that has a bind (>>=) function and a return function.

?

(I know how they relate, but the above assertion is not a particularly helpful description of List and Maybe)

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

#78

Earlier quoted context omitted.

Facebook is also creating tools with Haskell: https://github.com/facebook/Haxl My 2 cents: definitely _also_ learn OCaml down the line. But: - my pet peeve with OCaml is the lack of a builtin type for Unicode strings (the only other language still commonly used with this shortcoming is PHP), and this could be an issue if you plan to write some web app code that needs to be internationalized - OCaml is strict, Haskell…

Is there a free, light tutorial book like "For Great Good" for OCaml?

Not as lighthearted as LYAH, but (as suggested by ufo) I think this might be useful:

https://realworldocaml.org/

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

#79
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.

We had a Learn you a Haskell book club at work a few years ago and a friend made these very good excercises: https://github.com/noelmarkham/learn-you-a-haskell-exercises

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

#80
post #16

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.

I recommend this to anybody who wants to learn about Haskell's important data types: https://wiki.haskell.org/Typeclassopedia

I found the typeclassopedia to be really helpful after I'd been programming in Haskell for a few years. It really helped tie all of the types together, but a part of me thinks that it might be a bit overkill for someone who's just dipping their toes in for the first time.
Post reply on HN