ANN: "Real World Haskell", now shipping

Good evening - John Goerzen, Don Stewart and I are delighted to announce the availability of our book, "Real World Haskell". It is 710 pages long, and published by O'Reilly Media. This is the first book to comprehensively cover modern Haskell programming. From an introduction to functional programming, it focuses on teaching through many worked examples. We discuss the "awkward squad" of I/O, concurrency, and exceptions. We cover network programming, databases, and system hacking. We motivate and work with monoids, applicative functors, monads, and monad transformers. We show you how to debug code, and how to ship well-tested software. Better yet, the book is available under a Creative Commons license, so you can read as much of it as you please before you buy: http://book.realworldhaskell.org/ We developed this book with the enthusiastic and voluble support of the Haskell community, and we are proud to share our work in a fashion that will help newcomers to our field. And best of all, if you order now (at least in North America), you can have a copy of the book in your hands in a matter of days. Thank you from all of us to our friends in the Haskell world who have been so generous with their feedback and kind words!

Mine arrives in two days; I can't wait! :)
Thanks for all your hard work, and to all the members of the community which
provided comments/suggestions to improve the book.
__
Donnie Jones
On Wed, Nov 26, 2008 at 12:15 AM, Bryan O'Sullivan
Good evening -
John Goerzen, Don Stewart and I are delighted to announce the availability of our book, "Real World Haskell". It is 710 pages long, and published by O'Reilly Media.
This is the first book to comprehensively cover modern Haskell programming. From an introduction to functional programming, it focuses on teaching through many worked examples. We discuss the "awkward squad" of I/O, concurrency, and exceptions. We cover network programming, databases, and system hacking. We motivate and work with monoids, applicative functors, monads, and monad transformers. We show you how to debug code, and how to ship well-tested software.
Better yet, the book is available under a Creative Commons license, so you can read as much of it as you please before you buy: http://book.realworldhaskell.org/ We developed this book with the enthusiastic and voluble support of the Haskell community, and we are proud to share our work in a fashion that will help newcomers to our field.
And best of all, if you order now (at least in North America), you can have a copy of the book in your hands in a matter of days.
Thank you from all of us to our friends in the Haskell world who have been so generous with their feedback and kind words! _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Is it possible to order it from France yet ?

dav.vire+haskell:
Is it possible to order it from France yet ?

On Wed, Nov 26, 2008 at 9:10 AM, Don Stewart
dav.vire+haskell:
Is it possible to order it from France yet ?
Actually right now I was logging in to Amazon.fr to check :) Thanks. I'm going to order 3 copies and offer 2 for christmas.

Excerpts from david48's message of Wed Nov 26 09:31:54 +0100 2008:
Actually right now I was logging in to Amazon.fr to check :)
It's not available yet on Amazon.fr. I've ordered them anyway, but I'm warned that I will not have them for christmas :(
I've ordered it on Amazon.fr some months ago and it's planned for the 10 December. -- Nicolas Pouillard aka Ertai

