View mode: basic / threaded / horizontal-split · Log in · Help
July 04, 2010
d2 compiler
Hello everybody,
i'm new to D but not to programming in general. I wrote some todo-lister 
in D1. It compiles and works nearly perfectly except some little issues. 
I wanted to check if it works under D2. I renamed my
DMD version 1 compiler to "dmd1.exe" so I could use dsss/rebuild.
When try to compile my code doesn't stop to take more RAM.
Where's the issue. Is it my code, dsss or the compiler.

I use dmd 2.047, dsss/rebuild through the commandline, win7.
Here's my code: http://pastebin.com/DRCbg03v

Mafi
July 04, 2010
Re: d2 compiler
Mafi:
> When try to compile my code doesn't stop to take more RAM.

Maybe it's those appensds. If you have many large strings it's much better both in D and other languages to collect them in an array of strings, and then join them all at the end.
Try to strip your program to bare-bones if you want to find the source of your problems.

Note "$"[0] is probably written '$'.

Bye,
bearophile
July 04, 2010
Re: d2 compiler
bearophile:
> Mafi:
>> When try to compile my code doesn't stop to take more RAM.
>
> Maybe it's those appensds. If you have many large strings it's much better both in D and other languages to collect them in an array of strings, and then join them all at the end.
> Try to strip your program to bare-bones if you want to find the source of your problems.
If I understood you correctly, you want to say that the contactation 
takes much RAM, but it doesn't even compile. There's no error. It simply 
doesn't stop to build and takes more and more RAM.

> Note "$"[0] is probably written '$'.
Yeah, that's right!

It seems some problem of dmd or rebuild because a Hello-World-Program 
which also import std.file doesn't stop to compile. If comment out the 
std.file-import everything is fine.
July 05, 2010
Re: d2 compiler
Mafi wrote:

> so I could use dsss/rebuild.
> When try to compile my code doesn't stop to take more RAM.

We've had the same problem with dsss and D2. I don't think dsss works 
with D2.

Just forget about it and build directly with dmd... :)

Ali
July 05, 2010
Re: d2 compiler
> When try to compile my code doesn't stop to take more RAM.
> Where's the issue. Is it my code, dsss or the compiler.

rebuild doesn't work properly with D2.
xfBuild does for instance.
Top | Discussion index | About this forum | D home