Page 1 of 1

OS with D

Posted: Thu Sep 08, 2011 2:10 pm
by Haroogan
First of all, which D-Compiler would you suggest me to use? I see 2 possibilities: LDC and GDC (yes, the project is alive again). Since I know how to build cross compiler with GNU, therefore I have chosen to give GDC a try, but unfortunately I'm not able to build it - getting some weird error in "d-spec.c" file. So any suggestions here?

Secondly, I'm really obsessing about the run-time support:

1. Where can I find information on what run-time features I have to implement myself? I. e. something like a run-time specification.
2. Which features are run-time dependent and which ones are not? I. e. which features am I able to use during the kernel programming and which ones not.
3. Surely, I've looked into XOmB project - they have "runtime" folder, but its contents are complete mystery to me. How did these guys know what to write there and how can I understand what support is implemented there?
4. The whole run-time support should be compiled along with the kernel just like we've done in C++ project, right?

I'm not sure if you can answer all the questions, but at least you could give me some clues and links, since some of you are far ahead on this topic already. Also I would really appreciate some general recommendations on D usage in kernel and your own impressions on it.

Thanks in advance! ;D

Re: OS with D

Posted: Fri Sep 09, 2011 3:05 am
by Haroogan
There is nothing on the wiki about it.

Re: OS with D

Posted: Fri Sep 09, 2011 3:10 am
by Combuster
Haroogan wrote:I would really appreciate some general recommendations on D usage in kernel and your own impressions on it.
Short answer: don't do it if you can't solo it (which for 99% of the OS development popluation simply means: don't do it).

Long answer:
The more complex a language is, the more support it needs from a runtime, and the more you need to let go (if at all possible) of the actual language features. It has been done, and has therefore been proven possible, but for any compiler you basically need to be able to manually do what the compiler does: translate code in that language to assembly, which in turn means that you need to know how all language-based tasks are implemented at the lowest level. For C this is quite easy to do, but for D it's much more difficult, and several orders of magnitude fewer people actually have the knowledge to help you with it.

Re: OS with D

Posted: Fri Sep 09, 2011 4:20 am
by Haroogan
Berkus, like if you have nothing to answer yourself - then no need to point me to the wiki, since I have already read these wiki "articles", before posting my question and they do not make sense in terms of questions that I've asked.

Combuster, Thanks. I'm wondering because some people here are literate in this question as far as I read in older posts. Unfortunately, they've been absent for a long time now :(

Re: OS with D

Posted: Fri Sep 09, 2011 5:01 am
by cxzuk
I thought the wiki page was pretty informative

Re: OS with D

Posted: Fri Sep 09, 2011 10:20 am
by intx13
The wiki article links to this forum post: http://forum.osdev.org/viewtopic.php?f=15&t=18914 which appears, on a short read-through, to answer most of your questions at some level, including some stuff about the runtime library. It also links to this wiki page: http://wiki.osdev.org/GDC_Cross-Compiler, though it's incomplete. You've also got this page available: http://wiki.osdev.org/D_bare_bones. Someone here can probably answer your runtime library questions (not D specific, really) better than I can.

Re: OS with D

Posted: Fri Sep 09, 2011 12:14 pm
by Haroogan
Gratz on being stubborn, berkus. The only one who lacks reading skills here is you, because you still haven't answered any of my questions, but rather flood this topic with your biased thoughts. There is almost nothing about D on wiki, but still I've read it as I've already said.
Or better just go away.
Nah, man if you have intention to speak on the topic - just get lost.