LinuxQuestions.org
Review your favorite Linux distribution.
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 02-20-2009, 04:03 AM   #1
MasterOfTheWind
Member
 
Registered: Jul 2004
Distribution: Arch, Debian sid, Kubuntu, Slackware 11
Posts: 324

Rep: Reputation: 30
Perl or Ruby or Python? Or something else?


Hello all!

Yes, yes, I know it's one of THOSE threads again. I would like your opinion on what scripting language suits best my needs :-P

First a little about my background: I've been using C++ for 8 years on and off, for pretty much everything from useful file formatting "scripts" to game programming (SDL, OGL...) to statistical computations and visualization. I have had some experiences with M-code in MatLab and of course (as a devoted linux user for the past 7 or so years) bash scripting.

Despite C/C++ being versatile and fast I don't always want to bring out the bazooka to kill a moth so to speak, so it would have been great with a slightly more flexible (albeit perhaps not as fast) alternative.

So, what do I want? Here are my main priorities:
  • Easy file handling and (re-)formatting (convenient retrieval of columns/rows, flexible output control)
  • Statistics are crucial to me. So this scripting language should have an (as extensive as possible) statistical library.
  • Visualization should be easily accessible. Not necessarily interactive, but I would very much like to save to either raster or preferably vector formats.
  • (edit) Oh, yes, and bindings to some GUI lib could have been useful.

Can anyone suggest a flexible scripting language which may suit my needs?

Thanks in advance

Last edited by MasterOfTheWind; 02-20-2009 at 04:05 AM.
 
Old 02-20-2009, 04:24 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
As you already know much has been said about this subject. So, I think it is best to read some of them and pick a choice and go through a tutorial. If you don't like it, pick another.

I do think it is safe to say that of those 3 languages, perl has the most libraries/modules available. And also that ruby as well as python invite you to code more cleanly/readable than perl.

After learning C, C++, java, bash and PHP, personally I picked python and I don't regret it. Languages I now still use are C, bash and python.
 
Old 02-20-2009, 04:35 AM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I dunno, but python has numpy:
http://en.wikipedia.org/wiki/Numpy

For perl there are many modules available including many statistics-related ones:
http://search.cpan.org/

As for ruby, maybe see here:
http://rubyforge.org/projects/rubystats/

All of them have bindings to GUI toolkits.

If you want just pure statistical computation + graphics then:
http://www.r-project.org/
 
Old 02-20-2009, 06:11 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
For Perl you've got:

1.file formatting etc: Perl is very good at this.
2. Stats: try the PDL aka Perl Data Lang modules
3. I believe Perl has modules for this too
4. GUI Perl has bindings to several, inc TK.

Look at the hundreds (thousands?) of modules at search.cpan.org
Also, http://perldoc.perl.org/ & http://www.perlmonks.org/?node=Tutorials

I don't know Ruby or Python...
 
Old 02-20-2009, 06:28 AM   #5
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by chrism01 View Post
For Perl you've got:

1.file formatting etc: Perl is very good at this.
2. Stats: try the PDL aka Perl Data Lang modules
3. I believe Perl has modules for this too
4. GUI Perl has bindings to several, inc TK.

Look at the hundreds (thousands?) of modules at search.cpan.org
Also, http://perldoc.perl.org/ & http://www.perlmonks.org/?node=Tutorials

I don't know Ruby or Python...
Perl also has bindings for gtk+ and Qt.

Perl is probably the most powerful of the three, and shines in its functional (opposed to traditionally imperative) part, as well as data structures and scoping. And, of course, closures.

One of its strongest features is anonymity - where desired. Anonymity allows you to avoid name conflicts/namespace pollution. I know anonymity is a difficult subject for people with C++ background - I have a good friend of mine writing in C++ :-).

Because of Perl's strong functional feature one can implement various OO models - in addition to the "standard" Perl one.
 
Old 02-20-2009, 07:28 AM   #6
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by MasterOfTheWind View Post
H
Can anyone suggest a flexible scripting language which may suit my needs?

Thanks in advance
you only have 3 choices. If you do have not experience in any of them, study and research them for at least a week each. Then pick the one you like. you can easily do research using google.
 