I'd love it if people took a photo of the book arriving. With enough photos , I could put together a gallery of Haskell around the world :-) Here's my copy arriving last night, http://www.realworldhaskell.org/blog/2008/11/25/real-world-haskell-is-shippi... And Dino's digital version, http://galois.com/~dons/images/20081121_dm_838.jpg Drop me a line with a photo of yours arriving, and your location, and I'll add it to the gallery. Cheers, Don donnie:
Mine arrives in two days; I can't wait! :)
Thanks for all your hard work, and to all the members of the community which provided comments/suggestions to improve the book. __ Donnie Jones
On Wed, Nov 26, 2008 at 12:15 AM, Bryan O'Sullivan <[1]bos@serpentine.com> wrote:
Good evening -
John Goerzen, Don Stewart and I are delighted to announce the availability of our book, "Real World Haskell". It is 710 pages long, and published by O'Reilly Media.
This is the first book to comprehensively cover modern Haskell programming. From an introduction to functional programming, it focuses on teaching through many worked examples. We discuss the "awkward squad" of I/O, concurrency, and exceptions. We cover network programming, databases, and system hacking. We motivate and work with monoids, applicative functors, monads, and monad transformers. We show you how to debug code, and how to ship well-tested software.
Better yet, the book is available under a Creative Commons license, so you can read as much of it as you please before you buy: [2]http://book.realworldhaskell.org/ We developed this book with the enthusiastic and voluble support of the Haskell community, and we are proud to share our work in a fashion that will help newcomers to our field.
And best of all, if you order now (at least in North America), you can have a copy of the book in your hands in a matter of days.
Thank you from all of us to our friends in the Haskell world who have been so generous with their feedback and kind words! _______________________________________________ Haskell mailing list [3]Haskell@haskell.org [4]http://www.haskell.org/mailman/listinfo/haskell
References
Visible links 1. mailto:bos@serpentine.com 2. http://book.realworldhaskell.org/ 3. mailto:Haskell@haskell.org 4. http://www.haskell.org/mailman/listinfo/haskell
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Very excited to receive my copy! Congrats to the 3 of you!
On Tue, Nov 25, 2008 at 9:15 PM, Bryan O'Sullivan
Good evening -
John Goerzen, Don Stewart and I are delighted to announce the availability of our book, "Real World Haskell". It is 710 pages long, and published by O'Reilly Media.
This is the first book to comprehensively cover modern Haskell programming. From an introduction to functional programming, it focuses on teaching through many worked examples. We discuss the "awkward squad" of I/O, concurrency, and exceptions. We cover network programming, databases, and system hacking. We motivate and work with monoids, applicative functors, monads, and monad transformers. We show you how to debug code, and how to ship well-tested software.
Better yet, the book is available under a Creative Commons license, so you can read as much of it as you please before you buy: http://book.realworldhaskell.org/ We developed this book with the enthusiastic and voluble support of the Haskell community, and we are proud to share our work in a fashion that will help newcomers to our field.
And best of all, if you order now (at least in North America), you can have a copy of the book in your hands in a matter of days.
Thank you from all of us to our friends in the Haskell world who have been so generous with their feedback and kind words! _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Bryan O'Sullivan wrote:
Good evening -
John Goerzen, Don Stewart and I are delighted to announce the availability of our book, "Real World Haskell". It is 710 pages long, and published by O'Reilly Media.
You know, I *was* going to rush out and buy this as soon as it hit the shelves. I was really excited that this book was actually being made, etc. But then I sat and read some of it online, and the more I read it, the more I didn't like it. :-( That sounds horribly negative when these guys have just spend I don't know *how* long perfecting the thing, and I feel like I ought to say something positive as well to make it sound less harsh. But... it all seemed a bit muddled to me. I thought chapter 1 was very strong, and the rest seemed to ramble from topic to topic. I was left feeling kinda disapointed. Then again, one day I sat down and tried to draw a diagram of the essential concepts, techniques and syntax of Haskell and how they're related... The result looked like alphabet soup! It's not clear how you start to explain anything without immediately needing to explain 20 other things you just used to explain the first thing. (Somebody commented "recursive tutorials for a recursive language". It was meant as an insult, but I actually kinda like it...) Given that that's the case, I'm not really sure that I could do any better than the Three Kings, so maybe I should just shuffle off and keep my comments to myself. :-/ What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.

