Re: Learning Haskell and FP

2001-01-08 Thread Benjamin L. Russell

On Fri, 5 Jan 2001 10:26:19 -0500 (EST)
 Patrick M Doane [EMAIL PROTECTED] wrote:
 
 [snip]
 
 I think a really good beginner's tutorial on I/O could be
 started from this
 paper:
 
- Start immediately with using the 'do expression' and
 don't
  worry about the history that led to its development.

Actually, the history, especially from a comparative programming languages standpoint, 
can sometimes be useful for motivation.

For example, many Java textbooks motivated study of the language by explaining the 
need for a C-style language without explicit memory allocation or explicit pointer 
casting.  Similarly, an on-line document for C# motivated it by explaining the history 
of how it grew out of a need for a language similar to C and C++ (the document somehow 
left out the Java comparison :-( ), but that allowed programmers to develop more 
efficiently in it.

Even for a "Haskell in a Nutshell"-style textbook, a couple of paragraphs comparing 
Haskell to other languages from a historical viewpoint and describing the advantages 
and disadvantages of Haskell in particular could prove quite useful.

 [snip]

  Many people are also annoyed by an author using new
 vocabulary even
  if it is well defined. It's better to get them
 comfortable with the
  system first.

That depends on which new vocabulary is being mentioned, though.  That may true for 
unnecessary new vocabulary, such as "monads" for the first chapter.  However, e.g. in 
the following example (borrowed from Chapter 3 of _A Gentle Introduction to Haskell, 
Version 98,_ by Paul Hudak):

add :: Integer - Integer - Integer
add x y =  x + y

it is hard not to introduce such vocabulary as "has type," "arrow" (or "mapping"), and 
maybe even "currying."

 [snip]
 
- Conclude with explaining the difference between
 executing an action
  and building a value to execute the action. There is
 no need to
  point out that this is a requirement of being a lazy
 language.
  Instead point out the benefits such a system
 provides to back up 
  the claim that Haskell truly is "the world's finest
  imperative programming language."

Forgive me if I am ignorant, but who claimed that Haskell was an "imperative" language?

Also, in order to take full advantage of Haskell, it would seem necessary to get used 
to functional programming style (the Haskell school of expression, in particular).  It 
seems that using Haskell as an "imperative" language is a bit like thinking in C when 
programming in C++; only worse, since the imperative habits are being brought into the 
functional, rather than the OO, realm.

--Ben
--
Benjamin L. Russell
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: Learning Haskell and FP

2001-01-08 Thread Theodore Norvell

Erik Meijer wrote:

 Nope, I also think that Haskell is the world's finest *imperative* language
 (and the world's best functional language as well). The beauty of monads is
 that you can encapsulate imperative actions as first class values, ie they
 have the same status as functions, lists, ... Not many other imperative
 languages have statements as first class citizens.

It may be the only imperative language that doesn't have mutable variables
as a standard part of the language.  :-)

I do agree that Haskell has a lot of nice imperative features, but it
is also missing a few that are fundamental to imperative programming.

Personally, I'd love to see a language that is imperative from the
ground up, that has some of the design features of Haskell (especially
the type system), but I don't think that Haskell is that language (yet?).

A question for the list:  Is there a book that gives a good introduction
to Hindley-Milner typing theory and practice, and that delves into its
various extensions (e.g. imperative programs, type classes, record types).
I have Mitchell's book out from the library, but it seems a bit limited
with respect to extentions (I think it deals with subtypes, but not
type classes and mutable variables, for example).

Cheers,
Theodore Norvell


Dr. Theodore Norvell[EMAIL PROTECTED]
Electrical and Computer Engineering http://www.engr.mun.ca/~theo
Engineering and Applied SciencePhone: (709) 737-8962
Memorial University of Newfoundland  Fax: (709) 737-4042
St. John's, NF, Canada, A1B 3X5

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



RE: Learning Haskell and FP

2001-01-05 Thread Patrick M Doane

On Wed, 3 Jan 2001, Simon Peyton-Jones wrote:

 I'm sure that's right. Trouble is, we're the last people qualified
 to write one!  
 
 Here's a suggestion: would someone like to write such a guide,
 from the point of view of a beginner, leaving blanks that we can fill in,
 when you come across a task or issue you don't know the answer
 to?  That is, you provide the skeleton, and we fill in the blanks.

I read your paper on taming the Awkward Squad several months ago as my
first exposure to Haskell. I think it is an excellent paper and really
convinced me that Haskell was worthwhile to learn and use. 

There are aspects to the paper that are like a tutorial, but I think it
would be overwhelming for a programmer not used to reading papers from  
academia.

I think a really good beginner's tutorial on I/O could be started from this
paper:

   - Start immediately with using the 'do expression' and don't
 worry about the history that led to its development.

   - Avoid mentioning 'monad' and other mathematical terms until much
 latter in the game. It is better to see the system in action and then
 find out it has a nice solid foundation.

 Many people are also annoyed by an author using new vocabulary even
 if it is well defined. It's better to get them comfortable with the
 system first.

   - Take advantage of the 2d syntax rules to avoid the unneeded braces
 and semicolons. Syntax with little punctuation seems to go a long way
 with many programmers. Pointing out the similarities to Python here 
 could be appropriate.

   - After working through several examples, show that the 'do expression'
 is short hand for some more basic primitive operators. These
 can be more appropriate to use in some circumstances.

   - Conclude with explaining the difference between executing an action
 and building a value to execute the action. There is no need to
 point out that this is a requirement of being a lazy language.
 Instead point out the benefits such a system provides to back up 
 the claim that Haskell truly is "the world's finest
 imperative programming language."

Some points would still be difficult to get through:

   - Explaining the type system. There is no avoiding this, and users
 will have to learn it.

   - Working through the difference between 'unit' and 'void'.
 Perhaps this can be avoided in a beginning tutorial. A possible
 confusing example in the paper is that of composing putChar twice 
 while throwing away the result. People used to C or Java might
 immediately think "but it doesn't  have a result to through away!"

   - Some amount of understanding for Haskell expressions is going to be
 needed to understand examples. An I/O centric tutorial would want
 to explain as things go along as needed.

I would avoid other parts of the paper for a first attempt at some new
tutorial material.

Any thoughts? I could take a first stab at this if people think it would
be a useful direction.

Patrick


___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: Learning Haskell and FP

2001-01-04 Thread Lars Lundgren

On Wed, 3 Jan 2001, Michael Zawrotny wrote:

 1.  How the #$!? do I read some data from a file.  Good, I've
 got the data, now I can work on it.  Nope, now I have an "IO
 thingie" whatever that is, but all of the standard functions want
 a regular "thingie" now what?
 

I do not know if you actually wanted an answer to this, but I'm sick of
hearing this FAQ everywhere when the answer is so simple. There are
exactly two ways to do this (one of them is actually syntactic sugar for
the other).

1. Use the do notation:

   do regularThingie - IOThingie
  return (doWhateverYouWantWith regularThingie)

2. Use bind ( = ):

   IOThingie =
   \regularThingie - return (doWhateverYouWantWith regularThingie)


Note: Both constructs produces IO thingies. This is the real beauty of it,
if you have a value that is dependent on the environment (i.e. a IO value)
you can use it as a regular value inside one of the above constructs, but
the result will always be an IO value (The result will depend on the
environment because it uses a value dependent of the environment). This is
no problem, just accept it.

Can everyone include an answer to this FAQ everywhere, phleaze!

/Lars L




___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-04 Thread Keith Wansbrough

 I do not know if you actually wanted an answer to this, but I'm sick of
 hearing this FAQ everywhere when the answer is so simple. There are
 exactly two ways to do this (one of them is actually syntactic sugar for
 the other).
[..]
 Can everyone include an answer to this FAQ everywhere, phleaze!
 
 /Lars L

Thanks Lars... I've added it to the Wiki.

HINT TO EVERYONE: *Anyone* can add this kind of thing to the Wiki.  
Just find the appropriate page and click the EditText link at the 
bottom.  To create a new page just name it (in BiCapitalised form), and 
the name becomes a hyperlink.  Click on the link, then EditText on the 
new page and you're done.

The Haskell Wiki is at:

  http://haskell.org/wiki/wiki

I *do not* maintain it, I just evangelise for it.  :-)

