Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  First request for references (Conrad Meyer)
   2.  Re: First request for references (Benjamin L.Russell)
   3.  The problem with Monads...
      (Rafael Gustavo da Cunha Pereira Pinto)
   4.  Re: [Haskell-cafe] The problem with Monads... (Philippa Cowderoy)
   5.  Re: [Haskell-cafe] The problem with Monads...
      (Rafael Gustavo da Cunha Pereira Pinto)
   6.  Re: The problem with Monads... (Ertugrul Soeylemez)
   7.  Re: [Haskell-cafe] The problem with Monads...
      (Rafael Gustavo da Cunha Pereira Pinto)


----------------------------------------------------------------------

Message: 1
Date: Mon, 12 Jan 2009 19:42:55 -0800
From: Conrad Meyer <[email protected]>
Subject: Re: [Haskell-beginners] First request for references
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain;  charset="iso-8859-1"

On Saturday 10 January 2009 12:03:45 pm Alan Cameron wrote:
> Hi,
>
> I stumbled across Haskell while researching 'functional programming'.
> I have done some initial reading and have the following questions:
>
> 1. Are there any references to real-world applications using this language?
>
> I ask because most of the articles I have found seem to be of an extreme
> academic nature. I want to be sure that my time will not be wasted delving
> deeper.
>
> 2. Are there any tutorials with full code included which I can use on the
> HUGS system I have installed?
>
> I have found a few "A Gentle Introduction to Haskell 98" which assumes far
> too much previous knowledge to be immediately useful to me.
>
> Thanks for any replies.
>
> Alan Cameron

You might want to use GHC instead of HUGS, as it tends to be more 
feature-complete. For a tutorial to start with, how about "Yet Another 
Haskell Tutorial"?

Regards,
-- 
Conrad Meyer <[email protected]>




------------------------------

Message: 2
Date: Tue, 13 Jan 2009 15:41:37 +0900
From: Benjamin L.Russell <[email protected]>
Subject: [Haskell-beginners] Re: First request for references
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon, 12 Jan 2009 19:42:55 -0800, Conrad Meyer <[email protected]>
wrote:

>On Saturday 10 January 2009 12:03:45 pm Alan Cameron wrote:
>> Hi,
>>
>> I stumbled across Haskell while researching 'functional programming'.
>> I have done some initial reading and have the following questions:
>>
>> 1. Are there any references to real-world applications using this language?
>>
>> I ask because most of the articles I have found seem to be of an extreme
>> academic nature. I want to be sure that my time will not be wasted delving
>> deeper.