Old 02-23-2009, 02:49 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
Quote:
Perl also has bindings for gtk+ and Qt.
hay naranja!
have you tried using the perl GTK?
it's horrible!
 
Old 02-23-2009, 04:14 AM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by bigearsbilly View Post
hay naranja!
have you tried using the perl GTK?
it's horrible!
I wrote a pretty complex GUI in Perl gtk+. As I see it, the problem is not in Perl, but in gtk+ itself.

At the moment I decided to choose gtk+ and not Qt Qt Perl bindings were unsupported, and Qt wasn't LGPL (it is going to become LGPL this March).

Nowadays there are new (another author) Qt Perl bindings, so today I would have started from them.
 
Old 02-23-2009, 04:46 AM   #9
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
yes I agree, sergei.
i've done the same doing perl and glade, It's like pulling your own teeth out.
what makes it so bad is that the gtk documentation is abominable.


anyway has the OP reached a conclusion?
 
Old 04-30-2009, 02:09 PM   #10
GodofPain
LQ Newbie
 
Registered: May 2006
Posts: 5

Rep: Reputation: 0
Take a look at this site.

http://perlqt.wikidot.com

PerlQt is a very fast and easy way to create great looking GUI programs using the Qt drag and drop form designer and Perl. PerlQt is powerful enough for advanced developers and easy for beginners as well.
 
Old 04-30-2009, 02:29 PM   #11
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by GodofPain View Post
Take a look at this site.

http://perlqt.wikidot.com

PerlQt is a very fast and easy way to create great looking GUI programs using the Qt drag and drop form designer and Perl. PerlQt is powerful enough for advanced developers and easy for beginners as well.
Youy URL points to http://perlqt.sourceforge.net/ , which is the one of unsupported Qt bindings.

Here are newer bindings (Qt4):

http://qt-apps.org/content/show.php/...?content=69748
http://code.google.com/p/dongxu/wiki/PerlQT
.
 
Old 05-02-2009, 10:48 AM   #12
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
One "newer binding" is last updated in 2007 and the other one isn't available to download.

I couldn't even get the one to build which is actually available for download.

I'd say: right now, there's no QtPerl. (Or I didn't find it yet )

GtkPerl is more or less painless from the perl-side - and if you need better documentation, just use the PyGtk documentation; it translates very easily into GtkPerl.

http://www.pygtk.org/pygtk2reference/index.html
 
Old 05-07-2009, 06:02 AM   #13
amysaraantony
Member
 
Registered: Apr 2009
Posts: 42

Rep: Reputation: 16
Perl and Python are things of the past ...
Go Ruby baby !!!


Debian

Last edited by amysaraantony; 05-15-2009 at 08:17 PM.
 
Old 05-07-2009, 06:59 AM   #14
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by amysaraantony View Post
Perl and Python are things of the past ...
Go Ruby baby !!!
4x slower. Seriously, compare the features.
 
Old 05-07-2009, 07:10 AM   #15
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by amysaraantony View Post
Perl and Python are things of the past ...
Go Ruby baby !!!
I actually like Ruby quite a lot, but I wouldn't necessarily recommend it for a couple of reasons. (1) The core implementation (the Matz interpreter) is still significantly slower than either Perl or Python. (2) It's a bit of a moving target at the moment: 1.9.1 is out (and shows some nice speed increases, apparently), but although reasonably stable is not a true stable release. For example, many gems (Ruby's version of libraries/modules/add-ons) don't work yet with 1.9.1.

Perl is outstanding for text handling, and I believe it handles statistics quite well, but I've heard nothing but horror stories about using it for GUI apps. (It's my preferred language, by the way, so I'm not picking on it, just reporting what I have read.)
 
  


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
Perl vs. Ruby vs. Python vargadanis Programming 53 12-31-2010 12:37 PM
Lisp, Ruby, or python nesrail Programming 20 01-27-2009 02:49 AM
LXer: Basics 101: ruby python bash perl expect php, How do the exact same thing in th LXer Syndicated Linux News 0 10-05-2008 06:00 AM
Haskell, OCaml, Scheme, Erlang, Perl, Python, Ruby manolakis Programming 8 08-06-2007 10:10 PM

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

All times are GMT -5. The time now is 08:22 PM.

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