--KW 8-)


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2001-01-04 Thread Simon Peyton-Jones

|  1.  How the #$!? do I read some data from a file.  Good, I've
|  got the data, now I can work on it.  Nope, now I have an "IO
|  thingie" whatever that is, but all of the standard functions want
|  a regular "thingie" now what?

Perhaps this would be a good moment to advertise the revised version of

Tackling the Tackling the Awkward Squad:
monadic input/output, concurrency, exceptions, 
and foreign-language calls in Haskell

http://research.microsoft.com/~simonpj/#marktoberdorf

(Concerning the thread I'm responding to, it gives an introduction 
to monadic input/output.)

I've revised and extended this tutorial quite a bit since I announced it
last year,
with a lot of help from people on the Haskell mailing list: thank you!
Further suggestions are most welcome.

Simon

Abstract

Functional programming may be beautiful, but to write real
applications we must grapple with awkward real-world issues:
input/output, robustness, concurrency, and interfacing to programs
written in other languages. 

These lecture notes give an overview of the techniques that have
been
developed by the Haskell community to address these problems.  I
introduce various proposed extensions to Haskell along the way, and
I
offer an operational semantics that explains what these extensions
mean.



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2001-01-04 Thread i r thomas

Perhaps this would be a good moment to advertise the revised version of
   Tackling the Tackling the Awkward Squad:
   monadic input/output, concurrency, exceptions, 
   and foreign-language calls in Haskell
   http://research.microsoft.com/~simonpj/#marktoberdorf
(Concerning the thread I'm responding to, it gives an introduction 
to monadic input/output.)

Many thanks !
This is just what I need.
Will read it before bed tonight...


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-04 Thread Doug Fields

 One more thing: I'm happy to incorporate any tutorial material into
 haskell.org.  If you have material that would be appropriate please
 let me know and I'll add it to the site.  I know there are some very
 good slides from Haskell courses that could be put into haskell.org.

For what it's worth,

I'm happy to contribute my solutions to the exercises in
"Haskell: Craft" for posting on haskell.org. However, I assume that
in at least one place, the book is used for coursework and would, hence,
such posting would be discouraged.

Hi Paul. Hi Benjamin.

Cheers,

Doug

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-04 Thread Benjamin L. Russell

On Wed, 3 Jan 2001 22:55:17 -0800 (PST)
 Fritz K Ruehr [EMAIL PROTECTED] wrote:
 
 [snip]
 
 An O'Reilly "nutshell" book is an even better suggestion
 than
 my "Design Patterns in Haskell" of a few days back, at
 least
 from the perspective of marketing and promotion. 
 
 But it raises the issue of an appropriate animal mascot
 for
 the cover; I can only come up with the Uakari, an
 exotic-looking
 rainforest monkey, which sounds similar to "Curry". 
 
 (look here for a picture:)
 
   http://www.animalsoftherainforest.com/uakari.htm

