LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-30-2009, 05:55 PM   #1
post_erasmus
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Rep: Reputation: 0
Which programming languages run natively in which linux distributions?


Forgive me if this question displays volumes of ignorance, but which programming languages can/do run natively in linux/the various linux distributions?

I'm not exactly new to programming, but all of my work so far has been done in .NET and Java environments, and as such, has involved using Windows native-running programs or programs that run in the JRE.

If this is a stupid question, please help me to ask a better one.
 
Old 05-30-2009, 07:23 PM   #2
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
If you want to continue to using .NET then you should check out mono It doesn't have all the functionality of MS .NET but its getting better.

JRE runs pretty well with no real issues.

however these are probably the two worst supported languages in *nix.

Python is great scripting language(IMHO).

The traditional C/C++ are still really good as long as you compile for a Linux box. You lose some stuff from windows (e.g. winforms) but there are lots of alternative (gtk/QT), this can mean that applications can't be cross compiled easily.

Also check out Perl, Ruby, TCL and Bash scripting.

Really it's hard to give advice without knowing what you want to do. and what experience you have. I'm assuming you've had experience with Java and C# but ultimately you need to find a language that suits you and the task at hand.
 
Old 05-30-2009, 08:04 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
From a different angle:

"Programming languages running natively on Linux" has no significance. What counts is the software that is produced. If a program is compiled in the appropriate Linux environment (header files, libraries, etc.), then it will run "natively".

Next---for the most part, Linux is Linux. There are nuances, but most things should work on most distros.

I'm not a programmer, but my impression is that all the major languages (compilers or interpreters, as applicable) are available for Linux.
 
Old 05-30-2009, 08:11 PM   #4
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
Most versions of Linux come with or can install easily gcc which is the GNU compiler collection, which provides a compiler for C, C++, Objective-C, Fortran, Java, and Ada.
Then there are the scripting languages that are available, bash (or a variant) is available from the command-line and is typically useful for a variety of system administrative tasks. Of the generic scripting languages, Perl, PHP Python, Ruby... the list goes on, ever on...

If there is a specific language that you are interested in there is probably someone on this forum who could help you install it.
 
Old 05-30-2009, 09:34 PM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

I understand that you're not asking "Which language is 'best'?" (I'm very glad!)

I believe your question is more "which languages have platform dependencies?" A fair question - but the answer is still "It depends".

IMO, Java is an *excellent* choice for cross-platform portability.

