May 25, 2015
On 25 May 2015 at 18:14, ketmar via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

> On Mon, 25 May 2015 16:59:48 +0200, Iain Buclaw via Digitalmars-d wrote:
>
> > On 25 May 2015 09:45, "ketmar via Digitalmars-d" < digitalmars-d@puremagic.com> wrote:
> >>
> >> On Mon, 25 May 2015 00:24:26 +0200, Iain Buclaw via Digitalmars-d wrote:
> >>
> >> > I find the situation being like at university looking for grants or funding, and constantly being told. &#39;Oh yes, it is important what you are doing, and you must keep doing it as it is pivotal for future success.  But no, we won&#39;t help you.&#39;
> >>
> >> that's 'cause GCC is untameable beast for average Joe like me, for example. ;-)
> >
> > Both have equal complexity, so that is no excuse.  DMD just operates at a lower level, on a smaller scale, and forces you to think about the effect on generated object code.
>
> i'm afraid that they doesn't have equal complexity. i can read DMD code (ok, even backend, it's hard, but doable), but i cannot read GCC backend code in the same amount of time. and there are alot more things i have to know to understand GDC. i made some trivial fixes in DMD backend, yet i don't even know where to start to understand at least *something* in GCC.


Yes, they do.  The key difference is that GCC doesn't require you to delve into it's backend, as a language implementer, you only need to think of how the code should be represented in it's tree language (ie: http://icps.u-strasbg.fr/~pop/gcc-ast.html) - Because of this, I never need to look at assembly dumps to understand what is going on, only tree dumps, which are handily outputted in a C-style format with -fdump-tree-original=stdout.


May 25, 2015
On 5/25/15 3:51 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm@gmx.net>" wrote:
> On Sunday, 24 May 2015 at 16:03:30 UTC, Andrei Alexandrescu wrote:
>> On 5/24/15 1:20 AM, weaselcat wrote:
>>> IMO I think the worst thing C++ has done is blatantly ignore features
>>> that have been 'killer' in D(see: the reaction to the static_if
>>> proposal)
>>
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4461.html --
>> Andrei
>
> Quote: "always going to establish a new scope."
>
> This alone will make it much less powerful that D's static if.

I know. Politics does have a cost. -- Andrei
May 25, 2015
On Mon, 25 May 2015 18:34:24 +0200, Iain Buclaw via Digitalmars-d wrote:

> Yes, they do.  The key difference is that GCC doesn't require you to
> delve into it's backend, as a language implementer, you only need to
> think of how the code should be represented in it's tree language (ie:
> http://icps.u-strasbg.fr/~pop/gcc-ast.html) - Because of this, I never
> need to look at assembly dumps to understand what is going on, only tree
> dumps,
> which are handily outputted in a C-style format with
> -fdump-tree-original=stdout.

yet there are no well-documented samples for GCC, like "let's create a frontend for simple C-like language, step by step" (at least not in the distribution). there are none for DMD too, but DMD code can be read and understood enough to work with it. and reading GCC code is out of question, it's way too huge.

i once thinking about using GCC as backend for my experimental language, and ended writing my own codegen. it does awful job, spitting almost non- optimised code, but it was at least maintainable. with GCC i never got far enough, it's too complex and poorly documented.

sure, that is not your fault, i'm simply trying to explain why there are almost no people working on GDC. it's just too hard. or it seems to be hard, but without good GCC documentation it's almost the same.

May 25, 2015
On Monday, 25 May 2015 at 22:27:10 UTC, ketmar wrote:
> On Mon, 25 May 2015 18:34:24 +0200, Iain Buclaw via Digitalmars-d wrote:
>
>> Yes, they do.  The key difference is that GCC doesn't require you to
>> delve into it's backend, as a language implementer, you only need to
>> think of how the code should be represented in it's tree language (ie:
>> http://icps.u-strasbg.fr/~pop/gcc-ast.html) - Because of this, I never
>> need to look at assembly dumps to understand what is going on, only tree
>> dumps,
>> which are handily outputted in a C-style format with
>> -fdump-tree-original=stdout.
>
> yet there are no well-documented samples for GCC, like "let's create a
> frontend for simple C-like language, step by step" (at least not in the
> distribution). there are none for DMD too, but DMD code can be read and
> understood enough to work with it. and reading GCC code is out of
> question, it's way too huge.
>
> i once thinking about using GCC as backend for my experimental language,
> and ended writing my own codegen. it does awful job, spitting almost non-
> optimised code, but it was at least maintainable. with GCC i never got
> far enough, it's too complex and poorly documented.
>
> sure, that is not your fault, i'm simply trying to explain why there are
> almost no people working on GDC. it's just too hard. or it seems to be
> hard, but without good GCC documentation it's almost the same.

then contribute to LDC?
May 25, 2015
On Mon, 25 May 2015 22:46:51 +0000, weaselcat wrote:

> then contribute to LDC?

sorry, not interested in LLVM in any way. not that "it should die", but "i don't care if it exists or not".

May 25, 2015
On Monday, 25 May 2015 at 22:48:59 UTC, ketmar wrote:
> On Mon, 25 May 2015 22:46:51 +0000, weaselcat wrote:
>
>> then contribute to LDC?
>
> sorry, not interested in LLVM in any way. not that "it should die", but
> "i don't care if it exists or not".

LLVM addresses every issue you complained about in GCC.
May 26, 2015
On Mon, 25 May 2015 23:19:26 +0000, weaselcat wrote:

> On Monday, 25 May 2015 at 22:48:59 UTC, ketmar wrote:
>> On Mon, 25 May 2015 22:46:51 +0000, weaselcat wrote:
>>
>>> then contribute to LDC?
>>
>> sorry, not interested in LLVM in any way. not that "it should die", but "i don't care if it exists or not".
> 
> LLVM addresses every issue you complained about in GCC.

non-GPL. that means "non-existent" for me.

May 26, 2015
On Tuesday, 26 May 2015 at 00:24:20 UTC, ketmar wrote:
> On Mon, 25 May 2015 23:19:26 +0000, weaselcat wrote:
>
>> On Monday, 25 May 2015 at 22:48:59 UTC, ketmar wrote:
>>> On Mon, 25 May 2015 22:46:51 +0000, weaselcat wrote:
>>>
>>>> then contribute to LDC?
>>>
>>> sorry, not interested in LLVM in any way. not that "it should die", but
>>> "i don't care if it exists or not".
>> 
>> LLVM addresses every issue you complained about in GCC.
>
> non-GPL. that means "non-existent" for me.

you're aware that the dmd backend is proprietary, right?
May 26, 2015
On Tue, 26 May 2015 00:53:35 +0000, weaselcat wrote:

> you're aware that the dmd backend is proprietary, right?

of course. that's why i never submitted any fixes to DMD backend, although i have some.

May 26, 2015
On Tuesday, 26 May 2015 at 02:14:46 UTC, ketmar wrote:
> On Tue, 26 May 2015 00:53:35 +0000, weaselcat wrote:
>
>> you're aware that the dmd backend is proprietary, right?
>
> of course. that's why i never submitted any fixes to DMD backend,
> although i have some.

was just making sure

while I agree with your ideological standpoint on GPL, gcc is virtually inaccessible to anyone who isn't already familiar with the codebase in comparison to llvm. At least it seems gcc is interested in changing this.