Lalit Pant ( [EMAIL PROTECTED] ) (alternatively, [EMAIL PROTECTED] ) wrote an article 
in the May 2000 issue of _Java Report_ entitled "Developing Intelligent Systems With 
Java and Prolog" that described a Prolog implementation of the A-star search 
algorithm.  Lalit stated that Prolog was useful for algorithm prototyping.

Perhaps Lalit Pant and Simon Peyton Jones could collaborate together on an article, 
perhaps overseen by Paul Hudak, on prototyping search algorithms in Haskell, also for 
_The Java Report?_  If this article then had a high readership, maybe the article's 
success could then justify publication of an O'Reilly _Haskell in a Nutshell_ book?

--Ben

P. S. (Hi Doug Fields.  I didn't know that you were reading this mailing list.  I 
guess that I should also greet Professor Paul Hudak:  Hello, Professor Hudak.  Sorry 
about Collectively Speaking.  How's jazz in general?)

Benjamin L. Russell
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread Ketil Malde

"Karl M. Syring" [EMAIL PROTECTED] writes:

 Mind if I "me too" a bit?  I had just read the SICP, and I too found
 that the Gentle Introduction served well as an introduction to the
 Haskell syntax.

 If you start out with zero knowledge in functional programming, as I do, the
 GITH is really not very helpful. 

Exactly.  It's "gentle" if you know functional programming, but
probably not otherwise.

 PS: are the members of the list expecting to get replies by private mail?

Expecting?  I'd have no qualms about replying to people privately, but
then perhaps I am the obnoxious kind of person. :-)  Negative feedback
is scarce (although this thread might favorably diverge to -cafe?
Followup-To: set).

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2001-01-03 Thread Simon Peyton-Jones

| PS: are the members of the list expecting to get replies by 
| private mail?

The thing to do is to switch the thread to

[EMAIL PROTECTED]

haskell@haskell-org is meant for openers; longer threads should
move to haskell-cafe.  That way people can control how inundated they
get.  

You can "move" by simply adding "-cafe" into the address when you reply.

Simon

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread Shlomi Fish

On Tue, 2 Jan 2001, Paul Hudak wrote:

  Unforunately, the "Gentle Introduction To Haskell" that
  haskell.org links to is not a very useful introduction.
 
 John and I should probably rename this document, since it really isn't a
 very gentle intro at all.  We should probably also downplay it's
 prominance on the haskell website.  It was written rather quickly many
 years ago, at a time when there was not a single textbook on Haskell. 
 So it's probably outlived it's purpose, although I do believe that some
 people still find it useful.


I learned Haskell from it. Later, people corrected my style and I learned
some more. Of course, I did not do any serious Haskell programming yet,
except for my infamous primes finding algorithms.

Regards,

Shlomi Fish
 
   -Paul
 
 ___
 Haskell mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/haskell
 



--
Shlomi Fish[EMAIL PROTECTED] 
Home Page: http://t2.technion.ac.il/~shlomif/
Home E-mail:   [EMAIL PROTECTED]

The prefix "God Said" has the extraordinary logical property of 
converting any statement that follows it into a true one.


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread Paul Hudak

Thanks to everyone for their comments regarding "GITH".  I conclude
that:

-- it is useful to people who have previously programmed in Scheme
   or some other functional language
-- it is a difficult read for those not familiar with FP concepts,
   and certainly not appropriate for novice programmers
-- given the dearth of free documentation on Haskell, it serves a
   useful purpose
-- the title is misleading

Also thanks to George Russell for reminding me that the intro states
clearly that:

 Our goal is to provide a gentle introduction to Haskell for someone 
 who has experience with at least one other language, preferably a 
 functional language (even if only an "almost-functional" language 
 such as ML or Scheme).

So I suppose the main thing that John and I should think about is
changing the title.  Something like "An Introduction to Haskell for
People Who Have Previously Programmed in Scheme or Some Other Functional
Language" might be good! :-)  Of course changing the title might confuse
people to whom the document was recommended.  It may be that a
clarifying remark on haskell.org is warranted.

Anyway, thanks again for the comments.

Best to All for the New Year,

  -Paul

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread John Peterson

One more thing: I'm happy to incorporate any tutorial material into
haskell.org.  If you have material that would be appropriate please
let me know and I'll add it to the site.  I know there are some very
good slides from Haskell courses that could be put into haskell.org.

The document sources to the Gentle Intro are also available.  We've
already had some very generous help with it and Paul and I will be
happy to support anyone that would like to improve it further.

Finally, another thing that would be really nice in the way of
tutorials is one from the perspective of an experienced C++ / Java
programmer.  Even a relatively short work that maps between the O-O
terminology and the Haskell world would be quite useful.

  John

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread George Russell

Paul Hudak wrote:
[snip]
 So I suppose the main thing that John and I should think about is
 changing the title.  Something like "An Introduction to Haskell for
 People Who Have Previously Programmed in Scheme or Some Other Functional
 Language" might be good! :-)
"A Gentle Introduction to Haskell for Functional Programmers" might be better.
Then hopefully people who have been directed to "A Gentle Introduction" will
not be confused.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread Michael Zawrotny


Paul Hudak [EMAIL PROTECTED] wrote:
 Thanks to everyone for their comments regarding "GITH".  I conclude
 that:
 
 -- it is useful to people who have previously programmed in Scheme
