Thread overview
lowlevel programming with D?
Nov 15, 2004
alexander.panek
Nov 15, 2004
Ant
Nov 16, 2004
Walter
Nov 17, 2004
Sean Kelly
Nov 17, 2004
Sean Kelly
Nov 15, 2004
alexander.panek
Nov 15, 2004
Thomas Kuehne
Nov 15, 2004
J C Calvarese
November 15, 2004
Hello!

I just wondered, if there are any possibility to use D for microcontroller-programming. The reason I ask for is just because we get started programming microcontrollers in C (dunno which). So - as a D-fan ;o - it would be kind to use D instead of good old C. Afaik there`s only a OS-dependent compiler developed yet?!

Well, thanks for answers.

Alex


November 15, 2004
In article <cnapge$4lq$1@digitaldaemon.com>, alexander.panek@brainsware.org says...

>be kind to use D instead of good old C. Afaik there`s only a OS-dependent compiler developed yet?!

check here: http://www.digitalmars.com/drn-bin/wwwnews?D.gnu

Ant


November 15, 2004
Ant wrote:

>>be kind to use D instead of good old C. Afaik there`s only a
> OS-dependent compiler developed yet?!
> 
> check here:
> http://www.digitalmars.com/drn-bin/wwwnews?D.gnu

Or here:
http://home.earthlink.net/~dvdfrdmn/d/ <GDC home page>

Since D has a static runtime library (libphobos.a) and
has garbage collection and threading enabled by default,
it does produce bigger binaries than what plain C does...
(on the other hand, they are still smaller than with C++
if you also include the size of the shared stdc++ library)

--anders
November 15, 2004
In article <cnaqr0$6kg$1@digitaldaemon.com>, Ant says...
>check here:
>http://www.digitalmars.com/drn-bin/wwwnews?D.gnu
>Ant

Thanks for this quick answer!

Alex


November 15, 2004
alexander.panek@brainsware.org schrieb am Montag, 15. November 2004 18:37:

> I just wondered, if there are any possibility to use D for microcontroller-programming.

Depending on what you are going to do you might also have a look at: http://www.geocities.com/one_mad_alien/dkernel.html

Thomas
November 15, 2004
Thomas Kuehne wrote:
> alexander.panek@brainsware.org schrieb am Montag, 15. November 2004 18:37:
> 
> 
>>I just wondered, if there are any possibility to use D for
>>microcontroller-programming. 
> 
> 
> Depending on what you are going to do you might also have a look at:
> http://www.geocities.com/one_mad_alien/dkernel.html
> 
> Thomas

Some posts are referenced here that involve D kernel discussions (included dkernel):
http://www.dsource.org/forums/viewtopic.php?p=420#420

-- 
Justin (a/k/a jcc7)
http://jcc_7.tripod.com/d/
November 16, 2004
"Anders F Björklund" <afb@algonet.se> wrote in message news:cnattf$alj$1@digitaldaemon.com...
> Since D has a static runtime library (libphobos.a) and
> has garbage collection and threading enabled by default,
> it does produce bigger binaries than what plain C does...

That is true for small programs because the gc part of the library adds about 40K, but I don't believe it to be true for larger ones. In my repeated experience, D code is shorter than the equivalent C code, and over time this will add up as a smaller overall executable size.


November 16, 2004
Walter wrote:

> That is true for small programs because the gc part of the library adds
> about 40K, but I don't believe it to be true for larger ones. In my repeated
> experience, D code is shorter than the equivalent C code, and over time this
> will add up as a smaller overall executable size.

I should also make the reservation that I have only tried with gcc/gdc lately, and not the Digital Mars compilers dmc/dmd (could be different)

And a static library does mean less hidden baggage, than e.g. Java has ?
It's already smaller than C++ while offering similar features - and more

Just something to keep in mind, when comparing e.g. "Hello World" sizes
(my last count: Java* 764, C 9516, D 105524, C++ 430476. Bytes, that is)

--anders

* = not counting the Java Virtual Machine runtime or libs, of course...
    (C/C++ used a static library when linking, libgcc.a and libstdc++)
November 17, 2004
In article <cndr3i$1cos$2@digitaldaemon.com>, Walter says...
>
>"Anders F Björklund" <afb@algonet.se> wrote in message news:cnattf$alj$1@digitaldaemon.com...
>> Since D has a static runtime library (libphobos.a) and
>> has garbage collection and threading enabled by default,
>> it does produce bigger binaries than what plain C does...
>
>That is true for small programs because the gc part of the library adds about 40K, but I don't believe it to be true for larger ones. In my repeated experience, D code is shorter than the equivalent C code, and over time this will add up as a smaller overall executable size.

And it's worth noting that a runtime could be designed specifically for systems where multithreading and/or extensive library support are not needed.  Also, the garbage collector should probably eventually be buildable in both single and multi-threaded versions (probably not too much work with some version blocks).


Sean


November 17, 2004
In article <cne0nl$1k8u$1@digitaldaemon.com>, =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= says...
>
>Just something to keep in mind, when comparing e.g. "Hello World" sizes (my last count: Java* 764, C 9516, D 105524, C++ 430476. Bytes, that is)

I've got a minimal runtime library for D that compiled "Hello World" to 59,420 bytes, and it should be possible to get this quite a bit smaller with some work.


Sean