www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Simple HTTP support

reply Jonas Drewsen <jdrewsen nospam.com> writes:
Hi,

    My first post here so I don't know if this is the right place.

    I like how phobos is coming along but really miss a HTTP client and 
I think it should be a part of the standard library.

Is anyone working on this currently?

Any thoughts/heads-up if I decide to go ahead an implement it myself 
e.g. regarding ranges and other stuff?

Is it at all possible to get such thing accepted in phobos if someone 
implemented it (and the quality is good enough)?

Thanks
Jonas
Feb 25 2011
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet. 2. An API design that is safe (libcurl uses void* and unsafe idioms all over the API) based on libcurl and integrates well with the rest of Phobos. This would ideally be discussed prior to implementation and will need to go through a review. If you do 1, it would be an awesome good step forward. Andrei
Feb 25 2011
next sibling parent reply Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

Libcurl declarations could be a way forward. As far as I can see from the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos? Optional dependencies: *1 = requires OpenSSL, GnuTLS, NSS, yassl, axTLS or PolarSSL *2 = requires OpenLDAP *3 = requires a GSSAPI-compliant library, such as Heimdal or similar. *4 = requires FBopenssl *5 = requires a krb4 library, such as the MIT one or similar. *6 = requires c-ares *7 = requires OpenSSL or NSS, as GnuTLS only supports SSLv3 and TLSv1 *8 = requires libssh2 *9 = requires OpenSSL, GnuTLS, NSS or yassl
 2. An API design that is safe (libcurl uses void* and unsafe idioms all
 over the API) based on libcurl and integrates well with the rest of
 Phobos. This would ideally be discussed prior to implementation and will
 need to go through a review.

Do you see this as being based on 1?
 If you do 1, it would be an awesome good step forward.

I'll have to see how hard it would be :) /Jonas
Feb 25 2011
next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/25/11 10:36 AM, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 1. A declarations module for libcurl. We'd put that in etc. You wouldn't
 even need to go through the review process, the need and the benefits
 are obvious. Nobody has had a chance to do that yet.

Libcurl declarations could be a way forward. As far as I can see from the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos?

At this point this is open to discussion - in this very group. Perhaps the nicest way would be to automatically adapt to whatever is installed on the user's platform. Andrei
Feb 25 2011
parent Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 20.26, Andrei Alexandrescu wrote:
 On 2/25/11 10:36 AM, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 1. A declarations module for libcurl. We'd put that in etc. You wouldn't
 even need to go through the review process, the need and the benefits
 are obvious. Nobody has had a chance to do that yet.

Libcurl declarations could be a way forward. As far as I can see from the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos?

At this point this is open to discussion - in this very group. Perhaps the nicest way would be to automatically adapt to whatever is installed on the user's platform.

Adapt at compile time or at run time (e.g. using dlopen() calls)? /Jonas
Feb 26 2011
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2011-02-25 17:36, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:

the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos? /Jonas

Tango uses zlib and OpenSSL. I you want to use the modules that uses those libraries you just have to link to them. If you don't use them you don't have to do anything. Of curse, this is as long as Phobos is static library. When I think about it maybe Tango dynamically links to OpenSSL and statically to zlib. -- /Jacob Carlborg
Feb 25 2011
parent reply Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 21.11, Jacob Carlborg wrote:
 On 2011-02-25 17:36, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:

the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos? /Jonas

Tango uses zlib and OpenSSL. I you want to use the modules that uses those libraries you just have to link to them. If you don't use them you don't have to do anything. Of curse, this is as long as Phobos is static library. When I think about it maybe Tango dynamically links to OpenSSL and statically to zlib.

I'll give the tango version a look. thanks /Jonas
Feb 26 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-02-26 23:18, Jonas Drewsen wrote:
 On 25/02/11 21.11, Jacob Carlborg wrote:
 On 2011-02-25 17:36, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:

the phobos makefiles there really isn't any dependencies on anything other than standard system libraries and zlib. In order to support the full curl API the following libs are listed as optional dependencies. I guess it would not be a good idea to include the source for all these like it is done with zlib in etc. So how should this be handled? Should all optional deps just be opted out? Alternatively they could be statically linked in the binary distribution of phobos? /Jonas

