Hacker News new | past | comments | ask | show | jobs | submit login

> Scientific computing is a perfect example

Just out of curiosity, what's the best one?




The quote (which I really like, though I only use Python for a very small subset of things, generally quick throwaway scripts) doesn't have to imply that there is an agreed upon best.

Bob likes R. But he'll take Python second. Ted likes Matlab. But he'll take Python second. Etc.

The point is everyone agrees Python will do. Consensus plays in to the OP; even if Python isn't perfect for the domain, it's probably good enough, and the lingua franca.


So, in other words, it doesn't excel at anything in particular but is more of a jack of all trades. Got it. Thanks.


You know, the quote actually goes:

    Jack of all trades, master of none,
    Often times better than a master of one.


For raw speed at crunching through arrays (which is still vitally important in many areas of scientific computing), it's still FORTRAN. It also has very good (and well-tested) libraries for all sorts of mathy-sciency things.

A PhD friend of mine who does scientific computing works almost exclusively in FORTRAN.


I believe the comment was in reference to the supercomputing (HPC) world where Python is indeed very popular and has great libraries for doing large-scale scientific computing. You lose quite a bit of performance on the hardware but it makes up for it in speed of programming. For small-scale scientific computing other languages tend to be used.

The best language for large-scale scientific computing is C/C++, which surprises some people. Python binds to these libraries. C/C++ has two big advantages: it can run much faster than any other language and the language is better suited for designing massively parallel codes than most others. The latter point makes sense when you realize that HPC software only runs a single process per core and explicitly, adaptively schedules execution and messaging in order to optimize throughput. It is a bit like very old school single-threaded UNIX server programming.


For high-energy experimental physics (HEP or particle physics), most tend to use a CERN developed C++ framework called ROOT[1]. It's not overly pleasant, but it gets the job done.

There are Python bindings to ROOT (pyROOT) but I've found Python in my experience to be a bit too slow when handling the large (10TB+) datasets.

As an aside, it's interesting how ROOT attempts to provide C++ with some basic reflection[2] and saving of C++ objects to dis. Unfortunately it doesn't necessarily do a very good job of it, but perhaps things will change with ROOT6 as it transitions to being based on clang, as opposed to in-house C interpreter.

[1] http://root.cern.ch/ [2] http://root.cern.ch/drupal/content/reflex


R is by far the most commonly used for statistical sciences. As far as I know, the list continues as follows: Matlab & Labview for experimental physics. SPSS for social psychology. SAS for the pharmaceutical industry/medicine research.


It really depends on the application and area of study. There is no "one best" language for all of scientific computing. For some things R is the best, for others SPSS, and for some matlab. The larger the datasets and the more computationally intense the task, the more low-level languages like C++ or Fortran are best.

But across subfields and concentrations Python is almost always the second best language. Also Python kills for rapid prototyping and testing a concept on a small scale before the much more labor intensive porting to a lower-level language.


http://arstechnica.com/science/2014/05/scientific-computings... suggests its probably still Fortran. The new breed of contenders: Haskell (new?), Clojure, or Julia.


Depends entirely on what you are doing for. Basically for any give task you'll probably find a language better suited than python, but it will be a different language for each task. That is why python excels, no other language is "good enough" for so many different things.


R I thought.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: