November 10, 2011
This must be a really silly question, or it would have been asked already, so I apologise in advance.

It appears you have written a low level http, ftp, smtp library included in this library... why is there not a standard library for each of these protocols, and why aren't you building on top of that?

- me

On 10 November 2011 15:43, Jacob Carlborg <doob@me.com> wrote:

> On 2011-11-10 11:21, Jonathan M Davis wrote:
>
>> Well, for better or worse, we don't have an official policy on it. In
>> general, I
>> think that the tact is to try and rename the item so that it doesn't pose
>> a
>> problem, but that's not always possible (hence FunctionAttribute.pure_).
>> In
>> this case, since it comes from something else, it looks like it really
>> should
>> be some version of delete. However, whereas FunctionAttribute pretty much
>> _had_ to be as close to the keyword as possible since it represented the
>> keyword, that's not the case here, and given how ugly it is to tack the _
>> on,
>> del seems like a reasonable solution.
>>
>> In any case, if we want something official, we'd have to discuss it, and
>> we
>> generally have a hard time coming to any kind of consensus on stuff like
>> that.
>> So, I don't generally try unless it seems particularly important.
>>
>> - Jonathan M Davis
>>
>
> I think we should write down, somewhere, what we have, what we have agreed on unofficially. It may not be complete and not contain details for everything but it would at least be something. Instead of having to explain this every time we get a new contributor to Phobos or one has to try to find this information in the newsgroup.
>
> --
> /Jacob Carlborg
>


November 10, 2011
On 10/11/11 14.58, Manu wrote:
> This must be a really silly question, or it would have been asked
> already, so I apologise in advance.
>
> It appears you have written a low level http, ftp, smtp library included
> in this library... why is there not a standard library for each of these
> protocols, and why aren't you building on top of that?

The new etc.curl (std.curl) module is actually build on top of the libcurl bindings located in etc.c.curl. So all low level stuff is handled by the standard libcurl library.

/Jonas


> - me
>
> On 10 November 2011 15:43, Jacob Carlborg <doob@me.com
> <mailto:doob@me.com>> wrote:
>
>     On 2011-11-10 11:21, Jonathan M Davis wrote:
>
>         Well, for better or worse, we don't have an official policy on
>         it. In general, I
>         think that the tact is to try and rename the item so that it
>         doesn't pose a
>         problem, but that's not always possible (hence
>         FunctionAttribute.pure_). In
>         this case, since it comes from something else, it looks like it
>         really should
>         be some version of delete. However, whereas FunctionAttribute
>         pretty much
>         _had_ to be as close to the keyword as possible since it
>         represented the
>         keyword, that's not the case here, and given how ugly it is to
>         tack the _ on,
>         del seems like a reasonable solution.
>
>         In any case, if we want something official, we'd have to discuss
>         it, and we
>         generally have a hard time coming to any kind of consensus on
>         stuff like that.
>         So, I don't generally try unless it seems particularly important.
>
>         - Jonathan M Davis
>
>
>     I think we should write down, somewhere, what we have, what we have
>     agreed on unofficially. It may not be complete and not contain
>     details for everything but it would at least be something. Instead
>     of having to explain this every time we get a new contributor to
>     Phobos or one has to try to find this information in the newsgroup.
>
>     --
>     /Jacob Carlborg
>
>

November 10, 2011
Ah, I see :)

Are those extremely useful protocols already supported in the D standard library? I haven't checked... (yes, I *could* check right now ;)

On 10 November 2011 16:09, Jonas Drewsen <jdrewsen@nospam.com> wrote:

> On 10/11/11 14.58, Manu wrote:
>
>> This must be a really silly question, or it would have been asked already, so I apologise in advance.
>>
>> It appears you have written a low level http, ftp, smtp library included in this library... why is there not a standard library for each of these protocols, and why aren't you building on top of that?
>>
>
> The new etc.curl (std.curl) module is actually build on top of the libcurl bindings located in etc.c.curl. So all low level stuff is handled by the standard libcurl library.
>
> /Jonas
>
>
>  - me
>>
>> On 10 November 2011 15:43, Jacob Carlborg <doob@me.com <mailto:doob@me.com>> wrote:
>>
>>    On 2011-11-10 11:21, Jonathan M Davis wrote:
>>
>>        Well, for better or worse, we don't have an official policy on
>>        it. In general, I
>>        think that the tact is to try and rename the item so that it
>>        doesn't pose a
>>        problem, but that's not always possible (hence
>>        FunctionAttribute.pure_). In
>>        this case, since it comes from something else, it looks like it
>>        really should
>>        be some version of delete. However, whereas FunctionAttribute
>>        pretty much
>>        _had_ to be as close to the keyword as possible since it
>>        represented the
>>        keyword, that's not the case here, and given how ugly it is to
>>        tack the _ on,
>>        del seems like a reasonable solution.
>>
>>        In any case, if we want something official, we'd have to discuss
>>        it, and we
>>        generally have a hard time coming to any kind of consensus on
>>        stuff like that.
>>        So, I don't generally try unless it seems particularly important.
>>
>>        - Jonathan M Davis
>>
>>
>>    I think we should write down, somewhere, what we have, what we have
>>    agreed on unofficially. It may not be complete and not contain
>>    details for everything but it would at least be something. Instead
>>    of having to explain this every time we get a new contributor to
>>    Phobos or one has to try to find this information in the newsgroup.
>>
>>    --
>>    /Jacob Carlborg
>>
>>
>>
>


November 10, 2011
On Thu, Nov 10, 2011 at 5:14 AM, Jonas Drewsen <jdrewsen@nospam.com> wrote:

> On 10/11/11 08.32, Jacob Carlborg wrote:
>
>> On 2011-11-09 21:53, Jonas Drewsen wrote:
>>
>>> Hi,
>>>
>>> So after the last review of the etc.curl there were some requests for making it simpler.
>>>
>> <snip>
>
>
>  BTW, why is this "etc.culr" and not "std.curl".
>>
>
> I think Andrei mentioned that he wanted it to go to std.curl. Another option would be std.net.curl.
>
> Anyone have an opinion about this?
>
> /Jonas
>

I think putting the high level API (which I really like the clean and simple design of, by the way) under something like std.net and the low level curl specific API in etc.curl might be nice.  I know what curl is but looking for std.curl to download a file isn't obvious for anyone who isn't aware of curl.  This also leaves the option of keeping the high level API and swapping out the curl backend with something else if that was ever needed or wanted.  That's not very likely to happen anytime soon but I think a good guideline might be to keep the phobos API focused on what, specifically, you want to do rather than what is doing what you want to do.


November 11, 2011
Am 10.11.2011, 17:52 Uhr, schrieb Brad Anderson <eco@gnuk.net>:

> On Thu, Nov 10, 2011 at 5:14 AM, Jonas Drewsen <jdrewsen@nospam.com> wrote:
>
>> On 10/11/11 08.32, Jacob Carlborg wrote:
>>
>>> On 2011-11-09 21:53, Jonas Drewsen wrote:
>>>
>>>> Hi,
>>>>
>>>> So after the last review of the etc.curl there were some requests for
>>>> making it simpler.
>>>>
>>> <snip>
>>
>>
>>  BTW, why is this "etc.culr" and not "std.curl".
>>>
>>
>> I think Andrei mentioned that he wanted it to go to std.curl. Another
>> option would be std.net.curl.
>>
>> Anyone have an opinion about this?
>>
>> /Jonas
>>
>
> I think putting the high level API (which I really like the clean and
> simple design of, by the way) under something like std.net and the low
> level curl specific API in etc.curl might be nice.  I know what curl is but
> looking for std.curl to download a file isn't obvious for anyone who isn't
> aware of curl.  This also leaves the option of keeping the high level API
> and swapping out the curl backend with something else if that was ever
> needed or wanted.  That's not very likely to happen anytime soon but I
> think a good guideline might be to keep the phobos API focused on what,
> specifically, you want to do rather than what is doing what you want to do.