or some other functional language
 -- it is a difficult read for those not familiar with FP concepts,
and certainly not appropriate for novice programmers
 -- given the dearth of free documentation on Haskell, it serves a
useful purpose
 -- the title is misleading
 
 Also thanks to George Russell for reminding me that the intro states
 clearly that:
 
  Our goal is to provide a gentle introduction to Haskell for someone 
  who has experience with at least one other language, preferably a 
  functional language (even if only an "almost-functional" language 
  such as ML or Scheme).

GITH was a bit much for me.  However, I have a slightly different
take on the reason why.  My original background (undergrad
and PhD) is in biochemistry.  Most of my programming, etc. is
self-taught, although I got through about third year's worth of
course work for an undergrad CS degree while I was at my previous
job.  In the course of teaching myself various things, I dabbled
in both scheme and common lisp and more recently in SML and OCaml
(and obviously Haskell as well).

The reason that I found GITH difficult wasn't that the concept
of programming with functions/functional style was new to
me.  What got me was that the concepts and notations were much
more "mathematical" than "programmatic".  In my explorations
of various languages, my experience with introductions to
scheme/CL has mostly been that they tend to show how to do
things that are familiar to imperative programmers, plus all
of the things that you can do with functions as first class
values.  With intros to SML, OCaml and Haskell, there is a
much greater emphasis on types, type systems, and provable
program correctness.  The main difference being the emphasis
on doing familiar things in a better way followed by some new
things (scheme/lisp intros) versus throwing you into what may
be completely uncharted territory (formal type systems, monads,
functors) in SML/OCaml/Haskell intros.

There also seems to be the tendency to assume that the meaning of
a type signature like
 map :: (a-b) - [a] - [b]
is inherently obvious.  To someone unfamiliar with HM type
systems and whose last course in mathematics was more than a
decade ago, it might as well be greek.

The thing that I would most like to see would entitled "A
Practical Guide to Haskell" or something of that nature.  After
working through some of the online tutorials and a fair portion
of "Craft of Functional Programming", I thought, "Ok, I do most
of these excercises, and am comfortable.  Let's try that utility
program I've been thinking about for the last couple weeks."
What I ran into was scenarios like the ones listed below (some of
which have since been solved):

1.  How the #$!? do I read some data from a file.  Good, I've
got the data, now I can work on it.  Nope, now I have an "IO
thingie" whatever that is, but all of the standard functions want
a regular "thingie" now what?

2.  I need to do some XML processing.  Go to haskell.org, find
links to HaXML and install it.  Try to use it...  Nope, no
documentation that is understandable to me.  Ok, look at the
source to the one demo program that does something close to
what I want.  Nope, it was written in the "It's functional and
therefore self-documenting" style.  (Note, this is not intended
to be a shot at the implementors of HaXML.  It is clear from
the description of the library and the functions of the included
programs that the library is complete and well thought out.  I
am also sure that someone already fluent in Haskell who is used
to looking at type signatures to deduce the purpose of a function
can do sophisticated things with it.  My only criticism was that
it wasn't approachable to someone who is starting to feel somewhat
comfortable with Haskell and wants to "do" something useful with it, 
as opposed to exercises from a book or tutorial.)

3.  I gave up on Haskell for that particular utility and wrote it
OCaml.

One is tempted to come to the conclusion that Haskell is not
suited for "normal" programmers writing "normal" programs.  I
don't necessarily think that is true, but it is difficult for
someone who is used to imperative/OO style programming and has
dabbled in impure functional languages.

To be fair, I had almost the same reaction to SML/OCaml when I
first encountered them.  Working on Haskell and reading "Craft"
made it much easier to go back and look at them again.  It's
probably that in the spectrum of imperative  functional
languages, scheme/CL are farther to the left than SML/OCaml,
which is still left of Haskell.  In the case of someone like me
coming from C, C++, perl, python, etc., the extreme right is
inherently much less familiar territory than the middle ground.
The tendency of the written materials to get more 

Re: Learning Haskell and FP

2001-01-03 Thread William Lee Irwin III

On Wed, Jan 03, 2001 at 01:28:41AM -0800, Simon Peyton-Jones wrote:
 Here's a suggestion: would someone like to write such a guide,
 from the point of view of a beginner, leaving blanks that we can fill in,
 when you come across a task or issue you don't know the answer
 to?  That is, you provide the skeleton, and we fill in the blanks.

If someone should be bold enough to start writing such a guide, I would
be more than happy than to try to contribute to it and also set it up as
a Debian package.


Cheers,
Bill
-- 
"AIX is Unix from the universe where Spock had a beard."
-- Unknown

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2001-01-03 Thread Karl M. Syring


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Ketil Malde
 Sent: Wednesday, January 03, 2001 8:28 AM
 To: George Russell
 Cc: [EMAIL PROTECTED]; i r thomas; [EMAIL PROTECTED]
 Subject: Re: Learning Haskell and FP


 George Russell [EMAIL PROTECTED] writes:

  I think Paul is being unduly modest.  I found it very useful
 when I first learnt
  Haskell.  But I did already know ML, so maybe the Gentle
 Introduction would be
  harder going for someone who didn't know anything about
 functional programming.

 Mind if I me too a bit?  I had just read the SICP, and I too found
 that the Gentle Introduction served well as an introduction to the
 Haskell syntax.  I think it'd be fine if the title were a bit less
 ambitious - it isn't really aimed at the novice, I think.

 It's been a while since I read it tho'

