Friday, July 11, 2014

Mathematica 10 is making good progress

Mathematica 10 is released a few days ago. It's a quite exciting release. As mentioned in the official website, there are lots of improvements. Among those, here are what I found interesting:

A developing environment

Mathematica Notebook has always been fun to work with. However, when developing a package, I would rather use Intellij or Eclipse. Now it may be time to change my mind, because of a few improvements:

* Multiple undo (and redo). If you have been annoyed about undo in previous versions, go ahead and upgrade.

* The testing framework. This is very important for writing packages. Previously I use Eclipse for unit test. Now this can be done within Mathematica.

* Easier access to function definitions. Hover on a function and there is usage. This is minor but quite useful for unfamiliar functions.

Language features

* Association. This is on the one hand very convenient (something like a struct), and on the other hand really an interesting data structure because both lookup (access) and insertion/deletion is O(log N). Leonid Shifrin wrote an excellent explanation about its usage.

* Dataset. This is built on Association. It's interesting because it is structured data, and the SQL/noSQL operations that can easily be operated on it. I am planning to build up my personal research database with Dataset, and see how it works.

* More convenient functional form. For example, now we can define a function Select[EvenQ], which can act on a list and select even elements. Previously we have to write Select[#, EvenQ]&, which is messy. Composition also gained an operator form (@*), for the same purpose.

* String template (so as file, notebook and xml) is introduced. This helps a lot to create output with clean code.

Algorithm

* Machine learning. The integration of some machine learning algorithms is definitely interesting. One can, for example, predict Facebook topics or language. Inclusion of such definitely makes Mathematica more clever. Neural network is said to be arriving in the next minor release.

* Finite element method in PDE. This would be very helpful for people working a lot with PDEs with nontrivial boundary conditions.

* Geometry. Now lots of calculation, like range of integration, can work on geometry objects.

Cloud Deployment

This is an interesting but expensive feature. It's fun to try but we need to pay for realistic usage. For example, I put GR tensor calculation online, powered by MathGR package. In principle, anybody can now use Mathematica and MathGR to do tensor calculation without having Mathematica and/or MathGR.

https://www.wolframcloud.com/objects/67e0e184-39e0-41fc-bae6-77624a3fe383

However, I only have very limited free credits for running this on cloud, and thus a small number of runs per month (so the above link may stop working if lots of people try it).