So if the Linux Kernel is written in C, what IDE do they use?

Chat about Linux in general
Post Reply
User avatar
wutsinterweb
Level 5
Level 5
Posts: 693
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

So if the Linux Kernel is written in C, what IDE do they use?

Post by wutsinterweb » Mon Feb 25, 2019 5:37 pm

So I take it the core Linux Kernel is written in C and Assembly (and C++?). If that is correct, how do they do assembly while in a Linux Distro, is there an analogue to an IDE for Assembly code? And also, I know that in MSFT coding Visual Studio is the gold standard, but what IDEs do people like Linux, Richard, and everyone else use?

Finally, I take it Python is used to develope Mint? How is that done when the kernels are written in other languages.

I'm not a coder, but I'm doing reading on it, I've been focusing on Python for now. In college decades ago before I knew of Linux, we had a microprocessor course that involved some Assembly writing. I had a hard time with it and regret not learning better and more.
Last edited by karlchen on Mon Feb 25, 2019 5:50 pm, edited 1 time in total.
Reason: Not a support request; hence thread moved to "Chat about Linux"
I'm just a student, your guidance is appreciated.

User avatar
xenopeek
Level 24
Level 24
Posts: 24134
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by xenopeek » Tue Feb 26, 2019 12:25 pm

The Linux kernel is written in C with a little Assembly. The C compiler also understands inline assembly and will assemble that on its own. A common standalone assembler on Linux is NASM, for projects that need it.

There will likely be a different answer from each developer you ask as to what IDE and other developer necessities they are using (or even which Linux distro and desktop environment they use).

Linux Mint isn't developed in Python. Some programs—like Software Manager and Update Manager---are written in Python. Other programs—like Cinnamon, Nemo and Xed—are written in C. What programming language is used for one piece of software has no bearing or impact on what programming language can be used for other pieces of software. Use whichever tool fits the job.
Image

User avatar
wutsinterweb
Level 5
Level 5
Posts: 693
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by wutsinterweb » Tue Feb 26, 2019 3:57 pm

Thanks xenopeek!

I've only barely touched coding and that is why I'm asking these questions. C seems to be "the one to rule them all", I understand just a little of it to understand why it's used, it's closer to machine code and more explicit I believe.

Will a time come with AI where devs won't need C any longer and use AI to write code? If so, how many years off is that?
I'm just a student, your guidance is appreciated.

User avatar
xenopeek
Level 24
Level 24
Posts: 24134
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by xenopeek » Tue Feb 26, 2019 4:16 pm

Using AI to improve code completion in IDEs is actively worked on by multiple groups. Here's an example with Kite AI code completion for Python in action, side by side with an IDE without Kite: https://www.youtube.com/watch?v=dEdjXoGVFmA

Before an AI can write all the code I think we're way into the future.

Besides work on the IDE there is also work on the language front. Like Rust, which unlike C is memory and thread safe by default and catches logic mistakes during compilation—avoiding issues typically plaguing code written in C: https://www.rust-lang.org/
Image

User avatar
murray
Level 4
Level 4
Posts: 411
Joined: Tue Nov 27, 2018 4:22 pm
Location: Auckland, New Zealand

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by murray » Tue Feb 26, 2019 5:12 pm

With regards to AI that can write code...

Years ago "program generators" were popular. These allowed non-programmers to create their own programs by describing the inputs/outputs and the generator would then generate the code to accept the inputs, do any processing, and output the outputs. Usually these were business type programs, so the user might describe a database (eg list tables and fields) and the generator would create programs that would allow data to be added/changed/deleted/searched and reports printed.

In particular I remember one program generator called The Last One. It was advertised as the last program that would ever be needed; I guess their thinking was that all future programs would be created with The Last One! :roll: As a young programmer I was a bit worried, but turns out I need not have been.

In the 90's I used a programming language called Clarion which was a full programming language, designed primarly for business use (so had excellent database, screen and report functionality) and that also had a database, screen and report generator that allowed you to design a database, screen or report just by describing their layout and it would then generate the Clarion code which you could then tweak to make it do exactly what you wanted. This initially ran under DOS but later they bought out a Windows version.

So software that can create other software is nothing new.
Running Mint 19.2 Cinnamon on an Intel NUC8i5BEH with 16GB RAM and 500GB SSD

User avatar
wutsinterweb
Level 5
Level 5
Posts: 693
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by wutsinterweb » Tue Feb 26, 2019 9:46 pm

