Thread overview
getting started in D
May 11, 2008
Erik Lechak
May 11, 2008
Derek Parnell
May 13, 2008
Don
May 11, 2008
Hello All,

I hope this is correct forum to ask these questions.  I just started looking at D.  I was excited to go about writing my first application but ran into a few problems.

I decided to use gdc ( maybe this was the first problem? ).  Is gdc behind the times with respect to the dmd compiler?  I noticed that the standard library (phobos) was missing several functions that are documented here:
    http://www.digitalmars.com/d/2.0/phobos/phobos.html

    "std.string.startsWith" and "std.process.shell" are two that I recall being missing.

I used a standard debian gdc install.  I have the directory /usr/include/d/4.1  and a link /usr/include/d/4.1.3 that links back to 4.1.  All the files appear to be there but they are missing functionality.  Am I using the wrong libraries?  Is there a better or more up to date Phobos library?

Happily I got a program to compile and run ... wooohooo ... So I tried to get fancy and write my own module.  It took me a while, but I finally figured out I needed a build tool to do an "automated" build (like javac does).  So I tried to compile "build" / "bud" version 3.04.  It failed to compile.  So I spent some time fixing "bud" and got it to compile.  Now it runs fine.

Since "bud" didn't want to compile out of the box, I have to assume that it is not the approved method of compiling D code.  So what is the recommended way to compile D code?  Is anyone interested in my modified version of "bud" that compiles under gdc?  Does "bud" compile with dmd without problems?

Thanks,
Erik Lechak

May 11, 2008
Erik Lechak wrote:

> I decided to use gdc ( maybe this was the first problem? ).  Is gdc
> behind the times with respect to the dmd compiler?  I noticed that
> the standard library (phobos) was missing several functions that are
> documented here: http://www.digitalmars.com/d/2.0/phobos/phobos.html
> 
> "std.string.startsWith" and "std.process.shell" are two that I recall
> being missing.

If you are using the D1 language, then you need to instead look at:
http://www.digitalmars.com/d/1.0/phobos/phobos.html

> I used a standard debian gdc install.  I have the directory
> /usr/include/d/4.1  and a link /usr/include/d/4.1.3 that links back
> to 4.1.  All the files appear to be there but they are missing
> functionality.  Am I using the wrong libraries?  Is there a better or
> more up to date Phobos library?

The debian package uses version 1 of the D language, probably
since version 2 is still in an alpha stage and changing rapidly...

You might also want to take a peek at the Tango library instead ?
http://dsource.org/projects/tango/ (it replaces the Phobos library)

> Happily I got a program to compile and run ... wooohooo ... So I
> tried to get fancy and write my own module.  It took me a while, but
> I finally figured out I needed a build tool to do an "automated"
> build (like javac does).  So I tried to compile "build" / "bud"
> version 3.04.  It failed to compile.  So I spent some time fixing
> "bud" and got it to compile.  Now it runs fine.
> 
> Since "bud" didn't want to compile out of the box, I have to assume
> that it is not the approved method of compiling D code.  So what is
> the recommended way to compile D code?  Is anyone interested in my
> modified version of "bud" that compiles under gdc?  Does "bud"
> compile with dmd without problems?

The "bud" tool is mostly for DMD, the "rebuild" tool from DSSS works
better with GDC. Both uses version(build) and accomplish same thing.

--anders
May 11, 2008
On Sun, 11 May 2008 03:35:07 -0400, Erik Lechak wrote:

> Since "bud" didn't want to compile out of the box ...

I developed Bud on a DMD/Windows box and I rely on the kindeness of strangers to tell me about GDC and/or linux problems with it. However, I am improving its compatiblity with Linux ... gdc I'm not so sure about.


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell
May 13, 2008
Derek Parnell wrote:
> On Sun, 11 May 2008 03:35:07 -0400, Erik Lechak wrote:
> 
>> Since "bud" didn't want to compile out of the box ...
> 
> I developed Bud on a DMD/Windows box and I rely on the kindeness of
> strangers to tell me about GDC and/or linux problems with it. However, I am
> improving its compatiblity with Linux ... gdc I'm not so sure about.

Are you planning on another release? IIRC, it's been two years since the last one.
Not that I have any complaints about it.