Your opinions of the best combination of programming languages to learn.
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: The best languages?
PHP
23
18.25%
Perl
34
26.98%
Python
43
34.13%
Ruby
13
10.32%
C
86
68.25%
C++
53
42.06%
Java
37
29.37%
Lisp
14
11.11%
Erlang
4
3.17%
Smalltalk
4
3.17%
Haskell
9
7.14%
C#
10
7.94%
Lua
6
4.76%
COBOL
3
2.38%
Scheme
6
4.76%
Go
1
0.79%
Groovy
2
1.59%
Fortran
10
7.94%
R
6
4.76%
Multiple Choice Poll. Voters: 126. You may not vote on this poll
Now, it is no news that 1.9 is faster than 1.8, but an 8x improvement on this simple recursive script? I was astonished! This is better than using XRuby to speedup Ruby performance!
Ruby 1.9 confirms itself as a fast implementation, about three times the speed of 1.8.6 which is going to replace it in 3 weeks. Ruby 1.9 (Yarv) is still the fastest of the lot in most tests, but others are clearly catching up. We have been waiting for a long time for this version of Ruby and it’s sure not to disappoint. A great Christmas present for Ruby lovers.
NOTE^ I'm sure they meant "which it is going to replace in 3 weeks."
Last edited by pr_deltoid; 07-30-2010 at 12:03 AM.
Completely ignore my previous comment.
I updated my ruby to the 1.9 version and
I can confirm that ruby is no longer slow.
my personal test is to shuffle input lines, using fisher yates shuffle,
(which I use to randomize mp3 file names to put on a stick).
Code:
$ time ruby18 ./fisher_yates.rb 1.txt > 1
4.05s real 3.50s user 0.53s system
$ time ruby19 ./fisher_yates.rb 1.txt > 1
1.82s real 1.78s user 0.03s system
that is an impressive improvement!
my previous comparison was with perl...
Code:
$ time ./fisher_yates.pl 1.txt > 1
1.07s real 1.04s user 0.02s system
and python:
Code:
$ time ./fisher_yates.py < 1.txt > 1
2.25s real 2.20s user 0.03s system
test text is "don quixote" by cervantes, split to one word per line.
After reading and thinking, I'm going to make my final vote: C, C++, and Ruby or Python
I don't know the details of why Python is better than Ruby, even though I've seen it said again and again, but I've read some Python tutorials and now I'm learning Ruby and in my opinion, I would vote Ruby. It's very nice, I don't see anything wrong with it. Python's a good language, also, but I prefer Ruby.
Last edited by pr_deltoid; 09-14-2010 at 10:23 AM.
interestingly (?) on my benchmark C++ may blitz the scripting languages
or may not be appreciably any faster!
depending whether you use stdio or C++ streams:
using <cstdio>
Code:
$ time ./fisher_yates 1.txt > 1
0.14s real 0.11s user 0.03s system
using <iostream>
Code:
$ time ./fisher_yates_iostream 1.txt > 1
1.35s real 0.62s user 0.72s system
$
very disappointing show for iostreams I feel.
Last edited by bigearsbilly; 08-01-2010 at 05:14 AM.
Reason: typo
Distribution: Conectiva, RedHat, Debian, Mandrake and Other Unix OSs
Posts: 4
Rep:
ObjectPascal
I by myself do powerfull systems /applications in modern variants of ObjectPascal, its a pitty that this language is threated as second class citzen just becouse C/unix inventor, just did a unhappy commentin early 70'ies! Its a myth ObjectPascal is a feeble language only for educational porpuses. TIOBS list shows that interest on Pascal/ObjectPascal have been growing.
Distribution: Conectiva, RedHat, Debian, Mandrake and Other Unix OSs
Posts: 4
Rep:
Quote:
Originally Posted by fruttenboel
I'd say: Tcl/Tk and Java. Both are scripted languages. Still, they are fast enough and both are excelletn for building programs. Tcl/Tk is great for building GUI front ends, and also for 'normal' programs.
Java is the language of the future. It's the safest among the 'curly braces languages'. C and C++ are portable assemblers. And assemblers are outdated. But don't take me on my words here. C and C++ are neither assemblers nor portable. At least, not as much as the users would like them to be.
My great love in programming languages is Modula-2. It's a very safe language, like Ada, and it is certified for mission critical applications (like Ada). Alas, nobody is using it. Probably because it was made in Switzerland instead of in the US.
Java has a lot in common with C, C++ and Modula-2. It builds on the syntax of C and C++ yet has a lot of the safety issues of Modula-2 added to it. This makes the compiler type-safe. Java is cross platform and identical for every implementation. Add it all up and you have a good programming environment.
It's really hard for me to choose between Ruby and Python, but Python is used for so many things that it makes it seem better to me. I'd like Ruby to be as popular as Python. If it got as popular as Python, I'd probably use it instead. I don't know which one I would say is better, but Python is used so much... Ruby seems to be very nice and neat and I don't see any problems with it, and Python is getting changed around too much in my opinion (unless they stop now, after 3). But Python is so popular and commonly used for pretty much anything, that it seems like the better one to start learning.
I don't like the amount of changes between Python 2 and 3, even though I'm sure it's a big improvement. I won't care if they stop doing that after 3 or 4, but if every major release has a hundred differences, it's going to turn ridiculous. Hopefully 4 doesn't have to go through too many changes and then it's done with.
Last edited by pr_deltoid; 09-14-2010 at 10:30 AM.
Popularity means a larger coder base -> more resources in terms of libraries and snippets -> etc, etc.
This is like speaking/writing in a common language... I bet there are more pieces of technical / Philosophical / history / <whatever> writing in English than in Urdu... IMHO,
... so you access a bigger pool of knowledge being an English speaker, than being an Urdu speaker...
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986
Rep:
It depends
For Linux administration you should prioritize on Bash.
For a Solid understanding of the backbone of computing you should learn C which can be expanded to object C in the future.
For more learing I recommend RISC assembly for Microcontrollers although this is a little out there for most PC users. A full assmebly language set looks like C as compared to RISC so I only think it is interesting if you only want it to use BIOS for system calls.If you are a genius I would also then learn Perl. I studied Pascal and loved it but it is harder to implement than C for embedded and other small stuff.Bite the bullet and learn C as a base Language or use Java because it is more popular for employment.
Last edited by theKbStockpiler; 09-15-2010 at 02:53 AM.
Reason: Not being a genius
... I studied Pascal and loved it but it is harder to implement than C for embedded and other small stuff. ...
IIRC, full standard Pascal compiler written in Pascal is just about 5000 lines long. The point is not Pscal vs "C" complexity, but rather the fact that by design standard Pascal does not give access to memory addresses, i.e. one can't write in standard Pascal "store 5a hex at address 1234" and one can't access IO devices from standard Pascal.
I.e. Pascal was meant as an application programming (opposed to system programming) language.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.