Is all Unix & Linux system is made by C++?
hi to all,
Just to be clear to me..am a newbie.. Is all Unix & Linux system is made by C++? I'm going to start learning program in C++.. Where can i donwload this program..? and sample projects..to learn step by step..and learn from you guys.. and it is true that you can create a GUI using C++? Pls give me sample projects in GUI and code to be my reference.. Pls help me..how to start..and what should remember when it comes to programming... Thanks a lot, ___________________________________________ "You can't be a master, if you don't know how to be a servant" |
The Linux kernel is mainly written in C. KDE is mainly written in C++ and GNOME in C.
|
THANKS for the help..
Thanks..a lot..I research it from the google..
Lancelot |
Quote:
As has been pointed out, Linux (the kernel, that is) is written in C, and so is gnome. Most of the base system (ls, cp, mv, ln, true, false, seq, diff, make, sed, grep, awk, gzip, bzip2, tar, ...) is written in C. Most likely, programs that are part of a desktop environment are written in the language of that environment (i.e. C for gedit (`GNOME Notepad'), C++ for the kde equivalent). The rest of the `application programs' are written in a variety of languages: btdownloadgui -- Python azureus -- Java firefox -- C++ (I would think) whitespace -- Haskell (http://compsoc.dur.ac.uk/whitespace/index.php) Quote:
Quote:
Quote:
Quote:
Quote:
--- By the way, I recommend that one learns both OOP and C before studying C++; for OOP, you might want to look at python or java. <OT>I think java sucks, due to it being a bondage-and-discipline language (http://catb.org/~esr/jargon/html/B/b...-language.html), but it's up to you what you pick.</OT> hth --Jonas |
Quote:
You do NOT need to know C before learning C++. In fact you might pick up some (dare I say it??) 'frowned upon' habits in C++ world while your spending your beginning time learning C (casting when unnecessary, not passing by reference when you could, refusing to use C++ strings, and overuse of structs compared to classes to name a few). Not that these are bad, but you wont be the most popular member of a C++ team when you try to force your C habits on your group members. And obviously vice-versa. Enough rambling, listen to the chief: http://www.research.att.com/~bs/bs_f...l#prerequisite |
Quote:
|
Quote:
The biggest "problem" with C/C++ is the fact both languages only supply the basics. You need libraries (like KDE, GNOME, Qt, Gtk) to make something useful. * If you want to write a KDE application, use the KDE/Qt libraries to create a KDE-like-GUI. * If you want to write a GNOME application, use the Gtk libraries to create a GNOME-like-GUI. * If you want to write a cross-platform application, Qt 4 will be a great choice for Open Source applications. wxWindows/Gtk can be used for commercial applications too. Before you start, a good tutorial about C++ won't hurt. Find something that includes pointers, references and classes/objects. If you start writing KDE/Qt applications, you don't need to have much more knowlegde, because Qt and KDE provide the remaining stuff (like networking for example), and make C++ development a breeze. Each C/C++ application consists of a lot of plain text files, you could write them in KWrite for example. But an environment like KDevelop makes stuff easier to use, and also assist some basic tasks, offer a designer for the GUI, etc... Writing the code is still up to you though ;-) |
Re: Is all Unix & Linux system is made by C++?
Quote:
Quote:
Quote:
My experience says that gui in c++ = pain. Dispite what all c++ lovers will say, if you want to build gui I strongly recomend that you start with something more friendly, like java. Eclipse is a very good java IDE, but http://www.netbeans.org/ Netbeans is just subberb. It is as easy to use as VB IDE. Personally I use Lazarus and Pascal, but I still recomend that you start with java, because Lazarus IDE is still unfriendly compared to netbeans. [EDIT to Add] It is very important to say that c++, object pascal and java are *very* similar. If you learn one well you know the others. All the concepts are the same, but c++ does not have a good IDE to build gui stuff on it, but java and object pascal have. |
Quote:
But if you plan on learning both languages, I think it makes (really) good sense to learn C first. 1) Valid C is almost always valid, equivalent C++. While it is unidiomatic, you can make use of what you know already know. 2) Knowing that C++ has once been implemented as a to-C translator, you may be able to better understand the low-level details of C++ (say, vtables and inheritance) 3) You won't get nearly as much annoyed by the `missing features' of C (`and', `or' and `not' to name the minor ones). --- Of course, if you only want to learn C++, then the correct learning order is [ "C++" ]. my $0.01 (we're having a sale today). --Jonas |
Re: Re: Is all Unix & Linux system is made by C++?
Quote:
What I mean is that when you compile your kernel, the percent of the source you use that is written in assembly is a lot lower that 15%. It's just that C is portable and assembly is not. So since the kernel supports many architectures, the assembly part is rewritten for every architecture when most of the C part is portable to all architectures. So in the kernel source there may be 15% of assembly, but the actual part of assembly used for every kernel we compile is a lot lower. I don't know this for sure, so I may be wrong but 15% of assembly looks pretty high to me. |
Quote:
No: C++ use templates all over the plates--java doesn't have that yet (I wouldn't know about OP). In C++ you can have objects in addition to pointers to objects. In java you get OOP forced down you throat, you don't get that for C++. I assume that OP has a pascal-like syntax, which makes it quite different from C++ and java. Quote:
And while we're at doing `sales pitches' for our fav. languages, I'd like to present python: <Python> 1) You can get the job done *fast* Essentially a cat (a bit stripped down): Code:
from sys import argv 2) It multi-paradigm, allowing both for functional, procedural and object-oriented designs. 3) It has a good standard library allowing for easy handling of: networking (sockets, HTTP, telnet, smtp, gopher, ...), threads, zip/gzip/bzip/tar files, regexes, bytecode to `symbolic bytecode' disassembly, heaps, unit testing, serialization, object persistance, curses, opening and communicating with inferior processes, GNU readline, RPC, sound files and a bunch of other stuff. Basically everything and the kitchen sink (and that's just the *standard* library). </Python> cents = min(primesieve(100)) --Jonas |
Quote:
|
Quote:
Quote:
Felipe |
If you understand that programming isn't all pretty GUIs and such, I feel C++ is a very clean language for expressing yourself well. Makefiles are not a part of the C++ language so they have no real need to be brought up in an argument against it.
Code:
[prompt@yourbox]$ cat > hello.cpp << "EOF" |
Quote:
Quote:
And I agree, java is easier than c++. Quote:
That is, of course, my opinion (and opinion only). Quote:
But I agree that C++ is `heavier to dance with' than Java. However, I think that's inherent in the language design--and I actually a bit surprised you didn't address that. I'll talk more about that shortly. Quote:
A quick remark on "what is the most powerful programming language", though: assembly. It will let you do anything your machine + OS is capable of doing. There is no higher level of power. (paraphrase of someone else's words). I think that's an insightful (but still with-tongue-in-cheeck) point. Also note that I have to intention of starting a holy war--they never lead to anyone getting converted anyways :D Not when it comes to editors, or languages, or OSes, or distros, or unified vs. context diffs. It's all a matter of personal preference. And of course, there is no `best programming language'--any such proposition is easily refuted with the question "Best for what?". If the answer is "For learning how to program", then I claim that python may be a good choice--possibly better than java (and *way* better than C or C++). Because of... <strike>Oliver Cromwell</strike> 1) The language was designed with teaching in mind 2) It's actually easy to learn (i.e. the design was successful) 3) It's still useful and powerful (i.e. it's not Logo or VB :p) A comparison with java: http://www.ferg.org/projects/python_...e-by-side.html On its own merits (maybe compared a little bit with perl): http://www.linuxjournal.com/article/3882 Interview with Bruce Eckel (author of `Thinking in (java|C++)') about python (from time to time compared to java): http://www.artima.com/intv/tipping.html Its homepage: http://www.python.org And some learning material: http://www.ibiblio.org/obp/thinkCSpy/ Of course, we shouldn't argue about what language OP should choose--that *his* decision :) What we should do is provide guidance. You provided some very good guidance (pascal or java over c++)--I happen to think that python is *even* better. Some if it comes from the fact that I dislike Java for being a bondange-and-discipline language, too hyped and dictated too much by marketing and too little by competent geeks. (and pascal (but I wouldn't know about obj. pascal) is B&D too). Python is not--see `multi-paradigm programming' (which is nearly impossible with B&D languages). to OP: "You must do what you feel is right, of course". Quote:
Okay, so I might have been wrong about pascal, and I believe you. But if it's like C++ or java, then python is still better :p --- Am I making myself more understandable? --Jonas |
All times are GMT -5. The time now is 04:19 AM. |