www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.dtl - How to make and install DTL/MinTL

reply =?ISO-8859-1?Q?Sigbj=F8rn_Lund_Olsen?= <sigbjorn lundolsen.net> writes:
I'm a hobby programmer - I write programs for fun and recreation. 
Usually they are truly simple things. And I've found D very expressive 
in that regard - I'd say I spend a lot less time programming the same 
quantity of program in D than in Java or C++.

But libraries in D - these things do me in. I mean, when programming in 
C++ any library is going to have its own little "how to install - cannot 
possibly fail" recipe in a small text file. It's quick and painless - 
type "make && make install" and you're set. You just include the 
relevant header file (which is already in the include path due to make 
install) and you're laughing.

I honestly cannot figure out how to use DTL/MinTL. Maybe I am 
unbelievably dumb - but a word of warning: If I can't figure this out; 
if this language becomes popular with completely new programmers (and it 
might be more attractive to them because it's a simpler language than 
for example C++) then this is going to become hell.

My question is simply: How am I supposed to build and install DTL/MinTL?

Everybody seems to have a different layout. DTLs makefile is riddled 
with SYNSOFT_ROOT (of which I have none), and obviously assumes that 
I've got things sorted in some specific order. MinTL hasn't got anything 
to help me at all. dmake (more hardcoded paths and general nausea from 
trying to figure out how to actually make it resolve paths, as in my 
case it was determined not to read sc.ini no matter what I did) just 
built 4-5 object files and linked it into my app, but when compiling 
with -unittest I got link errors (which to me are generally fairly greek).

Now, I'm sure DTL/MinTL will keep me very happy indeed. All I want is 
linked list. It shouldn't be this complicated.

I recall an old "Plug 'n' Play" joke: In D, it's more like "Plug 'n' 
Pray". At least for me. But I am quite possibly unbelievably dumb.

Cheers,
Sigbjørn Lund Olsen
Oct 17 2004
next sibling parent Ben Hinkle <bhinkle4 juno.com> writes:
Sigbjørn Lund Olsen wrote:

 I'm a hobby programmer - I write programs for fun and recreation.
 Usually they are truly simple things. And I've found D very expressive
 in that regard - I'd say I spend a lot less time programming the same
 quantity of program in D than in Java or C++.
 
 But libraries in D - these things do me in. I mean, when programming in
 C++ any library is going to have its own little "how to install - cannot
 possibly fail" recipe in a small text file. It's quick and painless -
 type "make && make install" and you're set. You just include the
 relevant header file (which is already in the include path due to make
 install) and you're laughing.
 
 I honestly cannot figure out how to use DTL/MinTL. Maybe I am
 unbelievably dumb - but a word of warning: If I can't figure this out;
 if this language becomes popular with completely new programmers (and it
 might be more attractive to them because it's a simpler language than
 for example C++) then this is going to become hell.
 
 My question is simply: How am I supposed to build and install DTL/MinTL?
 
 Everybody seems to have a different layout. DTLs makefile is riddled
 with SYNSOFT_ROOT (of which I have none), and obviously assumes that
 I've got things sorted in some specific order. MinTL hasn't got anything
 to help me at all. dmake (more hardcoded paths and general nausea from
 trying to figure out how to actually make it resolve paths, as in my
 case it was determined not to read sc.ini no matter what I did) just
 built 4-5 object files and linked it into my app, but when compiling
 with -unittest I got link errors (which to me are generally fairly greek).
 
 Now, I'm sure DTL/MinTL will keep me very happy indeed. All I want is
 linked list. It shouldn't be this complicated.
 
 I recall an old "Plug 'n' Play" joke: In D, it's more like "Plug 'n'
 Pray". At least for me. But I am quite possibly unbelievably dumb.
 
 Cheers,
 Sigbjørn Lund Olsen
Near the end of the MinTL doc there is a section about "installing". What you do is add the containers you want plus the following: mintl/share.d mintl/seq.d (and it looks like mintl/array.d). So for example if the file mytest.d has import mintl.list; int main() { List!(int) list; list.add(10,20,30); return 0; } then it can be compiles with dmd mytest.d mintl/list.d mintl/share.d mintl/seq.d mintl/array.d The array.d is needed because of unittests - I should try to move those unittests elsewhere so that the dependencies are kept simple. The reason there isn't a makefile to make a library is that the lib would just contain a few exception classes - everything else is a template. I'll look into it, though, since it would be nice to trim down that list of stuff you need to type to get it to compile. If you get link errors like undefined reference to `_Class_5mintl5share25IndexOutOfBoundsException' then put mintl/share.d on the compilation list. It should be pretty easy to pick the module that is missing since it is mangled to "5mintl5share". Building with unittests might include more. Ignore any linker warnings about sizes of things being different - I get those all the time. They make me nervous but it doesn't seem to matter. I'll move that section about installing to the top of the doc so it is easier to find. Plus I notice that it leaves out mintl/array.d so I'll figure out what to do about that. good luck! -Ben
Oct 17 2004
prev sibling parent "Matthew" <admin.hat stlsoft.dot.org> writes:
 Everybody seems to have a different layout. DTLs makefile is riddled with
SYNSOFT_ROOT (of which I have none), and 
 obviously assumes that I've got things sorted in some specific order.
My fault, not yours. (I didn't realise that that was the case - I thought it was all relative.) DTL 0.3 will be coming as soon as I've got 15 million things sorted, and will have a sensible makefile.
 Now, I'm sure DTL/MinTL will keep me very happy indeed. All I want is linked
list. It shouldn't be this complicated.
It shouldn't. DTL is currently floundering at the end of a list. If there's anyone's left who's interested when I get round to doing the next round, things should be significantly better. Matthew
Oct 18 2004