Thread overview | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 29, 2010 Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
As a parallel thread to the current one on std.xml, I've started this thread to seek a similar discussion on requirements etc.. Recapping what Andrei said over there :- "If you want to work on the top most important item, probably networking would come ahead. We badly need http and ftp streaming libraries. I'm thinking libcurl would be a good choice as a backend (not interface). For D integration, it would be great to integrate networking with std.stdio.File - e.g. creating File("http://xyz.org") would just connect to the thing and allow streaming, ranges, everything. Adam Ruppe has a lower-level networking protocol that also hooks into std.stdio.File, which would be very important to have too." Yes, I agree that libcurl might be a choice as a backend. Is its license okay? From http://curl.haxx.se/docs/copyright.html "Curl and libcurl are true Open Source/Free Software and meet all definitions as such. It means that you are free to modify and redistribute all contents of the curl distributed archives. You may also freely use curl and libcurl in your commercial projects. Curl and libcurl are licensed under a MIT/X derivate license, see below" <curl-license> COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2010, Daniel Stenberg, <daniel@haxx.se>. All rights reserved. Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. </curl-license> Cheers Justin Johansson |
June 29, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin Johansson | Justin Johansson wrote:
> Yes, I agree that libcurl might be a choice as a backend. Is
> its license okay?
>
> From http://curl.haxx.se/docs/copyright.html
Looks ok to me.
|
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright <newshound2@digitalmars.com> wrote:
> Justin Johansson wrote:
>> Yes, I agree that libcurl might be a choice as a backend. Is
>> its license okay?
>> From http://curl.haxx.se/docs/copyright.html
>
> Looks ok to me.
It doesn't look okay for Phobos to me. The MIT/new BSD license is not BOOST compatible. In particular: "this permission notice appear in all copies" which includes binary copies.
|
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Jacques | Robert Jacques wrote: > On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright <newshound2@digitalmars.com> wrote: > >> Justin Johansson wrote: >>> Yes, I agree that libcurl might be a choice as a backend. Is >>> its license okay? >>> From http://curl.haxx.se/docs/copyright.html >> >> Looks ok to me. > > It doesn't look okay for Phobos to me. The MIT/new BSD license is not BOOST compatible. In particular: "this permission notice appear in all copies" which includes binary copies. I emailed Daniel Stenberg, the author, about that. His reply is: ================================================================= On Mon, 10 May 2010, Walter Bright wrote: > Hello, I'm Walter Bright, the lead developer on the D programming language. libcurl is the best networking library available, and we'd like to base the D runtime networking support on it. The only issue, though, is the clause in the license "provided that the above copyright notice and this permission notice appear in all copies". Does this include binaries? Or does it just apply to the source code? Thanks for your interest in libcurl and your question! The copyright notice is only for the source code, and possibly in the documentation. It is NOT for the binaries. I hope you'll find libcurl to do what you need, and I hope you'll discover that the curl-library is a fine list for help and assistance if or when you're in need! -- / daniel.haxx.se ====================================================================== That's good enough for me. |
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Robert Jacques wrote:
>> On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright <newshound2@digitalmars.com> wrote:
>>
>>> Justin Johansson wrote:
>>>> Yes, I agree that libcurl might be a choice as a backend. Is
>>>> its license okay?
>>>> From http://curl.haxx.se/docs/copyright.html
>>>
>>> Looks ok to me.
>>
>> It doesn't look okay for Phobos to me. The MIT/new BSD license is not BOOST compatible. In particular: "this permission notice appear in all copies" which includes binary copies.
>
> I emailed Daniel Stenberg, the author, about that. His reply is:
>
> =================================================================
>
> On Mon, 10 May 2010, Walter Bright wrote:
>
> > Hello, I'm Walter Bright, the lead developer on the D programming language. libcurl is the best networking library available, and we'd like to base the D runtime networking support on it. The only issue, though, is the clause in the license "provided that the above copyright notice and this permission notice appear in all copies". Does this include binaries? Or does it just apply to the source code?
>
> Thanks for your interest in libcurl and your question!
>
> The copyright notice is only for the source code, and possibly in the documentation. It is NOT for the binaries.
>
> I hope you'll find libcurl to do what you need, and I hope you'll discover that the curl-library is a fine list for help and assistance if or when you're in need!
>
>
Awesome squared!
Andrei
|
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Jacques | My network thing is very simple: it opens a socket, then wraps it up in a File struct, via FILE*. Then, you can treat it the same way. Simple code, and I've been meaning to commit it to phobos for linux at least, but stuff keeps coming up and I haven't gotten around to it yet. Now, there's some controversy on if std.stdio.File should rely on FILE*, but that's really an implementation detail that we can fix up later. I've been worrying about that which delays my plans to commit even more, but I don't think we should right now. Some is better than none here. For curl, I had to use it for a personal project last week (needed SSL support which I don't otherwise have - I've implemented simple HTTP code on top of the File interface, but no encryption there, so unsuitable for this task.) Here's the code: http://arsdnet.net/dcode/curl.d It is in my typical style of only porting and exposing the bare minimum to do the job I cared about doing, but maybe it is a good starting point for others. The function that does work is: string curl(string url, string data = null, string contentType = "application/x-www-form-urlencoded") If data is null, it does a GET of the url, otherwise a POST with the given contentType. It returns the data received as a string. |
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam Ruppe | Adam Ruppe wrote:
> My network thing is very simple: it opens a socket, then wraps it up
> in a File struct, via FILE*. Then, you can treat it the same way.
That's the traditional way to do it, but I'm not so sure it's the right way for the future. Wouldn't it be better to have an interface to it that is a range, rather than pretend it's a FILE* ?
|
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote:
> Robert Jacques wrote:
>> On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright <newshound2@digitalmars.com> wrote:
>>
>>> Justin Johansson wrote:
>>>> Yes, I agree that libcurl might be a choice as a backend. Is
>>>> its license okay?
>>>> From http://curl.haxx.se/docs/copyright.html
>>>
>>> Looks ok to me.
>>
>> It doesn't look okay for Phobos to me. The MIT/new BSD license is not BOOST compatible. In particular: "this permission notice appear in all copies" which includes binary copies.
>
> I emailed Daniel Stenberg, the author, about that. His reply is:
>
> =================================================================
>
> On Mon, 10 May 2010, Walter Bright wrote:
>
> > Hello, I'm Walter Bright, the lead developer on the D programming language. libcurl is the best networking library available, and we'd like to base the D runtime networking support on it. The only issue, though, is the clause in the license "provided that the above copyright notice and this permission notice appear in all copies". Does this include binaries? Or does it just apply to the source code?
>
> Thanks for your interest in libcurl and your question!
>
> The copyright notice is only for the source code, and possibly in the documentation. It is NOT for the binaries.
>
> I hope you'll find libcurl to do what you need, and I hope you'll discover that the curl-library is a fine list for help and assistance if or when you're in need!
You ripper Walter!
|
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 2010-06-30 04.39, Walter Bright wrote: > Robert Jacques wrote: >> On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright >> <newshound2@digitalmars.com> wrote: >> >>> Justin Johansson wrote: >>>> Yes, I agree that libcurl might be a choice as a backend. Is >>>> its license okay? >>>> From http://curl.haxx.se/docs/copyright.html >>> >>> Looks ok to me. >> >> It doesn't look okay for Phobos to me. The MIT/new BSD license is not >> BOOST compatible. In particular: "this permission notice appear in all >> copies" which includes binary copies. > > I emailed Daniel Stenberg, the author, about that. His reply is: > > ================================================================= > > On Mon, 10 May 2010, Walter Bright wrote: > > > Hello, I'm Walter Bright, the lead developer on the D programming > language. libcurl is the best networking library available, and we'd > like to base the D runtime networking support on it. The only issue, > though, is the clause in the license "provided that the above copyright > notice and this permission notice appear in all copies". Does this > include binaries? Or does it just apply to the source code? > > Thanks for your interest in libcurl and your question! > > The copyright notice is only for the source code, and possibly in the > documentation. It is NOT for the binaries. > > I hope you'll find libcurl to do what you need, and I hope you'll > discover that the curl-library is a fine list for help and assistance if > or when you're in need! Then it seems that he wants the Boost license and not the MIT license. -- Jacob Carlborg |
June 30, 2010 Re: Network I/O and streaming in D2 | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Tue, 29 Jun 2010 22:39:03 -0400, Walter Bright <newshound2@digitalmars.com> wrote:
> Robert Jacques wrote:
>> On Tue, 29 Jun 2010 18:26:51 -0400, Walter Bright <newshound2@digitalmars.com> wrote:
>>
>>> Justin Johansson wrote:
>>>> Yes, I agree that libcurl might be a choice as a backend. Is
>>>> its license okay?
>>>> From http://curl.haxx.se/docs/copyright.html
>>>
>>> Looks ok to me.
>> It doesn't look okay for Phobos to me. The MIT/new BSD license is not BOOST compatible. In particular: "this permission notice appear in all copies" which includes binary copies.
>
> I emailed Daniel Stenberg, the author, about that. His reply is:
>
> =================================================================
>
> On Mon, 10 May 2010, Walter Bright wrote:
>
> > Hello, I'm Walter Bright, the lead developer on the D programming language. libcurl is the best networking library available, and we'd like to base the D runtime networking support on it. The only issue, though, is the clause in the license "provided that the above copyright notice and this permission notice appear in all copies". Does this include binaries? Or does it just apply to the source code?
>
> Thanks for your interest in libcurl and your question!
>
> The copyright notice is only for the source code, and possibly in the documentation. It is NOT for the binaries.
>
> I hope you'll find libcurl to do what you need, and I hope you'll discover that the curl-library is a fine list for help and assistance if or when you're in need!
>
>
Great, but if binary are excluded from the libcurl license, then binaries don't have any license and are unusable. Besides, legally I don't think he can change the interpretation of his license without changing its text. I'd recommend kindly asking him to grant you/D the right to use libcurl under the BOOST license, for legal reasons.
|
Copyright © 1999-2021 by the D Language Foundation