I’m giving up!
Here is what happened:
- I concluded that HaskellDB is, in fact, dead, or so barely alive that it won’t be working well enough for my purposes any time soon.
- So I looked at Takusen, another high level DB library, instead. However, it doesn’t seem to have a backend that will cope with MySQL.
- So I gave up on high level libraries, and investigated just using HSQL and HDBC. HDBC requires ODBC for accessing MySQL, which isn’t ideal, and ODBC requires machine level configuration of connections, AFAIK, which I can’t do on my budget host. So I tried HSQL instead, which I already had got to work.
- I got as far as cobbling together a binary that would do some database stuff and return a web page with the result, printing any exceptions if they occurred. It worked completely on my local box, but when I built it with the static flags, I got a bunch of ominous warnings (e.g. “warning: Using ‘gethostbyname_r’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking”). Sure enough, when I uploaded it to my host, I couldn’t get anything out of it. My budget host couldn’t actually show me the real error message or error logs, so I’m just going to presume I’ve been scuppered by the linking problem.
But although this project has been killed by a logistical problem, I’m actually fairly glad. I wasn’t enjoying it much, mainly because half the libraries are in such a poor state. Once you know how to use them, they are great, but documentation is very patchy, and the project pages are all neglected. The best was HDBC, because at least that had a Wiki which encourages additions. Still, the only documentation it had was API documentation (really not good for getting started with, and it is usually really patchy anyway), and links to some programs that use the library.
I guess I’ve been spoilt by Django — picking it up was rewarding and fun from the beginning. Since I was doing this Haskell project just for fun, the fun-killers were project-killers. I think this is a problem in general with Haskell — until you get a critical mass of developers who have worked on these things and are still working on them, writing tutorials, hanging out on IRC for the sake of the newbies etc, things are just not going to take off. And the problem is that none of these things are particularly fun either, especially if you are an expert Haskell coder — I imagine it is much more satisfying to be off writing Soduko solvers in Haskell’s type system than getting hs-plugins to work with GHC 6.6 on Linux, or whatever.
Well, that concludes this little project. I didn’t succeed, and unfortunately I didn’t have much fun either. The former was caused by the latter.