If you start out with zero knowledge in functional programming, as I do, the
GITH is really not very helpful. I have found the Clean tutorial
(cleanBookI.pdf) a good place to get my feet wet. Now, I gently try to move
on.

Regards
Karl M. Syring

PS: are the members of the list expecting to get replies by private mail?


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2001-01-03 Thread Karl M. Syring

 -Original Message-
 From: Simon Peyton-Jones [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 03, 2001 10:02 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: Learning Haskell and FP


 | PS: are the members of the list expecting to get replies by
 | private mail?

 The thing to do is to switch the thread to

   [EMAIL PROTECTED]

 haskell@haskell-org is meant for openers; longer threads should
 move to haskell-cafe.  That way people can control how inundated they
 get.

 You can move by simply adding -cafe into the address when you reply.

I was somewhat irritated about the inclusion of the individual reply
adresses. Most mailing list software seems to remove the email adresses of
the senders. On the other hand, there are people that use the private mail
for archiving purposes, iff the content seems to be potentially important
while forwarding the letters send to the list to bit nirvana.

Regards
Karl M. Syring


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-03 Thread Benjamin L. Russell

On Wed, 03 Jan 2001 11:26:53 -0500
 Michael Zawrotny [EMAIL PROTECTED] wrote:
 
 [snip]
 
 The reason that I found GITH difficult wasn't that the
 concept
 of programming with functions/functional style was new to
 me.  What got me was that the concepts and notations were
 much
 more "mathematical" than "programmatic".  In my
 explorations
 of various languages, my experience with introductions to
 scheme/CL has mostly been that they tend to show how to
 do
 things that are familiar to imperative programmers, plus
 all
 of the things that you can do with functions as first
 class
 values.  With intros to SML, OCaml and Haskell, there is
 a
 much greater emphasis on types, type systems, and
 provable
 program correctness.
 
 [snip]
 
 The thing that I would most like to see would entitled "A
 Practical Guide to Haskell" or something of that nature.
 
 [snip]
 
 One is tempted to come to the conclusion that Haskell is
 not
 suited for "normal" programmers writing "normal"
 programs.

How would you define a "'normal' programmer writing 'normal' programs?"  What exactly 
is a "'normal' program?"

(Perhaps another way of phrasing the issue is as the "declarative" vs. "procedural" 
distinction, since the issue seems to be that of "what is" (types) vs. "how to" 
(imperative expression; i.e., procedures).)

While I agree that "A Practical Guide to Haskell" would indeed be a suitable 
alternative for programmers from the procedural school of expression, I would caution 
that such an introduction would probably not be suitable for all.

If I may give my own case as an example, I studied both C and Scheme (in addition to 
auditing a course in Haskell) in college, and favored Scheme over C precisely because 
of my Scheme course's emphasis on provable program correctness.  This is largely a 
matter of background and taste:  my course background was relatively focused on the 
design and analysis of algorithms, with provable program correctness being a related 
topic.

Perhaps, ideally, two separate tutorials (or perhaps a single tutorial with two 
sections based on different viewpoints?) may be needed?  The difficulty is that the 
conceptual distance between the declarative and procedural schools of thought seems 
too great to be bridged by a single viewpoint.  It seems that any introduction 
favoring either one would risk alienating the other.

Personally, I would really prefer "A Gentle Elementary Introduction to Haskell:  
Elements of the Haskell School of Expression with Practical Examples," but some would 
no doubt choose "Haskell in a Nutshell:  How to Write Practical Programs in Haskell."

--Ben
--
Benjamin L. Russell
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Re: Learning Haskell and FP

2001-01-02 Thread Paul Hudak

 Unforunately, the "Gentle Introduction To Haskell" that
 haskell.org links to is not a very useful introduction.

John and I should probably rename this document, since it really isn't a
very gentle intro at all.  We should probably also downplay it's
prominance on the haskell website.  It was written rather quickly many
years ago, at a time when there was not a single textbook on Haskell. 
So it's probably outlived it's purpose, although I do believe that some
people still find it useful.

  -Paul

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-02 Thread George Russell

Paul Hudak wrote:
 
  Unforunately, the "Gentle Introduction To Haskell" that
  haskell.org links to is not a very useful introduction.
 
 John and I should probably rename this document, since it really isn't a
 very gentle intro at all.  We should probably also downplay it's
 prominance on the haskell website.  It was written rather quickly many
 years ago, at a time when there was not a single textbook on Haskell.
 So it's probably outlived it's purpose, although I do believe that some
 people still find it useful.
I think Paul is being unduly modest.  I found it very useful when I first learnt 
Haskell.  But I did already know ML, so maybe the "Gentle Introduction" would be
harder going for someone who didn't know anything about functional programming.
Nevertheless I think it might be a mistake to downplay it unless there's a better
publicly-available introduction with which you can replace it.

The introduction states quite clearly that 
 Our goal is to provide a gentle introduction to Haskell for someone 
 who has experience with at least one other language, preferably a 
 functional language (even if only an "almost-functional" language 
 such as ML or Scheme).
and then goes on to recommend a couple of texts giving more detailed
introductions to functional programming.  I don't think one can ask for more.

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-02 Thread Jan Skibinski



On Tue, 2 Jan 2001, George Russell wrote:

 Paul Hudak wrote:
  
   Unforunately, the "Gentle Introduction To Haskell" that
   haskell.org links to is not a very useful introduction.
  
  John and I should probably rename this document, since it really isn't a
  very gentle intro at all.  We should probably also downplay it's
  prominance on the haskell website.  It was written rather quickly many
  years ago, at a time when there was not a single textbook on Haskell.
  So it's probably outlived it's purpose, although I do believe that some
  people still find it useful.

 [cut]
 Nevertheless I think it might be a mistake to downplay it unless 
 there's a better publicly-available introduction with which you can
 replace it.

Very valid observation.

John, Paul:
Wouldn't be worthwhile and possible to gradually upgrade
it within some sort of a supervised documentation project at
Yale, as part of your regular teaching curriculum? 

Jan
 



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-02 Thread Patrick M Doane

On Tue, 2 Jan 2001, Paul Hudak wrote:

  Unforunately, the "Gentle Introduction To Haskell" that
  haskell.org links to is not a very useful introduction.
 
 John and I should probably rename this document, since it really isn't a
 very gentle intro at all.  We should probably also downplay it's
 prominance on the haskell website.  It was written rather quickly many
 years ago, at a time when there was not a single textbook on Haskell. 
 So it's probably outlived it's purpose, although I do believe that some
 people still find it useful.
 

As another point of reference, I decided it was time to learn Haskell
recently and this guide is what I started with. I'm familiar with Standard
ML and O'Caml, and found the guide to be very easy to read and was a good
starting point. I had enough information that I could read other Haskell
source and understand what it was trying to do even if I didn't feel
comfortable about all the details for writing programs.

However, a related issue that has been causing a lot of difficulty is
system installation. I'm primarily interested in building stand-alone
executables where speed is an important factor, so ghc seemed the best
system to work with. I've been unable to get this to work at all on a
Windows system. It seems configured to use dynamic libraries but doesn't
come with any in the package. I tried building from source, but it
requires Happy to build (and that too needed the .dlls). 

On the Unix side, the installation was much smoother. I installed from
source using the FreeBSD port system and everything came together without
a hitch (it was a rather lengthy compile process though!).

There is a definite lack of "Getting Started" material in the ghc
distribution.

Documentation on libraries is also rather distributed. Sometimes I need to
look in the GHC manual about a library that is included with the
distribution, other times I need to look in the Haskell standard library
report. And if that fails, look in the Haskell standard language report
for information on what is included in the Prelude. Collecting this
information together would be a big benefit. 

I've installed Hugs on the Windows side recently, and it seemed to boot up
okay. I haven't tried looking into its documentation to see if things are
any different.

Overall, I'm very pleased with the lannguage design and am excited about
its future.

Patrick



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2001-01-02 Thread Ketil Malde

George Russell [EMAIL PROTECTED] writes:

 I think Paul is being unduly modest.  I found it very useful when I first learnt 
 Haskell.  But I did already know ML, so maybe the Gentle Introduction would be
 harder going for someone who didn't know anything about functional programming.

Mind if I me too a bit?  I had just read the SICP, and I too found
that the Gentle Introduction served well as an introduction to the
Haskell syntax.  I think it'd be fine if the title were a bit less
ambitious - it isn't really aimed at the novice, I think.

It's been a while since I read it tho'

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2000-12-29 Thread Johan Jeuring

Who are the audience for  the books on Advanced Functional Programming?
Academics with a theoretical CS background or someone with just a bit of
understanding of FP? Ideally, I would like a course suited for someone who
has completed a basic FP course.

It varies a bit per school (book) and per article. But certainly LNCS 925
contains a number of chapters that should be interesting for someone with
a general CS background and a basic FP course. I know it has been used
in a couple of undergraduate courses on advanced functional programming.

Topics, Authors, LNCS nr:

- Monads, Wadler, 925
- Parser Combinators, Fokker, 925
- Constructor Classes, Jones, 925
- (Monadic) folds (or catamorphisms), Meijer  Jeuring, 925
- Space leaks and heap profiling, Runciman  Rojemo, 1129
- Algorithms and data structures, Okasaki, 1129
- Graph algorithms, Launchbury, 925
- User Interfaces, Carlsson  Hallgren, 925, Peyton Jones  Finne 1129

etc.

Johan Jeuring

http://www.cs.uu.nl/~johanj/

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-29 Thread Frank Atanassow

Benjamin L. Russell wrote (on 28-12-00 17:35 -0500):

   "Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho
  [..] Is it OK if I show off and steal some thunder? :)

