Best programming language to write an OS with beautiful GUI?
-
- Posts: 1
- Joined: Thu Nov 14, 2013 6:24 pm
Best programming language to write an OS with beautiful GUI?
I want to make an OS to better understand how operating systems and computers work. I know C++, Objective-C, C, Java, and C#, and I'm willing to learn another programming language. I have asked a similar question before, and I was told C. What programming language should I use to make a very-efficient OS with a GUI that's very beautiful, but still fairly easy to make. Thank you for your time.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Best programming language to write an OS with beautiful
The canon answer remains C - it has the least pitfalls for a system development language. For all other languages you have to write a runtime before certain features become available. This holds for quite a few C++ features you'd use in daily coding, but some of the other language gadgets come for free and can save you a some work and thought. Still, neither language gives you a free lunch when it comes to OS development - it is and remains a lot of work.
The next one is already a problem case, and it only gets worse after that: Pretty much everything that is typical of Objective-C requires a runtime, which means you need a base kernel in C before you can get down to interfaces and messages - plus that there is little to no prior art in this respect. Then, if you have little to no insights in how Java or C# and their bytecodes work under the hood yet, forget them now and don't look back.
Most of the details can be found in the Languages page
The next one is already a problem case, and it only gets worse after that: Pretty much everything that is typical of Objective-C requires a runtime, which means you need a base kernel in C before you can get down to interfaces and messages - plus that there is little to no prior art in this respect. Then, if you have little to no insights in how Java or C# and their bytecodes work under the hood yet, forget them now and don't look back.
Most of the details can be found in the Languages page
I have asked a similar question before
HmmPosts: 1
Re: Best programming language to write an OS with beautiful
C and http://kernel.org?make a very-efficient OS with a GUI that's very beautiful, but still fairly easy to make.
It's quite hard to create an OS that can boot to a proper command line interface (not one of those adhoc kernel command interfaces, those are easy), and very hard to create an OS that can boot to a GUI interface. It's nigh impossible to make a very efficient OS with a GUI that's very beautiful. For instance, Windows 7 might have a beautiful GUI, but I would definitely have doubts about its efficiency. And linux doesn't even necessarily have a beautiful GUI (not sure what would qualify to as a beautiful GUI, but I would say maybe something appearing a little like Unity?), even though it's been developed by thousands of people over 22 years.
I've been developing various kernels of mine off and on for around 4 years or so, and I still don't have a kernel that can boot to a proper userspace. In fact I don't even have any sort of userspace implemented at all.
Anyway, if you want to develop an OS, let alone one with any sort of GUI at all, I would recommend C, because it's the near-universal language of OS development, and 80% or more of the examples that will make your life easier are written in C.
The beauty aspect is another whole problem too. Windows 7 has transparencies on its windows and task bars for instance. If you want to attain that to get a beautiful GUI, your GUI is going to be slower than molasses, because you won't have a working 3D graphics driver like Windows does.
Then there's the problem of beauty being entirely subjective. For instance, I might find that flat GUIs are beautiful, but to you, they might be the most hideous thing on planet Earth.
So really, I guess I should have pointed you to http://wiki.osdev.org/Beginner_Mistakes to begin with.
Regards,
kfreezen
Re: Best programming language to write an OS with beautiful
Use a language that was designed to write system software and doesn't require runtime libraries. It's a no-brainer.
Re: Best programming language to write an OS with beautiful
If your focus is making a better GUI, and writing an OS is just a vehicle to let you do that, it's probably better to build a GUI on top of an existing OS - or at least an existing kernel. You'll get to writing your GUI much quicker than writing a kernel first, and you have the possibility of using a language that requires a runtime if you want to.
Re: Best programming language to write an OS with beautiful
I think a beautiful GUI starts with a piece of paper, some color pencils, a lot of effort and a bit creativity.
Re: Best programming language to write an OS with beautiful
I like what hobbes said. Besides that, writing a GUI is a waste of time on your part.
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
http://github.com/Jezze/fudge/
Re: Best programming language to write an OS with beautiful
I'm getting along just fine in C...
Re: Best programming language to write an OS with beautiful
I disagree... C++ offers templating and low-level additions on top of C that can't be beat. I'm not talking about abstracting crap out of everything and painting yourself into a corner... but why use C when you can use an enhanced "C" and then intelligently augment it with an excellent balance of elegance and efficiency. If you don't know assembly, you don't know what C is doing. If you don't know what C is doing, you don't know what C++ is doing. But if, and only if, you know what C++ is doing, good lord it's a much better language than C even for low-level development.
EDIT:
I would like to agree that focusing first on a GUI is a waste of time (regardless of your language choice). You'll quickly realize it's fruitless.
EDIT:
I would like to agree that focusing first on a GUI is a waste of time (regardless of your language choice). You'll quickly realize it's fruitless.
Re: Best programming language to write an OS with beautiful
With the OPs specification in mind, starting a design with the GUI is hardly a waste of time or fruitless. On the contrary it's an excellent idea. To first work out the specifications the GUI generates for the OS before designing the OS would reduce the chance of introducing inefficiencies(*) in the system. Compare this to an OS first design schedule; what happens when it comes time to bolt a GUI onto an existing OS design then? I think there's a greater chance of inefficiency this way round.mrstobbe wrote: I would like to agree that focusing first on a GUI is a waste of time (regardless of your language choice). You'll quickly realize it's fruitless.
*) Efficiency being one of the OPs prime concerns. However, no definition of efficiency was given. Let's assume it is efficiency in terms of processor instruction count.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Best programming language to write an OS with beautiful
Okay, that can be true, but only if they've gotten to the point where they can even have some sort of GUI, and based on their original post...bwat wrote:With the OPs specification in mind, starting a design with the GUI is hardly a waste of time or fruitless
(and no rebuttal anywhere... in fact, that was their only post), I'd argue that it is a complete waste of time to (try and) start at the GUI.InfiniTech wrote:I want to make an OS to better understand how operating systems and computers work.
Again though, I will reiterate that I feel C++ is a completely mis-understood language, particularly at osdev.org. Ringing that bell loud and clear because you guys are sucking on a tit that's been crammed into your heads. Am I allowed to say that here? It's basic computer science though... the moment you start creating artificial cascades of structure, you're screwed. C++ is literally no different than C, as to C is no different to raw assembly. Do you prefer raw assembly over C?
Re: Best programming language to write an OS with beautiful
Relaxez vous! Nobody has mentioned C++ since your last post.mrstobbe wrote:Again though, I will reiterate that I feel C++ is a completely mis-understood language, particularly at osdev.org.
But.... if it's crammed into our heads, how can we suck it?mrstobbe wrote:Ringing that bell loud and clear because you guys are sucking on a tit that's been crammed into your heads.
mrstobbe wrote:Am I allowed to say that here?
I hope so. No doubt there will be outrage from the sort of people who are easily outraged.
All structure created by a programmer is by definition artificial. How do you design without structure?mrstobbe wrote:It's basic computer science though... the moment you start creating artificial cascades of structure, you're screwed.
Bit of an exaggeration there I think.mrstobbe wrote:C++ is literally no different than C, as to C is no different to raw assembly. Do you prefer raw assembly over C?
Personally I wouldn't touch C++. I go assembly -> C -> High-level language. There's too many high-level languages better suited to my needs than C++.
Every universe of discourse has its logical structure --- S. K. Langer.
Re: Best programming language to write an OS with beautiful
That hurts ;-;Jezze wrote:writing a GUI is a waste of time