I personally don't like the AI concept. A former employer is using automation that replaced me and people aren't happy. I don't want to ruffle feathers so I'll stop there.
I'm just a student, your guidance is appreciated.

User avatar
Valsodar
Level 4
Level 4
Posts: 226
Joined: Thu Jul 19, 2018 11:30 pm
Location: Sofia, Bulgaria
Contact:

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by Valsodar » Wed Feb 27, 2019 2:45 am

wutsinterweb wrote:
Mon Feb 25, 2019 5:37 pm
So I take it the core Linux Kernel is written in C and Assembly (and C++?).
Hm, I thought that if one thing is written in a given language, then the rest should be in the same language. Meaning that if the kernel is written in python, that explains why the OS is written in python (mint). And now you're telling me of something I thought was impossible - intermixing programming languages. :shock: :shock:
AsRock B85M Pro4, Core i3-4170, Palit GTX 1050 Ti 4GB, Corsair CX750 PSU, Corsair 32GB DDR3-1600, Corsair Force LE 120GB, WD Caviar Blue + Green = 1.5TB, Firefox 65+ x64, 5.0.13-arch1-1-ARCH Cinnamon

User avatar
Faust
Level 5
Level 5
Posts: 500
Joined: Thu Jul 14, 2016 3:40 am

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by Faust » Wed Feb 27, 2019 7:29 am

Valsodar wrote:
Wed Feb 27, 2019 2:45 am
...... And now you're telling me of something I thought was impossible - intermixing programming languages. :shock: :shock:
It's actually very common . There is no such thing as an all-singing , all-dancing , one-size-fits-all language .
That's why we have so many to choose from .
Large scale projects such as an OS or a web-browser will be written using code from several of them .

C is still the Big Daddy and will happily accommodate a variety of non-C code for inline execution .

But " It's lean and it's mean " , as I was told many moons ago , and it won't any give warnings if you are attempting to something
extremely stupid ( eg. writing into reserved memory ) .
If the syntax is correct , it will just go ahead and do it , quickly and efficiently .
" And so it goes " - Kurt Vonnegut
The modern reality and the satirical parody are rapidly converging .

User avatar
murray
Level 4
Level 4
Posts: 411
Joined: Tue Nov 27, 2018 4:22 pm
Location: Auckland, New Zealand

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by murray » Wed Feb 27, 2019 4:33 pm

Valsodar wrote:
Wed Feb 27, 2019 2:45 am
Hm, I thought that if one thing is written in a given language, then the rest should be in the same language. Meaning that if the kernel is written in python, that explains why the OS is written in python (mint). And now you're telling me of something I thought was impossible - intermixing programming languages. :shock: :shock:
At the end of the day all languages are converted into a machine code that the processor can understand and run (this is what "compiling" a program produces). The processor can no more understand C than it can understand Python or Java or whatever, hence the need for compiling (or "interpretting", which is kind of like compiling but done on the fly).
Running Mint 19.2 Cinnamon on an Intel NUC8i5BEH with 16GB RAM and 500GB SSD

User avatar
wutsinterweb
Level 5
Level 5
Posts: 693
Joined: Tue Feb 28, 2017 2:14 am
Location: Connecticut, USA

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by wutsinterweb » Wed Feb 27, 2019 11:21 pm

Great replies, thanks all.

Now another question:

If Linux doesn't use a registry and it uses configuration files inside the /etc directories, my next question may seem obvious: do the executables of all these programs have code that tells them to look into/refer to a given /etc directory for the config files? Or is there some in between part?
I'm just a student, your guidance is appreciated.

User avatar
Portreve
Level 8
Level 8
Posts: 2129
Joined: Mon Apr 18, 2011 12:03 am
Location: Florida
Contact:

Re: So if the Linux Kernel is written in C, what IDE do they use?

Post by Portreve » Sun Mar 10, 2019 11:00 am

I stopped my inquiries into coding with anything more complicated than:

Code: Select all

0 CLS
5 KEYOFF
10 PRINT "Hello, world."
15 END
:lol:

I understand enough about coding to philosophically appreciate what goes on, but I'm not nor have I ever been a coder.
Presently rocking LinuxMint 19.2 Cinnamon.

Remember to mark your fixed problem [SOLVED].

Xi does look like Winnie the Pooh. FTCG.

Post Reply

Return to “Chat about Linux”