www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd & gdc

reply "sami" <sami hotmail.com> writes:
my question is if there thing i can do with dmd only and visa 
versa?
what the feature of one of them over the other?
what the different between them in term of inline assembly, 
performance, platform and bugs?
Jan 26 2012
parent reply "Trass3r" <un known.com> writes:
On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
 my question is if there thing i can do with dmd only and visa 
 versa?
 what the feature of one of them over the other?
 what the different between them in term of inline assembly, 
 performance, platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code. On Windoze gdc is really preferable cause the dmd/dmc toolchain is just crap and doesn't support x64 at all. Building gdc yourself is PITA on Win though. On Linux the difference isn't that big.
Jan 26 2012
next sibling parent reply Jerome BENOIT <g6299304p rezozer.net> writes:
There is also gdmd : dmd front end that use gdc

On 26/01/12 13:34, Trass3r wrote:
 On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
 my question is if there thing i can do with dmd only and visa versa?
 what the feature of one of them over the other?
 what the different between them in term of inline assembly, performance,
platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code. On Windoze gdc is really preferable cause the dmd/dmc toolchain is just crap and doesn't support x64 at all. Building gdc yourself is PITA on Win though. On Linux the difference isn't that big.
Jan 26 2012
parent reply "Trass3r" <un known.com> writes:
 There is also gdmd : dmd front end that use gdc
It's nothing but a perl script that translates dmd command line options into gdc ones.
Jan 26 2012
next sibling parent Jerome BENOIT <g6299304p rezozer.net> writes:
actually is a d source file that does more than a simple translation ... as dmd

On 26/01/12 13:59, Trass3r wrote:
 There is also gdmd : dmd front end that use gdc
It's nothing but a perl script that translates dmd command line options into gdc ones.
Jan 26 2012
prev sibling parent Jerome BENOIT <g6299304p rezozer.net> writes:
Sorry I made a mistake here:
I confused gdmd with rdmd :-)



On 26/01/12 14:08, Jerome BENOIT wrote:
 actually is a d source file that does more than a simple translation ... as dmd

 On 26/01/12 13:59, Trass3r wrote:
 There is also gdmd : dmd front end that use gdc
It's nothing but a perl script that translates dmd command line options into gdc ones.
Jan 26 2012
prev sibling next sibling parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Thu, Jan 26, 2012 at 01:34:39PM +0100, Trass3r wrote:
 On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
my question is if there thing i can do with dmd only and visa
versa?
what the feature of one of them over the other?
what the different between them in term of inline assembly,
performance, platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code.
gdc also inherits gcc's multiplatform support, together with platform specific optimizations common to all gcc-based compilers.
 On Windoze gdc is really preferable cause the dmd/dmc toolchain is
 just crap and doesn't support x64 at all. Building gdc yourself is
 PITA on Win though.
Building gcc in general is a pain. It's just a little less painful on *nix systems, but still painful.
 On Linux the difference isn't that big.
Hmm, maybe somebody should write a D compiler in D. That will prove that D is a worthwhile language. ;-) You can then bootstrap it by compiling it with gdc, dmd, or whatever you wish, then recompile it with itself (gcc-style). All sorts of neat stuff you can do there. T -- Prosperity breeds contempt, and poverty breeds consent. -- Suck.com
Jan 26 2012
parent Trass3r <un known.com> writes:
 Building gcc in general is a pain. It's just a little less painful on
 *nix systems, but still painful.
I can't agree. The build instructions contain everything. Has been straightforward for me right from the beginning.
Jan 26 2012
prev sibling next sibling parent reply xancorreu <xancorreu gmail.com> writes:
Al 26/01/12 17:15, En/na H. S. Teoh ha escrit:
 On Thu, Jan 26, 2012 at 01:34:39PM +0100, Trass3r wrote:
 On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
 my question is if there thing i can do with dmd only and visa
 versa?
 what the feature of one of them over the other?
 what the different between them in term of inline assembly,
 performance, platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code.
gdc also inherits gcc's multiplatform support, together with platform specific optimizations common to all gcc-based compilers.
I note that gdc is completely free software but dmd runtime is not. An alternative is ldc, also free.
 On Windoze gdc is really preferable cause the dmd/dmc toolchain is
 just crap and doesn't support x64 at all. Building gdc yourself is
 PITA on Win though.
