I am a long-time fan of the D programming language, though I have never seriously learned it. One of the many big and small reasons that I do not use D is the official compiler dmd is hard to install on the old Linux servers I routinely access. Although a binary has been available for some time, it requires a recent glibc. I tried to compile the source code, but the compiler is separated into several source code trees and the documentation is quite lousy. It is not like I can download a tar-ball, unpack it and run ‘./configure;make;make install’.
The situation has not been changed much nowadays – the binary is still not working – but I hope I can help those who have the same problem. I wrote a Makefile to compile the D compiler. It grabs source code from github and compile it. If you have an old machine where the binary does not work, you can do the following to compile D (you need a C++ compiler and git of course):
mkdir -p dmd2; cd dmd2 git clone git://gist.github.com/1848272.git mv 1848272/compile-d.mak . make -f compile-d.mak export PATH="`pwd`/bin:$PATH"
The whole procedure only takes a few minutes, much faster than compiling gcc/g++. Hope it helps, just in case.
That’s great – I’ve been meaning to try D2 and that might prompt me to switch. Still using the gdc D1 compiler I laboriously built a few years ago (which surprisingly still works after various OS distribution upgrades) and have been putting off revisiting it..
D is a great language and really deserves more attention. Pity about the documentation the competing library issues.
I still say you may be more pleased with a language like ‘clay’. D2, rust, c#, java, there’s not a big difference between all these languages.
Thanks for the comments. I have heard a lot of good things about C#. However, C# is largely MS only. The Mono virtual machine is not of top quality. Java’s memory management, sluggish GUI and slow warm-up are always my concerns. Clay and rust are a bit young. Also Clay seems not to have a garbage collector (according to the front page). While I sometimes quite enjoy managing the memory myself for difficult tasks, other times I more like to give the job to a garbage collector for simple ones. Perhaps I know too little about Clay. I will have a look some day. Thank you.
I had a closer look at Clay and decided that it is not for me. Here are my concerns.
There are also minor concerns about the designs such as the lack of bit operators (Clay uses functions) and excessively verbose built-in function names. The documentation right now is also lousy. I am surprised that I even could not find something like “tutorial” or “getting started”. For a newcomer like me, missing such entry-level documentations is not a good start.