www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - getting started in D

reply Erik Lechak <prochak netzero.net> writes:
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
next sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
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
prev sibling parent reply Derek Parnell <derek psych.ward> writes:
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 11 2008
parent Don <nospam nospam.com.au> writes:
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.
May 13 2008