Re: Choosing a scripting language for scientific programming
- From: Axel Etzold <AEtzold@xxxxxx>
- Date: Tue, 20 Nov 2007 11:08:09 -0500
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
.
- References:
- Choosing a scripting language for scientific programming
- From: deltaquattro
- Choosing a scripting language for scientific programming
- Prev by Date: Re: ruby incredibly slow (update 2)
- Next by Date: Re: Arrays not working as I expected - help
- Previous by thread: Re: Choosing a scripting language for scientific programming
- Next by thread: Re: Choosing a scripting language for scientific programming
- Index(es):
Relevant Pages
|
Loading