So much for that idea...!

"(It's) An old pond! The sound of water steadily dripping in..."
 
 Actually, if I may add, the translation I remember was the following:
 
"[It's] An old pond!  The sound of water as the frog jumps in"
 
 "Kawazu" means "frog," and "tobikomu" means "(to) jump in."

That makes sense. I was guessing that "kawazu" was the old form of modern
"kawarazu" (`without changing'). Modern `frog' is "kaeru", though, and the
transitive form of "kawaru" (`change') is also "kaeru", so I suppose there is
some linguistic relationship. "tobikomu" makes much more sense this way too. I
thought it was a figurative usage, but it still didn't sound right...

-- 
Frank Atanassow, Information  Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-29 Thread i r thomas

On 12/28/2000 at 7:00 PM Bill Halchin wrote:
Hello IR,
I agree with the OU Haskell Tutorial. It is excellent!!

Yes, with a bit of editing and more diagrams , it would probably be worth publishing.

BTW, what is your C# source?

The .NET Framework SDK is freely downloadable from MS ( around 100 megs )
and comes with a C# tutorial, C# reference and a command line C#.
There are also a few chapters online of some C# books that cover issues like 
namespaces and attributes.
I am using the Antechinus C# editor as an IDE . This comes with a few basic C# 
examples as well.
( for vi freaks, I have written a C# vim syntax file that will appear on vim.org once 
it is polished up.)


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread i r thomas

While it may not be advanced or mathematical enough for your needs, you may wish to 
read _The Haskell School of Expression: Learning Functional Programming through 
Multimedia,_ by Paul Hudak.  This is also an introductory book on functional 
programming, with a special focus on Haskell, although the examples used are mainly 
from multimedia.

Is there an online version of Hudak's book ?
( For example Bruce Eckel has online versions of all his books available online as 
well as in print )

"Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

Translation please !
Basho is my favorite Japanese poet.
Unfortunately my Japanese is at the Ohio level..
(  ohiogozaimazu)




___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread Johan Jeuring

Is there a good textbook on Functional Programming which starts from a base
point similar to "The craft of Functional Programming" but more advanced in
terms of introducing necessary topics like Category theory, catamorphisms,
monads, etc?  I would find such a book very useful, especially if it
concentrated on lazy functional programming.

You might want to have a look at the series of three books on Advanced
Functional 
Programming, published in LNCS, as LNCS 925, 1129, and 1608. I would 
probably start with 925, which introduces monads, parser  pretty-printing 
combinators, monadic catamorphisms, constructor classes, etc.

-- Johan Jeuring


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread Frank Atanassow

i r thomas wrote (on 28-12-00 12:50 +1000):
 Unforunately, the " Gentle Introduction To Haskell" that haskell.org links to is not 
a very useful introduction.
 I am getting  more out of  Rex Paige's Two Dozen Short Lessons in Haskell. ( I am 
studying Haskell and C# on my own in my spare time as break from my medical practice 
). 

What did you find unuseful about GITH? How could it be improved? What were
your expectations for it? What was more useful about Rex Paige's notes?

 "Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

 Translation please !

Is it OK if I show off and steal some thunder? :)

  "(It's) An old pond! The sound of water steadily dripping in..."

-- 
Frank Atanassow, Information  Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



RE: Learning Haskell and FP

2000-12-28 Thread Doug Ransom

Who are the audience for  the books on Advanced Functional Programming?
Academics with a theoretical CS background or someone with just a bit of
understanding of FP? Ideally, I would like a course suited for someone who
has completed a basic FP course.



 -Original Message-
 From: Johan Jeuring [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 28, 2000 6:06 AM
 To: Doug Ransom
 Cc: [EMAIL PROTECTED]
 Subject: Re: Learning Haskell and FP
 
 
 Is there a good textbook on Functional Programming which 
 starts from a base
 point similar to "The craft of Functional Programming" but 
 more advanced in
 terms of introducing necessary topics like Category theory, 
 catamorphisms,
 monads, etc?  I would find such a book very useful, especially if it
 concentrated on lazy functional programming.
 
 You might want to have a look at the series of three books on Advanced
 Functional 
 Programming, published in LNCS, as LNCS 925, 1129, and 1608. I would 
 probably start with 925, which introduces monads, parser  
 pretty-printing 
 combinators, monadic catamorphisms, constructor classes, etc.
 
 -- Johan Jeuring
 

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread Benjamin L. Russell

On Thu, 28 Dec 2000 16:48:57 +0100
 Frank Atanassow [EMAIL PROTECTED] wrote:
 i r thomas wrote (on 28-12-00 12:50 +1000):
  Unforunately, the " Gentle Introduction To Haskell"
 that haskell.org links to is not a very useful
 introduction.
  I am getting  more out of  Rex Paige's Two Dozen Short
 Lessons in Haskell. ( I am studying Haskell and C# on my
 own in my spare time as break from my medical practice ).
 
 What did you find unuseful about GITH? How could it be
 improved? What were
 your expectations for it? What was more useful about Rex
 Paige's notes?

I read part of _GITH,_ too; while it included information necessary for an 
introduction, the style seemed rather terse and dry, and rather difficult to follow at 
times, and read more like a manual with many technical details than a tutorial 
brimming with motivational material, especially when compared to _The Haskell School 
of Expression_ ("_HSE_" in the sequel).  In particular, it could have had some more 
interesting examples or some more commentary, both of which made _HSE_ so fascinating.

  "Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo
 Basho
 
  Translation please !
 
 Is it OK if I show off and steal some thunder? :)
 
   "(It's) An old pond! The sound of water steadily
 dripping in..."

Actually, if I may add, the translation I remember was the following:

   "[It's] An old pond!  The sound of water as the frog jumps in"

"Kawazu" means "frog," and "tobikomu" means "(to) jump in."

--Ben
--
Benjamin L. Russell
[EMAIL PROTECTED]
[EMAIL PROTECTED]
"Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread Jan Skibinski



On Thu, 28 Dec 2000, Benjamin L. Russell wrote:

 On Thu, 28 Dec 2000 16:48:57 +0100
  Frank Atanassow [EMAIL PROTECTED] wrote:
  i r thomas wrote (on 28-12-00 12:50 +1000):
   "Furuike ya!  Kawazu tobikomu mizu no oto."  --Matsuo Basho
  
"(It's) An old pond! The sound of water steadily
  dripping in..."
 
"[It's] An old pond!  The sound of water as the frog jumps in"

Keeping with the minimalistic spirit of Haskell:

pond
frog
plop!

-- by James Kirkup, an English poet
-- Supposedly from Hiroaki Sato collection of 80 English translations
-- of this haiku.
--  
3 down 77 to go..

Jan



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: Learning Haskell and FP

2000-12-28 Thread Fritz K Ruehr

[ Doug Ransom wrote about wanting a more advanced and design-oriented book
  on FP than "The Craft of Functional Programming" by Simon Thompson.
  In reply, Johan Jeuring recommended the Advanced Schools books (I concur). 
 ]

Let me add a few other recommendations, plus a vision of a book (not
yet written, as far as I know) which might fit Doug's needs; I'll
call it "The Design Patterns Haskell Companion" (see below).

The "actual book" recommendations (all documented on haskell.org):

 * Introduction to Functional Programming using Haskell (second edition)
   by Richard Bird (Prentice Hall, ISBN: 0-13-484346-0)
   
   This book is an introductory text, like CFP, but it ramps up a bit
   faster and addresses design issues from a more advanced perspective
   (IMHO). It's certainly an excellent text, and it builds to a nice
   medium-sized design example (the program calculator of Chapter 12).
   It also leans toward a different style of design and programming,
   influenced by BMF/Squiggol.

 * Algebra of Programming
   by Richard Bird and Oege de Moor (Prentice Hall, ISBN: 0-13-507245-X)
   
   You might think of this as an advanced sequel to IFPH above, 
   although it focuses more on the theory behind program calculation:
   categories and allegories figure prominently, and it leans even 
   further in the direction indicated above. But there is nevertheless 
   a lot of good material here which can serve as a foundation for 
   design work, esp. the final chapters (7-10) on algorithms topics.

 * Algorithms: A Functional Programming Approach
   by Fethi Rabhi and Guy Lapalme (Addison-Wesley, ISBN: 0-201-59604-0)
   
   This is a concise tour through the usual gamut of data structures 
   and algorithms topics typical of a "CS 2" course, but from a 
   functional perspective. It is addressed more to people who are 
   already familiar with programming and with the "standard" approach
   to DSA issues. It works very well as a reference but includes 
   enough discussion to reward a straight reading.

 * Purely Functional Data Structures
   by Chris Okasaki (Cambridge University Press, ISBN: 0-521-66350-4)
   
   This one is similar to AFPA above (in being a tour of DSA topics from
   a functional perspective), but is a bit more advanced: e.g., Ch. 3
   covers leftist heaps, binomial heaps and red-black trees. It also
   addresses issues of analysis in the context of lazy evaluation more
   thoroughly (Banker's method, etc.). The examples are written using
   SML, but an appendix (and a website) give Haskell versions.

Of course, none of these books really answers the needs of the mature
programmer/blossoming functional programmer who seeks advice on
broader design issues in the context of lazy FP, esp. Haskell.
This gap leads me to propose the fanciful book mentioned above:

 * The Design Patterns Haskell Companion
   by [someone(s) reading this list?]

The title may be pandering a bit, but if the Smalltalk people can do it,
why can't we? :) . In fact, the title is based on "The Design Patterns
Smalltalk Companion" by Alpert, Brown and Woolf, a book I came across
while reading up on design patterns. (It was recommended by a customer
review on Amazon as being better than the original "gang of four" book.)

The "Smalltalk Companion" serves an audience of mature programmers and
attempts to document a number of "standard" design patterns in the
specific context of Smalltalk. I'm not sure that the Haskell community
would be comfortable referring to its collective design folklore in
these terms, but I'm sure we would all welcome a good book written at
this level which systematically addressed the motivation, rationale,
trade-offs, etc. of the more advanced techniques of FP (i.e., monads, 
type and constructor classes, Xa-morphisms (for various X), 
higher-order and nested datatypes, etc.).

As Johan mentioned, the "Advanced School" books serve this purpose to an
extent, but they differ from my vision in two respects: first, they are
collections of chapters on particular topics, written by different
authors, and thus don't form a consistent, systematic review. Second,
they are not (all) written from the specific perspective of design, so
that for example they don't provide as much comparison and contrast
*between* techniques.

Of course, another motivation for such a book is that it might lend an
air of credibility and maturity to the language, thus helping to 
promote it in the larger world. Casting it in terms of "design patterns"
would certainly make sense for these purposes (and probably guarantees
a certain audience, too), although I am still ambivalent about the need
for Haskell to become a huge hit with mainstream audiences.

In any case, if anyone is interested to write such a book, I will buy
a copy :) . And if anyone wishes to collabrate on it, I am willing
to help out. (I am not qualified to write it alone, and I think it 
would turn out best as a group effort in any case.)

  --  Fritz Ruehr
  

Re: Learning Haskell and FP

2000-12-27 Thread i r thomas

I have read "The Craft of Functional Programming" by Simon Thompson and a
few paper on the web.  "The Craft" is a good book, but it is an introduction
to FP.
It seems to me it there are a lot of books on OO design I can pick up at the
bookstore, but in the FP world, one must worm their way through all sorts of
papers.  I have seen papers on Catamorphisms, Monads, Programming with
Barbed Wire, folds, etc.  I think these papers are hard to understand if you
don't have the acadademic/mathematical background -- being papers and not
textbooks these papers assume a fair bit of base knowledge.

I agree with this completely.
The CFP book is a good introduction.
Unforunately, the " Gentle Introduction To Haskell" that haskell.org links to is not a 
very useful introduction.
I am getting  more out of  Rex Paige's Two Dozen Short Lessons in Haskell. ( I am 
studying Haskell and C# on my own in my spare time as break from my medical practice ).


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell