www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - ddmd

reply dolive <dolive89 sinal.com> writes:
thanksŁ¬great work !
make an all out effort !
Aug 21 2010
next sibling parent reply Denis Koroskin <2korden gmail.com> writes:
dolive Wrote:

 thanksŁ¬great work !
 make an all out effort !

I've implemented 127 missing methods (958 down to 831) yesterday. druntime compiles for a long time now (producing exactly the same binaries that DMD produces) and I hope that Phobos will be there soon enough. I'd say it is 80% complete but still missing a few key components. I have only tested it on Win32, but Linux might work, too (the was some work done to support it). Keep in mind that it is based on DMD2.032 which is almost a year old. It is also D2-only ATM but I believe D1 support can be added with little effort since a lot of the code is shared between the two versions with differences being versioned out. I tried not to break anything as much as I could. I'll report more when I manage to compile Phobos entirely.
Aug 21 2010
next sibling parent Robert Clipsham <robert octarineparrot.com> writes:
On 21/08/10 21:32, Denis Koroskin wrote:
 I'd say it is 80% complete but still missing a few key components.
 I have only tested it on Win32, but Linux might work, too (the was some work
done to support it).

I got it compiling on linux, and working in a lot of the cases dmd does, I was hitting some random SIGSEGVs in places which I couldn't track down though, I don't remember the specifics, and I didn't spend much time on it - if someone wanted to pick up where I left off they could probably track it down/fix it fairly quickly if familiar with the dmd source code. You should also note that the instructions for building on linux are slightly wrong in that you need to comment out the dmd main() function, before compiling the backend library, otherwise you end up using dmd rather than ddmd. -- Robert http://octarineparrot.com/
Aug 21 2010
prev sibling next sibling parent reply dsimcha <dsimcha yahoo.com> writes:
== Quote from Denis Koroskin (2korden gmail.com)'s article
 dolive Wrote:
 thanksŁ¬great work !
 make an all out effort !

druntime compiles for a long time now (producing exactly the same binaries that

 I'd say it is 80% complete but still missing a few key components.
 I have only tested it on Win32, but Linux might work, too (the was some work

 Keep in mind that it is based on DMD2.032 which is almost a year old. It is
also

of the code is shared between the two versions with differences being versioned out. I tried not to break anything as much as I could.
 I'll report more when I manage to compile Phobos entirely.

So when ddmd finally works fully, is Walter going to ditch the C++ codebase and base the official DMD implementation on ddmd? This would be great for a few reasons: 1. The PR benefits of having a self-hosting D compiler. 2. If Walter is eating his own dogfood, it will give him a better feel for what bugs are high vs. low priority. 3. If the productivity of D is higher than C++ by as much as we think it is, DMD should progress faster after the switch is made. I have my doubts, though, about the productivity benefits of D when you throw legacy code translated from old-school C++ into the mix. 4. I probably speak for a lot of people on this one, and one reason why I don't contribute to DMD even though I contribute to Phobos is because DMD is in C++ and I don't know C++ thoroughly. I know the basic syntax and semantics of the language, but I'm not so familiar with the idioms, conventions, gotchas and corner cases. I'd be a lot more inclined to help out with DMD if it were written in D.
Aug 21 2010
parent reply "Nick Sabalausky" <a a.a> writes:
"dsimcha" <dsimcha yahoo.com> wrote in message 
news:i4pf6d$15e1$1 digitalmars.com...
 == Quote from Denis Koroskin (2korden gmail.com)'s article
 dolive Wrote:
 thanksgreat work !
 make an all out effort !

druntime compiles for a long time now (producing exactly the same binaries that

 I'd say it is 80% complete but still missing a few key components.
 I have only tested it on Win32, but Linux might work, too (the was some 
 work

 Keep in mind that it is based on DMD2.032 which is almost a year old. It 
 is also

a lot of the code is shared between the two versions with differences being versioned out. I tried not to break anything as much as I could.
 I'll report more when I manage to compile Phobos entirely.

So when ddmd finally works fully, is Walter going to ditch the C++ codebase and base the official DMD implementation on ddmd? This would be great for a few reasons: 1. The PR benefits of having a self-hosting D compiler. 2. If Walter is eating his own dogfood, it will give him a better feel for what bugs are high vs. low priority. 3. If the productivity of D is higher than C++ by as much as we think it is, DMD should progress faster after the switch is made. I have my doubts, though, about the productivity benefits of D when you throw legacy code translated from old-school C++ into the mix. 4. I probably speak for a lot of people on this one, and one reason why I don't contribute to DMD even though I contribute to Phobos is because DMD is in C++ and I don't know C++ thoroughly. I know the basic syntax and semantics of the language, but I'm not so familiar with the idioms, conventions, gotchas and corner cases. I'd be a lot more inclined to help out with DMD if it were written in D.

All good points, but one problem with moving DMD's official source from C++ to D is it would make it difficult to port DMD to new platforms. Nearly every platform under then sun has a C++ compiler, but not so much for D compilers. Once a good, reliable, well-maintained, up-to-date C- or C++-producing backend for D is available (ideally for DMD itself, as I don't think Walter would want DMD's portability to be reliant on a third-party compiler like LDC or GDC), then that would be the time for DMD to make the switch.
Aug 21 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 8/21/2010 15:18, Nick Sabalausky wrote:
 All good points, but one problem with moving DMD's official source from C++ 
 to D is it would make it difficult to port DMD to new platforms. Nearly 
 every platform under then sun has a C++ compiler, but not so much for D 
 compilers.

Why would that matter? Why would you want to compile the compiler for a platform, on that platform? -- Rainer Deyke - rainerd eldwood.com
Aug 21 2010
next sibling parent reply "Nick Sabalausky" <a a.a> writes:
"Rainer Deyke" <rainerd eldwood.com> wrote in message 
news:i4pju0$1pjd$1 digitalmars.com...
 On 8/21/2010 15:18, Nick Sabalausky wrote:
 All good points, but one problem with moving DMD's official source from 
 C++
 to D is it would make it difficult to port DMD to new platforms. Nearly
 every platform under then sun has a C++ compiler, but not so much for D
 compilers.

Why would that matter? Why would you want to compile the compiler for a platform, on that platform?

To use that platform to compile something.
Aug 21 2010
parent reply Rainer Deyke <rainerd eldwood.com> writes:
On 8/21/2010 17:14, Nick Sabalausky wrote:
 "Rainer Deyke" <rainerd eldwood.com> wrote in message 
 news:i4pju0$1pjd$1 digitalmars.com...
 Why would that matter?  Why would you want to compile the compiler for a
 platform, on that platform?

To use that platform to compile something.

It took me a while to make any sense of that statement. You're talking about a situation where no compiler binary exists that runs on your platform, so you want to compile the compiler for that platform on the platform itself, right? The platform the compiler targets and the platform on which the compiler runs are orthogonal issues. If you want the compiler to produce native binaries on platform X, it must first be able to target platform X. If the compiler can target platform X, then it is easy enough to create a binary of the compiler that runs on platform X by compiling on platform A. From there it's a simple matter to write a script that compiles, packages, and uploads the compiler for all supported platforms. It should therefore never be necessary to compile the compiler itself on platform X. Or am I missing something? -- Rainer Deyke - rainerd eldwood.com
Aug 21 2010
parent "Nick Sabalausky" <a a.a> writes:
"Rainer Deyke" <rainerd eldwood.com> wrote in message 
news:i4pp13$rgr$1 digitalmars.com...
 On 8/21/2010 17:14, Nick Sabalausky wrote:
 "Rainer Deyke" <rainerd eldwood.com> wrote in message
 news:i4pju0$1pjd$1 digitalmars.com...
 Why would that matter?  Why would you want to compile the compiler for a
 platform, on that platform?

To use that platform to compile something.

It took me a while to make any sense of that statement. You're talking about a situation where no compiler binary exists that runs on your platform, so you want to compile the compiler for that platform on the platform itself, right? The platform the compiler targets and the platform on which the compiler runs are orthogonal issues. If you want the compiler to produce native binaries on platform X, it must first be able to target platform X. If the compiler can target platform X, then it is easy enough to create a binary of the compiler that runs on platform X by compiling on platform A. From there it's a simple matter to write a script that compiles, packages, and uploads the compiler for all supported platforms. It should therefore never be necessary to compile the compiler itself on platform X. Or am I missing something?

Yea, I think maybe I was just confused. To my knowledge, DMD doesn't do cross-compilation, so I managed to get it into my head that "If DMD runs on platform X, then it'll produce working binaries for Platform X", which of course is stupid ;)
Aug 21 2010
prev sibling parent dsimcha <dsimcha yahoo.com> writes:
== Quote from Rainer Deyke (rainerd eldwood.com)'s article
 On 8/21/2010 15:18, Nick Sabalausky wrote:
 All good points, but one problem with moving DMD's official source from C++
 to D is it would make it difficult to port DMD to new platforms. Nearly
 every platform under then sun has a C++ compiler, but not so much for D
 compilers.

platform, on that platform?

I have to compile DMD on some computers that I have SSH access to because the sysadmin insists on running some caveman era distro of Linux. It uses kernel version 2.6.9, which was apparently released in 2004! The binary that ships with DMD doesn't work with the shared libraries on a distro this old.
Aug 21 2010
prev sibling parent reply Jason House <jason.james.house gmail.com> writes:
Does ddmd use/port the back end? If so, you may be violating the backend
license. If not, what are you using as the backend?

Denis Koroskin Wrote:

 dolive Wrote:
 
 thanksŁ¬great work !
 make an all out effort !

I've implemented 127 missing methods (958 down to 831) yesterday. druntime compiles for a long time now (producing exactly the same binaries that DMD produces) and I hope that Phobos will be there soon enough. I'd say it is 80% complete but still missing a few key components. I have only tested it on Win32, but Linux might work, too (the was some work done to support it). Keep in mind that it is based on DMD2.032 which is almost a year old. It is also D2-only ATM but I believe D1 support can be added with little effort since a lot of the code is shared between the two versions with differences being versioned out. I tried not to break anything as much as I could. I'll report more when I manage to compile Phobos entirely.

Aug 21 2010
parent reply Denis Koroskin <2korden gmail.com> writes:
Jason House Wrote:

 Does ddmd use/port the back end? If so, you may be violating the backend
license. If not, what are you using as the backend?
 

I use Digitalmars backend bindings. Walter said it was okay to do so (since I only interface with it, not modify or integrate it).
Aug 22 2010
parent dolive <dolive89 sinal.com> writes:
Denis Koroskin Đ´µ˝:

 Jason House Wrote:
 
 Does ddmd use/port the back end? If so, you may be violating the backend
license. If not, what are you using as the backend?
 

I use Digitalmars backend bindings. Walter said it was okay to do so (since I only interface with it, not modify or integrate it).

yes, I remember he is said .
Aug 22 2010
prev sibling parent Leandro Lucarella <luca llucax.com.ar> writes:
Denis Koroskin, el 22 de agosto a las 05:53 me escribiste:
 Jason House Wrote:
 
 Does ddmd use/port the back end? If so, you may be violating the backend
license. If not, what are you using as the backend?
 

I use Digitalmars backend bindings. Walter said it was okay to do so (since I only interface with it, not modify or integrate it).

But you can't distribute it either, right? Anyway, I think Walter probably can give permission to distribute it if he wants, but it would be much better if the backend finally could get a proper free software license to completely remove this issue. -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- I'll take a quiet life, a handshake of carbon monoxide, with no alarms and no surprises, no alarms and no surprises.
Aug 22 2010