Building gcc in general is a pain. It's just a little less painful on *nix systems, but still painful.
 On Linux the difference isn't that big.
Hmm, maybe somebody should write a D compiler in D. That will prove that D is a worthwhile language. ;-) You can then bootstrap it by compiling it with gdc, dmd, or whatever you wish, then recompile it with itself (gcc-style). All sorts of neat stuff you can do there. T
A painful is the lack of documentation: there is only API/Classes docs and few html pages. The books are non-free and there are not worth tutorials. I like D but definitively it makes me back!. Compare for example golang and D. Both relatively new languages (D is elder) and you have many more docs about golang than D. You have not a bunch of docs, docs you get with python or perl, but it's worthy amount. Just my opinion, Xan.
Jan 26 2012
parent reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <xtzgzorex gmail.com> writes:
On 26-01-2012 18:06, xancorreu wrote:
 Al 26/01/12 17:15, En/na H. S. Teoh ha escrit:
 On Thu, Jan 26, 2012 at 01:34:39PM +0100, Trass3r wrote:
 On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
 my question is if there thing i can do with dmd only and visa
 versa?
 what the feature of one of them over the other?
 what the different between them in term of inline assembly,
 performance, platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code.
gdc also inherits gcc's multiplatform support, together with platform specific optimizations common to all gcc-based compilers.
I note that gdc is completely free software but dmd runtime is not. An alternative is ldc, also free.
Huh? Surely you mean the DMD back end? Everything else is either GPL or Boost.
 On Windoze gdc is really preferable cause the dmd/dmc toolchain is
 just crap and doesn't support x64 at all. Building gdc yourself is
 PITA on Win though.
Building gcc in general is a pain. It's just a little less painful on *nix systems, but still painful.
 On Linux the difference isn't that big.
Hmm, maybe somebody should write a D compiler in D. That will prove that D is a worthwhile language. ;-) You can then bootstrap it by compiling it with gdc, dmd, or whatever you wish, then recompile it with itself (gcc-style). All sorts of neat stuff you can do there. T
A painful is the lack of documentation: there is only API/Classes docs and few html pages. The books are non-free and there are not worth tutorials. I like D but definitively it makes me back!. Compare for example golang and D. Both relatively new languages (D is elder) and you have many more docs about golang than D. You have not a bunch of docs, docs you get with python or perl, but it's worthy amount. Just my opinion, Xan.
- Alex
Jan 26 2012
parent xancorreu <xancorreu gmail.com> writes:
Al 26/01/12 19:48, En/na Alex Rønne Petersen ha escrit:
 On 26-01-2012 18:06, xancorreu wrote:
 Al 26/01/12 17:15, En/na H. S. Teoh ha escrit:
 On Thu, Jan 26, 2012 at 01:34:39PM +0100, Trass3r wrote:
 On Thursday, 26 January 2012 at 11:46:19 UTC, sami wrote:
 my question is if there thing i can do with dmd only and visa
 versa?
 what the feature of one of them over the other?
 what the different between them in term of inline assembly,
 performance, platform and bugs?
They share the frontend, i.e. language support is pretty much the same. dmd's backend is limited both in terms of performance and platform support (x86 only), but it compiles D code faster. gdc inherits gcc's sophisticated optimizer capabilities, but may have unique bugs in its glue code.
gdc also inherits gcc's multiplatform support, together with platform specific optimizations common to all gcc-based compilers.
I note that gdc is completely free software but dmd runtime is not. An alternative is ldc, also free.
Huh? Surely you mean the DMD back end? Everything else is either GPL or Boost.
Yes, sorry. Xan.
Jan 26 2012
prev sibling next sibling parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Thu, Jan 26, 2012 at 06:06:38PM +0100, xancorreu wrote:
[...]
 I note that gdc is completely free software but dmd runtime is not.
You mean free as in freedom, not as in price.
 An alternative is ldc, also free.
I looked up ldc recently, and it seems that it hasn't been updated for years. Seems that gdc is the only other D compiler that's still actively maintained. And from what I hear, its front end is essentially the same as dmd. [...]
 A painful is the lack of documentation: there is only API/Classes
 docs and few html pages. The books are non-free and there are not
 worth tutorials.
