Beginning with RWH?

80 views
Skip to first unread message

TomAmundsen

unread,
Mar 24, 2009, 7:31:25 PM3/24/09
to Real World Haskell Book Club
Hi All,

Did anyone here pick up RWH without any prior knowledge, and then blow
through the entire book while understanding everything? This was going
to be my approach, until I think I didn't exactly `grok' some stuff
around Chapter 9-10. Now I feel that I am learning very little in
subsequent chapters because I didn't lay the foundation. (Note that
I've been programming for like 6 years in imperative languages, and
have had brief introducitons to Lisp and OCaml)

Is this not really supposed to be an introductory book, as it appears
to be marketed? If not, can anyone suggest a better introduction that
can prepare me for the concepts in RHW?

Fernando Henrique Sanches

unread,
Mar 24, 2009, 9:47:00 PM3/24/09
to real-world-has...@googlegroups.com
I am having almost the same problems as you - chapter 10 got me totally lost (although I think I'm *almost* grepping it).

Unfortunately, the only solution I found was to put the book aside for a while and do some practice coding, so the past ideas would fit better in my mind.

I also tried reading other books/tutorials, but it was of little help.

The problem is not with RWH - learning Haskell is hard. The content of these chapters is very dense, so it should be perfectly normal to have problems with them.

However, if someone finds the magical formula to understand chapt. 10, I will be glad to know it!


Fernando Henrique Sanches

Paul Barry

unread,
Mar 24, 2009, 10:40:11 PM3/24/09
to real-world-has...@googlegroups.com
Tom,

I have been reading "Learn You A Haskell" in addition to Real World Haskell and I have found that it does a tremendous job laying the foundation:

http://learnyouahaskell.com/

Jared Updike

unread,
Mar 24, 2009, 11:12:02 PM3/24/09
to real-world-has...@googlegroups.com
> Now I feel that I am learning very little in
> subsequent chapters because I didn't lay the foundation.

What concepts/chapters are you having trouble on... Which code are you
having trouble understanding? (Monads? In RWH they delay introducing
monads because they want to show that they are nothing special since
they have "used" them without saying so. This is confusing unless you
know the secret---what a monad is, how to us it, why it's useful,
where they are hiding in chapters 9 and 10...)

You may want to read the Typeclassopedia and refer back to it as you read RWH:

http://www.haskell.org/sitewiki/images/8/85/TMR-Issue13.pdf

Jared.

Tim Scheffler

unread,
Mar 25, 2009, 5:19:40 AM3/25/09
to real-world-has...@googlegroups.com
Hi Tom,

RWH is not my first "encounter" with Haskell. I've worked with "The
Haskell School of Expression" by Paul Hudak, "All About Monads"
(highly recommended)(http://www.haskell.org/all_about_monads/html/index.html),
and "Write Yourself a Scheme in 48 Hours"
(http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours)
before (As well as various smaller Haskell web postings).

I think one has to try to start with Haskell several times ;-)
Now that I have this prior knowledge I spot hints in the RWH chapter
leading to a certain goal, that I would have missed otherwise. For
example in chapter 10 most of the monad functionality is introduced
without telling the reader, that we are talking about monads. The
syntax is still a bit tedious, but this will be solved, once the monad
syntactic sugar is introduced in chapter 14.

I know from "Haskell School of Expression" that learning Haskell can
be quite frustrating. So my 2 cents would be trying to use several
tutorials (as they can yield different perspectives on Haskell) and
give the learning process some time.

Tim



2009/3/25 TomAmundsen <TomAm...@gmail.com>

David Fries

unread,
Mar 25, 2009, 8:23:04 AM3/25/09
to Real World Haskell Book Club
I agree with the others. The tutorials at http://www.haskell.org/ are
a good & free resource to get you started.

Further, I can recommend 'Programming in Haskell' by Graham Hutton as
an introductory text for people without any prior knowledge of
functional programming. The book doesn't go into too much detail, but
it covers many fundamental concepts, has many examples and exercises.
(it mentions little I/O and no concurrency or other advanced stuff,
though) But if you already read up to chapter 10 in RHW, almost
everything in Hutton's book will be a repetition for you. On the other
hand it is sometimes helpful to read about the same concepts again
from a second point of view...

Lally Singh

unread,
Mar 25, 2009, 8:30:36 AM3/25/09
to real-world-has...@googlegroups.com
I found rereading the chapter on monads to be really helpful.

Sometimes it takes a while for the brain to make a jump, while the
eyes continue to read on.

On Tue, Mar 24, 2009 at 7:31 PM, TomAmundsen <TomAm...@gmail.com> wrote:
>
--
H. Lally Singh
Ph.D. Candidate, Computer Science
Virginia Tech

John Goerzen

unread,
Mar 25, 2009, 9:41:58 AM3/25/09
to real-world-has...@googlegroups.com
TomAmundsen wrote:
> Hi All,
>
> Did anyone here pick up RWH without any prior knowledge, and then blow
> through the entire book while understanding everything? This was going

So I have some thoughts, and hopefully you will forgive me if I have any
biases in answering the questions :-)