If you need graphics or a GUI, for example, the combination of C/C++ and a "portable" library like SDL, Qt or GTK+ might solve the problem (and with Java, you wouldn't even have that particular problem in the first place).

Languages like C/C++, Ruby, Python, Erlang, Fortran, etc etc are all cross-platform as far as the language itself ... but you might quickly start running into problems depending on the library you need.

If you have special requirements for your problem domain (if, for example, you need good parallelization), then perhaps the *domain* might weigh more in your choice of language than the platform.

'Hope that helps .. at least a bit!

PS:
Don't forget, virtually *any* real application written in *any* programming language for *any* platform requires dynamic runtime support of some kind. Even a console-mode C application might fail if your particular version of Windows doesn't happen to have the correct version of MSVCRTLXX.dll installed. Conversely, installing an entire Java JRE or .Net runtime isn't necessarily that big a problem for most users under most circumstances (who generally expect to need a CD and/or an Internet connection to install anything). So everything is relative ... and the answer to your original question remains "It depends..."

Last edited by paulsm4; 05-30-2009 at 09:41 PM.
 
Old 05-31-2009, 09:57 AM   #6
post_erasmus
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Original Poster
Rep: Reputation: 0
First off, thanks to all for the thought out, and incrementally varied responses.

Pixellany: you're right, uncompiled programs don't run natively. What I was trying to get at was what languages could be reasonably compiled and run on linux without requiring additional runtimes, (such as the JRE). Thanks for the refocusing, there.

From what I'm reading, it sounds like C++ (which along with, C#, Java, VB, and python make up my known languages) is the route to go. Though problem domain, as paulsm mentioned, is also a big part of the decision. I just didn't really want to drop a requirements doc summary on you guys. That said (and since archShade asked, sort of) . . .

I have to take a program which was written in vb.net, quick-and-dirt-ily thrown at linux via an early version of mono (exact version i should get early this week), and has been run (and needs to continue to run) from a specific hardware rig (specs and hardware arriving early this week) using puppy linux and convert that program into something that runs natively on a linux distro and loads from startup. The app itself receives bytes and byte arrays from a specified set of TCP/IP locations and performs operations based on that received data, some timers, and a slew of xml configuration files. Then, after it "works", I need to begin tinkering with optimization with respect to the processor. And sandwich OS and application onto a 2 to (at most) 8 gig flash drive.

I think that this is a bit too robust for a scripting language to handle efficiently, but again, I've never programmed for linux (or much with scripting languages at all) before, so I'm more than willing to be wrong. Based on the comments you all have provided and my hopes for an object-oriented language with, perhaps, some extant libraries for handling xml and tcp/ip, I'm thinking C++ is probably the way to go, though I think I could manage straight C if it would make that big a difference in performance. Having read the IDE thread and down some downloading and playing, I was figuring on using Netbeans, Eclipse, or Ajunta. If you guys have any further suggestions on language or IDE, I would appreciate them.

While I'm rambling, is there a trustworthy place to get linux-compiled libraries for C++, C, etc., or would I be wiser (and able) to be making use of some of .lib files that show up in package managers?
 
Old 05-31-2009, 12:15 PM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi, again -

1. Cool - it sounds like you're on the right track!

2. For whatever it's worth, I'd *strongly* encourage you to keep Java under consideration. It sounds like it might well be a close fit for your skill set and the problem domain, and I think you might be surprised how *good* performance will actually be in the "real world".

Conversely, C++ is a complex beast. It's unfortunately all-too-easy to do the *wrong* thing in C++ ... and not even realize it. Until much, much too late.

As far as an OO language to quickly get up-to-speed on: I honestly believe Java, C# and Python are all much, much easier, safer and, IMO "cleaner". And all are equally (IMHO) capable of "industrial-strength" performance and reliability.

3. Using your distro's package manager is absolutely the best way to go. Whatever you wind up doing, there are always inevitable dependency, version and environment issues ... and your distro's package manager is almost certain to make the "better choice".

As a fallback, you should definitely install your distro's kernel headers, gcc, standard C headers and the build tools. So you'll also be prepared to build anything from source that you might need to.

'Hope that helps...-
... and please - Have fun!

Your .. PSM
 
Old 05-31-2009, 12:30 PM   #8
post_erasmus
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by paulsm4 View Post
For whatever it's worth, I'd *strongly* encourage you to keep Java under consideration. It sounds like it might well be a close fit for your skill set and the problem domain, and I think you might be surprised how *good* performance will actually be in the "real world".
To be honest I love Java, and I might try to throw together a performance test or two to see if I can convince the client to let me do this in Java, but as most of the reason for the app re-write/update is a desire to get more data through the processor using all the old hardware, I don't know how mutable they'll be.

Quote:
Using your distro's package manager is absolutely the best way to go. Whatever you wind up doing, there are always inevitable dependency, version and environment issues ... and your distro's package manager is almost certain to make the "better choice".
As a fallback, you should definitely install your distro's kernel headers, gcc, standard C headers and the build tools. So you'll also be prepared to build anything from source that you might need to.
I will do exactly this. Thank you again for all your help and advice.

Postscript:
Quote:
As far as an OO language to quickly get up-to-speed on: I honestly believe Java, C# and Python are all much, much easier, safer and, IMO "cleaner". And all are equally (IMHO) capable of "industrial-strength" performance and reliability.
Is Python really that robust? I've played with a bit, but predominantly in light-weight, very simple ways, because I sort of assumed it was best used in a little bit of bash script or in a python-compatible cgi gateway.

Last edited by post_erasmus; 05-31-2009 at 12:37 PM. Reason: enlightenment/further questions
 
Old 06-01-2009, 03:39 AM   #9
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by post_erasmus View Post
To be honest I love Java, and I might try to throw together a performance test or two to see if I can convince the client to let me do this in Java, but as most of the reason for the app re-write/update is a desire to get more data through the processor using all the old hardware, I don't know how mutable they'll be.


I will do exactly this. Thank you again for all your help and advice.

Postscript:

Is Python really that robust? I've played with a bit, but predominantly in light-weight, very simple ways, because I sort of assumed it was best used in a little bit of bash script or in a python-compatible cgi gateway.
Perl, for example, runs both under Windows and Linux, and if you choose your programming style to be cross-platform, the program will just run without any transformation.

Probably the same is true WRT Python, though I personally dislike the language.

ActiveState provides precompiled Perl/Python/TCL (and some more) packages for various OSes, including Linux and Windows.
 
Old 06-01-2009, 07:29 AM   #10
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
With obeying some rules and a portion of common sense, more or less each and every contemporary programming language I've encountered over the last decade runs on Linux, Windows and Mac as long as the programming language itself is supported under this system and I'm not trying to use something very native to the platform. Of course, something involving Mac's Cocoa does not run under Linux' X11.

Mostly, it's about endianess, handling of operating system specific things like "/" versus "\", GUI systems and some networking details as far as the average application is concerned.

So, choose what you like and know and if it's Java so be it and if you like C#/.NET, it's Mono as already mentioned.

But: The predominant programming language under Linux is still C (and partially C++) and many supporting libraries you might want to use are only available in C even though Linux has a very strong culture of binding and wrapping everything into all kinds of other programming languages. And while there's much Java-based projects out there running under Linux (IBM's Apache stuff for example), it's not the language of choice, if you're starting to develop KDE or Gnome applications. (I personally don't even have Java - I never need it and as C#/.NET is only coming with Mono which is too much involved with Gnome for my taste, I also don't have Mono installed on my Linux.) It really depends on your application you're going to develop.

