www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - XOMB operating system

reply "tim krimm" <twkrimm gmail.com> writes:
Is anyone here familiar with the XOMB operating system?
    http://wiki.xomb.org/index.php?title=Main_Page


It appears to be written in D.
    http://wiki.xomb.org/index.php?title=History_of_XOmB

"XOmB originally came about as a joke. Our group wanted to learn
the D Programming Language, and so we decided to do a project
together. While discussing what kind of project we should
undertake, someone suggested an operating system. We then had
several discussions about how we would implement it, if we would
actually go through with it, and realized that we had several
interesting ideas. "


I am wondering which language features they used and which ones
they stayed away from. This would be useful information if
someone wanted to use D for embedded programming.
May 12 2012
next sibling parent "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"tim krimm" <twkrimm gmail.com> wrote in message 
news:yrxopyridbcfflrgpslp forum.dlang.org...
 Is anyone here familiar with the XOMB operating system?
    http://wiki.xomb.org/index.php?title=Main_Page


 It appears to be written in D.
    http://wiki.xomb.org/index.php?title=History_of_XOmB

 "XOmB originally came about as a joke. Our group wanted to learn
 the D Programming Language, and so we decided to do a project
 together. While discussing what kind of project we should
 undertake, someone suggested an operating system. We then had
 several discussions about how we would implement it, if we would
 actually go through with it, and realized that we had several
 interesting ideas. "


 I am wondering which language features they used and which ones
 they stayed away from. This would be useful information if
 someone wanted to use D for embedded programming.
Anytime someone says "D isn't a systems language because nobody's written an OS in it", XOMB gets mentioned ;) I admit I don't know anything else about XOMB ATM, though :(
May 12 2012
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-05-12 21:37, tim krimm wrote:
 Is anyone here familiar with the XOMB operating system?
 http://wiki.xomb.org/index.php?title=Main_Page


 It appears to be written in D.
 http://wiki.xomb.org/index.php?title=History_of_XOmB

 "XOmB originally came about as a joke. Our group wanted to learn
 the D Programming Language, and so we decided to do a project
 together. While discussing what kind of project we should
 undertake, someone suggested an operating system. We then had
 several discussions about how we would implement it, if we would
 actually go through with it, and realized that we had several
 interesting ideas. "


 I am wondering which language features they used and which ones
 they stayed away from. This would be useful information if
 someone wanted to use D for embedded programming.
They need to be very careful with anything that uses the runtime, since they don't have a runtime to relay on. They need to build their own runtime. So anything related to the GC, threads so on. -- /Jacob Carlborg
May 14 2012
parent reply "tim krimm" <twkrimm gmail.com> writes:
Ping: Are there any XOMB developers out there reading this?
May 14 2012
parent reply "Tyro[17]" <nospam home.com> writes:
On Tuesday, 15 May 2012 at 02:06:24 UTC, tim krimm wrote:
 Ping: Are there any XOMB developers out there reading this?
Jarrett Billingsley, Brian Madden, and Kelly Wilson all contributed to the XOMB project. I haven't seen anything from them for years now. Don't know if they just lurk in the shadows or have completely given up on D.
May 14 2012
parent reply Robert Clipsham <robert octarineparrot.com> writes:
On 15/05/2012 03:36, Tyro[17] wrote:
 On Tuesday, 15 May 2012 at 02:06:24 UTC, tim krimm wrote:
 Ping: Are there any XOMB developers out there reading this?
Jarrett Billingsley, Brian Madden, and Kelly Wilson all contributed to the XOMB project. I haven't seen anything from them for years now. Don't know if they just lurk in the shadows or have completely given up on D.
Probably not, but you could try and contact them. You can get a list of them here: https://github.com/xomboverlord/xomb Doesn't look like it's been updated in a year or so though - there may be a more recent branch somewhere though. Note it's written in D1. -- Robert http://octarineparrot.com/
May 15 2012
parent reply "tim krimm" <twkrimm gmail.com> writes:
On Tuesday, 15 May 2012 at 09:38:13 UTC, Robert Clipsham wrote:
 On 15/05/2012 03:36, Tyro[17] wrote:
 On Tuesday, 15 May 2012 at 02:06:24 UTC, tim krimm wrote:
 Ping: Are there any XOMB developers out there reading this?