Ok, let's do an experiment. I don't think I've seen community polls yet, so I created one on a random online poll site:

http://www.easypolls.net/poll.html?p=4ebd3219011eb0e4518d35ab

When everyone has cast their vote, there should be no useless discussion about the decision afterwards. :) ... I hope.
(I wont vote myself this time, so it doesn't look like I created a poll tailored to my opinion.)
November 11, 2011
> Anyone have an opinion about this?

i mean no disrespect to the work you have invested. i like the new api and looking forward to use it, but isn't the integration of curl into phobos a kind of placeholder until somebody finally implements std.net.http, std.net.ftp, etc.?

i really believe high or low level wrapper code around 3rd party libraries shouldn't "pollute" the std.* namespace and stay in etc.* or maybe end up in a new package like lib.*, external.* or extra.*.

mirko
November 11, 2011
Den 10-11-2011 01:24, Walter Bright skrev:
> I tend to like references to things in other modules to be hyperlinks.
> For example, writeln should be $(LINK2
> http://www.d-programming-language.org/phobos/std_stdio.html#writeln,
> writeln)

The only places I use writeln is in the examples. Do you want hyperlinks in there? I haven't seen that in any other module.

If this is something we want to do then a new markup token should be added to std.ddoc I think. This should ensure that the examples does not look messy because of normal hyperlink highlighting.

/Jonas
November 11, 2011
Den 11-11-2011 19:25, Mirko Pilger skrev:
>> Anyone have an opinion about this?
>
> i mean no disrespect to the work you have invested. i like the new api
> and looking forward to use it, but isn't the integration of curl into
> phobos a kind of placeholder until somebody finally implements
> std.net.http, std.net.ftp, etc.?
>
> i really believe high or low level wrapper code around 3rd party
> libraries shouldn't "pollute" the std.* namespace and stay in etc.* or
> maybe end up in a new package like lib.*, external.* or extra.*.
>
> mirko

I agree. That is why I put it into etc.curl initially and not std.curl. Then when a package manager is in place (think CPAN) the entire etc.* could be pulled out. But until then it is a nice place to have it I think.

Anyway - it seems there are several people who wants it in std for now. I guess it wouldn't be that bad to move it out of std again at some point when a native http/ftp is implemented.

/Jonas
November 12, 2011
On Friday, November 11, 2011 20:45:28 Jonas Drewsen wrote:
> Den 10-11-2011 01:24, Walter Bright skrev:
> > I tend to like references to things in other modules to be hyperlinks. For example, writeln should be $(LINK2 http://www.d-programming-language.org/phobos/std_stdio.html#writeln, writeln)
> 
> The only places I use writeln is in the examples. Do you want hyperlinks in there? I haven't seen that in any other module.
> 
> If this is something we want to do then a new markup token should be added to std.ddoc I think. This should ensure that the examples does not look messy because of normal hyperlink highlighting.

I don't think that it's possible to have links in examples with ddoc. It just prints exactly what you put in there as-is. References to functions outside of the examples should use XREF (for functions in other modules in Phobos) and LREF (for functions in the same module).

- Jonathan M Davis
November 12, 2011
Am 11.11.2011, 16:30 Uhr, schrieb Marco Leise <Marco.Leise@gmx.de>:

> Ok, let's do an experiment. I don't think I've seen community polls yet, so I created one on a random online poll site:
>
> http://www.easypolls.net/poll.html?p=4ebd3219011eb0e4518d35ab
>
> When everyone has cast their vote, there should be no useless discussion about the decision afterwards. :) ... I hope.
> (I wont vote myself this time, so it doesn't look like I created a poll tailored to my opinion.)

There are 12 votes in now and these are the results so far:

etc.curl                                    50% (6)
std.net.curl                                25% (3)
etc.curl (low-level) / std.net (high-level) 17% (2)
std.curl                                     8% (1)

Thanks for voting and generating a clear result !