Online Real World Haskell, problem with Sqlite3 chapters

In the online version of Real world Haskell, there's a problem with examples in ghci when the module Database.HDBC.Sqlite3 is imported. It goes on like this for all of chapter 21 and 22. Example : ( note: this is not me trying to reproduce the examples, it's an actual copy & paste from the site url http://book.realworldhaskell.org/read/using-databases.html ) ghci> :module Database.HDBC Database.HDBC.Sqlite3 Could not find module `Database.HDBC.Sqlite3': Use -v to see a list of the files searched for. ghci> conn <- connectSqlite3 "test1.db" <interactive>:1:8: Not in scope: `connectSqlite3' ghci> :type conn <interactive>:1:0: Not in scope: `conn' ghci> disconnect conn <interactive>:1:0: Not in scope: `disconnect' <interactive>:1:11: Not in scope: `conn'

See John's comment, right there in the online version: "The system that generated this webpage didn't have HDBC installed at the time. We'll get that fixed and re-post this chapter. In the meantime, unfortunately, all of the examples on this page will look that way." david48 wrote:
In the online version of Real world Haskell, there's a problem with examples in ghci when the module Database.HDBC.Sqlite3 is imported. It goes on like this for all of chapter 21 and 22.
Example : ( note: this is not me trying to reproduce the examples, it's an actual copy & paste from the site url http://book.realworldhaskell.org/read/using-databases.html )
ghci> :module Database.HDBC Database.HDBC.Sqlite3 Could not find module `Database.HDBC.Sqlite3': Use -v to see a list of the files searched for. ghci> conn <- connectSqlite3 "test1.db"
<interactive>:1:8: Not in scope: `connectSqlite3' ghci> :type conn
<interactive>:1:0: Not in scope: `conn' ghci> disconnect conn
<interactive>:1:0: Not in scope: `disconnect'
<interactive>:1:11: Not in scope: `conn' _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Dr. Janis Voigtlaender http://wwwtcs.inf.tu-dresden.de/~voigt/ mailto:voigt@tcs.inf.tu-dresden.de

Now that is "real world" - problems even before release!-) Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target? There used to be a time when one could guess the poster's Haskell book from their question topics: - 'HGL' doesn't work: Hudak's book - 'fromInt' issues: Thompson's book The problem arises because the books survive far longer than the version of the code base they refer to. The only way to reduce this friction has been to avoid fast-changing details, eg, focussing on programming, problem solving, reasoning (Hutton, Thompson, Bird), and even that isn't safe ('n+k', 'fromInt',..). Neither is keeping a separate library - 'SOEGraphics' has been revived several times, on different GUI/graphic libs, even different Haskell implementations, but has always fallen prey to bitrot again. I've only scanned RWH briefly, but it seems to be on the other end of the spectrum, focussing precisely on the details of stuff that is likely to evolve much faster than the book. Is the plan to keep someone employed over the years to keep the online version updated? Claus

On Fri, 2008-09-05 at 13:04 +0100, Claus Reinke wrote:
Now that is "real world" - problems even before release!-)
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
There used to be a time when one could guess the poster's Haskell book from their question topics:
- 'HGL' doesn't work: Hudak's book - 'fromInt' issues: Thompson's book
The problem arises because the books survive far longer than the version of the code base they refer to. The only way to reduce this friction has been to avoid fast-changing details, eg, focussing on programming, problem solving, reasoning (Hutton, Thompson, Bird), and even that isn't safe ('n+k', 'fromInt',..). Neither is keeping a separate library - 'SOEGraphics' has been revived several times, on different GUI/graphic libs, even different Haskell implementations, but has always fallen prey to bitrot again.
There are currently two independent working implementations of SOEGraphics on GUI libs that are maintained. I think it'll probably be ok. Duncan

On Fri, Sep 05, 2008 at 01:04:03PM +0100, Claus Reinke wrote:
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
There used to be a time when one could guess the poster's Haskell book from their question topics:
- 'HGL' doesn't work: Hudak's book - 'fromInt' issues: Thompson's book
The problem arises because the books survive far longer than the version of the code base they refer to. The only way to reduce this friction has been to avoid fast-changing details, eg, focussing on programming, problem solving, reasoning (Hutton, Thompson, Bird), and even that isn't safe ('n+k', 'fromInt',..).
One of the specific aims of Haskell 98 was to provide a stable base for authors. It did not include fromInt, which was an internal quirk of the Hugs implementation, and nor did any other Haskell implementation.

On Fri, Sep 05, 2008 at 01:04:03PM +0100, Claus Reinke wrote:
Now that is "real world" - problems even before release!-)
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Hope that enough copies are sold that O'Reilly lets us make a 2nd edition when things change? :-) More seriously, you do the best you can. We tried to mostly write about things that are in the libraries that ship with GHC. There are some exceptions, such as HDBC and gtk2hs. But these things happen in any language, and you publish errata, or a new edition. We've already been bitten by this, and we're not even in production yet. The regex library included with GHC 6.8.3 can be used in a [String] context, but the newer regex library on Hackage (which is shipped by Debian) can't. Doh.
I've only scanned RWH briefly, but it seems to be on the other end of the spectrum, focussing precisely on the details of stuff that is likely to evolve much faster than the book. Is the plan to keep someone employed over the years to keep the online version updated?
We haven't specifically discussed that, but in general, doing a book is a *lot* of work, and I suspect all three of us will be wanting to take a break from book-writing or -maintaining activities for a bit after O'Reilly starts cutting down trees on our behalf. That said, we're still maintaining all the infrastructure for the project, so we could go and update things at any time. -- John

On Fri, Sep 5, 2008 at 5:04 AM, Claus Reinke
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent editions. If readers find that specific pieces of information have bitrotted, I'm sure we'll hear about it. In that case, we'll create a wiki page with errata, and link to it from the book site.

Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent editions. If readers find that specific pieces of information have bitrotted, I'm sure we'll hear about it. In that case, we'll create a wiki page with errata, and link to it from the book site.
Just saying, it is worth planning for, especially if the book is going to be successful. I understand if creating that book at breakneck speed has left you looking forward to a break (not of the neck;-), but laying out a strategy for this, and putting it in the preface, might avoid sorrows later. You do have the online version and commenting system in place which you could keep around, you could even keep copies of the precise code versions you use, although adapting the text is more appropriate for this style of book. Thompson and Hudak both have had home pages for their books, but that didn't prevent their readers coming to the mailing lists instead, often frustrated at the beginning of their threads, sometimes disappointed at the end (in spite of a succession of strong Haskell hackers reviving SOE support again and again, there were gaps in between). And your book looks like it is going to suffer more, being completed before, but published after several changes (more base breakup, last time that extralibs come with ghc, haskell platform, extensible exceptions, ..) as well as being detailed and concrete about the use of several real-world libraries/tools subject to normal evolution. Anyway, good luck!-) Claus

On Fri, 2008-09-05 at 20:55 +0100, Claus Reinke wrote:
Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent editions. If readers find that specific pieces of information have bitrotted, I'm sure we'll hear about it. In that case, we'll create a wiki page with errata, and link to it from the book site.
Just saying, it is worth planning for, especially if the book is going to be successful. I understand if creating that book at breakneck speed has left you looking forward to a break (not of the neck;-), but laying out a strategy for this, and putting it in the preface, might avoid sorrows later. You do have the online version and commenting system in place which you could keep around, you could even keep copies of the precise code versions you use, although adapting the text is more appropriate for this style of book.
To make what (I believe) Claus is saying more explicit and direct, add a note to the beginning of the book (or somewhere reasonably prominent) that states something along the lines: "As time progresses parts of this book are going to become out-of-date, in particular code examples will. See <url> for errata or read the comments for that section on the online version of the book for details resolving these issues. Alternatively, send an email to <rwhmailinglistaddress>." I would recommend having a mailing list or some such as then you can potentially leverage the community to resolve such issues leading to less pressure on you three and likely faster responses.

On Fri, Sep 5, 2008 at 7:50 PM, Derek Elkins
To make what (I believe) Claus is saying more explicit and direct, add a note to the beginning of the book (or somewhere reasonably prominent) that states something along the lines [...]
We will add a link to an errata site in the final version. Thanks for the suggestion; it's an obvious thing to do in retrospect.

On 2008 Sep 5, at 12:45, Bryan O'Sullivan wrote:
On Fri, Sep 5, 2008 at 5:04 AM, Claus Reinke
wrote: Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent editions. If readers find that
Errata pages are common; as authors become more aware of the Internet, they often put updates in the same place. -- 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

allbery:
On 2008 Sep 5, at 12:45, Bryan O'Sullivan wrote:
On Fri, Sep 5, 2008 at 5:04 AM, Claus Reinke
wrote: Seriously, though, what is the RWH authors' plan for tackling the eternal frustration of Haskell book authors, a moving target?
Other tech books face the same problem, which, if they sell successfully and the authors haven't moved into caves afterwards to recover, they address with subsequent editions. If readers find that
Errata pages are common; as authors become more aware of the Internet, they often put updates in the same place.
And our book is online already, and accepts comments :-) -- Don

"Bryan" == Bryan O'Sullivan
writes:
Bryan> Other tech books face the same problem, which, if they sell Bryan> successfully and the authors haven't moved into caves afterwards Bryan> to recover, they address with subsequent editions. If readers Bryan> find that specific pieces of information have bitrotted, I'm sure Bryan> we'll hear about it. In that case, we'll create a wiki page with Bryan> errata, and link to it from the book site. I think we should be happy that RWH book is done and considering it is for 'real-world' users I'm sure they will find a way to cope for upgrading libs, non-working packages etc. "A blind uncle is better than no uncle" :-D Congrats to RWH's 'Gang od Three' ;) Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D ----------------------------------------------------------------

On Fri, Sep 5, 2008 at 1:05 PM, Janis Voigtlaender
See John's comment, right there in the online version:
"The system that generated this webpage didn't have HDBC installed at the time. We'll get that fixed and re-post this chapter. In the meantime, unfortunately, all of the examples on this page will look that way."
Oops. Though, by the time I wrote the message, I didn't have access to the comments. I see now it's corrected. Kudos to the authors for an excellent book ! David.
participants (11)
-
Brandon S. Allbery KF8NH
-
Bryan O'Sullivan
-
Claus Reinke
-
david48
-
Derek Elkins
-
Don Stewart
-
Duncan Coutts
-
Gour
-
Janis Voigtlaender
-
John Goerzen
-
Ross Paterson