www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Available D2 implementation on Windows besides DMD?

reply "Victor T." <gmane.greatwolf mamber.net> writes:
Hi,

I'm looking to try out D2 after reading Andrei's D Programming book. What 
implementations are available besides DMD for the windows platform?

I've looked at both GDC and LLVM-LDC but was unable to get either of them 
to work at least for version 2 of the language. The precompiled binaries on 
the gdc page seems to be for gdc version 1 of the language. LDC doesn't 
have any precompiled binaries at all for windows and my attempts to build 
it has so far failed.

Any recommendations and advice on this is appreciated. I'm mainly 
interested in trying all these alternate implementations to see how well 
they can optimize code.
Jun 10 2011
next sibling parent reply Daniel Gibson <metalcaedes gmail.com> writes:
Am 10.06.2011 10:46, schrieb Victor T.:
 Hi,
 
 I'm looking to try out D2 after reading Andrei's D Programming book. What 
 implementations are available besides DMD for the windows platform?
 
 I've looked at both GDC and LLVM-LDC but was unable to get either of them 
 to work at least for version 2 of the language. The precompiled binaries on 
 the gdc page seems to be for gdc version 1 of the language. LDC doesn't 
 have any precompiled binaries at all for windows and my attempts to build 
 it has so far failed.
 
 Any recommendations and advice on this is appreciated. I'm mainly 
 interested in trying all these alternate implementations to see how well 
 they can optimize code.
Are you aware that the new official GDC page is https://bitbucket.org/goshawk/gdc/wiki/Home ? The download page contains snapshots for D2 on windows (and maybe D1 as well). Cheers, - Daniel
Jun 10 2011
parent reply "Victor T." <gmane.greatwolf mamber.net> writes:
Daniel Gibson <metalcaedes gmail.com> wrote in
news:issm47$10ia$4 digitalmars.com: 

 
 Are you aware that the new official GDC page is
 https://bitbucket.org/goshawk/gdc/wiki/Home ?
 The download page contains snapshots for D2 on windows (and maybe D1
 as well).
 
 Cheers,
 - Daniel
 
Yes that was the page I was talking about. Specifically, the precompiled binaries here: https://bitbucket.org/goshawk/gdc/downloads It appears to work with version 1 of the D language spec. For example, when I compile the following under gdc I get an error that writeln is undefined: import std.stdio; void main() { writeln("quicktest\n"); } However, changing it to writefln compiles and runs fine. Additionally, I also tried passing in -fversion=2 to gdc to which it complains it's invalid. So it would appear the precompiled binaries made available do not support D2.
Jun 10 2011
next sibling parent Daniel Gibson <metalcaedes gmail.com> writes:
Am 10.06.2011 11:22, schrieb Victor T.:
 Daniel Gibson <metalcaedes gmail.com> wrote in
 news:issm47$10ia$4 digitalmars.com: 
 
 Are you aware that the new official GDC page is
 https://bitbucket.org/goshawk/gdc/wiki/Home ?
 The download page contains snapshots for D2 on windows (and maybe D1
 as well).

 Cheers,
 - Daniel
Yes that was the page I was talking about. Specifically, the precompiled binaries here: https://bitbucket.org/goshawk/gdc/downloads It appears to work with version 1 of the D language spec. For example, when I compile the following under gdc I get an error that writeln is undefined: import std.stdio; void main() { writeln("quicktest\n"); } However, changing it to writefln compiles and runs fine. Additionally, I also tried passing in -fversion=2 to gdc to which it complains it's invalid. So it would appear the precompiled binaries made available do not support D2.
Strange. I haven't got a windows box, but in the archive there's also a libphobos2 and include/ also contains a d2 dir, so I thought D2 was supported.
Jun 10 2011
prev sibling parent reply Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 6/10/11, Victor T. <gmane.greatwolf mamber.net> wrote:
   void main()
   {
       writeln("quicktest\n");
   }

 However, changing it to writefln compiles and runs fine. Additionally, I
 also tried passing in -fversion=2 to gdc to which it complains it's
 invalid.
gdc -v2 main.d
Jun 10 2011
parent reply Greatwolf <gmane.greatwolf mamber.net> writes:
Andrej Mitrovic <andrej.mitrovich gmail.com> wrote in 
news:mailman.765.1307719908.14074.digitalmars-d puremagic.com:

 
 gdc -v2 main.d
Thank you! That option did the trick. Somehow I didn't see that in the user docs in the gdc site https://bitbucket.org/goshawk/gdc/wiki/UserDocumentation
Jun 10 2011
parent Andrew Wiley <wiley.andrew.j gmail.com> writes:
On Fri, Jun 10, 2011 at 2:54 PM, Greatwolf <gmane.greatwolf mamber.net>wrote:

 Andrej Mitrovic <andrej.mitrovich gmail.com> wrote in
 news:mailman.765.1307719908.14074.digitalmars-d puremagic.com:

 gdc -v2 main.d
Thank you! That option did the trick. Somehow I didn't see that in the user docs in the gdc site https://bitbucket.org/goshawk/gdc/wiki/UserDocumentation
Building a GDC that does both is still a relatively new development, and I think it hasn't actually been integrated into the main repo yet. Pretty sure whoever's making the Windows binaries (sorry, I should know who that is, but I don't) is patching it before he builds.
Jun 10 2011
prev sibling parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 10/06/2011 09:46, Victor T. wrote:
 Hi,

 I'm looking to try out D2 after reading Andrei's D Programming book. What
 implementations are available besides DMD for the windows platform?

 I've looked at both GDC and LLVM-LDC but was unable to get either of them
 to work at least for version 2 of the language. The precompiled binaries on
 the gdc page seems to be for gdc version 1 of the language. LDC doesn't
 have any precompiled binaries at all for windows and my attempts to build
 it has so far failed.

 Any recommendations and advice on this is appreciated. I'm mainly
 interested in trying all these alternate implementations to see how well
 they can optimize code.
Your best option for D on Windows is dmd right now. It is implicitly more up to date than GDC/LDC (they both depend on the dmd front end, so there will inevitably be some amount of lag). GDC has D2 support and Windows support, I don't believe it offers pre-compiled binaries for D2 on Windows yet though. It should do in the near future, as gdc is actively developed, and people have been taking an interest in Windows support recently. LDC has alpha, maybe beta support for D2, and is behind dmd releases. It uses the LLVM backend, which doesn't support exceptions on Windows currently, so it's not much use. Note that the next release of LLVM will have support for exceptions on 64-bit Windows, no work has been done for 32 bit though, my guess is that will follow. As for how well they optimize code, dmd has a state of the art optimizer from the 90s, or there abouts - the code it generates is pretty speedy, it has some obvious short comings though (I believe floating point and inlining are lacking, as well as some more modern optimizations). GDC optimizes code almost as well as GCC, there are a few notable cases where it doesn't though - it's a matter of time before these are fixed though, by which time the code generated will be roughly the same speed as the equivalent C/C++. LDC optimizes code roughly as well as clang, and has some D specific optimizations too (something which GDC is lacking, and DMD too). As far as I'm aware these are nothing major though. -- Robert http://octarineparrot.com/
Jun 10 2011
next sibling parent Trass3r <un known.com> writes:
Am 10.06.2011, 14:01 Uhr, schrieb Robert Clipsham  
<robert octarineparrot.com>:
 LDC has alpha, maybe beta support for D2, and is behind dmd releases. It  
 uses the LLVM backend, which doesn't support exceptions on Windows  
 currently, so it's not much use. Note that the next release of LLVM will  
 have support for exceptions on 64-bit Windows, no work has been done for  
 32 bit though, my guess is that will follow.
Woot! That's great news, Win64 support is all I need :)
Jun 10 2011
prev sibling next sibling parent reply Trass3r <un known.com> writes:
Am 10.06.2011, 14:01 Uhr, schrieb Robert Clipsham  
<robert octarineparrot.com>:
 Note that the next release of LLVM will have support for exceptions on  
 64-bit Windows, no work has been done for 32 bit though, my guess is  
 that will follow.
What is your source? I could only find this changeset which adds SEH parsing and AST support to Clang: https://llvm.org/viewvc/llvm-project?view=rev&sortby=date&revision=130366
Jun 10 2011
parent Robert Clipsham <robert octarineparrot.com> writes:
On 10/06/2011 15:34, Trass3r wrote:
 Am 10.06.2011, 14:01 Uhr, schrieb Robert Clipsham
 <robert octarineparrot.com>:
 Note that the next release of LLVM will have support for exceptions on
 64-bit Windows, no work has been done for 32 bit though, my guess is
 that will follow.
What is your source? I could only find this changeset which adds SEH parsing and AST support to Clang: https://llvm.org/viewvc/llvm-project?view=rev&sortby=date&revision=130366
There are a lot of other commits for it, and some mailing list entries, you can find a selection here: Commits: http://goo.gl/efoVp http://goo.gl/iXGlT http://goo.gl/qe9u1 Mailing list entries: http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-June/040442.html -- Robert http://octarineparrot.com/
Jun 10 2011
prev sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Robert Clipsham" <robert octarineparrot.com> wrote in message 
news:ist1af$tbj$1 digitalmars.com...
 As for how well they optimize code, dmd has a state of the art optimizer 
 from the 90s, or there abouts - the code it generates is pretty speedy, it 
 has some obvious short comings though (I believe floating point and 
 inlining are lacking, as well as some more modern optimizations).
I'm pretty sure DMD does inlining. After all, it *does* have an "-inline" commandlne flag. My understanding is that it just doesn't always inline everything it could.
Jun 10 2011
parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On 2011-06-10 13:15, Nick Sabalausky wrote:
 "Robert Clipsham" <robert octarineparrot.com> wrote in message
 news:ist1af$tbj$1 digitalmars.com...
 
 As for how well they optimize code, dmd has a state of the art optimizer
 from the 90s, or there abouts - the code it generates is pretty speedy,
 it has some obvious short comings though (I believe floating point and
 inlining are lacking, as well as some more modern optimizations).
I'm pretty sure DMD does inlining. After all, it *does* have an "-inline" commandlne flag. My understanding is that it just doesn't always inline everything it could.
dmd _definitely_ has inlining. It could use some improvement (e.g. functions with lazy parameters can't currently be inlined), but it _does_ have inlining. And dmd's optimizations aren't bad. It's just that they could be better. I expect that we'll see them improve further once the language has stablized more. As much as faster code would be nice, correct code is much more important. And there are still plenty of bugs to iron out in the compiler (though it's definitely improving). - Jonathan M Davis
Jun 10 2011
parent Robert Clipsham <robert octarineparrot.com> writes:
On 10/06/2011 21:18, Jonathan M Davis wrote:
 On 2011-06-10 13:15, Nick Sabalausky wrote:
 "Robert Clipsham"<robert octarineparrot.com>  wrote in message
 news:ist1af$tbj$1 digitalmars.com...

 As for how well they optimize code, dmd has a state of the art optimizer
 from the 90s, or there abouts - the code it generates is pretty speedy,
 it has some obvious short comings though (I believe floating point and
 inlining are lacking, as well as some more modern optimizations).
I'm pretty sure DMD does inlining. After all, it *does* have an "-inline" commandlne flag. My understanding is that it just doesn't always inline everything it could.
dmd _definitely_ has inlining. It could use some improvement (e.g. functions with lazy parameters can't currently be inlined), but it _does_ have inlining. And dmd's optimizations aren't bad. It's just that they could be better. I expect that we'll see them improve further once the language has stablized more. As much as faster code would be nice, correct code is much more important. And there are still plenty of bugs to iron out in the compiler (though it's definitely improving). - Jonathan M Davis
Indeed, by lacking I didn't mean lacking the feature, I meant lacking in functionality/ability, there are a lot of things that it could inline but doesn't currently. -- Robert http://octarineparrot.com/
Jun 11 2011