School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,464 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,681 people online right now. Registration is fast and FREE... Join Now!




Programming for Linux

 

Programming for Linux, Choosing a language based on needs

Welly

2 Jun, 2009 - 12:15 PM
Post #1

D.I.C Head
**

Joined: 7 Dec, 2008
Posts: 71



Thanked: 3 times
My Contributions
hey there. i currently know c++ up to intermediate level but i haven't learned yet anything on an intermediate level. im trying to make fast small programs for linux and i cant choose a language. What is a good low level programming language that makes good programs on Linux? im possibly going to use Ftp transfers socket programming and fast data analysis. Any point in the right direction would be great also which compiler to use and where to find it. this is my first time logging on to Linux, i just installed ubuntu so im not very knowledgeable on the Linux platform.

User is offlineProfile CardPM
+Quote Post


Core

RE: Programming For Linux

2 Jun, 2009 - 12:19 PM
Post #2

Den The Developer
Group Icon

Joined: 8 Dec, 2008
Posts: 2,944



Thanked: 214 times
Dream Kudos: 900
Expert In: C#, VB.NET, .NET Framework

My Contributions
Well since you already know C++ at an intermediate level, you probably should stick with it. It offers the functionality you need (well basically any programming language does).
User is offlineProfile CardPM
+Quote Post

Welly

RE: Programming For Linux

2 Jun, 2009 - 12:22 PM
Post #3

D.I.C Head
**

Joined: 7 Dec, 2008
Posts: 71



Thanked: 3 times
My Contributions
so is the GCC installed on linux a compiler for C++? where do i find a good ide/compiler? I'd heard that c++ is a slower version of c and i love c++ but it makes you wonder how much slower in these days compared to when they originally made the languages cause i dont care about nanoseconds.
User is offlineProfile CardPM
+Quote Post

Core

RE: Programming For Linux

2 Jun, 2009 - 12:38 PM
Post #4

Den The Developer
Group Icon

Joined: 8 Dec, 2008
Posts: 2,944



Thanked: 214 times
Dream Kudos: 900
Expert In: C#, VB.NET, .NET Framework

My Contributions
I really don't know who's opinion are quoting since it is not true. A good IDE (at least the one I used) is NetBeans, but you can use even a simple text editor to create your programs. Speaking about 'slower' programs, with modern computer capacities you probably won't feel the real difference unless you are benchmarking the performance. There are languages that usually make programs run a little slower (like Java, since it makes use of JVM to actually run the program), but again, with powerful computers today the end user doesn't really see the performance differnces.
User is offlineProfile CardPM
+Quote Post

Tom9729

RE: Programming For Linux

2 Jun, 2009 - 03:15 PM
Post #5

Debian ninja
Group Icon

Joined: 30 Dec, 2007
Posts: 2,129



Thanked: 53 times
Dream Kudos: 425
My Contributions
I use NetBeans everyday at work because it's pretty well integrated with Glassfish, and while I don't mind using it I definitely do not recommend it. It is bloated and slow, the GUI makes some braindead assumptions, and the latest version seems to be riddled with several very interesting bugs. If you're doing C/C++ I would recommend you take a look at Anjuta. If you want more IDE's, there are a couple of threads floating around that list tons of them. Off the top of my head some other ones are Eclipse, KDevelop, and Geany. All of these have pretty good support for several different languages (except Anjuta which I think is strictly C/C++). There are also some language-specific IDEs, but the only one I can think of off the top of my head is MonoDevelop (for Mono).

Also popular with *nix programmers are editors like Emacs and Vi(m). Each has it's own cult following (Google around for "editor wars") and while they're both much lighter-weight than your average IDE you can do a lot with them, at the cost of a pretty significant learning curve.

As far as languages go C is a pretty universal language when it comes to Linux, but there are also a lot of programs written in other languages. I've just picked up Python as a hobby language and while some things still drive me batty I can't help but notice that there are a lot of very accessible libraries for it to do anything you can imagine.

GCC is actually a collection of compilers for a lot of different languages (off the top of my head) including C, C++, Objective-C, Pascal, Fortran, Java, Ada, and Lisp. Most (if not all) of them working by compiling the language down do C, and then using the C compiler to make an executable. Many languages have multiple implementations though. I can list 5-6 C compilers off the top of my head if you're interested. When it comes to Java there is gcj (GCC's Java compiler) and Sun's official implementation. I can also list several assemblers, Pascal compilers, Lisp interpreters, etc. Basically (in my opinion) one of the greatest things about programming in Linux is that most versions come with an enormous number of tools that let you program in just about any language you want.

Here is a website that has benchmarks for a lot of different programming languages if you're interested. Generally though languages that are stuck with bulky runtime requirements (Java, Mono) are going to be slower starting than languages that run "on the bare metal" (C, C++). Interpreted languages (Perl, Python) are generally used when speed doesn't really matter, but for most jobs they're still fast enough and 99% of the time well written code in a "slow language" is going to run faster than poorly written code written in a "fast language".

If you already have experience with C++ then by all means keep using it. I've already mentioned a good C/C++ IDE, and the GCC C++ compiler is called 'g++' . I don't think Ubuntu installs it by default but it will be in the software repository.

Edit: Oops, I would also like to point out that for Java "slow starting" is not the same thing as "poor performance".

This post has been edited by Tom9729: 2 Jun, 2009 - 03:25 PM
User is offlineProfile CardPM
+Quote Post

Hiram

RE: Programming For Linux

2 Jun, 2009 - 05:05 PM
Post #6

New D.I.C Head
*

Joined: 2 Jun, 2009
Posts: 39



Thanked: 3 times
My Contributions
This is just my opinion, but I think programming on Linux using c++ should be EXACTLY the same as on Windows, providing everything you learned was portable.

Learning to code in a portable way makes a lot more sense to me, you learn what you need to once rather than learn many things.
User is offlineProfile CardPM
+Quote Post

xclite

RE: Programming For Linux

2 Jun, 2009 - 06:07 PM
Post #7

LIKE A BOSS
****

Joined: 12 May, 2009
Posts: 629



Thanked: 13 times
My Contributions
QUOTE(Hiram @ 2 Jun, 2009 - 07:05 PM) *

This is just my opinion, but I think programming on Linux using c++ should be EXACTLY the same as on Windows, providing everything you learned was portable.

Learning to code in a portable way makes a lot more sense to me, you learn what you need to once rather than learn many things.


If you end up coding ON a linux machine, you should give VI or Emacs a try. Hopefully you can avoid the associated religious war. As for windows, I see a lot of recommendations for Code::Blocks for your IDE.
User is offlineProfile CardPM
+Quote Post

baavgai

RE: Programming For Linux

3 Jun, 2009 - 03:42 AM
Post #8

Dreaming Coder
Group Icon

Joined: 16 Oct, 2007
Posts: 4,261



Thanked: 389 times
Dream Kudos: 550
Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua, Cheese

My Contributions
QUOTE(Welly @ 2 Jun, 2009 - 02:22 PM) *

I'd heard that c++ is a slower version of c


C++ has more overhead than C. However, it's reusable code base is optimized and if you're using the STL properly then any difference will be imperceptible. Custom rolling your own data structures can be faster, but it's also more error prone. Don't worry about the speed; really.

Beyond C, C++ is a hell of a lot faster than any other Linux dev option. Your bottle necks are most likely going to happen when you call other libraries, like the GUI layer, at which point it doesn't really matter what language you use.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 02:28AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month