Andrei's book is worth the buy. It's not that expensive and it covers a lot of very useful stuff. As for docs and tutorials, why not contribute by writing more of them?
 I like D but definitively it makes me back!.
 Compare for example golang and D. Both relatively new languages (D is
 elder) and you have many more docs about golang than D. You have not a
 bunch of docs, docs you get with python or perl, but it's worthy
 amount.
[...] It's because of the size of the community. The D community is relatively small, but because google has such a wide exposure, golang has acquired a large following in spite of its young age. Larger community == more people writing tutorials, docs, howtos, etc.. So how to combat this? Write your own tutorials and docs. Contribute to the community. T -- The fact that anyone still uses AOL shows that even the presence of options doesn't stop some people from picking the pessimal one. - Mike Ellis
Jan 26 2012
parent reply Trass3r <un known.com> writes:
 I looked up ldc recently, and it seems that it hasn't been updated for
 years. Seems that gdc is the only other D compiler that's still actively
 maintained.
Please don't spread such misinformation. https://github.com/ldc-developers/ldc/commits/master
Jan 26 2012
parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Thursday, January 26, 2012 19:56:22 Trass3r wrote:
 I looked up ldc recently, and it seems that it hasn't been updated for
 years. Seems that gdc is the only other D compiler that's still actively
 maintained.
Please don't spread such misinformation. https://github.com/ldc-developers/ldc/commits/master
Unfortunately, with both gdc and ldc, the first hits that google gives you are generally to out-of-date web pages, so both projects quickly end up looking out-of-date and/or dead. - Jonathan M Davis
Jan 26 2012
prev sibling parent reply xancorreu <xancorreu gmail.com> writes:
Al 26/01/12 18:43, En/na H. S. Teoh ha escrit:
 On Thu, Jan 26, 2012 at 06:06:38PM +0100, xancorreu wrote:
 [...]
 I note that gdc is completely free software but dmd runtime is not.
You mean free as in freedom, not as in price.
Yes, both
 An alternative is ldc, also free.
I looked up ldc recently, and it seems that it hasn't been updated for years. Seems that gdc is the only other D compiler that's still actively maintained. And from what I hear, its front end is essentially the same as dmd.
I think ldc is actively and it supports D 2.0 (see http://www.dsource.org/projects/ldc/wiki/BuildInstructionsPhobosDruntimeTrunk)
 [...]
 A painful is the lack of documentation: there is only API/Classes
 docs and few html pages. The books are non-free and there are not
 worth tutorials.
Andrei's book is worth the buy. It's not that expensive and it covers a lot of very useful stuff. As for docs and tutorials, why not contribute by writing more of them?
 I like D but definitively it makes me back!.
 Compare for example golang and D. Both relatively new languages (D is
 elder) and you have many more docs about golang than D. You have not a
 bunch of docs, docs you get with python or perl, but it's worthy
 amount.
[...] It's because of the size of the community. The D community is relatively small, but because google has such a wide exposure, golang has acquired a large following in spite of its young age. Larger community == more people writing tutorials, docs, howtos, etc.. So how to combat this? Write your own tutorials and docs. Contribute to the community. T
The developers, the experts, they "should" write good tutorials and bring to the community freely (as in beer and as in freedom). Because with lack of ground documentation, the hypotetic learners like me will not learn or at least the effort to do it will be exagerated. The documentation I could write, the learner, is more more more painful than an expert could do. Perhaps the documentation is the key that developers forget. How many books we have of D 2.0? One. All the documentation with API/Class exception points to this. Even web page (the two only freely avaliable chapters). Think about that. Good intentions. :-) Xan.
Jan 26 2012
parent Don Clugston <dac nospam.com> writes:
On 26/01/12 18:59, xancorreu wrote:
 Al 26/01/12 18:43, En/na H. S. Teoh ha escrit:
 On Thu, Jan 26, 2012 at 06:06:38PM +0100, xancorreu wrote:
 [...]
 I note that gdc is completely free software but dmd runtime is not.
You mean free as in freedom, not as in price.
Yes, both
I don't what that means. The DMD backend license is not compatible with the GPL, so it could never be bundled with a *nix distro. Otherwise, I don't think there are any consequences. It has nothing else in common with non-free products. The complete source is on github, and you're allowed to freely download it, compile it, and make your own clone on github. What else would you want?
Jan 27 2012