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 know I can design a fold function to use in place of primitive recursion for most data structures -- I just don't know if I should. It is pretty easy to get through "The Craft of Functional Programming" without understanding what Category Theory , a Catamorphism , or a Kleisli Composition is. I can see lots of real Software Engineering oppurtunities for these various techniques if I could just put them together. 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. Doug Ransom Systems Engineer Power Measurement Ltd. http://www.pml.com 250-652-7100 office 250-652-0411 fax mailto:doug_ransom@pml.com
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 ).
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
On Thu, 28 Dec 2000 16:48:57 +0100 Frank Atanassow <franka@cs.uu.nl> 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 russell@brainlink.com benjamin.russell.es.94@aya.yale.edu "Furuike ya! Kawazu tobikomu mizu no oto." --Matsuo Basho
On Thu, 28 Dec 2000, Benjamin L. Russell wrote:
On Thu, 28 Dec 2000 16:48:57 +0100 Frank Atanassow <franka@cs.uu.nl> 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
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
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
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.
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
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
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
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
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
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.
Paul Hudak <paul.hudak@yale.edu> 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 mathematical as one moves to the right also exacerbates the problem. That was my reaction when I read GITH and some of the other introductory material around. A lot of this probably is more relevant to the people who are thinking of writing a lower-level intro than it is to the next edition of The-Document-Formerly-Known-As-GITH. My plea is for people include introductory material for people who know how to program in general and want to do mundane tasks in Haskell as opposed to C, Python, or whatever other language. Mike -- Michael Zawrotny 411 Molecular Biophysics Building Florida State University | email: zawrotny@sb.fsu.edu Tallahassee, FL 32306-4380 | phone: (850) 644-0069
On Wed, 03 Jan 2001 11:26:53 -0500 Michael Zawrotny <zawrotny@gecko.sb.fsu.edu> 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 russell@brainlink.com benjamin.russell.es.94@aya.yale.edu "Furuike ya! Kawazu tobikomu mizu no oto." --Matsuo Basho
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
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-)
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 Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
---------------------------------------------------------------------- Shlomi Fish shlomif@vipe.technion.ac.il Home Page: http://t2.technion.ac.il/~shlomif/ Home E-mail: shlomif@techie.com The prefix "God Said" has the extraordinary logical property of converting any statement that follows it into a true one.
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. I compared the first few chapters of both _The Craft of Functional Programming_ and _The Haskell School of Expression,_ and personally found Hudak's book (the latter) much more interesting. The exercises are designed to teach the reader to think in terms of functional, as opposed to imperative or object-oriented, programming--hence the phrase in the title "School of Expression." --Ben -- Benjamin L. Russell russell@brainlink.com benjamin.russell.es.94@aya.yale.edu "Furuike ya! Kawazu tobikomu mizu no oto." --Matsuo Basho On Wed, 27 Dec 2000 17:30:19 -0800 Doug Ransom <Doug_Ransom@pml.com> wrote:
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 know I can design a fold function to use in place of primitive recursion for most data structures -- I just don't know if I should. It is pretty easy to get through "The Craft of Functional Programming" without understanding what Category Theory , a Catamorphism , or a Kleisli Composition is. I can see lots of real Software Engineering oppurtunities for these various techniques if I could just put them together.
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.
Doug Ransom Systems Engineer Power Measurement Ltd. http://www.pml.com 250-652-7100 office 250-652-0411 fax mailto:doug_ransom@pml.com
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
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)
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
participants (15)
-
Benjamin L. Russell -
Doug Fields -
Doug Ransom -
Frank Atanassow -
George Russell -
i r thomas -
Jan Skibinski -
Johan Jeuring -
John Peterson -
Keith Wansbrough -
Lars Lundgren -
Michael Zawrotny -
Patrick M Doane -
Paul Hudak -
Shlomi Fish