http://qs1969.pair.com?node_id=743590


in reply to Perl for science

I have to say, I am probably one of your 'target audience'. I'd like to think I'm open to change so I'd like to hear more specifics about why or perhaps where perl fits in as a scientific application.

As a physics undergrad, I was taught Fortran (well, a bit) and supervisors, friends and profs used Fortran or C for numerical simulations. At $work, I learned perl, mostly because I was getting p****d off at shell scripting! But I'm glad I did because I came to like perl in its own right. However, when writing numerical simulations at work, I (have to) use C or C++.

My boyfriend (working for a PhD in image forensics) swears by python for its numpy and scipy libraries, but again writes most of his processing intensive code in C.

So the perception is definitely there in my mind. I'm your perfect stereotype---Perl is great for its ease of use, flexibility and text processing capabilities, but C/C++ and python are the way to go for science, at least that's the impression I've always been given by the people around me. So what is it specifically that makes perl suitable/better for these applications? Or what needs doing to make perl better? Writing libraries? Or do you think it's only a matter of perception?

why_bird
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......

Replies are listed 'Best First'.
Re^2: Perl for science
by syphilis (Archbishop) on Feb 13, 2009 at 13:04 UTC
    I'd like to hear more specifics about why or perhaps where perl fits in as a scientific application

    In a nutshell, if you extend perl (with XS) to incorporate that fortran/C/C++ code (as does PDL, Math::Pari, Math::GSL and Math::GMP for example), then you end up with something that's as easy to use as perl, but performs its tasks as quickly as fortran/C/C++.

    Cheers,
    Rob
Re^2: Perl for science
by bruno (Friar) on Feb 13, 2009 at 18:29 UTC
    So what is it specifically that makes perl suitable/better for these applications?

    Libraries. Modules. CPAN. I'm not going to say that Perl is better than any other niche language in science. But I am willing to argue that it is no worse than python/java/ruby/whatnot for general-purpose scientific computing.

    The proof for this is my personal experience. I am not married to Perl in any way. My data is more important than my favorite language. So I said to myself; the day that I felt held back by Perl, I'd leave it (albeit temporarily) for the next better tool. And even though I've been only coding for a couple of years, that day has yet to come, and I've used a wide variety of data-crunching modules.