Tango uses zlib and OpenSSL. I you want to use the modules that uses those libraries you just have to link to them. If you don't use them you don't have to do anything. Of curse, this is as long as Phobos is static library. When I think about it maybe Tango dynamically links to OpenSSL and statically to zlib.

I'll give the tango version a look. thanks /Jonas

I you want to contribute to Phobos do NOT look at the Tango sources. The Phobos developers don't like it. -- /Jacob Carlborg
Feb 27 2011
parent reply Jonas Drewsen <jdrewsen nospam.com> writes:
On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas
Feb 27 2011
next sibling parent Daniel Gibson <metalcaedes gmail.com> writes:
Am 27.02.2011 15:50, schrieb Jonas Drewsen:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

There has been an incident where somebody, who was familiar with the corresponding Tango API, wrote a module for Phobos. Tango devs claimed he copied code and thus his code couldn't be included in Phobos. Part of the problem is that Tango's license (BSD-style) is less permissive than Phobos' boost-license, so code from Tango can't be reused in Phobos. Cheers, - Daniel
Feb 27 2011
prev sibling next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis
Feb 27 2011
parent reply Jacob Carlborg <doob me.com> writes:
On 2011-02-28 01:30, Jonathan M Davis wrote:
 On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis

I can't find that post by Andrei, neither in my newsgroup reader application or the web interface. Has someone removed that post? I don't understand what all the noise is about. I just tried to warn him BEFORE he starts looking at the Tango sources. Then starts implementing code that could be interpreted as based on the Tango source and hoping to contribute that to Phobos. The Tango developers aren't happy about including Tango source code into Phobos. Because of that, Phobos developers don't want you to look at Tango code and then contributing similar code to Phobos, correct me if I'm wrong. Actually I don't care if it's the Tango or Phobos developers that don't like it. -- /Jacob Carlborg
Feb 28 2011
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2011-02-28 12:21, Jonathan M Davis wrote:
 On Monday 28 February 2011 01:59:41 Jacob Carlborg wrote:
 On 2011-02-28 01:30, Jonathan M Davis wrote:
 On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources.
 The Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis

I can't find that post by Andrei, neither in my newsgroup reader application or the web interface. Has someone removed that post? I don't understand what all the noise is about. I just tried to warn him BEFORE he starts looking at the Tango sources. Then starts implementing code that could be interpreted as based on the Tango source and hoping to contribute that to Phobos. The Tango developers aren't happy about including Tango source code into Phobos. Because of that, Phobos developers don't want you to look at Tango code and then contributing similar code to Phobos, correct me if I'm wrong. Actually I don't care if it's the Tango or Phobos developers that don't like it.

