Is it a great innovation that other tools have caught up with, or is it still getting a lot of use at the bleeding edge?
Is it a great innovation that other tools have caught up with, or is it still getting a lot of use at the bleeding edge?
To start with, maybe you want to solve some simple mass and energy balances on the thing to find out how much power it will take, and how long it will need to run. No problem, Mathematica does basic algebra right out of the box. It's also got a nice units system, so you can convert things easily.
Now you realize that your mass balances have turned into differential equations. No problem. Mathematica has that built in and you can immediately plug your mass balance equations into the ODE/PDE solver and get analytic or numerical answers.
Now you are interested in how to run the fans/heater so that your dehydrator stays in the safe ranges. No problem. Mathematica has that built in, and you can immediately start working with Mathematica's process control tools.
Now you've built the thing, and recorded some data. You want to make a calibration curve for your thermometer, refine your model's parameters, and make some graphs. No problem. Mathematica has built in data processing, curve fitting, and plotting tools. You can immediately get the answers you want, and plug them into your earlier work.
Of course, you can probably do all those things in python, or R, or Matlab. But in Mathematica, you don't even need to install optional components between each step. There is no hunting down and learning some 3rd party library. There is no need to try to wrestle your symbolic work into a form that your numerical number cruncher tool can understand. There is no creating awkward pipeline code to shoehorn the results of your statistical analysis back into your differential equation. Things play nice with each other.
That being said, from my experience Mathematica is best for prototyping or research. Once you know what you are doing it makes sense to redo everything in C/C++ (or your other favorite static typing language) for production or client use.
Performance is the other issue. Mathematica is no slouch, but it can be tough to figure out how to improve things if you need more speed.
All those don't offer a seamless environment, that's hassle free, easy to setup, with commercial support, a great GUI, great documentation and works across so many science domains and with different approaches.
So, the question is quite (but not that severely) like "what people do with excavators that you can't do with spades".
The answer is, nothing much, except tons.
[Edit: added Microsoft]
Hardly so[1] --especially for general/non-technical users.
[1] http://doc.sagemath.org/pdf/en/installation/installation.pdf
The reason I've seen people prefer Mathematica is because its symbolic computation and visualization capabilities are both powerful and easy to use for basic things. Here, it is just very good, as to be expected from popular software with a long history with significant resources spent on its development. (The open source alternatives for symbolic computation may be as good in some applications for experts in some mathematical fields, but the general purpose user experience is not as good. As an alternative to Mathematica, I'm currently using Sagemath, and while it's perfectly OK for many things, the polish is often lacking.)
That's true, Matlab does -- I was referring mostly to the others, disparate attempts at a cohesive solution.
Which of those doesn't apply to R?
> works across so many science domains
Mathematica offers the same statistical capabilities as R? Granted, I haven't used it in years, but that would be a new thing if true.
https://www.wolfram.com/mathematica/new-in-9/built-in-integr...
It is easy to interactively build up plots that give good insight into my data. It also is easy to problematically create quite complex plots. It is enough better at that that I don't just stick with R or python. I can get it done faster in Mma, and the plots also look nicer.
The distribution (random number) functions are also very nice, which I often use hand in hand with the histogram, when I want to play around with statistics.
Edit: The graphics also scale better for largish data sets. If I want to plot a few hundred thousand data points, Mma feels a lot faster.
So, when do you use Matlab? Can you give me some real life examples that illustrated your decision?
Mathematica also has some algorithms from the 70's and 80's that aren't widely available as open source, and then there's the notebook interface (but see Jupyter / IPython). The part I've found most useful has been Wolfram|Alpha; it's really nice to be able to say "August 2, 2016 - September 4, 2017" and get back the number of days, weeks, and hours between those two times.
What would be those (if you got a minute)?
In Python:
import datetime # standard module
timedelta = datetime.datetime(2016, 8, 2) - datetime.datetime(2017, 9, 4)
timedelta.days
> -398
timedelta.days / 7
> -57
timedelta.days / 7.
> -56.857142857142854
timedelta.total_seconds() / 3600.
> -9552.0
In particular, that you can pretty much ask anything to Wolfram|Alpha, and that it has to figure out exactly what you're asking (and I admit most of the time, it does it), always seemed more like a marketting ploy than a real feature to me. I can't go as far as saying that I dislike it, but the few times I tried to use it, it didn't get what I was trying to "ask" and I just gave up.--> I also admit it might be me that I just don't get the tool.
from datetime import datetime, timedelta
But the code already looked pretty good to me.For example something like this: https://dateparser.readthedocs.io/en/latest/
Importing packages every time I want to use them is rather tedious though. I guess I need PYTHONSTARTUP as well.
Overall, though, 10 minutes to setup something I only use once or twice a year seems like a waste.
datetime.datetime.strptime("Aug 18 2015", "%b %d %Y")
> datetime.datetime(2015, 8, 18, 0, 0)
Like xapata said, if you import from datetime, it looks "nicer". I prefer to see where things come from most of the time, because I keep open long sessions and it can become messy otherwise.I don't really see how this can take 10 minutes to setup. You can have the import already in a file called dateutils.py and you only set it up once:
import datetime
def string2date(val):
return datetime.datetime.strptime(val, "%b %d %Y")
Then your session becomes easier from dateutils import *
string2date("Jul 4 1776")
datetime.datetime(1776, 7, 4, 0, 0)
However, I think at this point we're talking more about our personal preferences for tools rather than the original subject. It just struck me that your example was something that is available in Python using standard library modules.Other than that, it is as coldtea answers.
While these Lisps run fine on unix, they do not define how the system is programmed, but are "just" another application environment. It's still pipes/signals/ioctl()s down there.
Seriously, that's a long time, and a lot of user hours and development have gone into Mathematica. It's not perfect, it's not for everyone, I don't currently have a license, but to my mind, it's the gold standard for interactive notebook type math and science where you will never have to wedge in some weird plugin, deal with a library incompatibility, just go.
late 1980s to be more precise…
Nothing; but Mathematica has been the tool of choice for cs education (or math+cs) and people tend to stick to what they know.
However I have to agree that the UI of Mathematica is superb. Jupyter Notebook is a nice free alternative, but its recent development (Jupyter Lab) seemed very "ideish" and got me scared (do not get me wrong, it looks pretty slick and must have been complicated to engineer - but for me the nice thing about the notebook was that it is _not_ an IDE like Netbeans, Eclipse, QT-Creator - i.e. the classic ide UI that is separated into editor, file-viewer, shell and something like variable inspector). But this is a different story.