View mode: basic / threaded / horizontal-split · Log in · Help
October 26, 2012
Re: Uri class and parser
On 2012-10-26 11:13, Jonathan M Davis wrote:

> There's definitely some truth to that, but Walter in particular seems to be
> against breaking anything period. If it were entirely up to him, pretty much
> none of the breaking changes that have happened to Phobos' API over the last
> few years would have happened. And Andrei is beginning to oppose most breaking
> changes. So, the bar is getting pretty high for making breaking changes.
> Simply renaming stuff generally isn't going to cut it. This is arguably
> slightly more than simply renaming std.uri, because it's an issue of module
> organization rather than simply what its name is, but it's also arguably so
> trivial that the benefit is near zero.

I agree that's not good to break code. But I also don't like that we 
have to "suffer" for the choices/mistakes made in the past just because 
of risking breaking code.

Example, someone thought it was a "great" idea to basically not not use 
the nice module system we do have in D and instead use a flat namespace.

-- 
/Jacob Carlborg
October 26, 2012
Re: Uri class and parser
Looks good.

Does it handle relative URIs? It would also be nice to support 
combining URIs from an absolute and relative portion.

Another omission is handling file URIs.
October 26, 2012
Re: Uri class and parser
On Friday, 26 October 2012 at 11:52:09 UTC, John Chapman wrote:
> Looks good.
>
> Does it handle relative URIs? It would also be nice to support 
> combining URIs from an absolute and relative portion.
>
> Another omission is handling file URIs.

It doesn't support relative URIs as their syntax is not 
officially defined in RFC 3986, nor are there any relative URIs 
in the examples:
http://tools.ietf.org/html/rfc3986#section-1.1.2

I am however considering it because even though not (clearly) 
defined, they are URIs and they are often used.


Definition of URI on Wikipedia:
> "In computing, a uniform resource identifier (URI) is a string 
> of characters used to identify a name or a resource."
October 26, 2012
Re: Uri class and parser
Jacob Carlborg wrote:
> On 2012-10-26 11:53, Jens Mueller wrote:
> 
> >Unfortunately there are no portable solutions. The only thing I found is
> >symbol versioning. But this is only supported by GNU ld.
> >These strategic issues need to be solved.
> 
> There are many other solutions that can be used to easy this
> problem. The release process can be improved significantly, this has
> been discussed before. For example, provide a road map. Then people
> will know that's coming. Better release scheme. Releases of DMD, D
> and Phobos shouldn't necessarily be in the same release. We use a
> semantic version scheme:
> 
> http://semver.org/
> 
> This will make it easier for developers when they upgrade DMD. It
> basically let them know if something will break or not.

Probably. I'm all for it.
The thing is that new things are proposed but these then die out
quickly. I have that feeling e.g. with trello.com even though it's a
good idea. I wish I knew why these things do not work out.
But there are also decisions that turned out to be very successful, e.g.
moving to github.

Jens
October 26, 2012
Re: Uri class and parser
On Friday, 26 October 2012 at 14:13:21 UTC, Mike van Dongen wrote:
> I am however considering it because even though not (clearly) 
> defined, they are URIs and they are often used.

The basedOn function in my uri struct in cgi.d does it:
https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/cgi.d#L1702

The unit test below the function is focused on checking the 
relative function.
October 26, 2012
Re: Uri class and parser
On Friday, 26 October 2012 at 14:22:07 UTC, Adam D. Ruppe wrote:
> On Friday, 26 October 2012 at 14:13:21 UTC, Mike van Dongen 
> wrote:
>> I am however considering it because even though not (clearly) 
>> defined, they are URIs and they are often used.
>
> The basedOn function in my uri struct in cgi.d does it:
> https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/cgi.d#L1702
>
> The unit test below the function is focused on checking the 
> relative function.

On Friday, 26 October 2012 at 11:52:09 UTC, John Chapman wrote:
> It would also be nice to support combining URIs from an 
> absolute and relative portion.

If relative URIs will be supported I agree there should be a 
method that merges two (incomplete) URIs into one (valid) URI.
October 26, 2012
Re: Uri class and parser
n 10/23/2012 1:47 PM, Mike van Dongen wrote:
> My code can be found here, at the bottom of the already existing file uri.d:
> https://github.com/MikevanDongen/phobos/blob/uri-parser/std/uri.d

Needs to have a range interface, not a string interface.
October 26, 2012
Re: Uri class and parser
On 10/26/2012 2:13 AM, Jonathan M Davis wrote:> There's definitely some truth to 
that, but Walter in particular seems to be
> against breaking anything period.

We have a number of fed up developers and abandoned, dead projects because of 
breaking changes.

It MUST STOP.
October 27, 2012
Re: Uri class and parser
On Friday, 26 October 2012 at 20:20:59 UTC, Walter Bright wrote:
> Needs to have a range interface, not a string interface.

I don't think range makes any sense for this. It isn't something 
you'd loop over... you just load the one string and slice it up.
October 27, 2012
Re: Uri class and parser
On 2012-10-26 16:16, Jens Mueller wrote:

> Probably. I'm all for it.
> The thing is that new things are proposed but these then die out
> quickly. I have that feeling e.g. with trello.com even though it's a
> good idea. I wish I knew why these things do not work out.
> But there are also decisions that turned out to be very successful, e.g.
> moving to github.

It's all about conniving Walter. He's the one release the new versions.

-- 
/Jacob Carlborg
1 2 3 4 5 6
Top | Discussion index | About this forum | D home