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:
Can anyone suggest a flexible scripting language which may suit my needs? Thanks in advance |
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. |
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/ |
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... |
Quote:
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. |
Quote:
|
Quote:
have you tried using the perl GTK? it's horrible! |
Quote:
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. |
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? |
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. |
Quote:
Here are newer bindings (Qt4): http://qt-apps.org/content/show.php/...?content=69748 http://code.google.com/p/dongxu/wiki/PerlQT . |
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 |
|
Quote:
|
Quote:
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.) |
All times are GMT -5. The time now is 10:09 AM. |