Andrew Coppin 쓴 글:
Then again, one day I sat down and tried to draw a diagram of the essential concepts, techniques and syntax of Haskell and how they're related... The result looked like alphabet soup! It's not clear how you start to explain anything without immediately needing to explain 20 other things you just used to explain the first thing. (Somebody commented "recursive tutorials for a recursive language". It was meant as an insult, but I actually kinda like it...) Given that that's the case, I'm not really sure that I could do any better than the Three Kings, so maybe I should just shuffle off and keep my comments to myself. :-/
If one needs introductory Haskell programming tutorial explaining about the language concepts from first principles, then one should read a textbook written for that purpose such as "Programming in Haskell". "Real World Haskell" is a collection of practical tips and know-hows to get things done at work rather than a step-by-step Haskell tutorial. And I believe that many other O'Reilly books are like that.
What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
What do you mean by that "they are trying database programming is possible in Haskell"? I've done very simple database programming in Haskell using HDBC, and it just works using the binary package from debian. If you need more complicated examples, you can take a look at the hpodder source code or any other applications that use database. They are all on Hackage. -- Ahn, Ki Yung

Ahn, Ki Yung wrote:
Andrew Coppin 쓴 글:
Then again, one day I sat down and tried to draw a diagram of the essential concepts, techniques and syntax of Haskell and how they're related... The result looked like alphabet soup! It's not clear how you start to explain anything without immediately needing to explain 20 other things you just used to explain the first thing. (Somebody commented "recursive tutorials for a recursive language". It was meant as an insult, but I actually kinda like it...) Given that that's the case, I'm not really sure that I could do any better than the Three Kings, so maybe I should just shuffle off and keep my comments to myself. :-/
If one needs introductory Haskell programming tutorial explaining about the language concepts from first principles, then one should read a textbook written for that purpose such as "Programming in Haskell".
"Real World Haskell" is a collection of practical tips and know-hows to get things done at work rather than a step-by-step Haskell tutorial. And I believe that many other O'Reilly books are like that.
Quoting the introduction: "What will you need to know before reading this book? We expect that you already know how to program, but if you've never used a functional language, that's fine." Seems like it's intended to be useful to people who don't know any Haskell at all. And indeed, the subject matter of the opening chapters strongly reinforces this impression. Certainly this doesn't look like a book aimed at Haskell experts who are just looking for tips on how to solve "real world" problems. (Although no doubt the authors intended it for their benefit as well.) Unfortunately, the organisation isn't the clearest. But then, given that I've yet to come up with anything better myself, we should probably leave it at that...

andrewcoppin:
Ahn, Ki Yung wrote:
Andrew Coppin 쓴 글:
Then again, one day I sat down and tried to draw a diagram of the essential concepts, techniques and syntax of Haskell and how they're related... The result looked like alphabet soup! It's not clear how you start to explain anything without immediately needing to explain 20 other things you just used to explain the first thing. (Somebody commented "recursive tutorials for a recursive language". It was meant as an insult, but I actually kinda like it...) Given that that's the case, I'm not really sure that I could do any better than the Three Kings, so maybe I should just shuffle off and keep my comments to myself. :-/
If one needs introductory Haskell programming tutorial explaining about the language concepts from first principles, then one should read a textbook written for that purpose such as "Programming in Haskell".
"Real World Haskell" is a collection of practical tips and know-hows to get things done at work rather than a step-by-step Haskell tutorial. And I believe that many other O'Reilly books are like that.
Quoting the introduction:
"What will you need to know before reading this book? We expect that you already know how to program, but if you've never used a functional language, that's fine."
Seems like it's intended to be useful to people who don't know any Haskell at all. And indeed, the subject matter of the opening chapters strongly reinforces this impression. Certainly this doesn't look like a book aimed at Haskell experts who are just looking for tips on how to solve "real world" problems. (Although no doubt the authors intended it for their benefit as well.)
Indeed, we assume you know how to program, or you're one of the many Haskellers looking for that final 15%.
Unfortunately, the organisation isn't the clearest. But then, given that I've yet to come up with anything better myself, we should probably leave it at that...
I gather you've only briefly looked at the online draft? The structure is based on the plan we stated 12 months ago, http://www.realworldhaskell.org/blog/2007/05/23/real-world-haskell-its-time/ Namely, "cover the major techniques used to write serious, real-world Haskell code, so that programmers can just get to work in the language." Each major domain has a chapter or two, and we build upon earlier chapters in later ones. The book is explicitly fast-paced, so perhaps that's what you're noticing. We explicitly weren't going to leave the "getting things done"' part to page 711. And the response has been ridiculously positive, see, e.g. the Amazon reviews, "The text is incredibly readable and straightforward. It's set up for those who already know how to program imperatively (e.g. C++/Java/C, etc), and takes those readers deep into Haskell & functional programming." http://www.amazon.com/review/product/0596514980/ref=dp_db_cm_cr_acr_txt?_encoding=UTF8&showViewpoints=1 If the coverage is too varied or too fast for your taste, perhaps one of the slower-paced intros such as Graham's recent book, "Programming in Haskell" would be more appropriate. -- Don

