Best programming language to write an OS with beautiful GUI?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
InfiniTech
Posts: 1
Joined: Thu Nov 14, 2013 6:24 pm

Best programming language to write an OS with beautiful GUI?

Post by InfiniTech »

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.
User avatar
Combuster
Member
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

Post by Combuster »

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
I have asked a similar question before
Posts: 1
Hmm :-k
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
kfreezen
Member
Member
Posts: 46
Joined: Tue Jul 21, 2009 11:36 am

Re: Best programming language to write an OS with beautiful

Post by kfreezen »

make a very-efficient OS with a GUI that's very beautiful, but still fairly easy to make.
C and http://kernel.org?
:)

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
User avatar
iansjack
Member
Member
Posts: 4711
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Best programming language to write an OS with beautiful

Post by iansjack »

Use a language that was designed to write system software and doesn't require runtime libraries. It's a no-brainer.
madanra
Member
Member
Posts: 149
Joined: Mon Sep 07, 2009 12:01 pm

Re: Best programming language to write an OS with beautiful

Post by madanra »

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.
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Best programming language to write an OS with beautiful

Post by qw »

I think a beautiful GUI starts with a piece of paper, some color pencils, a lot of effort and a bit creativity.
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: Best programming language to write an OS with beautiful

Post by Jezze »

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/
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: Best programming language to write an OS with beautiful

Post by klange »

I'm getting along just fine in C...
mrstobbe
Member
Member
Posts: 62
Joined: Fri Nov 08, 2013 7:40 pm

Re: Best programming language to write an OS with beautiful

Post by mrstobbe »

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.
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Best programming language to write an OS with beautiful

Post by bwat »

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.
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.

*) 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.
mrstobbe
Member
Member
Posts: 62
Joined: Fri Nov 08, 2013 7:40 pm

Re: Best programming language to write an OS with beautiful

Post by mrstobbe »

bwat wrote:With the OPs specification in mind, starting a design with the GUI is hardly a waste of time or fruitless
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...
InfiniTech wrote:I want to make an OS to better understand how operating systems and computers work.
(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.

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?
User avatar
bwat
Member
Member
Posts: 359
Joined: Fri Jul 03, 2009 6:21 am

Re: Best programming language to write an OS with beautiful

Post by bwat »

mrstobbe wrote:Again though, I will reiterate that I feel C++ is a completely mis-understood language, particularly at osdev.org.
Relaxez vous! Nobody has mentioned C++ since your last post.
mrstobbe wrote:Ringing that bell loud and clear because you guys are sucking on a tit that's been crammed into your heads.
But.... if it's crammed into our heads, how can we suck it?
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.
mrstobbe wrote:It's basic computer science though... the moment you start creating artificial cascades of structure, you're screwed.
All structure created by a programmer is by definition artificial. How do you design without structure?
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?
Bit of an exaggeration there I think.

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.
klange
Member
Member
Posts: 679
Joined: Wed Mar 30, 2011 12:31 am
Libera.chat IRC: klange
Discord: klange

Re: Best programming language to write an OS with beautiful

Post by klange »

Jezze wrote:writing a GUI is a waste of time
That hurts ;-;
Post Reply