May 06, 2021
On Thursday, 6 May 2021 at 13:54:31 UTC, Adam D. Ruppe wrote:
> You might have a cached version since they're not empty at all anymore, hit refresh in your browser.

My mistake. Sorry. :-P

> That said there are a bunch of undocumented things. I can't generate what isn't in the source. But there's at least something.
>
> http://dmd.dpldocs.info/dmd.lexer.Lexer.html
> http://dmd.dpldocs.info/dmd.parse.Parser.html


But the parser is much larger than this?
I guess most of it is private. Hm.

May 06, 2021
On 5/6/2021 6:15 AM, Andrei Alexandrescu wrote:
> Would be really nice if dmd had some substantial ddoc-generated documentation.


https://dlang.org/phobos/

Click on "dmd" under "Internal API".
May 06, 2021
On 5/6/2021 6:27 AM, Adam D. Ruppe wrote:
> On Thursday, 6 May 2021 at 13:15:18 UTC, Andrei Alexandrescu wrote:
>> Would be really nice if dmd had some substantial ddoc-generated documentation.
> 
> fun fact my website generates it:
> 
> http://dmd.dpldocs.info/dmd.html

Very nice! Thanks for doing this.
May 07, 2021
On 5/3/2021 6:17 AM, Blatnik wrote:
> Honestly another difficult thing to get is the file names themselves.
> 
> `ty.d`

TYpes

> `ph2.d`

Precompiled Headers

> `mars.d`

Entry point. So named when D was originally the "Mars" programming language. It was the first source file! I tend to name the source file that contains the program entry point with the name of the ultimate executable.

> `melf.d`

The D translation of "melf.h", a system file

> `fp.d`

Floating Point

> `ee.d`

Execution Environment

> `e2ir.d`,

Expression To Intermediate Representation

> `eh.d`

Exception Handling

> `el.d`

ELements

> I get that it's probably nice to not have to type a lot in the import statements when you actually know what the all the files are after a year of hacking, but it's really hard to guess where something is.

Now you know. No need to guess anymore!

> Also, a lot of comments are rather useless.
> 
> /*********************************
>   * Loop data structure.
>   */
> 
> struct loop { ... }


Holds the state for analyzing Loops in the optimizer


> struct loc_t
> {
>      elem *e;
>      int flags; // LFxxxxx
> }
> ```
> 
> Ahhh that's what the flags are, I totally get it now. Thanks comment! :P

No reason to copy/paste the LF comments.

> There's basically no way to know what something is for without doing a grep for it across the entire codebase..

Indeed. Grep is your best friend, unless you have an IDE that can automatically take you to the definition of a type.
May 07, 2021
On Friday, 7 May 2021 at 09:32:11 UTC, Walter Bright wrote:
> On 5/3/2021 6:17 AM, Blatnik wrote:
>> Honestly another difficult thing to get is the file names themselves.
>> 
>> `ty.d`
>
> TYpes
>
>> `ph2.d`
>
> Precompiled Headers
>
>> `mars.d`
>
> Entry point. So named when D was originally the "Mars" programming language. It was the first source file! I tend to name the source file that contains the program entry point with the name of the ultimate executable.
>
>> `melf.d`
>
> The D translation of "melf.h", a system file
>
>> `fp.d`
>
> Floating Point
>
>> `ee.d`
>
> Execution Environment
>
>> `e2ir.d`,
>
> Expression To Intermediate Representation
>
>> `eh.d`
>
> Exception Handling
>
>> `el.d`
>
> ELements


Couldn't these be renamed to be more readable? I don't think it is reasonable to expect someone to know that "ee" stands for execution environment. This would be a step towards reducing the barrier to entry for DMD.



May 07, 2021
On Friday, 7 May 2021 at 15:57:45 UTC, Sputnic wrote:
> On Friday, 7 May 2021 at 09:32:11 UTC, Walter Bright wrote:
>> [...]
>
>
> Couldn't these be renamed to be more readable? I don't think it is reasonable to expect someone to know that "ee" stands for execution environment. This would be a step towards reducing the barrier to entry for DMD.

Either that or add a comment.

Personally I don't have a problem with short names, but if I don't know what they mean, I have 🌞
May 07, 2021
On 5/7/2021 8:57 AM, Sputnic wrote:
> Couldn't these be renamed to be more readable? I don't think it is reasonable to expect someone to know that "ee" stands for execution environment. This would be a step towards reducing the barrier to entry for DMD.

People hear "Central Intelligence Agency" once and ever after use CIA. The same goes for everything else.

DMD source code should be optimized for the people who spend thousands of hours on it. For new people, the link to the glossary has already been posted here.

Some years back, someone did a Pull Request to rename the "paren" token to "Parentheses" (s.i.c.). This is used several hundred times in the source code. It's more annoying than illuminating.
May 07, 2021
On 5/7/2021 9:02 AM, Imperatorn wrote:
> Either that or add a comment.

As Dennis posted:

You can see the meaning of each file here:
https://github.com/dlang/dmd/tree/master/src/dmd#dmd-source-code
May 07, 2021
On Friday, 7 May 2021 at 19:12:07 UTC, Walter Bright wrote:
> On 5/7/2021 9:02 AM, Imperatorn wrote:
>> Either that or add a comment.
>
> As Dennis posted:
>
> You can see the meaning of each file here:
> https://github.com/dlang/dmd/tree/master/src/dmd#dmd-source-code

Nice, that's actually a quite good summary. Thx
1 2 3
Next ›   Last »