Jarrett Billingsley, Brian Madden, and Kelly Wilson all contributed to the XOMB project. I haven't seen anything from them for years now. Don't know if they just lurk in the shadows or have completely given up on D.
Probably not, but you could try and contact them. You can get a list of them here: https://github.com/xomboverlord/xomb Doesn't look like it's been updated in a year or so though - there may be a more recent branch somewhere though. Note it's written in D1.
I tried contacting them almost a week ago and I have not heard back.
May 25 2012
parent reply "tim krimm" <twkrimm gmail.com> writes:
I have been looking at the xomb bare bones (XBB) source code.
It looks like they have a bare bones library, no Phobos.
They used ldc for their compiler.

1) Can the same things be done with the DMD version 2 compiler?

2) Will DMD work without the Phobos library?

3) What minimal set of modules do you need for DMD?
May 30 2012
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-05-31 05:04, tim krimm wrote:
 I have been looking at the xomb bare bones (XBB) source code.
 It looks like they have a bare bones library, no Phobos.
 They used ldc for their compiler.

 1) Can the same things be done with the DMD version 2 compiler?
Maybe, I don't know if it has the correct flags. One don't want to link to the standard library (which dmd does by default) and the runtime library when building a kernel.
 2) Will DMD work without the Phobos library?
Yes, it only needs the runtime. What's needed from the runtime depends on what the code does.
 3) What minimal set of modules do you need for DMD?
-- /Jacob Carlborg
May 30 2012
prev sibling parent reply "jerro" <a a.com> writes:
On Thursday, 31 May 2012 at 03:04:58 UTC, tim krimm wrote:
 I have been looking at the xomb bare bones (XBB) source code.
 It looks like they have a bare bones library, no Phobos.
 They used ldc for their compiler.

 1) Can the same things be done with the DMD version 2 compiler?

 2) Will DMD work without the Phobos library?

 3) What minimal set of modules do you need for DMD?
GDC has the -nophoboslib flag. So you can write a D file that doesn't use druntime or phobos: extern(C) int puts(const char *); extern(C) int main() { puts("Hello world!"); return 0; } and compile it with: gdc -nophoboslib hello.d The linker will complain about undefined reference to _Dmodule_ref. So you need to write a c file like with just "void* _Dmodule_ref;" in it and compile it to object file with gcc -c dummy.c. Then you can do gdc -nophoboslib hello.d dummy.o And it works.
May 31 2012
parent reply "jerro" <a a.com> writes:
On Thursday, 31 May 2012 at 08:57:37 UTC, jerro wrote:
 On Thursday, 31 May 2012 at 03:04:58 UTC, tim krimm wrote:
 I have been looking at the xomb bare bones (XBB) source code.
 It looks like they have a bare bones library, no Phobos.
 They used ldc for their compiler.

 1) Can the same things be done with the DMD version 2 compiler?

 2) Will DMD work without the Phobos library?

 3) What minimal set of modules do you need for DMD?