Andrew Coppin
What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
Well, it's certainly possible to interact with a SQL database. You have had some kind of trouble, or you have a higher notion of "database programming"? -- _jsn

Jason Dusek wrote:
Andrew Coppin
wrote: What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
Well, it's certainly possible to interact with a SQL database. You have had some kind of trouble, or you have a higher notion of "database programming"?
Yeah: None of the packages on Hackage will compile successfully. :-P It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze. (Hack, wxHaskell even comes with a special pre-build Windows binary... and it *still* doesn't work!)

As far as I know, wxHaskell was developed mainly for windows?
On Sat, Nov 29, 2008 at 10:25 AM, Andrew Coppin
Jason Dusek wrote:
Andrew Coppin
wrote: What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
Well, it's certainly possible to interact with a SQL database. You have had some kind of trouble, or you have a higher notion of "database programming"?
Yeah: None of the packages on Hackage will compile successfully. :-P
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
(Hack, wxHaskell even comes with a special pre-build Windows binary... and it *still* doesn't work!)
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Patience is the last resort for those unable to take action

Hello Jason, Saturday, November 29, 2008, 5:55:06 PM, you wrote:
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
Well, I'll have a chance to verify this soon enough. Have you posted your errors somewhere?
unfortunately, HsLua already breaks the law :) -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Sat, 2008-11-29 at 18:13 +0300, Bulat Ziganshin wrote:
Hello Jason,
Saturday, November 29, 2008, 5:55:06 PM, you wrote:
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
Well, I'll have a chance to verify this soon enough. Have you posted your errors somewhere?
unfortunately, HsLua already breaks the law :)
How so? The hslua.cabal file labels it BSD3 where as it should be MIT. Is that what you meant? The COPYRIGHT file in the hslua package reproduces the lua licence. Duncan

Hello Duncan, Saturday, November 29, 2008, 7:49:52 PM, you wrote:
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
unfortunately, HsLua already breaks the law :)
How so?
it has C code and works on windows -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

On Sat, 2008-11-29 at 19:57 +0300, Bulat Ziganshin wrote:
Hello Duncan,
Saturday, November 29, 2008, 7:49:52 PM, you wrote:
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
unfortunately, HsLua already breaks the law :)
How so?
it has C code and works on windows
Oh, sorry, I misinterpreted what you said. "Law" made me think legal rather than the rule that Jason was positing. Other packages in that category include zlib and bzlib. Duncan

andrewcoppin:
Jason Dusek wrote:
Andrew Coppin
wrote: What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
Well, it's certainly possible to interact with a SQL database. You have had some kind of trouble, or you have a higher notion of "database programming"?
Yeah: None of the packages on Hackage will compile successfully. :-P
It seems to be an unwritten law that any package involving non-Haskell components doesn't work on Windoze.
(Hack, wxHaskell even comes with a special pre-build Windows binary... and it *still* doesn't work!)
Very curious. Did you file a bug report with the maintainers of the 30+ database packages on hackage? Or did you not have the underlying database drivers installed? Did you make any attempt to contact the authors to determine the cause of your problem? -- Don

Don Stewart wrote:
Very curious. Did you file a bug report with the maintainers of the 30+ database packages on hackage?
Or did you not have the underlying database drivers installed?
Did you make any attempt to contact the authors to determine the cause of your problem?
Incidentally, with my HDBC maintainer hat on, I can state: 1) That I have no Windows development machines myself; 2) That Windows people are using HDBC and HDBC-ODBC; 3) I actively try to maintain all of my packages in a cross-platform-friendly manner (except those that are really tied to one platform, such as HSH) 4) Windows users actively send me patches if something breaks, and these are readily applied. I don't think this state of affairs is unique in the Haskell world. Some people use Linux, Mac, or Windows as their main development box, but pretty much everybody tries to support all platforms. Incidentally, Andrew Coppin (CCd on this thread already) is one of those that has sent me patches. -- John