If you don't care for platform-independence you can pretty much use at least a couple of dozens programming languages of all kinds supported under Linux no matter how exotic.

And yes, Python and Perl are stable and robust - it's not that they were invented just yesterday.

Last edited by Su-Shee; 06-01-2009 at 07:30 AM.
 
Old 06-01-2009, 08:14 PM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
The gcc compiler suite, as previously noted, supports several languages and generates native machine code for each.

Honestly, I can't think of any language that isn't supported under Unix/Linux. . .
 
Old 06-03-2009, 06:45 PM   #12
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Originally Posted by sundialsvcs View Post

Honestly, I can't think of any language that isn't supported under Unix/Linux. . .
visual basic! C# (whatever that is)
(thank god)

there are a million other languages,
mostly better than
java.lang.outOfMemoryError

(I reckon)
 
Old 06-04-2009, 06:33 AM   #13
archShade
Member
 
Registered: Mar 2006
Location: Delft NL
Distribution: Debian; Slackware; windows 7
Posts: 218

Rep: Reputation: 53
Quote:
visual basic! C# (whatever that is)
C# is supported under Linux + Mono isn't exactley same as C# + .NET but very similar
 
  


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
LXer: Hack Attack : Run Linux Apps Natively On Windows, OSX LXer Syndicated Linux News 0 03-23-2008 09:50 PM
Laptops that run Linux Natively rorymacneill09 Linux - Laptop and Netbook 4 04-15-2007 11:25 AM
Can linux natively run software that uses drm yet? mikepj Linux - General 1 04-01-2007 11:09 AM
languages of linux: which languages can be choosen in suse and red-hat distributions? Klaus Schnorr Linux - Software 3 09-10-2005 02:19 AM
Programming languages on Linux? Imek Programming 6 01-04-2004 03:07 AM

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

All times are GMT -5. The time now is 11:57 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