January 30, 2016
Just want to update y'all that my better docs continue to improve with each passing week.

I just did a style facelift on the members section:

http://dpldocs.info/experimental-docs/std.algorithm.setops.html

(and yes, that's mostly css style! I did a minor change to the html, you can see the old here: http://dpldocs.info/experimental-docs/std.stdio.html (well, at least until I rebuild the docs of all of Phobos again), but the css is the big thing. It is nice having semantic markup.)


So I hope that is more readable. The sidebar is also new over the last couple weeks, giving a sorted list of sibling names - including package listings.

If you go into a thing: http://dpldocs.info/experimental-docs/std.stdio.write.html you can see how the sidebar shows the immediate siblings only, which makes the list a lot more managable than trying to cram everything everywhere. I find the Phobos official sidebar to be useless because there's just too much there.

BTW the recent push that makes constraints small and grey, check this out for example:

http://dlang.org/phobos/std_algorithm_sorting.html#completeSort

I feel is no help. The readability is still poor and it doesn't help with navigation. In my new members thing, I used a small, hoverable prototype... but just on the index. Once you click through, I still have the full details, formatted for legibility.

This reform is not appeasing my revolution....



Anyway, I feel that this is really starting to come together now... pretty soon, I'll promote it to "alpha" from its current state of "pre-alpha". Just gotta write the new search engine first!
January 30, 2016
On Sat, 30 Jan 2016 20:58:44 +0000, Adam D. Ruppe wrote:

> Just want to update y'all that my better docs continue to improve with each passing week.
> 
> I just did a style facelift on the members section:
> 
> http://dpldocs.info/experimental-docs/std.algorithm.setops.html

Oh god, that's lovely. It works even with outrageously strict security policies in the browser.

You probably know about this, but some of the source code formatting is a
little off (and allowing javascript / cross-site requests doesn't help).
Example:
http://ikeran.org/images/std.range.enumerate.png

The initial part is more readable than the original source code, but the in contract is  a bit messy.

Even with that, this is a lot easier and more approachable than the dlang.org docs. Thanks!
January 30, 2016
On Saturday, 30 January 2016 at 21:22:02 UTC, Chris Wright wrote:
> You probably know about this, but some of the source code formatting is a
> little off (and allowing javascript / cross-site requests doesn't help).

Right, the contract formatter is something I started a while ago but not finished yet.

And actually, a lot of the contracts are ugly anyway, even if nicely formatted  (that is, the code is more implementation-focused than presentable as documentation), so I'm not sure trying to print them is actually a good idea.


This is the original source of your picture:

in
{
    static if (hasLength!Range)
    {
        // TODO: core.checkedint supports mixed signedness yet?
        import core.checkedint : adds, addu;
        import std.conv : ConvException, to;

        alias LengthType = typeof(range.length);
        bool overflow;
        static if(isSigned!Enumerator && isSigned!LengthType)
            auto result = adds(start, range.length, overflow);
        else static if(isSigned!Enumerator)
        {
            Largest!(Enumerator, Signed!LengthType) signedLength;
            try signedLength = to!(typeof(signedLength))(range.length);
            catch(ConvException)
                overflow = true;
            catch(Exception)
                assert(false);

            auto result = adds(start, signedLength, overflow);
        }
        else
        {
            static if(isSigned!LengthType)
                assert(range.length >= 0);
            auto result = addu(start, range.length, overflow);
        }

        assert(!overflow && result <= Enumerator.max);
    }
}



It is certainly nicer when correctly formatted... but still, what is that actually saying?

> The initial part is more readable than the original source code, but the in contract is  a bit messy.

aye, that's where I spent all the time.

> Even with that, this is a lot easier and more approachable than the dlang.org docs. Thanks!

awesome
January 30, 2016
On Saturday, 30 January 2016 at 20:58:44 UTC, Adam D. Ruppe wrote:
> In my new members thing, I used a small, hoverable prototype...

Nice. Slight layout problem: when the browser width is set less than the max line width, hovering will add a white bar to the right of the page, maybe 20px wide. It doesn't show, but it makes a horizontal slider appear. It disappears on focus-out. The horizontal slider also causes a resize on the vertical slider, so it is quite a nervous flicker when moving the mouse across the page. Safari 9.0.3.
January 30, 2016
On Saturday, 30 January 2016 at 22:08:55 UTC, Bastiaan Veelo wrote:
> Nice. Slight layout problem: when the browser width is set less than the max line width, hovering will add a white bar to the right of the page, maybe 20px wide.

Yeah, I know. I want it to be the width of the container's container, but don't know how to express that in CSS.

So the document layout is basically:

<dl>
  <dt>
      <a>name</a>
      <div>prototype</div>
  </dt>
  <dd>
      description
  </dd>
</dl>


The dt has a fixed width set to a fraction of the dl. The dl is a normal block element.

The prototype is normally clipped to the width of the dt, but on hover, I want it to break free and take the width of the dl, while staying in the same place otherwise.


I know quite a few css tricks... but I don't think I can actually do this without adding a script or something, so I just put an arbitrary fixed width on hover for now.
January 31, 2016
On Saturday, 30 January 2016 at 22:37:18 UTC, Adam D. Ruppe wrote:
> I know quite a few css tricks... but I don't think I can actually do this without adding a script or something, so I just put an arbitrary fixed width on hover for now.

Meh, I just did it with JavaScript, so if you enable script, you should be free of that now (and if not, the fixed width fallback is still there.)

(specifically, the script just edits the html of a special dynamic <style> element)
January 31, 2016
On Saturday, 30 January 2016 at 22:37:18 UTC, Adam D. Ruppe wrote:
> I know quite a few css tricks... but I don't think I can actually do this without adding a script or something, so I just put an arbitrary fixed width on hover for now.

One trick is to set the width and clipping on "dt > *" instead of "dt", and use "calc(...)" for dynamic sizes.



January 31, 2016
On Sat, Jan 30, 2016 at 10:58 PM, Adam D. Ruppe via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote:

> Just want to update y'all that my better docs continue to improve with each passing week.
>
> I just did a style facelift on the members section:
>
> http://dpldocs.info/experimental-docs/std.algorithm.setops.html
>
> (and yes, that's mostly css style! I did a minor change to the html, you can see the old here: http://dpldocs.info/experimental-docs/std.stdio.html (well, at least until I rebuild the docs of all of Phobos again), but the css is the big thing. It is nice having semantic markup.)
>
>
> So I hope that is more readable. The sidebar is also new over the last couple weeks, giving a sorted list of sibling names - including package listings.
>
> If you go into a thing: http://dpldocs.info/experimental-docs/std.stdio.write.html you can see how the sidebar shows the immediate siblings only, which makes the list a lot more managable than trying to cram everything everywhere. I find the Phobos official sidebar to be useless because there's just too much there.
>
> BTW the recent push that makes constraints small and grey, check this out for example:
>
> http://dlang.org/phobos/std_algorithm_sorting.html#completeSort
>
> I feel is no help. The readability is still poor and it doesn't help with navigation. In my new members thing, I used a small, hoverable prototype... but just on the index. Once you click through, I still have the full details, formatted for legibility.
>
> This reform is not appeasing my revolution....
>
>
>
> Anyway, I feel that this is really starting to come together now... pretty soon, I'll promote it to "alpha" from its current state of "pre-alpha". Just gotta write the new search engine first!
>


If you don't get a cease and desist letter from the D Foundation soon I'd be surprised. Your matter of fact insulting of our official docs (which are leaps and bounds better than the new stuff you are making) is destructive to our community.

Having a different kind of search and having a different layout that is more succinct is "Super Awesome" and you are doing it, but you have absolutely no reason to constantly insult the work on the main site.

_Creating division in such a small community is not helpful_. Having competing designs can be very helpful, (e.g. your layout could be nice for Google search results), official docs are nice because you don't have to constantly jump around the site while working.


January 31, 2016
On 2016-01-30 21:58, Adam D. Ruppe wrote:

> If you go into a thing:
> http://dpldocs.info/experimental-docs/std.stdio.write.html


"extern (C) nothrow" is repeated a couple of times.

-- 
/Jacob Carlborg
January 31, 2016
On Sunday, 31 January 2016 at 13:11:54 UTC, Jacob Carlborg wrote:
> "extern (C) nothrow" is repeated a couple of times.

Yeah, those shouldn't be there at all on this function. I probably bugged the removal of attributes when moving up a scope or something.