What programming languages do mathematicians use? I understand this might be a slightly subjective question, but I am honestly curious what programming languages are used by the mathematics community.
I would imagine that there is a group of mathematicians out there that use haskell because it might be more consistent with ideas from mathematics. Is this true? 
What about APL? Do mathematicians today use APL or is that just a relic of the past?
 A: I still use Lisp occasionally!
I use Maple if I need anything symbolic (and I have a decent little library of code for what I need; otherwise I'd switch), but one of the annoying things I find about Maple is that its functional programming constructs are remarkably clunky (and apparently poorly implemented).
A: What language a mathematician uses is highly dependent on the field. I know of algebraists who use Maple, Magma, and Sage. I know numericists who use Fortran (even 77 ><), some who use Matlab, some who use C++ and some who use C (overlapping in many cases). I know of some mathematicians who use Python. I personally like functional languages, thought I am not familiar personally with any mathematicians who use them regularly (by this I mean purely functional languages... the few, the proud). I have seen some people use Mathematica, though I myself don't use it. I know of many mathematicians who try to avoid computers and programming languages.
A: Which 'conventional' programming language a mathematician reaches for depends upon many things. One is familiarity: it is often easier and quicker in the short term to get an answer with a familiar language than with one well-suited to the job.
However, the provision of language features or libraries in a language, or the sheer amount of computation requires may also play a part.
Features of particular note include:


*

*support for symbolic manipulation

*numerical support of

*

*big integers (arbitrary size)

*(static) arbitrary precision floating point (FP)

*'exact' numerical computation (effectively, dynamic arbitrary precision FP)

*error tracking or interval arithmetic 


*complex number support

*'natural' notation, and brevity

*ease of encapsulation


Languages of particular note are:


*

*ML, Haskell, ... — functional languages feel relatively natural to a mathematician; there are many to choose from, often with fundamental differences semantics (e.g., how lazy the evaluation, how strong the typing).

*Q or Pure — so-called equational languages: a variation on functional languages built upon term-rewriting rather than lambda calculus. These are excellent for customised symbolic manipulation. http://code.google.com/p/pure-lang/

*C++ — might be chosen for processing speed. This language is becoming more attractive with recent complex number support, and many useful, well-optimised mathematical libraries such as GMP, Boost/Math, Boost/uBLAS, Boost/Graph, and so on.

*Python, ... — might be chosen for ease of use combined with ability to encapsulate; there are many other scripting languages to choose from, but I suspect that mathematicians would find Python relatively attractive amongst them.

A: People in math seem to be pretty fond of Python (me included).
As an evidence, search on MathOverflow for posts where people mention the fact that they wrote a program, and it's nearly always either a special math framework (like Maple, Sage, Magma or other answers here) or Python.
And, by the way, Python is compiled to bytecode, which is run by VM. It's not much different from Java or precompiled JavaScript in that.
A: Two of my favorites are Haskell and Ruby. I like Haskell because it is computable category theory and Ruby because it is really easy to write scripts and other various prototype kinds of code. Although any language that has functional programming constructs and closures is usually fun to use. Maple and Mathematica fall in this category and they are fun to use when I need heavy duty symbolic and plotting facilities.
A: It seems most software used by low-dimensional topologists is written in things like C, C++ and Python.  SnapPea, Regina, Orb, GAP, etc.   
I don't think I've ever heard of APL before.  Haskell I have heard about but it was only in passing -- I think a thread (here) on programming languages that are structured in a category-friendly way. 
A: For mathematicians which do scientific computing in the sens of numerical analysis a very good choice are the XSC languages (C-XSC and Pascal-XSC) which provide tools to solve numerical problems with a verification of the results. See U. Kulisch et alia, Springer Series in Computational Mathematics, vol. 21, for an introduction to Verified Computing and this link for the software. 
A: I like mathematica for most things. Particularly version 7. Scheme is a great way to think about computing in general. I think procedural languages are too mechanistic, as a mathematician I tend to think in terms of mappings. 
A: APL as such is probably less in use nowadays - but its ASCII sibling J is quite usable, and has interesting grammatic and mathematical constructions.
A: I will take the original poster's question broadly to include, "What software systems or aids do mathematicians use?", in order to avoid the debate on what exactly constitutes a programming language.
During my previous life as a software developer (mostly embedded software for monitor and control of telecom/datacom gear) I programmed mostly in C, C++, and assembly language for production code, and at times used Forth on the lab bench.  I also made fairly extensive use of Unix tools such as sed, awk, and shell scripting for constructing tools for our software development environments (not the target code itself).
Nowadays as an instructor, I occasionally use Mathematica when designing examples for lectures or questions for exams and quizzes.  However, I do not write programs in Mathematica.  I'm sure Maple or Matlab would suit my needs in this regard just as well as Mathematica does.
As a researcher, I usually write software in Caml (or Ocaml), which, like Haskell, is in the ML family of languages.  If I ever come across a problem where speed is crucial, I would probably resort to C++.  I dabbled with Sage a couple of years ago, and I will likely do so again someday, assuming that their code base has stabilized a bit since last I used it.  (Too many things were in flux at the time for me to feel comfortable using it in earnest.)
And like most everyone these days, I use Latex for my documentation needs, though I have not dug into the depths of Tex.  I.e. I am a Latex user, not a Tex programmer.
A: I like Ada-95.
It is a compilable language. Indeed it has debug mode where it is almost as reliable as an interpreter (the only exception from its reliability that deallocation of a dynamic object is unchecked). And it has production mode where it is (AFAIK) comparably fast as C/C++.
If you need to make fast algorithms, choose Ada. (C and C++ are very inconvenient and unreliable, don't choose them.)
A: Some of the previous answers mention producing mathematical illustrations.
SVG may be of interest as a language in which to express mathematical illustrations, especially from the point-of-view of having an open standard http://www.w3.org/TR/SVG/, and in being scalable (whereas bitmaps are not).
SVG support includes cubic Bézier curves http://www.w3.org/TR/2003/REC-SVG11-20030114/paths.html#PathDataCubicBezierCommands, useful for function sketches.
The SVG files might be generated from a script written in one of the languages mentioned in other answers here, and are relatively easy to parse (e.g. for transformation purposes) as input using XML libraries.
SVG files might be dropped directly into web pages for on-line documentation, but that relies upon browser support, or the supply of pre-rasterised alternatives.
There are tools for converting both from raster (bitmap) formats to SVG, such as Delineate http://delineate.sourceforge.net/, and from SVG to bitmap, such as the Apache Batik rasteriser http://xmlgraphics.apache.org/batik/tools/rasterizer.html.
[I do not know how widely SVG is used by mathematicians, but as a mathematician and programmer, I am attracted to certain properties of SVG itself, and to the availability of tools.]
A: Having an industrial focus for most of my career, I personally find MATLAB to be very useful. It is only on very rare occasions that I find Maple (or Mathematica) to be that helpful (the last time I recall using symbolic code for more than convenience was in confirming my calculations for Haar measures for a non-unimodular Lie group some years ago). 
One of the nicest things about using something like MATLAB (or Octave) is that using a numerical environment forces you to be careful in a way that symbolic ones don't, while allowing you to gloss over details that would be very time consuming in other languages. Often times using Boolean variables or clever use of primes allows a considerable amount of "symbolic" computation that is much easier to translate into practical code. It's not Grobner bases or whatever but it's usually pretty effective.
I have made it a standard practice for most of my company's code to be prototyped in MATLAB, whether it's mathematically oriented or not. This is also very helpful for validating outputs against C or Java code as well as checking that graphs using Swing, OpenGL, etc. are displaying properly.
A: array programming languages like APL, J, K, Mathematica, MATLAB, Nial, PPL, Q
Also, there is c++ math libraries like Blitz++, Armadillo
coq is an interactive theorem prover written in OCaml
A: Mathematica and Matlab are popular among mathematicians. R is popular among statisticians. 
A: Haskell is very popular with category theorists. 
A: For a while I was fascinated by the simplicity and power of Logo and its tight connection with geometry. I wish Python or magma would have graphics primitives. In the past 15 years I have used mostly Mathematica. It is excellent for small projects but not so good for large ones. 
A: One language I still use is PostScript. I probably need to defend that. 


*

*Its syntax is elegant. In fact, no language I've seen has more uniform syntax: a complete program is syntactically identical to almost any fragment of a program. There are no keywords and very few special cases. 

*It can be a lot of fun, and you can make pretty pictures.

*It has very few data types, but some of the ones it does have are surprisingly useful. Dictionaries come to mind immediately. Also, "arrays" (which would be called "lists" in any other language) are extremely flexible. They automatically support comprehensions, not as a separate feature, but as an obvious consequence of the syntax. Functional programmers shouldn't be surprised that procedures are useful as a type; actually, due to the simplicity of the syntax and lack of keywords, any nontrivial program has to work with procedures as data. 
Unfortunately, it has many drawbacks that prevent it from really being useful. Its handling of strings is abominable. Also, it has no facilities for user interaction. Its console I/O is crippled. Things like that could in principle be fixed by appropriate third-party packages, but unfortunately, to my knowledge, there are no third-party packages at all (at least for general programming). Finally, it can be very hard to debug; actually, it is more difficult to debug than any other language I know except assembly. All of those things combine to make it one of the most programmer-unfriendly languages out there. Nevertheless, some of my best work is implemented directly in PostScript, and I have done some real work in it. (Also, let's be fair: PostScript was never intended for general-purpose programming! Using a page-description language for any serious computation at all is some sort of achievement.) 
(Language: PostScript. Mathematical interest: its syntax is simple enough to be interesting as a mathematical construction. It's easy to produce some mathematical illustrations, like many types of fractals.)
For real mathematical figures (such as for inclusion in papers), I use MetaPost. PostScript can be used for this purpose, but MetaPost is much better suited for this and is very TeX-friendly.
(Language: MetaPost. Mathematical interest: it's great for making mathematical figures suitable for inclusion in a LaTeX document.) 
Another language that I use mostly for fun, not serious work, is x86 assembly language. In contrast to PostScript, it's an ugly language, but strangely, I think I use assembly for some of the same reasons that draw me to PostScript. 
(Language: Assembly. Mathematical interest: its execution model is very simple, so expressing algorithms in it is an interesting challenge that mathematicians may enjoy.)
The rest of the languages I use need no introduction: C, C++, Python, Ruby, Java. 
(Languages: C, C++, Python, Ruby, Java. Mathematical interest: none in particular, but they're useful in general programming, including mathematical programs.) 
I used to use Octave, but apparently most of the world uses Matlab, and Octave has just enough incompatibilities with Matlab to make it annoying to try to use other people's code. Also, it seems to have pretty poor support for sparse matrix computations. 
(Language: Octave. Mathematical interest: free approximate-clone of Matlab. It has simple syntax for matrix-centric computation.) 
I used to use PHP a lot. Actually, PHP and assembly are sort of an odd couple. A while ago, for no good reason, I tried to come up with the fastest code to print out all the permutations of a string. My best solution (for strings of ~10 or more characters, IIRC) was a combination of PHP and x86 assembly. To be fair, the PHP part could have been done in another language, but PHP was almost the right tool for the job.
(Language: PHP. Mathematical interest: none in particular, but it's great for designing websites with server-side scripting, which is no less useful to mathematicians than it is to other programmers.)
I like Haskell, but I don't use it much. 
(Language: Haskell. Mathematical interest: sigfpe said it.)
There are other languages I find interesting but never learned properly, like Lisp, Fortran, and Forth. 
If anyone's looking for a recommendation, I don't recommend any of those. But learn all of them, and then go off into a dark corner of the universe and come back with the One Language that will rule us all. 
A: No one mentioned OCAML here, so I think It is my "duty" to add this language.
OCAML slightly less "extravagant" than Haskell.
It allows you write partially imperative programs in a way that most "non-functional people" would understand. So it is easier to learn and after you did it -- Haskell will be a breeze for you.
OCAML also is VERY strictly typed. If you know exactly what you want then it will be nearly impossible to make a mistake. The language is very fast and has a lot of tools distributed with it. Many people consider the language as alternative for C. Last but not least -- there is a F# language -- .NET version of OCAML supported by Microsoft.
So if I need to quickly check some idea -- I use Mathematica or Haskell. 
But if I need to write something that should be reliable and stable, so I can share the program with others -- then I use OCAML.
A: There are lots of subject specific packages written by mathematicians out there: GAP, PARI/GP, SnapPea, Macaulay (1 and 2), Magma, Singular, etc.  Sage is a new python based open-source project that is trying to absorb these, its rate of progress is better in number theory than in other subjects, but Sage is the best thing to learn if you're starting from scratch.  It's also Python based.
There are also commercial programs: Mathematica, Maple, Matlab, etc.  In the circles I run in Mathematica is the most popular.
Of course for things where you need serious speed people tend to use C++, Java or some other lower level language.
A: I mostly use C, with occasional quick and dirty calculation in Mathematica. Much of the programming that I do is searching for various examples. Moreover, since the objects I tend to be interested are relatively concrete, I rarely need any libraries to support high-level mathematical function, and C provides the speed and smaller memory footprint that allows me to do bigger calculations. 
When I need to do a quick and simple (usually symbolic) calculation, I reach for Mathematica because it has quite a few high-level functions, and I am already familiar with it. However, I regard the answers it gives in the same way I treat announcements of new results: likely to be true, but until I check myself, I cannot trust it. That is because I have encountered its bugs way too many times to take its answers for granted.
A: For large-scale optimization, GAMS [1] should be considered.
For automated proof checking, there are several packages out there, see e.g. [2].
However, I voted up Mathematica and R, since that are the tools I use.
[1] http://de.wikipedia.org/wiki/General_Algebraic_Modeling_System
[2] http://en.wikipedia.org/wiki/Automated_proof_checking
A: In addition to programming languages, of course, some mathematicians use computer algebra systems (CAS). Examples are:


*

*Axiom http://axiom-developer.org/

*wxMaxima http://wxmaxima.sourceforge.net/wiki/index.php/Main_Page
In some cases, the system comes with its own scripting or programming language.
For example, Axiom is associated with the old A# or the new Aldor programming languages.


*

*http://en.wikipedia.org/wiki/A_Sharp_%28Axiom%29

*http://www.aldor.org/

*http://axiom-developer.org/axiom-website/bookvol9.pdf
There are many other CAS. Some are primarily numerical, some primarily symbolic, and some are geared to specific domains. With some, there is built-in support for creating mathematical documents. Some are free and open-source; others are commercial, and can be very expensive.
A: They taught me Pascal in the early 80s, and since I don't want to invest much time to learning the quirks of other languages, it has become a kinda native language for me. Alas, I was forced to migrate from the Borland dialect to FreePascal and/or Delphi with the discontinuation of DOS :-)
My CAS of choice has been Mathematica. Not out of love, but for reasons of availability. It actually is not too bad, once you get used to its idiosyncracies. Earlier I did stuff with Maple for similar reasons.
When I worked in the industry side for a while I had to use ANSI C and Matlab. I will never voluntarily use either again. Too difficult to remember the syntax for file/screen I/O functions or the pointer logic in C, and Matlab is A) outrageously priced, B) for numerical stuff only (but has that excellent support for telecommunications applications, which fitted my former employer nicely).
A: I'm in an MS in stats program and we don't use the programming languages as much as software packages like R, SAS, STATA, MATLAB and MiniTab. The closest to low a low level programming language is C-Sim which is used for simulating systems. 
A: Bryan Birch is credited with once saying that he programmed in a very high-level programming language called "graduate student".
A: [Meta-answer]  I believe that the answers already posted to this question lead to a fairly obvious conclusion:  other than the 'obvious' domain-specific languages for mathematics, all of which are used (whether the task is computation, typesetting or proof), mathematicians are not 'special' with regards to programming and, as a community, use pretty much the same languages as other communities.  The distribution might be somewhat different (i.e. mathematicians might be more daring than average), but probably not that different.
What would be an interesting counter-point is to understand which percentage of mathematicians program.
A: At least one mathematician primarily uses Maple.  See Doron Zeilberger's 92nd Opinion and programs.
A: For self-education, I have used a wide variety of languages, including BASIC, APL, Pascal, python, and bash.  For computer search and verification, I have used bc and awk: bc primarily for "small" bignum computations and awk for its nice handling of defaults and recasting between string and integer types.  Awk is also similar to python in that a user can rapidly prototype with it.
Gerhard "Ask Me About System Design" Paseman, 2010.02.22
A: BASIC! Gotta love the "goto" command.
