Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Perl for science

by hda (Chaplain)
on Feb 08, 2009 at 15:15 UTC ( [id://742262]=note: print w/replies, xml ) Need Help??


in reply to Perl for science

Punkish, I fully understand your situation and seemingly many others in this forum do. I am a scientist and migrated from FORTRAN to Perl some years ago. I use Perl for almost everything from rearranging text files to even some heavy calculations, the latter almost exclusively with PDL. My work involves lots of cartography and geographic calculations (coordinates and so on). In my opinion, and without getting into useless comparisons with other languages, Perl offers an amazing variety of modules and programming structures that greatly facilitate scientific work in almost any aspect. Of course, this is only once you get used to the language, but this applies to any other language or tool, isn't it?

In my opinion, your despair has to do with the fact that it is always difficult, and sometimes futile, to combat misconceptions fixed in some people's minds. The biggest enemy of scientists is not ignorance, but narrow-mindedness. So, do not loose time and energy with those that are closed in their beliefs (this might also apply to other aspects of life).

Go on with Perl, your example, if good, will suffice to show others the power of the camel!

Replies are listed 'Best First'.
Re^2: Perl for science
by Anonymous Monk on Feb 08, 2009 at 20:06 UTC
    I'm a biologist and I use R and Perl for statistical computing. I think that R would have something to offer for people working with e.g. geographic calculations. Check www.r-project.org or http://addictedtor.free.fr/graphiques/allgraph.php?sort=votes (for graphs)
      There are Perl modules to assist in working with R: such as R::Writer.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

        Indeed there are, after a fashion. I'm not sure if any of them are really all that useful, though. R::Writer is marked a alpha code, so with all due respect there's no way I'd use that (yet) for our lab's data analysis. FWIW, I'm also not sure if I'd personally have much use for the R::Writer approach; if one can already write flexible R code, why get perl to do it for you?

        The RSPerl module did work a couple of years ago (although not perfectly, even back then) and changes to R in the meantime have apparently broken the module (which appears to be unmaintained). I've toyed with trying to work on the RSPerl module myself, but my lack of knowledge of perl internals has so far put me off. Maybe some day...

        Instead, my approach in the past has generally been to either maintain R code in separate scripts (and R libraries for the larger stuff), and to pass data via temporary files and system() calls to Rscript. Certainly it's ugly, but at least it's relatively reliable and easily hidden behind a convenient perl wrapper.

        Tim

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://742262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found