Python for casual stuff—it’s powerful, the code doesn’t become incomprehensible 6 months (or 6 hours) after writing it, and the design is coherent enough that returning to it after a short period of disuse doesn’t involve too much painful swapping everything back into memory. Main downside: the usual Python implementation is really slow. (For some categories of calculation-intensive task, Numpy mitigates this. It’s not too hard to extend Python in C or C++. There’s an implementation of Python called PyPy that runs some code much faster, but is much more memory-hungry.)
I tend to say that Common Lisp is my overall favourite programming language, but I’ve written hardly any in the last decade or so. Admittedly that’s mostly because in the last decade or so most of my programming has been done at work where language choice is usually determined by factors other than my general preferences. CL’s pretty nice, though: it has roughly the usual set of useful datatypes found in modern languages, is highly extensible both syntactically and semantically (via “reader macros” and ordinary macros; C users should note that CL’s macros are not at all like C’s), has a reasonably capable standard library, and can be made to run pretty fast despite being dynamically typed. Downsides: the syntax is a bit clunky in some respects (e.g., there are hash-tables but no literal syntax for making them), some kinds of genericity we’re used to nowadays—e.g., being able to use the same code to do standard things to anything that “behaves like a sequence”—aren’t there, and because it’s not a popular language nowadays there’s much less chance that someone’s already solved 90% of your problem than there is in, say, Python or Ruby or even C++.
I retain a soft spot for good ol’ C, but reluctantly concede that these days you generally want to be using C++ rather than C for really performance-critical work. But C++ is a very unlovable language. (Recent versions have made a lot of things nicer, if you do things the “modern” way—but most of the C++ code I deal with day to day has to run on very resource-limited embedded processors, which means we generally avoid a lot of the standard library, and has to be able to build with old compilers, which means a lot of those nicer friendlier features might as well not be there.) I have hopes that Rust may turn out to be a “better C++” but it’s early days yet.
On the thankfully rare occasions when I need to write something Windows-GUI-ish, C# is actually a pretty good tool these days. In particular, LINQ is pretty cool (comparable to Python’s comprehensions but uglier and more capable).
I still use Perl for exactly one purpose: one-liners in the shell for tasks just one notch up from what a single grep invocation will do.
For numeric stuff I regrettably tend to use MATLAB (which was well established at my current employer well before I got here). Python/Numpy would be a pretty good alternative—as a programming language MATLAB is maybe one step above INTERCAL—but isn’t so convenient for interactive use, which is quite a big deal.
Things I have a constant sense of nagging guilt for not having looked at properly yet: Julia (might make a really good replacement for MATLAB/Python+Numpy), Haskell (clearly very powerful and elegant, and lots of language-theoretical stuff happens there), Go (clearly not in any way an interesting language, but for its niche—pretty much anything you could call a “server”—it seems well designed), Racket (seems like they’ve grown Scheme into something really capable, and maybe it should be taking CL’s place in my heart).
For numeric stuff I regrettably tend to use MATLAB (which was well established at my current employer well before I got here). Python/Numpy would be a pretty good alternative—as a programming language MATLAB is maybe one step above INTERCAL—but isn’t so convenient for interactive use, which is quite a big deal.
Doesn’t ipython solve a lot of the issues of convenience for interactive use?
Yes, ipython is nice and plays well with matplotlib. But there are some things MATLAB still does a lot better. For instance: make a 3d plot and move your point of view around with the mouse. Trivial in MATLAB, impossible in ipython/matplotlib.
Python for casual stuff—it’s powerful, the code doesn’t become incomprehensible 6 months (or 6 hours) after writing it, and the design is coherent enough that returning to it after a short period of disuse doesn’t involve too much painful swapping everything back into memory. Main downside: the usual Python implementation is really slow. (For some categories of calculation-intensive task, Numpy mitigates this. It’s not too hard to extend Python in C or C++. There’s an implementation of Python called PyPy that runs some code much faster, but is much more memory-hungry.)
I tend to say that Common Lisp is my overall favourite programming language, but I’ve written hardly any in the last decade or so. Admittedly that’s mostly because in the last decade or so most of my programming has been done at work where language choice is usually determined by factors other than my general preferences. CL’s pretty nice, though: it has roughly the usual set of useful datatypes found in modern languages, is highly extensible both syntactically and semantically (via “reader macros” and ordinary macros; C users should note that CL’s macros are not at all like C’s), has a reasonably capable standard library, and can be made to run pretty fast despite being dynamically typed. Downsides: the syntax is a bit clunky in some respects (e.g., there are hash-tables but no literal syntax for making them), some kinds of genericity we’re used to nowadays—e.g., being able to use the same code to do standard things to anything that “behaves like a sequence”—aren’t there, and because it’s not a popular language nowadays there’s much less chance that someone’s already solved 90% of your problem than there is in, say, Python or Ruby or even C++.
I retain a soft spot for good ol’ C, but reluctantly concede that these days you generally want to be using C++ rather than C for really performance-critical work. But C++ is a very unlovable language. (Recent versions have made a lot of things nicer, if you do things the “modern” way—but most of the C++ code I deal with day to day has to run on very resource-limited embedded processors, which means we generally avoid a lot of the standard library, and has to be able to build with old compilers, which means a lot of those nicer friendlier features might as well not be there.) I have hopes that Rust may turn out to be a “better C++” but it’s early days yet.
On the thankfully rare occasions when I need to write something Windows-GUI-ish, C# is actually a pretty good tool these days. In particular, LINQ is pretty cool (comparable to Python’s comprehensions but uglier and more capable).
I still use Perl for exactly one purpose: one-liners in the shell for tasks just one notch up from what a single grep invocation will do.
For numeric stuff I regrettably tend to use MATLAB (which was well established at my current employer well before I got here). Python/Numpy would be a pretty good alternative—as a programming language MATLAB is maybe one step above INTERCAL—but isn’t so convenient for interactive use, which is quite a big deal.
Things I have a constant sense of nagging guilt for not having looked at properly yet: Julia (might make a really good replacement for MATLAB/Python+Numpy), Haskell (clearly very powerful and elegant, and lots of language-theoretical stuff happens there), Go (clearly not in any way an interesting language, but for its niche—pretty much anything you could call a “server”—it seems well designed), Racket (seems like they’ve grown Scheme into something really capable, and maybe it should be taking CL’s place in my heart).
Doesn’t ipython solve a lot of the issues of convenience for interactive use?
Yes, ipython is nice and plays well with matplotlib. But there are some things MATLAB still does a lot better. For instance: make a 3d plot and move your point of view around with the mouse. Trivial in MATLAB, impossible in ipython/matplotlib.