Version 11 of Mathematica
blog.wolfram.com
blog.wolfram.com
In Version 11 it’s finally realistic to take any 3D plot, and just 3D print it.
I didn't know that I wanted this until I saw it. Generally I prefer small, simple languages. But Mathematica is my favorite large language.I'm also happy that, even though Mathematica 11 introduces flashy features like 3D printing support and a Logo-derivative, it also includes improved support for calculus. Is there anyone else like Wolfram, i.e. a math-person who presides over a very-pragmatic, very-large programming language? That's not a rhetorical question.
A question for Mathematica-folk: does Mathematica have support for direct manipulation like Toby Schachman's works?[] I find direct manipulation more pleasant than typing characters.
Locator comes to mind:
https://reference.wolfram.com/language/ref/Locator.html
https://youtu.be/6wOLBVFdek8?t=11s
And more generally Manipulate which makes it easy to whip together a let-me-explore-how-this-depends-on-that type of widget.
Description from: http://www.sagemath.org/
"SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers. Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab."
I would argue that MMA is a small language hiding behind a gigantic, domain-specific library.
In some statically typed languages like C# and Java you can use an IDE's object or interface explorer to see what the classes, methods, and properties of a class lib are. If that's missing do you have to use introspection or reflection? In a REPL if the language has one?
Is it assumed a compiled language will be statically typed (though that doesn't have to be true) and if it's not the source code will come with any library so examining it is easy?
In classical Mathematica, you could be pretty sure that computations with future versions would give the same output. Now what happens when, for example, the average size of an egg increases over time, and then with version 12 the data is updated, and suddenly your notebooks give different results when you rerun them.
Also, where does the data come from? Can you use it as a base for scientific publications?
This stuff is packaged nicely, but it's really just another API…
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?
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...
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.
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.
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?
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.
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…
data on Pokémon and lots of other useful things
I love this - will be able to show off my kids a tool that I use all the time for work.
The current selection of layers is biased a bit towards vision, but my colleague and I are working on recurrent networks as we speak, which will unlock networks that operate on text, audio, and other data of a sequential or temporal character. Hopefully that will land in a few months with 11.1.
Awesome! Good to hear that there will be abstractions for general data processing too, and not just audio/video/text.
reference.wolfram.com seems to be down as I write this, but I'll check back in a few hours.
If you're working on Mathematica as your comment implies, thanks for your contributions. It's a wonderful piece of software (even if closed source)!
It does annoy me a bit that it's becoming a mix of a client environment and an online service, but Alpha does have its use.
Not really sure what to make of the Pokémon stuff, though :)
Correction: that is the upgrade price, my mistake
It might make sense one day when when processor improvements level off even more than they already have.
On the other hand, it might be a neat idea to OEM a high end x86 system and sell it as a purpose built "mathematica machine," with Mathematica pre-installed, the best supported GPU, optimal RAM and CPU, etc.
I think the take away was learned when every generation of the x86 would be a significant leap in performance. As you say in paragraph 3, things might change with the leveling off of improvements.
> On the other hand, it might be a neat idea to OEM a high end x86 system and sell it as a purpose built "mathematica machine," with Mathematica pre-installed, the best supported GPU, optimal RAM and CPU, etc.
I've been pitched by salesmen that their machine is a killer machine for Mathematica. We don't use it here, so I was not really into it as much as buying the sealed medical computers for the carpentry people.
Besides the CPU there is another, even more important, difference. Lisp systems were all the way down to the metal developed in Lisp. Mathematica is largely written in C++ (runtime, environment, ...) and runs on top of a conventional OS (Windows, OSX, Linux, ...).
It's called Macsyma and existed long before Mathematica. Macsyma was ported to Lisp Machines, in fact Lisp Machines exist partly because of Macsyma. It was one of the early Lisp applications which needed better and dedicated (not timeshared) hardware.
Square brackets for function arguments makes no sense, neither mathematically, nor programming language wise :)
Same for Sin requiring a capital letter, and curly braces instead of square brackets for matrices
As for square brackets for parameters, it's unconventional, for sure, but not ambiguous because list literals use curly braces anyway.
Consistency and backwards-compatibility are much more important for most existing users, whatever their aestetic preferences may be.
Result: reserved key for brackets, instead of mixing brackets and numbers while making the only kind of bracket an entire key more to get to.
Evaluation: it's clean and efficient.