I believe that Andrei was displeased with you saying that the Tango developers "don't like it," since that's not necessarily true. The fact that you were pointing out that anyone looking to submit code to Phobos shouldn't be looking at Tango's API or source code is just fine. As I understand it, essentially what happened before was that a single Tango developer expressed concern that someone might think that there was license infringement on SHOO's part in what he did with the time code that he was working on, because he had seen Tango's API (and possibly code) previously (and his API might have been similar - I'm not sure). The Tango developers were never up in arms about it or getting mad at us or anything of the sort. _One_ developer expressed concern about someone thinking that infringement occurred. That's all. However, it got blown out of proportion by the folks on this newsgroup with them getting mad at the Tango developers. Andrei (and others) are sick of this coming up again and again - particularly when it frequently turns into an anti-Tango or anti-Tango developer debate. As I understand it, it _is_ true that there are Tango developers who don't want their code in Phobos, but I don't believe that they've ever been nasty about it as some of the posters here have thought. Tango _does_ have a different license than Phobos, and the Tango developers have every right to share their code or not. So, you can't copy code from there unless you wrote it in the first place, or if you get permission to do so from the developers who wrote it (which isn't necessarily easy). The decision was made that there was no need to look at Tango or copy its code or API and that we didn't want even the possibility of conflict between the two communities if it could be reasonably avoided. So, for the most part, Phobos developers just don't look at the Tango API or code, and we don't want folks who are looking to submit code to Phobos to be looking at Tango's API or code. It's just simpler that we. We have nothing against the Tango developers or what they're doing. As I understand it, they've written some great code, and as far as I'm concerned, all the more power to them. But we don't want to risk any conflict or misunderstandings between the two communities, so those developing Phobos code avoid Tango. Really, I don't think that there was all that much wrong with what you said (it's not like you were explicitly trying to give misinformation), but there are those (Andrei included) who are very sensitive to and/or sick of this issue and don't want it blowing up again. So, Andrei took offense to how your response was worded. - Jonathan M Davis P.S. Everyone, please do _not_ say anything in this thread about the whole Tango licensing issue unless you have something truly constructive to say. We do _not_ need further debate, arguments, or flaming on this topic (and I'm not specifically singling anyone out when I say that; we just want to avoid any more problems about this topic). And in the future, while we _should_ point out to anyone that asks (or that obviously needs to be told) that those developing for Phobos shouldn't be looking at Tango's API or code because of the difference in licenses between Tango and Phobos, we should _not_ be going into whatever issues have or haven't occurred with the Tango team or this newsgroup in the past. This is a sensitive topic which has created too much flaming and discontent around here in the past. We don't copy Tango code, because it has a different license, not because of any problems with the Tango developers.

I agree, but when someone says "You shouldn't look at Tango code if you want to contribute to Phobos code" then someone else will ask "why?". Should we just respond "incompatible licenses" and leave it like that? I have no problem with that. -- /Jacob Carlborg
Feb 28 2011
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/28/11 3:59 AM, Jacob Carlborg wrote:
 On 2011-02-28 01:30, Jonathan M Davis wrote:
 On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango
 sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis

I can't find that post by Andrei, neither in my newsgroup reader application or the web interface. Has someone removed that post?

I have removed it shortly after posting because I realized it would have (in fact now it has since it's been quoted) added more to the discussion it was trying to avoid.
 I don't understand what all the noise is about. I just tried to warn him
 BEFORE he starts looking at the Tango sources. Then starts implementing
 code that could be interpreted as based on the Tango source and hoping
 to contribute that to Phobos.

 The Tango developers aren't happy about including Tango source code into
 Phobos. Because of that, Phobos developers don't want you to look at
 Tango code and then contributing similar code to Phobos, correct me if
 I'm wrong.

 Actually I don't care if it's the Tango or Phobos developers that don't
 like it.

The noise is about the fact that the initial post makes a gross misrepresentation of the situation. It can be interpreted two ways: the final "it" means "looking at Tango's sources", or the final "it" means "Tango". Either way, it squarely spreads disinformation. Andrei
Feb 28 2011
parent Jacob Carlborg <doob me.com> writes:
On 2011-02-28 14:55, Andrei Alexandrescu wrote:
 On 2/28/11 3:59 AM, Jacob Carlborg wrote:
 On 2011-02-28 01:30, Jonathan M Davis wrote:
 On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango
 sources. The
 Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis

I can't find that post by Andrei, neither in my newsgroup reader application or the web interface. Has someone removed that post?

I have removed it shortly after posting because I realized it would have (in fact now it has since it's been quoted) added more to the discussion it was trying to avoid.

Ok, thanks for the clarification.
 I don't understand what all the noise is about. I just tried to warn him
 BEFORE he starts looking at the Tango sources. Then starts implementing
 code that could be interpreted as based on the Tango source and hoping
 to contribute that to Phobos.

 The Tango developers aren't happy about including Tango source code into
 Phobos. Because of that, Phobos developers don't want you to look at
 Tango code and then contributing similar code to Phobos, correct me if
 I'm wrong.

 Actually I don't care if it's the Tango or Phobos developers that don't
 like it.

The noise is about the fact that the initial post makes a gross misrepresentation of the situation. It can be interpreted two ways: the final "it" means "looking at Tango's sources", or the final "it" means "Tango". Either way, it squarely spreads disinformation. Andrei

What I meant by the last sentence was: The Phobos developer does not like that one look at the Tango source code and then contributes similar code to Phobos. If that is incorrect then please tell so and I'm sorry if I spread any disinformation. I guess we should end this discussion. -- /Jacob Carlborg
Feb 28 2011
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2011-02-28 14:08, Steven Schveighoffer wrote:
 On Mon, 28 Feb 2011 04:59:41 -0500, Jacob Carlborg <doob me.com> wrote:

 I can't find that post by Andrei, neither in my newsgroup reader
 application or the web interface. Has someone removed that post?

One is allowed to cancel one's posts (some newsreaders support this feature, for example in Opera, you go to your sent items, and right click on a sent message and there is a "Cancel Post" option). Jonathan's newsreader must have downloaded the message before Andrei retracted it. If my newsreader is running (which it was) when a canceled post goes through, I get a header, but no message, because the message is not downloaded until I click on it (which is what I got for this post). Not joining the discussion, but I just wanted to clarify to avoid any thoughts of conspiracy ;) -Steve

Ok, thanks. -- /Jacob Carlborg
Feb 28 2011
prev sibling next sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Mon, 28 Feb 2011 04:59:41 -0500, Jacob Carlborg <doob me.com> wrote:

 I can't find that post by Andrei, neither in my newsgroup reader  
 application or the web interface. Has someone removed that post?

One is allowed to cancel one's posts (some newsreaders support this feature, for example in Opera, you go to your sent items, and right click on a sent message and there is a "Cancel Post" option). Jonathan's newsreader must have downloaded the message before Andrei retracted it. If my newsreader is running (which it was) when a canceled post goes through, I get a header, but no message, because the message is not downloaded until I click on it (which is what I got for this post). Not joining the discussion, but I just wanted to clarify to avoid any thoughts of conspiracy ;) -Steve
Feb 28 2011
prev sibling parent "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Mon, 28 Feb 2011 11:02:40 -0500, Jacob Carlborg <doob me.com> wrote:


 What I meant by the last sentence was:

 The Phobos developer does not like that one look at the Tango source  
 code and then contributes similar code to Phobos.

 If that is incorrect then please tell so and I'm sorry if I spread any  
 disinformation. I guess we should end this discussion.

That is incorrect. Phobos will accept code from anyone as long as the code's author(s) are properly attributed and the license is Boost 1.0 or compatible. Potentially, Tango code could be included in phobos with proper attribution if the respected authors re-released the code under a compatible license. -Steve
Feb 28 2011
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/25/11 1:16 PM, Johannes Pfau wrote:
 Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

I remember there was some discussion about that some time ago. Graham Fawcett has a declarations module here: https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d . It's not complete (only wraps the simple curl api), but it's a start. I think he was even willing to contribute it to phobos, but I'm not sure.

Graham?
 I've been working on a webclient like api now and then, but I haven't
 got the time right now to continue it and the code currently is a mess.
 The biggest problem I faced is curls 'push interface', you receive all
 data in a callback. Webclients in other languages offer a 'pull' /
 stream like api and i couldn't find a good way to support that with
 curl.

You can do both with curl IIRC, it's a bit more work - you need is do the work in a separate hidden thread and use synchronization or message passing with client's thread. Andrei
Feb 25 2011
parent reply Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 20.31, Andrei Alexandrescu wrote:
 On 2/25/11 1:16 PM, Johannes Pfau wrote:
 Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

I remember there was some discussion about that some time ago. Graham Fawcett has a declarations module here: https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d . It's not complete (only wraps the simple curl api), but it's a start. I think he was even willing to contribute it to phobos, but I'm not sure.

Graham?

I've contacted him via github and asked it he is willing contribute it to phobos. It probably needs to be finished and polished but I think it is a good start.
 I've been working on a webclient like api now and then, but I haven't
 got the time right now to continue it and the code currently is a mess.
 The biggest problem I faced is curls 'push interface', you receive all
 data in a callback. Webclients in other languages offer a 'pull' /
 stream like api and i couldn't find a good way to support that with
 curl.

You can do both with curl IIRC, it's a bit more work - you need is do the work in a separate hidden thread and use synchronization or message passing with client's thread.

It would also be nice with a async support using futures/deferreds. In most cases I think it is easier to debug single threaded async IO than using threads. /Jonas
Feb 26 2011
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 2/28/11 9:59 AM, Graham Fawcett wrote:
 Hi folks,

 On Sat, 26 Feb 2011 23:42:33 +0100, Jonas Drewsen wrote:

 On 25/02/11 20.31, Andrei Alexandrescu wrote:
 On 2/25/11 1:16 PM, Johannes Pfau wrote:
 I remember there was some discussion about that some time ago. Graham
 Fawcett has a declarations module here:
 https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d
 . It's not complete (only wraps the simple curl api), but it's a
 start. I think he was even willing to contribute it to phobos, but I'm
 not sure.

Graham?

I've contacted him via github and asked it he is willing contribute it to phobos. It probably needs to be finished and polished but I think it is a good start.

Yes, Jonas contacted me, and I'm very happy to contribute it. I've just added a Boost 1.0 license, and Jonas is going to take it from there. Sorry for missing this, I haven't had much time for the D list lately. :P Best, Graham

Thanks, Graham! Andrei
Feb 28 2011
prev sibling parent Jonas Drewsen <jdrewsen nospam.com> writes:
On 28/02/11 16.59, Graham Fawcett wrote:
 Hi folks,

 On Sat, 26 Feb 2011 23:42:33 +0100, Jonas Drewsen wrote:

 On 25/02/11 20.31, Andrei Alexandrescu wrote:
 On 2/25/11 1:16 PM, Johannes Pfau wrote:
 Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and
 I think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if
 someone implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

I remember there was some discussion about that some time ago. Graham Fawcett has a declarations module here: https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d . It's not complete (only wraps the simple curl api), but it's a start. I think he was even willing to contribute it to phobos, but I'm not sure.

Graham?

I've contacted him via github and asked it he is willing contribute it to phobos. It probably needs to be finished and polished but I think it is a good start.

Yes, Jonas contacted me, and I'm very happy to contribute it. I've just added a Boost 1.0 license, and Jonas is going to take it from there. Sorry for missing this, I haven't had much time for the D list lately. :P Best, Graham

Thank you Graham.
Feb 28 2011
prev sibling next sibling parent Graham Fawcett <fawcett uwindsor.ca> writes:
Hi folks,

On Sat, 26 Feb 2011 23:42:33 +0100, Jonas Drewsen wrote:

 On 25/02/11 20.31, Andrei Alexandrescu wrote:
 On 2/25/11 1:16 PM, Johannes Pfau wrote:
 Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and
 I think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if
 someone implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

I remember there was some discussion about that some time ago. Graham Fawcett has a declarations module here: https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d . It's not complete (only wraps the simple curl api), but it's a start. I think he was even willing to contribute it to phobos, but I'm not sure.

Graham?

I've contacted him via github and asked it he is willing contribute it to phobos. It probably needs to be finished and polished but I think it is a good start.

Yes, Jonas contacted me, and I'm very happy to contribute it. I've just added a Boost 1.0 license, and Jonas is going to take it from there. Sorry for missing this, I haven't had much time for the D list lately. :P Best, Graham
 
 I've been working on a webclient like api now and then, but I haven't
 got the time right now to continue it and the code currently is a
 mess. The biggest problem I faced is curls 'push interface', you
 receive all data in a callback. Webclients in other languages offer a
 'pull' / stream like api and i couldn't find a good way to support
 that with curl.

You can do both with curl IIRC, it's a bit more work - you need is do the work in a separate hidden thread and use synchronization or message passing with client's thread.

It would also be nice with a async support using futures/deferreds. In most cases I think it is easier to debug single threaded async IO than using threads. /Jonas

Feb 28 2011
prev sibling parent reply Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet. 2. An API design that is safe (libcurl uses void* and unsafe idioms all over the API) based on libcurl and integrates well with the rest of Phobos. This would ideally be discussed prior to implementation and will need to go through a review. If you do 1, it would be an awesome good step forward.

So I've been trying to begin this curl declarations module. I looked a libcurls home page and there already is a D binding: http://curl.haxx.se/libcurl/d/ This one uses the htod tool to make a declaration module from the libcurl headers and creates a curldef.d file. In addition to this it defines a normal D class (libcurl.d) that wraps only the basic curl functionality in order to provide a nicer interface. I haven't created a declaration module before so my question is whether this would also be the right approach for a module in phobos 'etc'? /Jonas
Mar 01 2011
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 3/1/11 3:54 PM, Jonas Drewsen wrote:
 On 25/02/11 16.01, Andrei Alexandrescu wrote:
 On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet. 2. An API design that is safe (libcurl uses void* and unsafe idioms all over the API) based on libcurl and integrates well with the rest of Phobos. This would ideally be discussed prior to implementation and will need to go through a review. If you do 1, it would be an awesome good step forward.

So I've been trying to begin this curl declarations module. I looked a libcurls home page and there already is a D binding: http://curl.haxx.se/libcurl/d/ This one uses the htod tool to make a declaration module from the libcurl headers and creates a curldef.d file. In addition to this it defines a normal D class (libcurl.d) that wraps only the basic curl functionality in order to provide a nicer interface. I haven't created a declaration module before so my question is whether this would also be the right approach for a module in phobos 'etc'? /Jonas

I found that link too in my searches but it's been dead for a good while. I thought it has gotten dark. We could of course use it if we secure author's permission. Andrei
Mar 01 2011
prev sibling next sibling parent reply Adam Ruppe <destructionator gmail.com> writes:
I've made a very simple curl wrapper:

http://arsdnet.net/dcode/curl.d

It is meant to provide trivial get and post support:

string response = curl("http://mywebsite.com"); // contains the response

curl("http://mywebsite.com", "var=something&v2=moe"); // do a POST


There's functions in my module to do cookies and other things too,
but those functions are kinda ugly. (I just whipped them together to
work without worrying about beauty.)
Feb 25 2011
parent Jonas Drewsen <jdrewsen nospam.com> writes:
On 25/02/11 16.12, Adam Ruppe wrote:
 I've made a very simple curl wrapper:

 http://arsdnet.net/dcode/curl.d

 It is meant to provide trivial get and post support:

 string response = curl("http://mywebsite.com"); // contains the response

 curl("http://mywebsite.com", "var=something&v2=moe"); // do a POST


 There's functions in my module to do cookies and other things too,
 but those functions are kinda ugly. (I just whipped them together to
 work without worrying about beauty.)

I'll have a look at it. Thanks, /Jonas
Feb 26 2011
prev sibling next sibling parent Johannes Pfau <spam example.com> writes:
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Andrei Alexandrescu wrote:
On 2/25/11 8:48 AM, Jonas Drewsen wrote:
 Hi,

 My first post here so I don't know if this is the right place.

 I like how phobos is coming along but really miss a HTTP client and I
 think it should be a part of the standard library.

 Is anyone working on this currently?

 Any thoughts/heads-up if I decide to go ahead an implement it myself
 e.g. regarding ranges and other stuff?

 Is it at all possible to get such thing accepted in phobos if someone
 implemented it (and the quality is good enough)?

 Thanks
 Jonas

Here's what I think would be great to do: 1. A declarations module for libcurl. We'd put that in etc. You wouldn't even need to go through the review process, the need and the benefits are obvious. Nobody has had a chance to do that yet.

I remember there was some discussion about that some time ago. Graham Fawcett has a declarations module here: https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d . It's not complete (only wraps the simple curl api), but it's a start. I think he was even willing to contribute it to phobos, but I'm not sure.
2. An API design that is safe (libcurl uses void* and unsafe idioms
all over the API) based on libcurl and integrates well with the rest
of Phobos. This would ideally be discussed prior to implementation and
will need to go through a review.

If you do 1, it would be an awesome good step forward.


Andrei

I've been working on a webclient like api now and then, but I haven't got the time right now to continue it and the code currently is a mess. The biggest problem I faced is curls 'push interface', you receive all data in a callback. Webclients in other languages offer a 'pull' / stream like api and i couldn't find a good way to support that with curl. --=20 Johannes Pfau
Feb 25 2011
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Monday 28 February 2011 01:59:41 Jacob Carlborg wrote:
 On 2011-02-28 01:30, Jonathan M Davis wrote:
 On Sunday 27 February 2011 08:01:36 Andrei Alexandrescu wrote:
 On 2/27/11 8:50 AM, Jonas Drewsen wrote:
 On 27/02/11 11.47, Jacob Carlborg wrote:
 I you want to contribute to Phobos do NOT look at the Tango sources.
 The Phobos developers don't like it.

Okey. That is indeed nice to know. But what is it that they don't like. The source code, the design, the API...? It's good to know what not to do if something is to be included in phobos :) /Jonas

WTF? Jacob, for Pete's sake please stop spreading FUD and fomenting another interminable discussion. This is not about liking!

True. And we _don't_ want another discussion about this. But the point still stands that we'd prefer that anyone looking to work on a submission for Phobos not look at the corresponding Tango API or source code. Misunderstandings and licensing issues are possible, and we don't want to get into that again. It has gotten blown out of proportion in the past, and I think that a large portion of the posters around here don't understand what really happened (hence the FUD - I very much doubt that Jacob is purposely misinterpreting what happened). So, we don't want to get into that again (though unfortunately, it's bound to come up just about any time someone mentions looking at Tango), but it _is_ true that it's just cleaner for those working on Phobos to avoid Tango. That way, misunderstandings (on both sides) can be avoided, and we won't have any potential licensing issues. - Jonathan M Davis

