www.digitalmars.com         C & C++   DMDScript  

D.gnu - Binary size

reply Giles Constant <giles spacepigs.com> writes:
Hi there,

I appreciate that it's early days yet, and there's probably more important
things to worry about, but will there be any movement towards making gdc
produce smaller binaries, or is this not a goal of the project?  eg. "hello
world" producing binaries in the range of 4k rather than 190k :-)

I looking at D as an alternative to C for programming 64k graphical demos,
but so far, I've had to rule it out completely!

Thanks,

Giles
Jun 23 2004
next sibling parent reply Ilya Minkov <minkov cs.tum.edu> writes:
Giles Constant schrieb:
 Hi there,
Yo!
 I looking at D as an alternative to C for programming 64k graphical demos,
 but so far, I've had to rule it out completely!
So nice to see fellow demosceners are interested in the language!
 I appreciate that it's early days yet, and there's probably more important
 things to worry about, but will there be any movement towards making gdc
 produce smaller binaries, or is this not a goal of the project?  eg. "hello
 world" producing binaries in the range of 4k rather than 190k :-)
Let's see what can be done. There's not much to be done on the compiler, so it's the question of creating an alternative, minimalistic runtime library. Garbage collection would be compromised on the platforms where boehm is not in OS distribution. Typeinfo has to be disabled. And so on. And still, i'm not sure of success - you have to cripple D into some other language anyway. I don't see much advantage beyond C++. Where D really should be a great gain, is large software, in the sense that it makes it easier, and for large software, i believe D executables may be more compact than those of C++. -eye/PhotoAllergicsCrew (ex-midiclub/Numedia Cyclops) BTW, i'm about to start making a Demoengine which would use Blender as primary modelling and animation software. Would you like to participate, if it gets written in D? I haven't made my decision yet, whether it should be D or C++, but for C++ speaks e.g. Nebula1 which i could then mostly reuse.
Jun 24 2004
next sibling parent Ilya Minkov <minkov cs.tum.edu> writes:
Ilya Minkov schrieb:
 So nice to see fellow demosceners are interested in the language!
Wait a moment... SPACEPIGS? THE SPACE PIGS? (http://www.pouet.net/groups.php?which=1377) Oldskooler re-entry? -eye
Jun 24 2004
prev sibling parent reply Giles Constant <giles spacepigs.com> writes:
Ilya Minkov wrote:

 Giles Constant schrieb:
 
 So nice to see fellow demosceners are interested in the language!
Generally it's nice to see fellow demosceners anywhere :-)
 Let's see what can be done. There's not much to be done on the compiler,
 so it's the question of creating an alternative, minimalistic runtime
 library. Garbage collection would be compromised on the platforms where
 boehm is not in OS distribution. Typeinfo has to be disabled. And so on.
   And still, i'm not sure of success - you have to cripple D into some
 other language anyway. I don't see much advantage beyond C++.
At present I'm trying to write OO using C and structs for some very pluggable code. I ditched C++ because of the sudden bloat you get just for using the "template" keyword. I'm also using lots of things which could benefit from STL-like libraries, but the size bloat is huge. So I'm using C, which means I have to have millions of pointers to functions instead of virtual functions. The result is I spend 90% of my time fixing pointer/casting bugs which should really be spotted for me by the compiler. And since it's impossible to detect pointer casting bugs in a debugger (how does it know what type it's supposed to be?), you can probably imagine how frustrating this gets.
 BTW, i'm about to start making a Demoengine which would use Blender as
 primary modelling and animation software. Would you like to participate,
 if it gets written in D? I haven't made my decision yet, whether it
 should be D or C++, but for C++ speaks e.g. Nebula1 which i could then
 mostly reuse.
Sounds interesting! I'm not actually working on the full demo here - I'm writing the music synthesiser engine for someone else's demo, although I intend to make a full GUI for it, which will be in D, regardless of what language the synth is written in.
 Wait a moment... SPACEPIGS? THE SPACE PIGS?
Alas no.. I confess, I'd not heard of spacepigs when I registered the domain (I was an amiga scener in the 90s), but it got me VIP entrance to assembly 2003 before they worked out who I was, so I'm not complaining :-)
Jun 24 2004
parent Stephen Waits <steve waits.net> writes:
Excuse the thread hijacking..

Glad to see some demo people here.  I have a question..

What are you using for your linear algebra stuff?  How efficient is it?

Thanks,
Steve

[not a demo dude myself, I work for SCEA, on a PSP title]
Jun 30 2004
prev sibling parent reply Alvaro Segura <alvaro.segura gmail.com> writes:
Giles Constant wrote:

 Hi there,
 
 I appreciate that it's early days yet, and there's probably more important
 things to worry about, but will there be any movement towards making gdc
 produce smaller binaries, or is this not a goal of the project?  eg.
 "hello world" producing binaries in the range of 4k rather than 190k :-)
I'm very new to D. Why is a minimal program 190K? Is the runtime library static or what? With a shared rtl it shouldn't be that big.
Nov 06 2004
next sibling parent Sebastian Czech <sebastian.czech arcor.de> writes:
On Sat, 06 Nov 2004 23:03:55 +0100
Alvaro Segura <alvaro.segura gmail.com> wrote:

 I'm very new to D. Why is a minimal program 190K? Is the runtime library
 static or what? With a shared rtl it shouldn't be that big.
phobos (gdc) is an static lib - you can build an so if you want Sebastian
Nov 06 2004
prev sibling parent Ilya Minkov <minkov cs.tum.edu> writes:
Alvaro Segura schrieb:

 I'm very new to D. Why is a minimal program 190K? Is the runtime library
 static or what? With a shared rtl it shouldn't be that big.
Yes, so far it is. It has been so for now because it is likely to change before the final release, so the executables better carry one with them. I heard that since making a shared library was not a priority yet, subtle bugs may prevent you from making it work. -eye
Nov 07 2004