www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Learning D as main systems programming language

reply "Goran Petrevski" <ggpetrevski gmail.com> writes:
I'm new in the programming, systems programming especially, but I 
want to learn D more as a systems programming language and by 
that I mean avoiding libraries at all. My goal is to write a 
simple operating system totaly in D (using Assembly wherever is 
needed) and by progressing in that project, learning this 
powerfull language as the main systems programming language. Any 
help/advice on this goal will be really helpful/appreciated. 
Thanks in advance.
Jan 08 2014
next sibling parent reply "Rikki Cattermole" <alphaglosined gmail.com> writes:
On Wednesday, 8 January 2014 at 23:38:31 UTC, Goran Petrevski 
wrote:
 I'm new in the programming, systems programming especially, but 
 I want to learn D more as a systems programming language and by 
 that I mean avoiding libraries at all. My goal is to write a 
 simple operating system totaly in D (using Assembly wherever is 
 needed) and by progressing in that project, learning this 
 powerfull language as the main systems programming language. 
 Any help/advice on this goal will be really 
 helpful/appreciated. Thanks in advance.
Based upon what I've read on the forum: Try and get a minimal druntime first. Doing so will make you understand what is required to make it work. You won't have access to the GC so a lot of language features (like slices) are out of the question. There are some copies of druntime floating about for embedded which will probably help you. I don't know how easy it would be to get a bootloader to call a D kernel although it has been done.
Jan 08 2014
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Thursday, 9 January 2014 at 03:36:30 UTC, Rikki Cattermole 
wrote:
 I don't know how easy it would be to get a bootloader to call a 
 D kernel although it has been done.
Pretty easy if you use GRUB. You can just compile a regular linux program with a linker script and load it right up. My minimal.zip (a bit of a misnomer as it is more than minimal including some experimentation) has some code to run D on bare x86 metal arsdnet.net/dcode/minimal.zip
Jan 08 2014
prev sibling parent "Jakob Ovrum" <jakobovrum gmail.com> writes:
On Thursday, 9 January 2014 at 03:36:30 UTC, Rikki Cattermole 
wrote:
 You won't have access to the GC so a lot of language features 
 (like slices) are out of the question.
Slices are fine, it's just the slice concatenation operators that must be disabled. This is easily accomplished by simply not implementing the runtime functions that support them, thus causing a linker error if used.
Jan 08 2014
prev sibling parent reply "qznc" <qznc web.de> writes:
On Wednesday, 8 January 2014 at 23:38:31 UTC, Goran Petrevski 
wrote:
 I'm new in the programming, systems programming especially, but 
 I want to learn D more as a systems programming language and by 
 that I mean avoiding libraries at all. My goal is to write a 
 simple operating system totaly in D (using Assembly wherever is 
 needed) and by progressing in that project, learning this 
 powerfull language as the main systems programming language. 
 Any help/advice on this goal will be really 
 helpful/appreciated. Thanks in advance.
You might want to look into XOmB: https://github.com/xomboverlord/xomb
Jan 09 2014
parent reply "Goran Petrevski" <ggpetrevski gmail.com> writes:
 You might want to look into XOmB: 
 https://github.com/xomboverlord/xomb
Isn't it written in D1? Not sure about that...
Jan 09 2014
parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Friday, 10 January 2014 at 00:05:35 UTC, Goran Petrevski wrote:
 You might want to look into XOmB: 
 https://github.com/xomboverlord/xomb
Isn't it written in D1? Not sure about that...
So what if it is written in D1? :) It should not be a big problem to "port" it to D2. Second interesting project that is kinda related to the topic: https://bitbucket.org/timosi/minlibd . More: http://wiki.dlang.org/Other_Dev_Tools
Jan 10 2014