LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-29-2002, 03:52 PM   #31
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30

hahah... you could also try assembler... I think that won't have any problems with anything... you know, since you are working on such a low level that is quiet impossible (if you know what you are doing) to have problems with anything... (deps, binds, that sort of stuff).

I insist. C or C++... those are the two basic languages you need to know to develop a good app for linux.
 
Old 12-29-2002, 04:23 PM   #32
tunedLow
Member
 
Registered: Sep 2001
Location: Salt Lake City
Distribution: Slackware 8.1
Posts: 133

Rep: Reputation: 15
c0c0deuz,
You might try Beginning Linux Programming (ISBN 1861002971). Just picked it up - seems pretty comprehensive (900+ pages), covers low level c stuff, tcl, perl, shell scripting, writing for X... assumes really basic c knowledge.
 
Old 12-29-2002, 09:37 PM   #33
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
I got a copy of Beginning Linux Programming a few months back. It's an okay book. Good to glance at while on The Throne. Handy reference. For the most part though programming is programming on any platform. I used to write utils for windows before and I don't really find programming on linux too different. The biggest differences (in my humble opionion) would be as follows :

1.) C is the dominant language on linux
2.) Linux guys scoff at Hungarian notation (thank jesus)
3.) Linux has many libraries & such to learn as opposed to MS's APIs, which ARE ALL KNOWING AND CONTROL EVERYTHING!!!!!!!!!!!!!!!!

Anyways, that's my two cents on programming.

Ciccio - no offense, but please research before you post (I know I'm guilty of the same thing). Things you tell people seeking answers can really hurt them. When you say things like "it is a fact that the kernel is mostly programmed on C++" without knowing, it spreads mis-information and ignorance.
 
Old 12-30-2002, 05:59 AM   #34
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
The kernel SHOULD be written in standard C++. And, toolkits like GTK+ which provide decorators for xlib functionality should natively support standard C++. I would rather design an application using classes, and inheritance than navigate an action oriented design.
 
Old 12-30-2002, 06:43 AM   #35
macewan
Senior Member
 
Registered: Jan 2002
Distribution: Ubuntu, Debian
Posts: 1,055
Blog Entries: 1

Rep: Reputation: 45
i thought the kernel was written in visual basic

guess you learn new things every day.
 
Old 12-30-2002, 06:58 AM   #36
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
>>The kernel SHOULD be written in standard C++

Why? OOP can be just as confusing to follow than proc code. At least a kerenl written in C can be accessed in C or C++. Try using a LoadKernelAndEveryKnownApplication class from C. I'm glad the kernel & most apps are in C. C is all straightforward and doesn't bog you down with templates, classes & the like. Besides, just be glad its not written in all Java (not that it could be).
 
Old 12-30-2002, 09:11 AM   #37
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
I was told by a Microsoft developer that they are implementing their entire operating system as managed code. I suspect that if that is true, than they will not document their system interface in some later versions of Windows.

Java is a framework that supports high quality OOP programming. I think it's great for cross platform solutions but probably not so great for system implementation.

A standard C++ kernel would be more manageable and easier to document. Templates are awesome and among the most promising technologies of the future. I'd like to see an entire kernel documented in UML and made out of standard C++ components. That would kick ass.
 
Old 12-30-2002, 09:52 AM   #38
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
>>I'd like to see an entire kernel documented in UML and made out of standard C++ components.

I triple-dawg-dare you to write one.

>>Java is a framework that supports high quality OOP programming. I think it's great for cross platform solutions but probably not so great for system implementation.

It's impossible to use Java for systems programming. Even if it were possible, I would absolutly hate to do it.

I don't know if it's the programmers or some weird coincedence, but for some reason C++ programs often come out very bloated. And by bloated I mean the size of the executable, the size of the source code and often times, feature bloat.

We should all go back to assembly
 
Old 12-30-2002, 01:58 PM   #39
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
Sorry, before in this thread someone told that the kernel was written in pure C. And that makes more sense than a C++ kernel...

Anyway... I think that the only programming language to learn is C. I mean... with C you can do virtually everything. It's the base of the OS and It's the lower-level language (above assembler, obviously) You could write a kernel in java (i'd like to see how that works) but it won't be useful.

RuLeZ
 
Old 12-30-2002, 04:14 PM   #40
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
I really don't think you can write a kernel in Java. I'm no expert in Java, so it's possible I'm mistaken, but it just dosen't make any sense. You can't directly access memory with Java, from what I understand, so how are you going to load the kernel into memory or access the BIOS information? Plus, all the applications would have to be written in Java, or there would have to be some sort of access layer. It just sounds impossible and ridiculous to me. But if anyone knows if it is in fact possible to write a kernel in Java, please post.
 
Old 12-30-2002, 05:21 PM   #41
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Java is middleware, and it hosts a virtual machine. It's not designed for kenel programming. The virtual machine simulates the kernel with a virtual kernel mode.
 
Old 12-30-2002, 05:36 PM   #42
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
The kernel is written in C, all kernels are as far as i'm aware.

C++ for kernels would suck, because the ABI is C++ specific, so making it hard for other languages to invoke system level stuff, and you wouldn't get much gain out of it anyway. Bear in mind you can write object oriented C.

Windows won't be written in managed code anytime soon. The .NET wrapper libs will be.
 
Old 12-30-2002, 05:42 PM   #43
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
Object oriented C sucks!
 
Old 12-30-2002, 05:43 PM   #44
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
What exactly is managed code, anyways? I've heard it often but never figured it out.
 
Old 12-30-2002, 05:55 PM   #45
GtkUser
Member
 
Registered: Sep 2002
Location: Canada
Distribution: Redhat 9.0
Posts: 637

Rep: Reputation: 30
It's code that is managed by the common language runtime. The middleware compiles the code to a user mode security specification. It handles constraints in user mode, as opposed to kernel mode.

I don't like OOC because it is obfusicated. I don't think that there would be any problem implementing the kernel in standard C++. It would improve readability, extensibility, and modularity. As you said, the kernel has taken more of an object based design over the years, why not refactor it in standard C++ and document it in UML.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Top Down programming & Bottom up programming minil Programming 1 06-17-2005 02:42 AM
New Forum for Linux-Gurus[Programming/Administration] or Linux-Advanced Users [ Progr raees LQ Suggestions & Feedback 5 04-12-2005 07:35 PM
C/C++ programming for linux leeman_s Linux - General 6 01-28-2003 06:16 PM
Exp. Windows/Linux-Script Programmer - Need Linux Programming Mentor! ruttiger Linux - Newbie 2 10-28-2001 11:00 AM
New to Linux programming .... need help Izhar Programming 2 10-17-2001 03:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration