Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl for science

by why_bird (Pilgrim)
on Feb 13, 2009 at 12:05 UTC ( #743590=note: print w/replies, xml ) Need Help??


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 (Bishop) 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.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (None)
    As of 2021-10-16 11:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My first memorable Perl project was:







      Results (69 votes). Check out past polls.

      Notices?