View mode: basic / threaded / horizontal-split · Log in · Help
June 10, 2011
Available D2 implementation on Windows besides DMD?
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.
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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.
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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.
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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/
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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 :)
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
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/
June 10, 2011
Re: Available D2 implementation on Windows besides DMD?
"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.
« First   ‹ Prev
1 2
Top | Discussion index | About this forum | D home