First of all, Haskell is a rather mind-altering experience. It
introduces three major concepts that are foreign to most: purity,
laziness, and an expressive type system. It, of course, is also a
functional language, and that's foreign to quite a few people, too.

With your brief OCaml experience, you've had some exposure to an
expressive type system and functional programming, but not to purity and
laziness. I feel like I can't overstate just how... *different* Haskell
is. It's like a high-yield CD. If you don't invest much in learning
it, the dividend won't be very impressive down the road.

So I guess what I'm saying is: are you sure you really understood
everything while just blowing through the first 10 chapters of the book?
I know that everybody learns differently, but I don't think I would
have internalized that content by just blowing through it.

I'd recommend taking the examples from those first 8 chapters, trying
them out, hacking on them a bit, until you're sure you understand what
they're doing. And, where you're stuck on the other chapters, ask here
with specific questions.

> Is this not really supposed to be an introductory book, as it appears
> to be marketed? If not, can anyone suggest a better introduction that
> can prepare me for the concepts in RHW?

RWH absolutely is intended to be an introductory book. The dilemma we
faced constantly is: what's the best way to tech an entirely different
way of programming to people that have only ever known something
different? As I wrote in a magazine once, Haskell manipulates functions
like Perl manipulates strings. It has no loops, no for or while,
because it has no need for them. And that's just the FP aspect of it.
The real mind-blowing stuff starts when you get to laziness, monads, and
purity.

In the end, we chose what we thought would work best for most people in
our target audience (experienced imperative programmers), but of course
it's a given that everybody learns differently, and there may be some
for whom our approach isn't the most effective.

-- John

Thomas Amundsen

unread,
Mar 25, 2009, 10:19:02 AM3/25/09
to real-world-has...@googlegroups.com
Thanks everybody! Especially to John for the thoughtful reply. The typeclassopedia paper seems to be helping. The other tutorials don't seem to be as much of a help. For example, "Learn you a Haskell for Great Good!" talks about all the stuff I understand. But RWH gets into the more advanced concepts that you don't find in tutorials, and rather early on. Which is great!

I guess the main reason why I felt so off-track was that I was indeed going to fast. I made it up to Chapter 12 in one week. I thought it was OK since I was doing all of the exercises (up to Ch8, at some point in Ch9, I could no longer get all of them working), but sometimes I was not completely internalizing what was happening with the example code that we didn't have to modify in the exercises.

The main problem with that is that it is often the case that a new concept or function is introduced and completely explained in one paragraph, and then used EVERYWHERE in the next chapter. I mean, it's a great approach, but it means you really need to understand things the first time through, or you are going to be confused.

So yea, I'll just have to re-read some of this book and see if that will work.

Thanks,
Tom

Vladimir Kelman

unread,
Mar 25, 2009, 10:15:06 PM3/25/09
to real-world-has...@googlegroups.com
There is "Programming in Haskell" book which is small an is intended for
beginners. It's not a "real world" stuff, it's a student textbook.
http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521871723
http://www.cs.nott.ac.uk/~gmh/book.html

http://www.haskell.org/tutorial/

Thomas Amundsen

unread,
May 7, 2009, 2:03:31 PM5/7/09
to real-world-has...@googlegroups.com
I just want say that I found the latest chapter in this online tutorial quite helpful to finally understand what "lifting" really means. That seemed to be one of the most important concepts that held me back from understanding the material I was struggling with. Here is the link - http://learnyouahaskell.com/functors-applicative-functors-and-monoids

These guys hold your hand a lot more than RWH does. :)

- Tom
Reply all
Reply to author
Forward
0 new messages