According to the Wikipedia entry for "Software transactional memory,"
in the "Implementations" section (see
http://en.wikipedia.org/wiki/Software_transactional_memory#Implementations),
as previously mentioned by Thomas Davie as well in this thread, "STM
for Perl 6 has been implemented in Pugs via the Glasgow Haskell
Compiler's STM library."

>>
>> 2. Are there any tutorials with full code included which I can use on the
>> HUGS system I have installed?
>>
>> I have found a few "A Gentle Introduction to Haskell 98" which assumes far
>> too much previous knowledge to be immediately useful to me.
>>
>> Thanks for any replies.
>>
>> Alan Cameron
>
>You might want to use GHC instead of HUGS, as it tends to be more 
>feature-complete. For a tutorial to start with, how about "Yet Another 
>Haskell Tutorial"?
        
You may also wish to read the book _Programming in Haskell,_ by Graham
Hutton (see http://www.cs.nott.ac.uk/~gmh/book.html).  This
publication has often been praised as being relatively concise and
easy to follow.  There is even a relevant book review by Duncan Coutts
at http://www.cs.nott.ac.uk/~gmh/book-review.pdf.

-- Benjamin L. Russell
-- 
Benjamin L. Russell  /   DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Translator/Interpreter / Mobile:  +011 81 80-3603-6725
"Furuike ya, kawazu tobikomu mizu no oto." 
-- Matsuo Basho^ 



------------------------------

Message: 3
Date: Tue, 13 Jan 2009 12:56:55 -0200
From: "Rafael Gustavo da Cunha Pereira Pinto"
        <[email protected]>
Subject: [Haskell-beginners] The problem with Monads...
To: [email protected], [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Last night I was thinking on what makes monads so hard to take, and came to
a conclusion: the lack of a guided tour on the implemented monads.

Let's take the Writer monad documentation: all it says is:

Inspired by the paper "Functional Programming with Overloading and
Higher-Order Polymorphism",
        Mark P Jones (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html)
          Advanced School of Functional Programming, 1995.

SO WHAT?

The best approach is the Part II of the "All About Monads" tutorial. There
you have the almost ideal approach, except that the examples are just thrown
there, with no step-by-step explanation.

Of course one could copy, paste and run it, but this gives pretty much a "is
it right?'  feeling. Questions like "if a Reader is an application, why
don't use a regular function instead?" or "what bind means for a State
monad?".

I will try to work on a "Part II" extended version on my vacations... maybe
a WikiMonad... or MonadPedia... :-)

After all, it is my duty as a haskell noob to write another monad tutorial!
:D

Cheers!

-- 
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090113/ea8edc07/attachment-0001.htm

------------------------------

Message: 4
Date: Tue, 13 Jan 2009 16:08:29 +0000
From: Philippa Cowderoy <[email protected]>
Subject: [Haskell-beginners] Re: [Haskell-cafe] The problem with
        Monads...
To: Jonathan Cast <[email protected]>
Cc: [email protected]
Message-ID: <1231862909.31768.4.ca...@flippa-eee>
Content-Type: text/plain

On Tue, 2009-01-13 at 07:51 -0800, Jonathan Cast wrote:
> On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira Pinto
> wrote:
> > 
> > Last night I was thinking on what makes monads so hard to take, and
> > came to a conclusion: the lack of a guided tour on the implemented
> > monads.
> 
> ...
> 
> > Inspired by the paper "Functional Programming with Overloading and
> > Higher-Order Polymorphism",
> >         Mark P Jones
> > (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html)
> >           Advanced School of Functional Programming, 1995.
> > 
> > SO WHAT?
> 
> So have you read Jones' paper?  Or do you have a *concrete* explanation
> of how it differs from your desired `guided tour'?
> 

We really shouldn't be expecting people to read papers as documentation
for standard libraries these days, however good they are. Like it or
not, most people find papers intimidating and the file formats are
non-standard for documentation (I can't be the only one who hates most
PDF docs, and most windows users wouldn't know where to start finding a
postscript viewer!).

Moving some of the info into the docs is a good idea. Doubly so as the
community's common pool of ideas has often moved on since the original
paper and much more accessible documentation can now be written.

On another note, perhaps there should be a note up somewhere asking
people not to cross-post between -beginners and -cafe? People on -cafe
don't realising they're responding to a beginner request, losing much of
the point of having -beginners.

-- 
Philippa Cowderoy <[email protected]>



------------------------------

Message: 5
Date: Tue, 13 Jan 2009 14:09:01 -0200
From: "Rafael Gustavo da Cunha Pereira Pinto"
        <[email protected]>
Subject: [Haskell-beginners] Re: [Haskell-cafe] The problem with
        Monads...
To: "Jonathan Cast" <[email protected]>
Cc: [email protected], [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Yes, I've read it twice, and it is a nice explanation that "yes, the reader
monad is an application and is a monad". How do I use it? Why not the
function itself? How would the plumbing work in a real world example?

BTW, the article is really great as an brief introduction to monad
transformers. For the whole concept of monads, my all time favorite is "The
Haskell Programmer's Guide to the IO Monad" by Stefan Klinger.

Chapters 14 to 19 of "Real World Haskell" also have a good introduction on
the usage of the monads, but it lacks other monads, like the RWS or the
Continuation...

See, that is my point. The mathematical concept of monads is very palatable.
The idea that monads are either patterns or structures to hide computations
in sequence is also very easy to see. But how do we use them?
Why should I use a Writer monad when I can use a (a,w) tuple?



On Tue, Jan 13, 2009 at 13:51, Jonathan Cast <[email protected]>wrote:

> On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira Pinto
> wrote:
> >
> > Last night I was thinking on what makes monads so hard to take, and
> > came to a conclusion: the lack of a guided tour on the implemented
> > monads.
>
> ...
>
> > Inspired by the paper "Functional Programming with Overloading and
> > Higher-Order Polymorphism",
> >         Mark P Jones
> > (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html<http://web.cecs.pdx.edu/%7Empj/pubs/springschool.html>
> )
> >           Advanced School of Functional Programming, 1995.
> >
> > SO WHAT?
>
> So have you read Jones' paper?  Or do you have a *concrete* explanation
> of how it differs from your desired `guided tour'?
>
> jcc
>
>
>


-- 
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090113/3d4e09d1/attachment-0001.htm

------------------------------

Message: 6
Date: Tue, 13 Jan 2009 17:07:50 +0100
From: Ertugrul Soeylemez <[email protected]>
Subject: [Haskell-beginners] Re: The problem with Monads...
To: [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

Jonathan Cast <[email protected]> wrote:

> On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira Pinto
> wrote:
>
> > Inspired by the paper "Functional Programming with Overloading and
> > Higher-Order Polymorphism",
> >         Mark P Jones
> > (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html)
> >           Advanced School of Functional Programming, 1995.
> >
> > SO WHAT?
>
> So have you read Jones' paper?  Or do you have a *concrete*
> explanation of how it differs from your desired `guided tour'?

I agree with Rafael here.  The standard library documentation is
insufficient.  Pointing to nothing else than a paper is about the same
as "RTFM", especially being "inspired" by a paper, there is really
almost no information in the documentation.  I wouldn't expect from an
average programmer to read a whole paper to understand an everyday-use
monad.  Especially for newcomers to the purely functional world, even
reading the introduction of a paper may well take an hour, which can be
tiring and frustrating.

There should be some basic information about the monad at least at the
end of the documentation, as well as some well-thought usage examples.


Greets,
Ertugrul.


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/




------------------------------

Message: 7
Date: Tue, 13 Jan 2009 16:35:57 -0200
From: "Rafael Gustavo da Cunha Pereira Pinto"
        <[email protected]>
Subject: [Haskell-beginners] Re: [Haskell-cafe] The problem with
        Monads...
To: [email protected], [email protected]
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

I didn't knew Wadler's papers (I save all papers I read into a external USB
HD, so I can read them later!), and at a first glance it is really good.


Then again, instead of creating another "monad tutorial", what about a
Haskell monads reference guide, and some worked examples?

Some of this work could even be attached to the library documentation.

Regards

Rafael


On Tue, Jan 13, 2009 at 15:27, Derek Elkins <[email protected]>wrote:

> On Tue, 2009-01-13 at 16:22 +0000, Sittampalam, Ganesh wrote:
> > Jonathan Cast wrote:
> > > On Tue, 2009-01-13 at 12:56 -0200, Rafael Gustavo da Cunha Pereira
> > > Pinto wrote:
> > >>
> > >> Inspired by the paper "Functional Programming with Overloading and
> > >>         Higher-Order Polymorphism", Mark P Jones
> > >> (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html<http://web.cecs.pdx.edu/%7Empj/pubs/springschool.html>
> )
> > >>           Advanced School of Functional Programming, 1995.
> > >>
> > >> SO WHAT?
> > >
> > > So have you read Jones' paper?  Or do you have a *concrete*
> > > explanation of how it differs from your desired `guided tour'?
> >
> > To give a specific example, a few weeks ago I wanted an explanation of
> > the 'pass' function and couldn't find it in that paper.
> >
> > Ganesh
>
> Several years ago I documented all the (basic) monads in the mtl on the
> (old) wiki.
>
> http://web.archive.org/web/20030927210146/haskell.org/hawiki/MonadTemplateLibrary
> In particular,
> http://web.archive.org/web/20030907203223/haskell.org/hawiki/MonadWriter
>
>
> To respond to the essential point of Rafael's initial claim, Wadler's
> papers "The Essence of Functional Programming" and/or "Monads for
> Functional Programming" have exactly what he wants.  These are the
> papers that I recommend to anyone who is learning about monads.
> http://homepages.inf.ed.ac.uk/wadler/topics/monads.html
>
> Please, we do not need the 101st monad tutorial when there was an
> adequate one made almost two decades ago.  While I'm not saying that
> this is the case here, I suspect that many people don't read those
> papers because 1) they haven't heard of them and 2) they are "papers"
> and thus couldn't possibly be readable and understandable (which also
> partially causes (1) as people just don't think to look for papers at
> all.)
>
>


-- 
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.haskell.org/pipermail/beginners/attachments/20090113/d07b0868/attachment.htm

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 7, Issue 10
****************************************

Reply via email to