What programing language are you using? and why?

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.
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

What programing language are you using? and why?

Post by melgmry0101b »

Hi everyone,

What programing language are you using? and why? :)

I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily :)

-Edit : This discussion is about OS development and it may help beginners to choose the right language for the right purpose.
Last edited by melgmry0101b on Thu Aug 18, 2011 6:35 am, edited 1 time in total.
User avatar
mark3094
Member
Member
Posts: 164
Joined: Mon Feb 14, 2011 10:32 pm
Location: Australia
Contact:

Re: What programing language are you using? and why?

Post by mark3094 »

I'm using a combination of C and assembly.
I'm using MS VC++ 2010 Express, with NASM for the asm files.

I agree that C (or C++) is good because of the amount of tutorials written in it.
It is also quite powerful, and stil easy(ish) to understand.

Also, other OS's (eg, Linux and many more) have large amounts written in C, which I think is a good testamonial :)
User avatar
xvedejas
Member
Member
Posts: 168
Joined: Thu Jun 04, 2009 5:01 pm

Re: What programing language are you using? and why?

Post by xvedejas »

Despite being a fan of OOP, I use C (gcc) and asm (FASM) because I believe when designing a kernel, these allow for the fewest moving parts to worry about when coding.
torshie
Member
Member
Posts: 89
Joined: Sun Jan 11, 2009 7:41 pm

Re: What programing language are you using? and why?

Post by torshie »

C++/eclipse cdt/gcc 4.6
I'm also planning to try some C++0x features in the near future :twisted:
Yargh
Member
Member
Posts: 56
Joined: Sat Jun 12, 2010 9:04 pm
Location: Somewhere else.

Re: What programing language are you using? and why?

Post by Yargh »

Personally, I use C++ and assembly. They're just much easier (to do OS programming in) than other languages.
Also, on the topic of compilers, I use GCC. (GAS for assembly, but I use intel syntax, due to it being easier to use/read than AT&T).
Wait... What?
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: What programing language are you using? and why?

Post by Combuster »

Basic, Assembly and C. Basic because it has all the required features, and still allows you to do some common tasks much easier than with stock C functions. Assembly because you can't do without, and C because I'm sensible enough not to rewrite existing code in Basic.
"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 ]
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Re: What programing language are you using? and why?

Post by Laksen »

I use Object Pascal.

It compiles fast and easy, easy to port, and makes me feel good :)
http://j-software.dk | JPasKernel - My Object Pascal kernel
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: What programing language are you using? and why?

Post by xenos »

C++ and ASM, GCC and GAS, no IDE.

I prefer object oriented programming techniques which are easy to implement, mixed with a bit of ASM whenever this is necessary. GCC and GAS target all architectures I'm working with (x86 (32 / 64), ARM, M68K).
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
maakera
Posts: 14
Joined: Sun Apr 10, 2011 10:23 am
Location: Estonia

Re: What programing language are you using? and why?

Post by maakera »

C/Assembly

Because i have more experience with C.
The most basic language is the most advanced language.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: What programing language are you using? and why?

Post by OSwhatever »

Mozo40 wrote:Hi everyone,

What programing language are you using? and why? :)

I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily :)
You forgot to mention for what purpose. Applications? OS development?
melgmry0101b
Member
Member
Posts: 109
Joined: Wed Nov 10, 2010 10:49 am

Re: What programing language are you using? and why?

Post by melgmry0101b »

OSwhatever wrote:
Mozo40 wrote:Hi everyone,

What programing language are you using? and why? :)

I am using C++ with Microsoft Visual C++.
I am using it because it is easy to find errors and many documents and tutorials usually use C or C++.
Also MSVC is a good tool in collecting errors , showing you where is the error , modifying the projects' properties easily and it is fast in compiling.
MSVC gives the C++ code files a good formatting and coloring that helps the programmer to dive in the code easily :)
You forgot to mention for what purpose. Applications? OS development?
For OS development :)
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: What programing language are you using? and why?

Post by turdus »

I use CL (this is my own programming language, that allows you to write and mix object oriented assembly and C) and fasm. I wrote the compiler in ANSI C, and I use gcc to compile it.
I did this because I really wanted to start from ground up (including the compiler, the ABI and the object/executable format). I choose fasm because it's fast, small, supports amd64 and incredibly easy to port. Nevertheless it has rich macro capabilities.

I'm pretty sure many of you wondering what's the source look like, here's an example:

Code: Select all

//tell the compiler that code blocks use fasm syntax
#codeblock "fasm"
import lib.stdio;
class app.helloworld{
  int counter=0; //initialized class variable
  //entry point and arguments, similar to C's
  int main(string[] args)
  {
    .var string hello="Hello World!" //initialized variable in local stack frame

    //some meaningless code in native assembly
    xor         rax, rax
    //same as counter++
    clbaseof    rbx, app_helloworld.counter   //rbx=&counter;
    inc         qword [rbx]
    //say hello
    clcall0     lib_stdio.printf, hello
    //return a value
    clret       0
  }
}
 - or -
import lib.stdio;
class app.helloworld {
  int counter=0;
  int main(){
    string hello="Hello World!";
    app.helloworld.counter++;    //will not call object.int.inc(counter) because it's an inline method
    lib.stdio.printf(hello);
    return(0);
  }
}
The compiler generates an intermediate assembly source file, that can be assembled with a macro assembler and the corresponding CL header file (that contains macros for machine independent mnemonics, like clbaseof or clret). Currently I have headers for fasm, nasm and gas.
CL has basic support for aspect paradigm, and supports operator overloading, dynamic linking, monitors (aka critical sections), randezvous points, class level polymorphism and multiple dispatch. It does not support (and never will) inheritance and virtual methods (you have virtual classes, you can't change one method in a class, only all methods at once if the old and new interface conforming).
User avatar
rootnode
Member
Member
Posts: 42
Joined: Fri Feb 29, 2008 11:21 am
Location: Aachen, Germany
Contact:

Re: What programing language are you using? and why?

Post by rootnode »

I use C# for OS development with an own compiler (also written in C#) to produce an AOT'd kernel and later it's going to be used as a JIT compiler.
OSwhatever
Member
Member
Posts: 595
Joined: Mon Jul 05, 2010 4:15 pm

Re: What programing language are you using? and why?

Post by OSwhatever »

I'm using GCC C++ and assembly language on very places. Code::Blocks as editor.
rootnode wrote:I use C# for OS development with an own compiler (also written in C#) to produce an AOT'd kernel and later it's going to be used as a JIT compiler.
Interesting to see that managed languages are starting to become more and more used for OS development.
User avatar
IanSeyler
Member
Member
Posts: 326
Joined: Mon Jul 28, 2008 9:46 am
Location: Ontario, Canada
Contact:

Re: What programing language are you using? and why?

Post by IanSeyler »

Assembly for the Operating System(s) I am building. C for the programs and WebUI that can control the OS. Assembly and/or C for the applications that run on the OS.
BareMetal OS - http://www.returninfinity.com/
Mono-tasking 64-bit OS for x86-64 based computers, written entirely in Assembly
Post Reply