John Goerzen wrote:
Don Stewart wrote:
Very curious. Did you file a bug report with the maintainers of the 30+ database packages on hackage?
Or did you not have the underlying database drivers installed?
Did you make any attempt to contact the authors to determine the cause of your problem?
Incidentally, with my HDBC maintainer hat on, I can state:
1) That I have no Windows development machines myself;
2) That Windows people are using HDBC and HDBC-ODBC;
3) I actively try to maintain all of my packages in a cross-platform-friendly manner (except those that are really tied to one platform, such as HSH)
4) Windows users actively send me patches if something breaks, and these are readily applied.
I don't think this state of affairs is unique in the Haskell world. Some people use Linux, Mac, or Windows as their main development box, but pretty much everybody tries to support all platforms.
Incidentally, Andrew Coppin (CCd on this thread already) is one of those that has sent me patches.
OK, now I'm puzzled. I don't remember that! :-} I recall _trying_ to get a few of the database packages to build (I cannot remember which one(s) now - there's so many). In fact, IIRC, I even got the "base" package to build, but the driver for my database wouldn't build. (I forget why exactly.) In my experience, almost *everything* on Hackage consistently fails to build on Windows, so I think by this point I'd more or less given up even trying to make things build for me. In short, I didn't follow this one very far... At least, that's how I remember it. I guess this is where somebody digs up some thread on cafe from 3 years ago or something and proves me wrong. :-} In other news... why the hell does my ISP never deliver any emails to cafe originating from Don? They show up in Gmane, but not my inbox... how frustrating! (I'd reply to his other email, but I can't because it's not in my inbox.)

On Mon, Dec 01, 2008 at 09:59:24PM +0000, Andrew Coppin wrote:
I don't think this state of affairs is unique in the Haskell world. Some people use Linux, Mac, or Windows as their main development box, but pretty much everybody tries to support all platforms.
Incidentally, Andrew Coppin (CCd on this thread already) is one of those that has sent me patches.
OK, now I'm puzzled. I don't remember that! :-}
OK, I went back and looked at my Git logs and you're right. Wrong Andrew. Sorry.
I recall _trying_ to get a few of the database packages to build (I cannot remember which one(s) now - there's so many). In fact, IIRC, I even got the "base" package to build, but the driver for my database wouldn't build. (I forget why exactly.) In my experience, almost *everything* on Hackage consistently fails to build on Windows, so I think by this point I'd more or less given up even trying to make things build for me. In short, I didn't follow this one very far... At least, that's how I remember it. I guess this is where somebody digs up some thread on cafe from 3 years ago or something and proves me wrong. :-}
I would welcome bug reports and, even better, patches for this stuff. But I was pretty sure that HDBC and HDBC-ODBC in particular are working on Windows. -- John

John Goerzen wrote:
On Mon, Dec 01, 2008 at 09:59:24PM +0000, Andrew Coppin wrote:
OK, now I'm puzzled. I don't remember that! :-}
OK, I went back and looked at my Git logs and you're right. Wrong Andrew. Sorry.
LOL! S'OK...
I would welcome bug reports and, even better, patches for this stuff.
But I was pretty sure that HDBC and HDBC-ODBC in particular are working on Windows.
OK, well how about this then: In a few weeks when I upgrade to GHC 6.10.1, I'll tell you whether it builds there. ;-) For the record, which package is the "correct" one to use? Hackage seems to have a bazillion different database packages, and I have literally no idea which ones are the currently maintained ones... Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.) About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...

On 2008 Dec 2, at 14:44, Andrew Coppin wrote:
Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.) About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Many packages assume you have the msys / mingw stuff installed on Windows (if they work at all; those of us who don't develop on Windows wouldn't really know how to go about being compatible). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

Brandon S. Allbery KF8NH wrote:
On 2008 Dec 2, at 14:44, Andrew Coppin wrote:
Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.) About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Many packages assume you have the msys / mingw stuff installed on Windows (if they work at all; those of us who don't develop on Windows wouldn't really know how to go about being compatible).
According to the Cabal experts, the issue is that Windows doesn't have a "standard" place for keeping header files like the various POSIX environments typically do. That means anything that binds an external C library (i.e., almost all useful Haskell packages) don't easily work on Windows. I'm not sure what the solution to this is...

On Wed, Dec 3, 2008 at 11:53 AM, Andrew Coppin
Brandon S. Allbery KF8NH wrote:
On 2008 Dec 2, at 14:44, Andrew Coppin wrote:
Regardless, it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.) About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Many packages assume you have the msys / mingw stuff installed on Windows (if they work at all; those of us who don't develop on Windows wouldn't really know how to go about being compatible).
According to the Cabal experts, the issue is that Windows doesn't have a "standard" place for keeping header files like the various POSIX environments typically do. That means anything that binds an external C library (i.e., almost all useful Haskell packages) don't easily work on Windows. I'm not sure what the solution to this is...
Have you tried passing the --extra-include-dirs and --extra-lib-dirs arguments to 'cabal install'? On OS X, that's how I deal with the macports package manager which puts all library files under /opt/local. I've found the process pretty painless. -Judah

An even more painless way to do it is to edit the .cabal file (or just
cabal on Windows) in the cabal user directory (somwhere under the
AppData folder on windows), to have default values for
extra-include-dirs and extra-lib-dirs. Then you don't need to enter them
explicitly every time you use cabal.
/Tobias
-----Original Message-----
From: haskell-cafe-bounces@haskell.org
[mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Judah Jacobson
Sent: den 4 december 2008 01:07
To: Andrew Coppin
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] ANN: "Real World Haskell", now shipping
On Wed, Dec 3, 2008 at 11:53 AM, Andrew Coppin
Brandon S. Allbery KF8NH wrote:
On 2008 Dec 2, at 14:44, Andrew Coppin wrote:
Regardless, it has been my general experience that almost everything
obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use
Linux very often.) About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Many packages assume you have the msys / mingw stuff installed on Windows (if they work at all; those of us who don't develop on Windows wouldn't really know how to go about being compatible).
According to the Cabal experts, the issue is that Windows doesn't have
a "standard" place for keeping header files like the various POSIX environments typically do. That means anything that binds an external C library (i.e., almost all useful Haskell packages) don't easily work
on Windows. I'm not sure what the solution to this is...
Have you tried passing the --extra-include-dirs and --extra-lib-dirs arguments to 'cabal install'? On OS X, that's how I deal with the macports package manager which puts all library files under /opt/local. I've found the process pretty painless. -Judah _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Andrew Coppin
...it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.)
I try very hard to make my programs work on Windows; and indeed, one of things I appreciate about Haskell is how easy it is to create binaries and packages that are cross platform. However, the only time I actually use Windows is to build and test my Haskell packages. Most of the people on this list -- and I wager, most people on the mailing lists for any open source programming language -- are working on a NIXalike; we can work with bug reports, but we can't very well be the fabled "many eyeballs" on a platform we don't use. Ask not what your Haskell can do for you, but rather what you can do for your Haskell :)
About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Well, what else would a package built with GNU toolchain be confused about? Is there some miraculous language and package system for it where compiling libraries made with autotools is just a snap on Windows? -- _jsn

