# Tagged: rule-based programming

# Free “Mathematica”* in the Wolfram Cloud

My history with Mathematica goes back about 20 years, when I was doing Masters research and using Mathematica for both programming and visualisation.

One problem was that it was expensive unless you could justify it. Also, there were no free or “community” editions available…

**Well, THAT’S ALL CHANGED NOW!**

Almost a week ago, Stephen Wolfram announced the Wolfram Programming Cloud, which as you can see from the image below is extremely powerful – try doing that in a programming language…

Yep, Mathematica just integrated for two variables and then just assigned that to MySurface which represents that expression and plotted it in 3D

“Ah…”, I hear you say, “that’s just some fancy trickery with a good library, but it’s not real programming”. Well, that’s kind of right, except for the fact that Mathematica has a huge range of such libraries, spanning across most disciplines: Applied Mathematics, Arts and Humanities, Business and Economics, Education, Engineering, Information Science and Technology, Mathematica Technology, Mathematics, Science and Social Science.

Also, those two lines above are written in the language for Mathematica which is now called Wolfram that is a “symbolic, functional, and rule-based multi-paradigm programming language“. Pure language wise, it’s pretty hard to match.

It’s fully functional, being able to pass around functions to functions in whatever way you want, like above. But it doesn’t stop there as you can do conventional procedural programming:

For[i=0,i<4,i++,Print[i]]0 1 2 3

or, rule and pattern- based programming:

rule = {a_, b_} :> {b, a}{1, 3} /. rule{3, 1}

and purely functional programming like this classic fibbonaci example:

f[1]=1; f[2]=1; f[n_] := f[n-1]+f[n-2] // Define Fibbonaci Function f /@ Range[10] // Now get the first 10{1,1,2,3,5,8,13,21,34,55}

So that’s pretty much all of the major programming paradigms covered! Also, with all the talk about REPL’s these days, Mathematica has had one since it’s inception, except it’s not the REPL you’re used to. Apart from the normal ASCII behaviour, it can typeset and edit equations along with displaying graphics and widgets making it more of a SupeREPL.

I’ve not even scratched the surface here in order to keep the examples short and understandable, but you can easily find more by searching for “Mathematica programming example” or “Wolfram programming example“. Or, if you just want to see what it’s capable of doing or just get some inspiration, check out the Wolfram Language Code Gallery.

Interested? Then just head on over to the Wolfram Programming Cloud https://programming.wolframcloud.com/app/ and get started with the free version which is more than adequate to work out if you should upgrade to add extra options like an offline desktop version or even the mighty Mathematica itself.

Oh, and one last thing…

**The Wolfram Cloud works on an iPad!**

Yes, our (some very geeky people & me :) dream of being able to do complex computation and programming on the iPad is here – as long as you’re connected… Hopefully it won’t be that long before an offline “iPad Desktop” version comes out :-)

* Technically, the whole of Mathematica is not all in this product yet, but it seems quite a bit is and hopefully it will only be a matter of time before the whole thing is