Re: Choosing a scripting language for scientific programming



Dear deltaquattro,


-------- Original-Nachricht --------
Datum: Tue, 20 Nov 2007 22:10:07 +0900
Von: deltaquattro <deltaquattro@xxxxxxxxx>
An: ruby-talk@xxxxxxxxxxxxx
Betreff: Choosing a scripting language for scientific programming

Hi,

I'm a Fortran scientific programmer, and recently I have had to write
a lot of shell scripts which let different codes communicate by means
of I/O files. Right now I'm using awk and (to a lesser extent) perl to
do this. However, I'd like to learn a newer scripting language and at
the same time learn OOP, so I'm choosing between Python and Ruby. The
applications I have in mind are:

I don't know about Python, so I can't give you comparative information.
There is a guide to Ruby for programmers with hardly any prerequisites,
explaining the main features of the language, which you could go
through for the Ruby part of your comparison, to get a first impression
of that language and OOP:

http://pine.fm/LearnToProgram/

THE online reference to Ruby is the "Pickaxe book":

http://www.rubycentral.com/pickaxe/ .

This mailing list is of course a little biased towards Ruby when
it comes to comparing it to other languages . :)



1) (easy) automatic I/O files manipulation. Calculations, comparisons,
etc. among values contained in tables, and correspondent modfication
of the table entries;

To do file I/O manipulation, look at rio:

http://rio.rubyforge.org/ ,

if you want to read/write CSV data,

http://www.ruby-doc.org/stdlib/libdoc/csv/rdoc/index.html, may be of help.

You could also automate, say, Excel:

http://rubyonwindows.blogspot.com/2007/03/automating-excel-with-ruby-workbook.html

or connect to databases, such as MySQl, Postgresql etc ...




2) (less easy) semi-automatic generation of graph, images, report,
etc., based on data in huge binary files (O(Gb));

gd-graph (just do a search for library names on http://raa.ruby-lang.org/, if you want to know what exists)

can generate graphs,
ruport can generate reports,
rmagick can manipulate images,

3) (hard) create GUIs for scientifc codes, which could enable
unexperienced users to run the codes;


there are several GUI creation frameworks,
such as wxruby, fxruby, and others - there's just recently been
a discussion thread about pros and cons of those.

http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/279564?279371-279878

Which are the main differences between Ruby and Python? Which is
easier to learn? I've seen a lot of numerical libraries/extensions for
Python: does Ruby also support scientific programming? Thanks,


There is a website http://sciruby.codeforpeople.com/sr.cgi/InterestingProjects collecting
some scientific projects.

Then, there are bindings to GSL

http://rb-gsl.rubyforge.org/

and to the R statistical language,

http://raa.ruby-lang.org/project/rsruby/,

and others ...

An argument in favour of Ruby is its elegance and conceptual
versatility - I am much faster coding in Ruby than in other
languages I have used.
Yet, generally, Ruby tends to be slower when it comes to execution
times of algorithms than other scripting languages - if scripting
for you essentially means crunching huge amounts of numbers, it might
be worth considering extending Ruby right away with C via rubyinline

http://www.zenspider.com/ZSS/Products/RubyInline/

or with fortran - as you know it already :). This one could use
some of your help ;-)

http://blog.zenspider.com/archives/2006/10/inlinefortran_100_released.html

Best regards,

Axel


--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

.



Relevant Pages

  • Re: About Steve Yegges Opinions considered harmful post
    ... } It was just the before/after Rails thing really. ... } people whose first real exposure to Ruby came through the Rails hype (like ... Finally, a scripting language with pleasant syntax, a strong ... and why did I actually need to learn a scripting language (other than ...
    (comp.lang.ruby)
  • Re: Ruby Specifications
    ... use ANSI C or C# or PHP or Python or Perl or Ruby and make a mockery of the language and version updates. ... Ruby is a scripting language. ... PHP,PERL and others do not have a spec because they are fluid enough to fit in where ever they are at the time. ... So if Ruby becomes a scripting language without a home but with a specifiction then I would hope that it is because someone wants to build on it not change it into something different every 2 years. ...
    (comp.lang.ruby)
  • A couple of questions from a Ruby neophyte
    ... Ruby is the language I should be learning. ... I'm looking strictly for a console scripting language to handle ...
    (comp.lang.ruby)
  • Re: Play Want Bin: The "Girlfriend has gone away for three weeks" edition
    ... What, other than the fact that it's interpreted, makes a scripting language ... Well, it's slower, but then I daresay that in this day and age it ... Is its full name "Ruby on rails", ...
    (uk.games.video.misc)
  • Re: Ruby as First Language
    ... } My order was Quick BASIC, then C++, PHP, then Ruby. ... Most forms of Basic are, indeed, impediments to learning to ... I learned AppleSoft BASIC as my first language. ... } the basics of C or C++ in parallel with Ruby. ...
    (comp.lang.ruby)

Loading