Jason Dusek wrote:
Andrew Coppin
wrote: ...it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.)
I try very hard to make my programs work on Windows; and indeed, one of things I appreciate about Haskell is how easy it is to create binaries and packages that are cross platform.
Certainly the one or two "pure Haskell" packages out there (e.g., PureMD5) seem to build without issue. The trouble is that almost all useful Haskell packages are bindings to C libraries, and that varies by platform. :-(
However, the only time I actually use Windows is to build and test my Haskell packages. Most of the people on this list -- and I wager, most people on the mailing lists for any open source programming language -- are working on a NIXalike; we can work with bug reports, but we can't very well be the fabled "many eyeballs" on a platform we don't use. Ask not what your Haskell can do for you, but rather what you can do for your Haskell :)
As I say, last time I tried this, I'd just failed to build half a dozen other interesting packages, so by the time I'd got to trying to get database access working, I was frustrated to the point of giving up. (The IRC channel is great - but only if the people you need to speak to happen to be there at the exact moment when you ask your question. Apparently I'm in a different timezone to everybody else.)
About the worst problem there was Gtk2hs being confused about some Autoconfig stuff or something...
Well, what else would a package built with GNU toolchain be confused about? Is there some miraculous language and package system for it where compiling libraries made with autotools is just a snap on Windows?
No no - I meant the worst problem _on Linux_ was Gtk2hs getting confused. (It built OK on OpenSuSE, but appears not to like Ubuntu very much.)

andrewcoppin:
Jason Dusek wrote:
Andrew Coppin
wrote: ...it has been my general experience that almost everything obtained from Hackage fails miserably to compile under Windows. (IIRC, one package even used a Bash script as part of the build process!) I haven't seen similar problems on Linux. (But I don't use Linux very often.)
I try very hard to make my programs work on Windows; and indeed, one of things I appreciate about Haskell is how easy it is to create binaries and packages that are cross platform.
Certainly the one or two "pure Haskell" packages out there (e.g., PureMD5) seem to build without issue. The trouble is that almost all useful Haskell packages are bindings to C libraries, and that varies by platform. :-(
However, the only time I actually use Windows is to build and test my Haskell packages. Most of the people on this list -- and I wager, most people on the mailing lists for any open source programming language -- are working on a NIXalike; we can work with bug reports, but we can't very well be the fabled "many eyeballs" on a platform we don't use. Ask not what your Haskell can do for you, but rather what you can do for your Haskell :)
As I say, last time I tried this, I'd just failed to build half a dozen other interesting packages, so by the time I'd got to trying to get database access working, I was frustrated to the point of giving up.
Do you mail the maintainers when there's a bulid failure? There's around 1000 packages on hackage now, and we don't have a build farm, so you can make a real difference by mailing authors when their package fails on windows. -- Don

Andrew Coppin wrote:
What I *haven't* done yet is read the chapters where they try to claim that database programming is possible in Haskell. I'll have to do that at some point. Maybe this is where they reveal the Secret Formula that makes this stuff actually work properly... but somehow I doubt it.
What a ridiculous comment. Are you hoping to provoke people into helping you by sounding more stupid than you are? Database programming is obviously possible in haskell. Many many people are doing it. The documentation may be patchy, the libraries may be hard to install (often the case with free software for databases, for some reason) but that's quite a long way from impossible. Jules
participants (17)
-
Ahn, Ki Yung
-
Andrew Coppin
-
Brandon S. Allbery KF8NH
-
Bryan O'Sullivan
-
Bulat Ziganshin
-
David Leimbach
-
david48
-
Don Stewart
-
Donnie Jones
-
Duncan Coutts
-
Gianfranco Alongi
-
Jason Dusek
-
John Goerzen
-
Judah Jacobson
-
Jules Bean
-
Nicolas Pouillard
-
Tobias Bexelius