September 30, 2012
On 2012-09-30 17:53, Adam D. Ruppe wrote:
> On Sunday, 30 September 2012 at 15:41:46 UTC, Adam D. Ruppe wrote:
>> If you want to write the code, feel free.
>
> I'm sorry, this probably came across as rude, but the answer for why not
> do it the right way is simply that the right way takes time and I don't
> feel like putting it in. Apparently not very many other people do
> either, since we've had the status quo for a long time now.
>
> A quick helper app can be slapped together in a fraction of the time of
> a more proper fix.

Yeah I know. I would like to fix it but I think the DMD code base is quite horrible and just a big mess. I've tried several times to fix small bugs or tried to do some other modifications. But every time I fail because I have no idea what I'm doing and the DMD code base is far from easy to work.

-- 
/Jacob Carlborg
September 30, 2012
On Sunday, 30 September 2012 at 17:27:43 UTC, Jacob Carlborg wrote:
> I would like to fix it but I think the DMD code base is quite horrible and just a big mess.

What hurts me most in doing it is just that it is C++... I know my way around the compiler reasonably well. Not great but good enough to get by... but doing new code is just such a pain. Little things like no auto, forward declarations, weak sauce arrays and strings. Ugh, it just isn't D.

And then dmd has its own rules that trip me up. Aren't supposed to use dynamic_cast, can't use tabs, just all kinds of style things that grind me.

September 30, 2012
On 9/30/12 11:53 AM, Adam D. Ruppe wrote:
> On Sunday, 30 September 2012 at 15:41:46 UTC, Adam D. Ruppe wrote:
>> If you want to write the code, feel free.
>
> I'm sorry, this probably came across as rude, but the answer for why not
> do it the right way is simply that the right way takes time and I don't
> feel like putting it in. Apparently not very many other people do
> either, since we've had the status quo for a long time now.
>
> A quick helper app can be slapped together in a fraction of the time of
> a more proper fix.

I don't think the comeback was rude because many great improvements to D came exactly this way - pull requests followed through by talented and interested contributors. On the other hand, if I were to criticize anything, Adam has a lot of great work brought to the proof-of-concept stage but not finalized. It would be great if we had some more finalized things.

Andrei
October 01, 2012
On Sunday, 30 September 2012 at 20:24:17 UTC, Andrei Alexandrescu wrote:
> It would be great if we had some more finalized things.

A problem I've been having ever since I started doing professional programming is that my focus time is a lot less than it used to be.

I used to be able to sit down and spend a full month on one single thing, very few distractions as the monday return to work was /not/ inevitable... But recently that time has been limited to only three days, if I'm lucky, before something comes up and takes my attention away.

And after I switch focus to something else, I often don't come back to the other thing for quite a long time. It is pushed down to the bottom of an ever growing list.

So if it isn't finished in just a few days, it means I probably won't finish it for at least many months, and there's not a great deal I can do about that in the short term, at least not without spending 14 hours a day every day doing nothing but code, and blargh.
October 01, 2012
On 2012-09-30 21:23, Adam D. Ruppe wrote:

> What hurts me most in doing it is just that it is C++... I know my way
> around the compiler reasonably well. Not great but good enough to get
> by... but doing new code is just such a pain. Little things like no
> auto, forward declarations, weak sauce arrays and strings. Ugh, it just
> isn't D.

I completely agree. Can't we start to use C++11 soon. At least it has "auto".

> And then dmd has its own rules that trip me up. Aren't supposed to use
> dynamic_cast, can't use tabs, just all kinds of style things that grind me.

I know a few of these rules were due to old compilers having problem with some of the C++ features (templates). Is this still a problem or is there other reasons? I know that Clang doesn't use "dynamic_cast" or RTTI for that matter.

-- 
/Jacob Carlborg
October 01, 2012
On 2012-10-01 04:55, Adam D. Ruppe wrote:

> A problem I've been having ever since I started doing professional
> programming is that my focus time is a lot less than it used to be.
>
> I used to be able to sit down and spend a full month on one single
> thing, very few distractions as the monday return to work was /not/
> inevitable... But recently that time has been limited to only three
> days, if I'm lucky, before something comes up and takes my attention away.

That's the big issue. I'm basically limited to one or two hours per day, if I'm lucky. Last week I only got a couple of minutes per day. This weekend I spent debugging DWT which lead nowhere, which felt like quite waste.

