Monday, October 15, 2007

Mathematica Player online conversion

At last! We can now use Mathematica to write software that we can publish on our websites and which can be run by anybody, i.e. this is not limited to end-users who own their own copy of Mathematica. This development was quietly announced in a Wolfram blog posting entitled The Day that Documents and Applications Merged; at least, that's where I learnt about it. It takes the form of a Mathematica Player online conversion system for transforming Mathematica notebooks into a form that can be run by the Mathematica Player. The blog posting summarises this as:

But the new online conversion service opens up almost any notebook. If you're a Mathematica user, that means you don't have to share your work just with other users anymore. Create your dynamic applications and share them with anyone you'd like. You can even post them on your website and link people to the Player download - a great way to publish research papers, books, or interesting computational models.

This changes everything! Long-time users of Mathematica such as me have been gnashing their teeth for 20 years at the fact that, although they have a uniquely powerful tool in Mathematica, any software that they write has been limited to being used by only those people who have their own copy of Mathematica. Unfortunately, there is almost zero chance that any randomly selected person owns Mathematica.

Many years ago I made the decision to use Mathematica because it was my "secret weapon" that allowed me to do things that would be much more cumbersome to do with other software tools such as C++, Matlab, etc. It allowed me to do a lot more research than would otherwise have been the case. In fact, I covered ground so fast that people couldn't keep up with me; that's praise for Mathematica rather than an inflated view of my ability to do research. I have received almost universal criticism from those around me (who use C++, Matlab, etc), because the fruits of my Mathematica labours are not available for them to use, at least not without a lot of effort to translate the software into a form that satisfies them (i.e. into C++, Matlab, etc). My use of Mathematica is regarded by these people as a selfish act, because it makes life easy for me and difficult for them. I can see their point! However, I am not one to be swayed by other peoples' misguided opinions, so I carried on regardless.

Of course, the Mathematica Player online conversion system comes with some restrictions, which limit its use to one of the following categories:

  1. Educational purposes in a not-for-profit, educational institution.
  2. Publicly accessible or published research content.
  3. Demonstration purposes, including at commercial or governmental organizations.
  4. None of the above. I am interested in commercial distribution.

This set of alternatives seems remarkably generous to me, after 20 years of not being able to use Mathematica in this way. The category above that particularly interests me is (2), which allows me to include working software with research papers that I publish. In fact, I wonder whether I will move to a model in which I seamlessly combine software and research paper in the Mathematica notebook that I feed to the Mathematica Player online conversion system (I assume this is possible).

Thank you so much Wolfram! I hope there aren't hidden caveats that break what appears to be a fully working model.


Yaroslav said...

Does this one work in Player?

I used "SaveDefinitions->True", copy/pasted the Manipulate output, then used online converter

Stephen Luttrell said...

I presume that your comment was intended for my posting here.

I have checked your lutrell3.nbp notebook in Mathematica Player and, although the Manipulate is active, it still does not run in the same way as in the full version of Mathematica.

The correct behaviour is that the Ising model should update itself continuously when the “update” check box is selected, which is not the case in Mathematica Player.

Yaroslav said...

Strange, it will update itself continuously after checking the box on my computer (MathPlayer, Windows XP). However, changing size of the array will create some errors

Stephen Luttrell said...

I have now uninstalled all Wolfram products from an old Windows XP computer of mine, downloaded Mathematica Player again (it turned out to be exactly the same file as I downloaded before), and installed it on my completely Wolfram-clean computer.

I then ran your lutrell3.nbp notebook, and it behaved exactly the same way as before. There is no continuous updating of the Ising model when I select the "update" check box and then stand back not touching anything. If I move the 2D sliders around I get one update each time the slider position changes, but my intention is that updates occur continuously. When I change the size of the Ising model array then I get no error messages.

I played around for a while and I found that when the Mathematica Player window did not have focus then it started to update itself continuously as I had originally intended! I also noticed that the processes MathKernel.exe and MathematicaPlayer.exe were using essentially 100% of the processor whatever I did. So some processing is going on, but not quite what I think Wolfram intended.

This copy of Mathematica Player announced itself as beta software during installation, so I presume that the problems that I am experiencing are due to bugs that will be ironed out in due course.

I have now convinced myself that there is no point continuing my attempts to use Mathematica Player until these basic problems are sorted out.

Thanks for your help in this experiment. I hope it goes much more smoothly on the next attempt.