[darcs-users] should darcs use the curl binding on hackage?

Dmitry Kurochkin dmitry.kurochkin at gmail.com
Tue Mar 17 21:16:09 UTC 2009


Hi Sigbjorn.

On Tue, Mar 17, 2009 at 9:17 PM, Sigbjorn Finne
<sigbjorn.finne at gmail.com> wrote:
> Thanks Dmitry and Eric,
>
> it would be an honour to be able to support darcs via this binding.
> Knowing that having 'multi' is a requirement for you is useful
> feedback; it was left out because there wasn't an initial pull for it.
> Now there is :)

Great to hear!

I have looked in haskell curl sources and it seems I was too
pessimistic :) I would like to work on haskell curl bindings for multi
API but unfortunately free time is very limited at present...

Note that darcs does not require full multi curl API, just basic
"select" part of it. Socket API (IIRC that is how it is called) is not
used.

BTW I have noticed that string options passed to libcurl are saved and
not freed until the handle is destroyed. But libcurl documentation
says strings are copied and can be freed after setopt returns.

Regards,
  Dmitry

>
> I'll take care of the other details referred to below.
>
> --sigbjorn
>
> Dmitry Kurochkin wrote:
>>
>> 2009/3/16 Eric Kow <kowey at darcs.net>:
>>
>>>
>>> I'm CC'ing Sigbjorn (the current maintainer of the curl package on
>>> hackage) in
>>> case he has any comments on the matter.
>>>
>>> Sigbjorn: darcs currently uses its own binding on libcurl.  We're quite
>>> interested in paring darcs down as much as possible, outsourcing anything
>>> that
>>> doesn't need to be done in-house.  We might be interested in using the
>>> curl
>>> binding.  Do you think it would be straightforward to address concerns
>>> below?
>>>
>>> Many thanks!
>>>
>>> On Mon, Mar 16, 2009 at 10:09:12 +1100, Trent W. Buck wrote:
>>>
>>>>
>>>> While we're on the subject, has anyone evaluated using external
>>>> haskell/curl bindings?
>>>>
>>>> $ cabal list curl
>>>> * curl
>>>>    Synopsis: Haskell binding to libcurl
>>>>    Latest version available: 1.3.4
>>>>    Latest version installed: [ Not installed ]
>>>>    License:  BSD3
>>>>
>>>
>>> I think Dmitry has pointed out that the current bindings do not support
>>> HTTP pipelining.
>>>
>>
>> AFAIK haskell curl bindings support only easy libcurl API. Easy API
>> was used by darcs before pipelining support. To use pipelining we need
>> multi curl API support. IMHO it is much more work to provide bindings
>> to curl multi API.
>>
>> Regards,
>>  Dmitry
>>
>>
>>>
>>> Also for his work on camp, Ian is avoiding it because of the following
>>> concerns he has about it
>>>
>>>  * Hardcoded constants
>>>  * Explicit global withCurlDo, but individual instances get finalisers
>>> which
>>>  thus may not run before global cleanup?
>>>  * -fvia-C in options pragmas, including generating warnings from the
>>> mangler
>>>
>>> Thanks!
>>>
>>> --
>>> Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
>>> PGP Key ID: 08AC04F9
>>>
>>>
>
>


More information about the darcs-users mailing list