-- 
/Jacob Carlborg
October 01, 2012
On Sun, 30 Sep 2012 07:02:15 -0400, Jacob Carlborg <doob@me.com> wrote:

> On 2012-09-30 04:17, Adam D. Ruppe wrote:
>> On Saturday, 29 September 2012 at 17:20:48 UTC, Dmitry Olshansky wrote:
>>> Agreed. What's needed to make it a reality ?
>>
>> Need to integrate my helper program into the website build process.
>
> Is it just me that thinks that having a tool that fixes the generated documentation is ridiculous. The compiler should be modified to generate the documentation we want to have.
>

it's not just you...

-Steve
October 01, 2012
> I think documentation is really important, and something has to be done about it. How can a newcomer get started with D when he doesn't have a readable documentation of Phobos?

A couple of random things I'd like to see:

1. Improve index.html. It's the first thing new users are likely to see about Phobos and it appears to contain an overview of the modules, but in fact it only lists half the modules of Phobos and the description of most modules is too short  to be useful. There should also be a getting-started guide that lists the most common data types and functions and which module contains them (to!T, Tuple, writeln, ....) and it should also discuss the 'built-in' types for completeness, like slices, hashes and strings, since in other languages these are standard library components.)

2. To make the documentation easier to Google, put the keyword "D2" on every page of the Phobos documentation, e.g. the heading could change from "std.file" to "std.file (D2)". Nowadays when I search for something about "D Language", I often find a page about D1 instead of D2.

The "articles" should be reviewed too. For example the page on tuples http://dlang.org/tuple.html makes it sound like you're supposed to define your own Tuple type instead of using the one in std.typecons; in fact it suggests

template Tuple(E...) { alias E Tuple; }

which is really a TypeTuple isn't it?
October 01, 2012
On Saturday, 29 September 2012 at 15:29:46 UTC, Mr. Anonymous wrote:
> Hi guys.
>
> I was browsing the book "Programming in D" by Ali Çehreli. It was pretty much clear, and then I stumbled upon this on page 89:
>> 20.9 Exercises
>> 1. Browse the documentations of the std.string, std.array, std.algorithm, and std.range modules.
>
> OK, let's open the D website and browse the documentation of std.string:
> http://dlang.org/phobos/std_string.html
>
> What do we see? A bunch of links that look like SEO tags of a spam website, followed by a mess of anything - structs, classes, functions, and what not.
> Do you really think somebody who learns programming can understand anything here?
>
> Compare this with, e.g., an msdn reference:
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms684852(v=vs.85).aspx
> A clear division of enums, functions, macros, structs, ...
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms684847(v=vs.85).aspx
> The functions are divided by usage, with a short explanation next to each function.
>
> I think documentation is really important, and something has to be done about it. How can a newcomer get started with D when he doesn't have a readable documentation of Phobos?

OK, I looked at it, and I saw that the links are generated by javascript.
So I decided to try and write a better javascript function for creating links.

Here's what I came up with:
The JS code: http://pastebin.com/Pz4fb4JR
Screenshots: http://i.imgur.com/gwxrI.png, http://i.imgur.com/qGGQn.png

As you can see, the code works for both the website html and the one bundled with dmd.
If my function finds nothing, it falls back to it's old version of anchor list.

This solution is quite bad and temporary, but what we have now is not much better, so, for a while, I think it's worth using.

P.S. I saw in the comments that Adam D. Ruppe came up with a better solution, but it requires an external tool. My solution requires a small javascript change, which should be very easy to integrate.
October 01, 2012
Mr. Anonymous wrote:
> OK, I looked at it, and I saw that the links are generated by javascript.
> So I decided to try and write a better javascript function for creating
> links.
>
> Here's what I came up with:
> The JS code: http://pastebin.com/Pz4fb4JR
> Screenshots: http://i.imgur.com/gwxrI.png, http://i.imgur.com/qGGQn.png
>
> As you can see, the code works for both the website html and the one
> bundled with dmd.
> If my function finds nothing, it falls back to it's old version of
> anchor list.
>
> This solution is quite bad and temporary, but what we have now is not
> much better, so, for a while, I think it's worth using.

I've also tried to improve it:
http://forum.dlang.org/thread/jb0ril$17oa$1@digitalmars.com

But I think that top positioned index is bad. It should be on the left, or the right pane.