CouchDB module in Yhc source tree: clarification, and small problems with other packages

Hi, Don asked:
Are we likely to see the couchdb bindings released as a standalone library for the wider community?
Let me explain a little bit why the CouchDB module appears in the Yhc repo. As the next stage of the Yhc/Javascript project, I am trying to set up a web service where people might upload some Haskell code (or reference to such code, these details haven't been clarified yet), and get it compiled by background Yhc/ycr2js batch job, returning a HTML page with Javascript in response. CouchDB was picked* as intermediate storage for this project. Therefore an interface module was needed, so I wrote one. This module, `Database.CouchDB' is not 100% finished; it was coded up to satisfy the needs of the first utility I wrote, `cdbup' which is currently capable of uploading a text (utf-8 expected) or a binary file as a document attachment to CouchDB. So some functionality hasn't been coded yet, although it will definitely be, as the project develops. Regarding packaging, I hope I will eventually put it on Hackage, but there are some problems with another packages which I'll try to explain here, so maybe those packages' developers suggest something. 1. Text.JSON. This module was picked from Jun Mukai's haskellnet package (http://darcs.haskell.org/SoC/haskellnet/). One problem with this package, it needs too many dependencies (while JSON module relies only on Packrat parser). I had to extract the JSON module into Yhc tree; can the haskellnet package be split somehow into orthogonal sub-packages, and maybe one toplevel package which would pull all parts together if used? 2. Text.JSON again. I had to change the pNumber function (parser for numeric nodes) replacing the '1'..'9' digits range with '0' .. '9'. Otherwise it did not handle JSON-encoded numbers equal to zero. I am not sure I was 100% right, so perhaps some JSON experts here might correct me. 3. Packrat parser does not seem to be packaged anywhere else, does it? 4. The dataenc package (http://code.haskell.org/dataenc/devo/) from which I pulled the Codec.Binary.Base64 module. The package may need some adjustment to GHC 6.8.x packages structure as only "base" listed in build-depends does not seem to be enough: when building it, Cabal complains for hidden packages such as collections (which I had to add manually to the cabal file), etc. Is it some problem with my GHC setup, or does just the dataenc.cabal need to be updated? So, in order to get things done quicker, I pulled the said pieces from their packages into Yhc tree. For packaging the CouchDB interface, definitely these duplicates need to be removed. Other packages that CouchDB relies upon, are**: base, network, HTTP, filepath, base64-string, utf8-string Thanks for the interest in CouchDB interface, and feel free to ask any questions. --- * before support form IBM/Apache was announced, but this recent development definitely increases interest to CouchDB ** Just from the -package options I used to compile it; I may have something omitted here. -- Dimitry Golubovsky Anywhere on the Web

Sorry for not responding earlier but I didn't pay attention to this
thread at the time. The reason for finding it now is that I listened
to the FLOSS Weekly's episode on CouchDB yesterday; I stumbled on this
email from a search for haskell+couchdb.
On Sat, Jan 5, 2008 at 4:14 PM, Dimitry Golubovsky
4. The dataenc package (http://code.haskell.org/dataenc/devo/) from which I pulled the Codec.Binary.Base64 module. The package may need some adjustment to GHC 6.8.x packages structure as only "base" listed in build-depends does not seem to be enough: when building it, Cabal complains for hidden packages such as collections (which I had to add manually to the cabal file), etc. Is it some problem with my GHC setup, or does just the dataenc.cabal need to be updated?
As the author of dataenc I'm interested in fixing any problems you see with it. Maybe you could offer some more information: 1. Is this still a problem? (I'm using GHC 6.8.2 and I'm having no such problems at the moment.) 2. What can I do to make sure that I get contacted if similar issues come up in the future? (Currently bugs can only be reported by contacting me directly, preferably via email. Since you didn't I suspect I haven't communicated that clearly enough though.) /M

magnus:
Sorry for not responding earlier but I didn't pay attention to this thread at the time. The reason for finding it now is that I listened to the FLOSS Weekly's episode on CouchDB yesterday; I stumbled on this email from a search for haskell+couchdb.
On Sat, Jan 5, 2008 at 4:14 PM, Dimitry Golubovsky
wrote: 4. The dataenc package (http://code.haskell.org/dataenc/devo/) from which I pulled the Codec.Binary.Base64 module. The package may need some adjustment to GHC 6.8.x packages structure as only "base" listed in build-depends does not seem to be enough: when building it, Cabal complains for hidden packages such as collections (which I had to add manually to the cabal file), etc. Is it some problem with my GHC setup, or does just the dataenc.cabal need to be updated?
As the author of dataenc I'm interested in fixing any problems you see with it. Maybe you could offer some more information:
1. Is this still a problem? (I'm using GHC 6.8.2 and I'm having no such problems at the moment.) 2. What can I do to make sure that I get contacted if similar issues come up in the future? (Currently bugs can only be reported by contacting me directly, preferably via email. Since you didn't I suspect I haven't communicated that clearly enough though.)
I think the best result here would be to put a CouchDB binding on hackage. Is anyone in a position to do this? -- Don

Don & All,
On 8/21/08, Don Stewart
I think the best result here would be to put a CouchDB binding on hackage.
Is anyone in a position to do this?
As for myself, honestly, I did not plan to do this at this time as I am busy with other stuff (Yhc Core conversion). I'd be glad to help anyone who is willing to put CouchDB interface on Hackage. I'd like to note though that this may be a bit premature at the moment. CouchDB has been going through significant redevelopment within Apache Incubator (I am not a developer, but just watch silently), and what is available within the Yhc source tree may not work properly with the current CouchDB: it was for 0.7.x while they have 0.8.x in the incubator. So I would wait for "graduation" of CouchDB from the incubator, or at least checked with its core developers regarding API stability. Besides, the CouchDB interface in question was written only to satisfy the needs of the Yhc Web Service and may be missing some pieces, although it may be good for a starting point. Thank you. -- Dimitry Golubovsky Anywhere on the Web

Actually few days ago I run into CouchDB and started to prototype a binding using JSON and Curl from hackage. Once the base functionality is supported, I could post it for review. Adam On Aug 21, 2008, at 11:29 AM, Dimitry Golubovsky wrote:
Don & All,
On 8/21/08, Don Stewart
wrote: I think the best result here would be to put a CouchDB binding on hackage.
Is anyone in a position to do this?
As for myself, honestly, I did not plan to do this at this time as I am busy with other stuff (Yhc Core conversion). I'd be glad to help anyone who is willing to put CouchDB interface on Hackage.
I'd like to note though that this may be a bit premature at the moment. CouchDB has been going through significant redevelopment within Apache Incubator (I am not a developer, but just watch silently), and what is available within the Yhc source tree may not work properly with the current CouchDB: it was for 0.7.x while they have 0.8.x in the incubator.
So I would wait for "graduation" of CouchDB from the incubator, or at least checked with its core developers regarding API stability.
Besides, the CouchDB interface in question was written only to satisfy the needs of the Yhc Web Service and may be missing some pieces, although it may be good for a starting point.
Thank you.
-- Dimitry Golubovsky
Anywhere on the Web _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 8/21/08, Don Stewart
wrote: I think the best result here would be to put a CouchDB binding on hackage.
Is anyone in a position to do this?
As for myself, honestly, I did not plan to do this at this time as I am busy with other stuff (Yhc Core conversion). I'd be glad to help anyone who is willing to put CouchDB interface on Hackage.
I'm using CouchDB for a little HAppS-based web service. I'll put it on Hackage in about a week--once I'm done with the the web service. For the moment the code is here and is cabalized. http://github.com/arjunguha/haskell-couchdb/tree/master Feedback welcome. Arjun
participants (5)
-
Adam Smyczek
-
Arjun Guha
-
Dimitry Golubovsky
-
Don Stewart
-
Magnus Therning