GDC has the -nophoboslib flag. So you can write a D file that doesn't use druntime or phobos: extern(C) int puts(const char *); extern(C) int main() { puts("Hello world!"); return 0; } and compile it with: gdc -nophoboslib hello.d The linker will complain about undefined reference to _Dmodule_ref. So you need to write a c file like with just "void* _Dmodule_ref;" in it and compile it to object file with gcc -c dummy.c. Then you can do gdc -nophoboslib hello.d dummy.o And it works.
I just remembered you can do something similar with DMD, too, using -defaultlib. Make a static library containing just _Dmodule_ref: echo "void* _Dmodule_ref;" | gcc -x c - -c -o dmodule_ref.o ar cr libdmodule_ref.a dmodule_ref.o Now put it somewhere where the linker can find it. Now you can compile d programs without druntime like this: dmd hello.d -defaultlib=dmodule_ref
May 31 2012
next sibling parent "Sandeep Datta" <datta.sandeep gmail.com> writes:
Yes true...if some one is interested here is a link 
(https://github.com/SDX2000/helios) to some sample code. Just 
build by changing to the src directory and running make. It 
builds a hello world program which can be run in qemu.
May 31 2012
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-05-31 11:11, jerro wrote:

 I just remembered you can do something similar with DMD, too, using
 -defaultlib. Make a static library containing just _Dmodule_ref:


 echo "void* _Dmodule_ref;" | gcc -x c - -c -o dmodule_ref.o
 ar cr libdmodule_ref.a dmodule_ref.o

 Now put it somewhere where the linker can find it. Now you can compile d
 programs without druntime like this:

 dmd hello.d -defaultlib=dmodule_ref
Perhaps manually do the linking with gcc. DMD links using gcc anyway. -- /Jacob Carlborg
May 31 2012
next sibling parent "Tim Krimm" <twkrimm gmail.com> writes:
Thanks to everyone for the info.
May 31 2012
prev sibling parent reply "tim krimm" <twkrimm gmail.com> writes:
On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote:

 DMD links using gcc anyway.
Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS? ============================================================== OK, lets switch from XOMB to a starting point for embedded coding. Does this also mean there is no Garbage collection? What happens if you try to use dynamic arrays or classes? Will this cause linker errors to let the user know they are "out of bounds"?
May 31 2012
next sibling parent reply Sean Kelly <sean invisibleduck.org> writes:
On May 31, 2012, at 4:41 PM, "tim krimm" <twkrimm gmail.com> wrote:

 On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote:
=20
 DMD links using gcc anyway.
=20 Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS? =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 OK, lets switch from XOMB to a starting point for embedded coding.
=20
 Does this also mean there is no Garbage collection?
=20
 What happens if you try to use dynamic arrays or classes?
=20
 Will this cause linker errors to let the user know they are "out of bounds=
"? The wiki at http://dsource.org/project/druntime is a bit outdated but releva= nt.=20=
May 31 2012
parent reply "tim krimm" <twkrimm gmail.com> writes:
On Friday, 1 June 2012 at 00:15:54 UTC, Sean Kelly wrote:
 On May 31, 2012, at 4:41 PM, "tim krimm" <twkrimm gmail.com> 
 wrote:

 On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote:
 
 DMD links using gcc anyway.
Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS? ============================================================== OK, lets switch from XOMB to a starting point for embedded coding. Does this also mean there is no Garbage collection? What happens if you try to use dynamic arrays or classes? Will this cause linker errors to let the user know they are "out of bounds"?
The wiki at http://dsource.org/project/druntime is a bit outdated but relevant.
http://dsource.org/project/druntime Not Found 404 Not Found (No handler matched request to %s)
May 31 2012
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-06-01 04:04, tim krimm wrote:

 http://dsource.org/project/druntime

 Not Found
 404 Not Found (No handler matched request to %s)
It should be "projects". http://dsource.org/projects/druntime -- /Jacob Carlborg
Jun 01 2012
prev sibling parent Sean Kelly <sean invisibleduck.org> writes:
On May 31, 2012, at 7:04 PM, "tim krimm" <twkrimm gmail.com> wrote:

 On Friday, 1 June 2012 at 00:15:54 UTC, Sean Kelly wrote:
 On May 31, 2012, at 4:41 PM, "tim krimm" <twkrimm gmail.com> wrote:
=20
 On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote:
 DMD links using gcc anyway.
Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 OK, lets switch from XOMB to a starting point for embedded coding.
 Does this also mean there is no Garbage collection?
 What happens if you try to use dynamic arrays or classes?
 Will this cause linker errors to let the user know they are "out of boun=
ds"?
=20
 The wiki at http://dsource.org/project/druntime is a bit outdated but rel=
evant.
=20
 http://dsource.org/project/druntime
=20
 Not Found
 404 Not Found (No handler matched request to %s)
Sorry. http://dsource.org/projects/druntime=
Jun 01 2012
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-06-01 01:41, tim krimm wrote:
 On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote:

 DMD links using gcc anyway.
Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS?
It should work on Mac OS X. On Windows DMD doesn't use the system linker, it uses optlink. Don't know if the system linker support the needed flags anyway.
 ==============================================================
 OK, lets switch from XOMB to a starting point for embedded coding.

 Does this also mean there is no Garbage collection?
Yes, you need to reimplement the GC if you want to use those features.
 What happens if you try to use dynamic arrays or classes?
If you don't have a GC you will get linker errors for everything that depends on the GC.
 Will this cause linker errors to let the user know they are "out of
 bounds"?
-- /Jacob Carlborg
Jun 01 2012