BOOK's

All development related issues welcome

Moderator: Moderator Team

techpro
Posts: 10
Joined: Thu Aug 16, 2007 7:16 pm

Post by techpro »

I'll ignore the insult. I studied operating systems as part of my university degree before many of you were born. Operating systems were written in assembler then - C hadn't even been invented - but that doesn't mean it's the right solution for today when memory and processor power is not a big issue.

There may be good reasons for the OS kernel, drivers etc. to be written in C, but a lot of what goes into a modern OS is higher level stuff. If control panel applets, things to help people manage the OS, etc. could be written more quickly in C++ or even some Basic script, why not do that? They are not performance critical and they are not even very interesting programs to write. I've read Petzold's book "Programming Windows" and know just how much hard work it is to achieve simple things that are a couple of lines of code in Delphi. Why make things hard for yourselves when you've already admitted coding resources are scarce?

I really don't understand "The use of win32 C also discourages people from trying to get small, non-essential programs into the ROS base." If you don't want stuff included, don't include it. Simple as that.

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

One reason for keeping out languages besides ASM, C, and C++ is the infrastructure work we would need to do on our build system to support additional languages. That by itself would distract from working on the OS.

Another point would be the fact we don't need that much in the way of applications. Yes, there are cases other languages might make developing certain applicationsfaster, but most of those apps wouldn't be included by default anyways.

Also, keep in mind that the win32 API uses a lot of C++ conventions, even though in theory it was designed to be used with C. Exception handling is one example. C didn't have proper exception handling. MS added it in with their SEH. There's a few other examples, but in general, it's not like we're asking you to code in raw C. The Windows API does most of the heavy lifting anyways.

If we were to allow inclusion of C++ code using Microsoft Foundation Classes, we would have to do even more work. MS doesn't permit you to release the source code for that and it's a shitload of stuff. Implementing that would be almost as difficult as implementing the original win32 API. The same holds true for almost any other API that abstracts the win32 API and interacts with GDI. There's very little out there for us to build on. The only thing out there would be the open source implementations of .NET, and we still can't use those anyways.

The statement about keeping apps out was meant to say it provides us with a fast and easy way to justify why we won't include something. It helps stem the tide, so to speak.

lhstech
Posts: 12
Joined: Thu Jul 05, 2007 5:25 pm

Well I have a question...

Post by lhstech »

@developers...

Since we are on the subject of programming in C...

questions...

1. Does it matter too much which C compiler to use (ie. do yall care?)? Such as GCC, borland, etc.

2. If so...which one do yall recommend or like the best?

Thanks for all answers ahead of time...:)

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

We use GCC 4.1.3 right now, so any code you produce needs to be compiliable by that. All the stuff you need to compile is in the build environment we produce.

A few other thoughts occurred to me in regards to forcing people to use the Windows API. Our objective here isn't to train application programmers, it's to get system programmers. The Windows API is very powerful because it exposes a lot of stuff for direct manipulation. When you learn it, you are also in effect learning about the datastructures within GDI. This information is very helpful in transitioning to programming the win32k subsystem, as well as teaching you the conventions that will be used in programming the kernel and other parts of the OS.

Also, the framework for drivers is similar in convention to the Windows API. You'd be far more prepared for Windows system programming if you learned the Windows API first than if you learned say, Qt or Delphi.

lhstech
Posts: 12
Joined: Thu Jul 05, 2007 5:25 pm

hey Z98...

Post by lhstech »

Thanks for the quick answer...:)

i have a couple of more questions now concerning GCC...

1. does it matter if i use a later version than 4.1.3? their website says they just released version 4.2.1.

2. GCC's website also says to install it on windows you have to use cygwin which is at version 1.5.24-2. So should i install cygwin to be compatible with ROS?

Thanks for all of your help...:)

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

1. I believe either 4.2 or 4.3 will break our C++ code. Also, 4.2 is technically still in their beta phase. 4.2 is annoying the crap out of a lot of people too.

2. No. Use mingw. That's what we use in our build environment. Cygwin is far too bloated for practical usage.

lhstech
Posts: 12
Joined: Thu Jul 05, 2007 5:25 pm

Post by lhstech »

Thanks Z98...

you know i should have asked those questions a lot sooner...lol...oh well...

btw...it would probably help others like me who want to help (...and not argue about what programming language you guys should use with YOUR os!!!) to add that in the Newbie Development FAQ (maybe with the compilers links too)...:) i really didn't know what compiler to use (ie. yall's recomendation) since it's not in there.

anyway...thanks for the info Z98...i really appreciate all of your help!

GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

many opensource project stay at gcc 4.1.x or 4.x, the ABI are diffent in gcc 4.2.x that why allot apps does not compile fine with it. If I rember right the change back the ABI in gcc 4.3. that is in second phase at moment.

Other C compiler can not build ReactOS, Only Compiler can build reactos is that version we provided. for it contain bugfix for C++ COM. That are not included in gcc 4.2.x or 4.1.x or 4.0.x serie.

Nmn
Posts: 170
Joined: Wed Dec 07, 2005 10:20 pm
Location: In front of my pc maybe?

Post by Nmn »

4.2* is annoying the living 5#!7 right out of me. It broke my Linux system into pieces.

Stick below it for now. It seems as its headers are actually broken - for example, in C++ including <string> causes 3 compiler errors that aren't easily solvable.

lhstech
Posts: 12
Joined: Thu Jul 05, 2007 5:25 pm

Post by lhstech »

i have a question about text editors too...

i noticed in the FAQ that you list 7 different editors with their known issues listed (if applicable) beside them.

i am currently using SciTE v1.74. is this a good editor? what issues does it have? should i just junk it for one of the listed ones?

thanks again for all answers ahead of time...:)

Z98
Release Engineer
Posts: 3379
Joined: Tue May 02, 2006 8:16 pm
Contact:

Post by Z98 »

Which FAQ?

It all depends on what you want. If you want a full IDE, I'd say just go with Visual C++ Express. You can get the SDK and link it in to do native apps. If you want open source, go with Code::Blocks. Some of the devs here just use Notepad to get their work done.

Ged
Developer
Posts: 925
Joined: Thu Sep 29, 2005 3:00 pm
Location: UK

Post by Ged »

techpro wrote:I'll ignore the insult.
Appologies if it came across as an insult, that wasn't intended.

All I was trying to get at is, if you don't know the reasons of why an operating system is (mostly) written in C, then you either aren't an operating system developer or you haven't done any research on the topic.

As I said before, you tell me 1 area of ReactOS which should be developed in a language other than C, and I'll give you the reason(s) why it isn't.
That's not an insult / challenge, it's an offer to help clarify things.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest