Wolfram Research's flagship program Mathematica has run on full-power desktops at science and engineering labs for 25 years. Now it's possible to run Mathematica for free on a Raspberry Pi, the credit-card-sized PC that retails for as little as $25--a sort of pilot for a new Wolfram programming language that will be able to run on cheap devices or in the cloud.
"I think in its class--symbolic computation program--I think it's the best thing that's available," Raspberry Pi cofounder Eben Upton says of Mathematica. "It felt like the right one for the platform."
The Raspberry Pi launch is part of Wolfram Research's efforts to make its new Wolfram Language--a programming language that expands on Mathematica's existing command line interface--available across a wide range of devices, from low-powered embedded computers to cloud-based servers to parallel computing clusters.
The Pi is the first device to support the new language, which aims to provide a uniform, cross-platform interface to Mathematica's core equation-solving and number-crunching functionality and to Wolfram Alpha. Wolfram Alpha is Wolfram Research's online "computational knowledge engine," sort of a cross between a high-powered graphing calculator and an almanac of facts about the world, from physical constants to baseball scores, all of which will be accessible via Wolfram Language. Wolfram Research founder Stephen Wolfram wrote in a blog post about the launch:
We've got a language that's not mostly concerned with the details of computers, but is instead about being able to understand and create things on the basis of huge amounts of built-in computational ability and knowledge.
Mathematica and Wolfram Language for the Pi were launched Thursday at the Computer-Based Math Education Summit at UNICEF's New York headquarters. The summit was organized by computerbasedmath.org, an organization founded by Wolfram Research executive Conrad Wolfram, the brother of Stephen Wolfram, to encourage the use of computers to teach math. With computers to help with calculations, teachers can be more focused on problem solving and less on mechanically applying formulas, the organization says.
"These are people who are really committed to this idea of trying to reform math education," Upton says.
With the Wolfram tools available on the Pi, Upton said it will be possible to give an entire class the tools needed to practice computer-based math for less than $1,000. The Pi was created as a simple and inexpensive device to teach computer science and engineering and has become a favorite of the maker community, running everything from automated dog feeders to full-fledged web servers.
The full graphical interface to Mathematica, with support for plotting equations and visualizing images and audio, can be "a trifle sluggish by modern standards" on the Pi, but the command-line interface to Wolfram Language is "quite zippy," Stephen Wolfram wrote in his blog post. Some Mathematica features, like predictive input, are disabled by default in the interests of speed, he wrote.
"But it's still spectacular: the first time Mathematica has been able to run at all on anything like a $25 computer," he wrote.
Wolfram Research is also working on a "course authoring platform" that will let instructors run cloud-based online courses where students can run demonstrations and do homework using Wolfram Language, according to an earlier blog post from Stephen Wolfram.
During the announcement, Conrad Wolfram demonstrated a Raspberry Pi-powered robot programmed in Wolfram Language to search for and move toward blue objects, using the Pi's camera and the language's information-processing routines. The language features a standardized, cross-platform interface to access connected devices, including the Pi's camera and other peripherals, Stephen Wolfram wrote.
Beyond that, it provides a library of more than 5,000 built-in functions, many of them quite high-level, ranging from matrix operations and calculus to face recognition, HTML parsing, and even tweeting, as Stephen Wolfram demonstrated on his own Twitter account.
Since the built-in functions operate at such a high level, the demonstration robot's program consisted of only about 10 lines of code, Upton said.
"It's very tight, and very comprehensive," Upton says of the language, which also provides typical programming features like constructs for imperative and functional programming and an interactive debugger.
Other functions pull information directly from Wolfram Alpha's databases. That information could be anything from hurricane statistics to the molecular structure of common chemicals to facts about cat and dog breeds. (The Abyssianian cat is "loyal" but "agenda-driven," and it typically weighs between 7.4 and 16 pounds, for instance.)
And, the language will soon contain built-in support for executing Wolfram Language code in the Wolfram cloud, and similar functions will allow executing programs in a private cloud or deploying them to a desktop computer or embedded device, according to Stephen Wolfram's blog.
Wolfram also plans to build a cloud-based publishing platform for documents containing embedded interactive components written in Wolfram Language. A planned data science platform would be able to automatically pull in information from other sources, run computations, and publish reports to the document platform, according to the blog.
Having a unified language across platforms should make Mathematica more versatile as well, Stephen Wolfram wrote.
"There'll be Mathematica Online, in which a whole Mathematica session runs on the cloud through a web browser," he wrote. "And on the desktop, there'll be seamless integration with the Wolfram Cloud, letting one have things like persistent symbolic storage, and instant large-scale parallelism."
And Wolfram Research intends to contribute tutorials to Raspberry Pi's official blog, Upton said, demonstrating what can be done with the new tools. The Raspberry Pi Foundation plans to focus on building tools for teaching computing in 2014 and expand further into other areas that can be taught with the devices, including computer-based math, in the following year, he said.
"I think it's inevitable that that would be a Mathematica-based and Wolfram Language-based thing," Wolfram says. "The intention is to keep Mathematica on the Pi. This isn't a one-shot deal."