I can't find that post by Andrei, neither in my newsgroup reader application or the web interface. Has someone removed that post? I don't understand what all the noise is about. I just tried to warn him BEFORE he starts looking at the Tango sources. Then starts implementing code that could be interpreted as based on the Tango source and hoping to contribute that to Phobos. The Tango developers aren't happy about including Tango source code into Phobos. Because of that, Phobos developers don't want you to look at Tango code and then contributing similar code to Phobos, correct me if I'm wrong. Actually I don't care if it's the Tango or Phobos developers that don't like it.

I believe that Andrei was displeased with you saying that the Tango developers "don't like it," since that's not necessarily true. The fact that you were pointing out that anyone looking to submit code to Phobos shouldn't be looking at Tango's API or source code is just fine. As I understand it, essentially what happened before was that a single Tango developer expressed concern that someone might think that there was license infringement on SHOO's part in what he did with the time code that he was working on, because he had seen Tango's API (and possibly code) previously (and his API might have been similar - I'm not sure). The Tango developers were never up in arms about it or getting mad at us or anything of the sort. _One_ developer expressed concern about someone thinking that infringement occurred. That's all. However, it got blown out of proportion by the folks on this newsgroup with them getting mad at the Tango developers. Andrei (and others) are sick of this coming up again and again - particularly when it frequently turns into an anti-Tango or anti-Tango developer debate. As I understand it, it _is_ true that there are Tango developers who don't want their code in Phobos, but I don't believe that they've ever been nasty about it as some of the posters here have thought. Tango _does_ have a different license than Phobos, and the Tango developers have every right to share their code or not. So, you can't copy code from there unless you wrote it in the first place, or if you get permission to do so from the developers who wrote it (which isn't necessarily easy). The decision was made that there was no need to look at Tango or copy its code or API and that we didn't want even the possibility of conflict between the two communities if it could be reasonably avoided. So, for the most part, Phobos developers just don't look at the Tango API or code, and we don't want folks who are looking to submit code to Phobos to be looking at Tango's API or code. It's just simpler that we. We have nothing against the Tango developers or what they're doing. As I understand it, they've written some great code, and as far as I'm concerned, all the more power to them. But we don't want to risk any conflict or misunderstandings between the two communities, so those developing Phobos code avoid Tango. Really, I don't think that there was all that much wrong with what you said (it's not like you were explicitly trying to give misinformation), but there are those (Andrei included) who are very sensitive to and/or sick of this issue and don't want it blowing up again. So, Andrei took offense to how your response was worded. - Jonathan M Davis P.S. Everyone, please do _not_ say anything in this thread about the whole Tango licensing issue unless you have something truly constructive to say. We do _not_ need further debate, arguments, or flaming on this topic (and I'm not specifically singling anyone out when I say that; we just want to avoid any more problems about this topic). And in the future, while we _should_ point out to anyone that asks (or that obviously needs to be told) that those developing for Phobos shouldn't be looking at Tango's API or code because of the difference in licenses between Tango and Phobos, we should _not_ be going into whatever issues have or haven't occurred with the Tango team or this newsgroup in the past. This is a sensitive topic which has created too much flaming and discontent around here in the past. We don't copy Tango code, because it has a different license, not because of any problems with the Tango developers.
Feb 28 2011