Putting the Wolfram Language (and Mathematica) on Every Raspberry Pi

November 21, 2013

Last week I wrote about our large-scale plan to use new technology we’re building to inject sophisticated computation and knowledge into everything. Today I’m pleased to announce a step in that direction: working with the Raspberry Pi Foundation, effective immediately there’s a pilot release of the Wolfram Language—as well as Mathematica—that will soon be bundled as part of the standard system software for every Raspberry Pi computer.

Wolfram Language and Mathematica now free on Raspberry Pi
In effect, this is a technology preview: it’s an early, unfinished, glimpse of the Wolfram Language. Quite soon the Wolfram Language is going to start showing up in lots of places, notably on the web and in the cloud. But I’m excited that the timing has worked out so that we’re able to give the Raspberry Pi community—with its emphasis on education and invention—the very first chance to put the Wolfram Language into action.

I’m a great believer in the importance of programming as a central component of education. And I’m excited that with the Wolfram Language I think we finally have a powerful programming language worthy of the next generation. 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.

It’s tremendously satisfying—and educational. Writing a tiny program, perhaps not even a line long, and already having something really interesting happen. And then being able to scale up larger and larger. Making use of all the powerful programming paradigms that are built into the Wolfram Language.

And with Raspberry Pi there’s something else too: immediately being able to interact with the outside world. Being able to take pure code, and connect it to sensors and devices that do things.

I think it’s pretty amazing that we’re now at the point where all the knowledge and computation in the Wolfram Language can run in a $25 computer. And I think that it’s the beginning of something very important. Because it means that going forward it’s going to be technically possible to embed the Wolfram Language in pretty much any new machine or system. In effect immediately injecting high-level intelligence and capabilities.

I’ve waited a long time for this. Back in 1988 when Mathematica was first released, it could only just fit in a high-end Mac of the time, but not yet a PC. A decade later—even though it had grown a lot—it could run well on pretty much any newly sold personal computer. But embedded computers were a different story—where one expected that only specially compiled simple code could run.

But I knew that one day what would become the Wolfram Language would be able to run in its complete form on an embedded computer. And now it’s clear that finally that day has come: with the Raspberry Pi, we’ve passed the threshold for being able to run the Wolfram Language on an embedded computer anywhere.

To be clear, the Raspberry Pi is perhaps 10 to 20 times slower at running the Wolfram Language than a typical current-model laptop (and sometimes even slower when it’s lacking architecture-specific internal libraries). But for many things, the speed of the Raspberry Pi is just fine. And for example, my old test of computing 1989^1989 that used to take many seconds on the computers that existed when Mathematica was young now runs in an immeasurably short time on the Raspberry Pi.

From a software engineering point of view, what’s being bundled with the Raspberry Pi is a pilot version of our new Wolfram Engine. Then there are two applications on the Pi powered by this engine.  The first is a command-line version of the Wolfram Language. And the second is Mathematica with its notebook user interface, providing in effect a rich document-based way of interacting with the Wolfram Language.

Wolfram Language and Mathematica icons

The command-line Wolfram Language is quite zippy on the Raspberry Pi. The full notebook interface to Mathematica—requiring as it does the whole X Window stack—can be a trifle sluggish by modern standards (and we had to switch a few things off by default, like our new Predictive Interface, because they just slowed things down too much). But it’s still spectacular: the first time Mathematica has been able to run at all on anything like a $25 computer.

And it’s the whole system. Nothing is left out. All 5000+ Wolfram Language functions.  All capabilities of Mathematica and its notebook interface.

For me, one of the most striking things about having all this on the Raspberry Pi is how it encourages me to try a new style of real-world-connected computing. For a start, it’s easy to connect devices to a Pi. And a Pi is small and cheap enough that I can put it almost anywhere. And if I start a Wolfram Language program on it, it’s reliable enough that I can expect it to pretty much go on running forever—analyzing and uploading sensor data, controlling an autonomous system, analyzing and routing traffic, or whatever.

Building in as much automation as possible has been a longstanding principle of mine for the Wolfram Language. And when it comes to external devices, this means consistently curating properties of devices, and then setting up general symbolic functions for interacting with them.

Here’s how one would take this whole technology stack and use it to switch on LEDs by setting voltages on GPIO pins:

GPIO with Wolfram Language

And here’s some image analysis on a selfie taken by a RaspiCam:

RaspiCam self-portrait image analysis with Wolfram Language

Something we’re releasing alongside the Raspberry Pi bundle is a Remote Development Kit, that allows one to develop code and maintain a notebook interface on a standard laptop or other computer, while seamlessly executing code on a networked remote Raspberry Pi. The current RDK connects to a copy of Mathematica (such as Mathematica Student Edition) running on any Mac, PC or Linux machine; soon there will be other options, for example on the web.

Within the Wolfram Language there’s actually a whole emerging structure for symbolically representing remote running language instances—and for collecting results, dispatching commands, doing computations in parallel, and so on. We’re also going to have WolframLink (derived from the MathLink protocol that we’ve used for nearly 25 years), that’ll let one exchange code, data or anything else in a very flexible way.

I’m very excited to see what kinds of things people invent with the Wolfram Language on the Raspberry Pi—and I look forward to reading about some of them in the Wolfram+Raspberry Pi section on Wolfram Community, as well as on the Raspberry Pi Foundation website.

Raspberry Pi post on Wolfram Community

In the next few months, it’s all going to get more and more interesting. What we’re releasing today on the Raspberry Pi is just the first pilot for the Wolfram Language. There’ll be many updates, particularly as we approach the first production release of the language.

As with Wolfram|Alpha on the web, the Wolfram Language (and Mathematica) on the Raspberry Pi are going to be free for anyone to use for personal purposes. (There’s also going to be a licensing mechanism for commercial uses, other Linux ARM systems, and so on.)

As a footnote to history, I might mention that the Raspberry Pi is only the second computer ever on which Mathematica has been bundled for free use. (Not counting, of course, all the computers at universities with site licenses, etc.) The first was Steve Jobs’s NeXT computer in 1988.

I still regularly run into people today who tell me how important Mathematica on the NeXT was for them. Not to mention the gaggle of NeXT computers that were bought by CERN for physicists to run Mathematica—but ended up being diverted to invent the web.

What will be done with the millions of instances of the Wolfram Language that are bundled on Raspberry Pi computers around the world? Maybe some amazing and incredibly important invention will be made with them. Maybe some kid somewhere will be inspired, and will go on to change the world.

But one thing is clear: with the Wolfram Language on Raspberry Pi we’ve got a new path for learning programming—and connecting it to the real world—that a great many people are going to be able to benefit from. And I am very pleased to have been able to do my part to make this happen.

  

Join the Discussion
Join the Discussion

25 more comments. Show all »

  1.  

    yay!!!

  2.  

    Elated today, not only for the rest of the world, who will soon have these computable resources in their hands, perhaps eventually more ubiquitously then Google; but also for S.W., who has been building up to this, for many years.

    An exciting time, to live in.

    DCWhatthe
  3.  

    Good job, Wolfram Research team. It may be a small step in your large-scale plan, but it truly offers the inspiration to launch a new generation into the world of computer-based math.

    Garrett
  4.  

    The Mathematica/Pi announcement is great ! ‘ Way to get the technology into the hands and minds of kids !! Applause [Infinity, Volume->11]

    Brian
  5.  

    I still have my B&W NeXT Cube running Mathematica, thanks for rebundling it with yet another revolutionary computer.

    Adam Hill
  6.  

    Great! Good Idea!
    I completely agree with your point of view.
    thank you very much.

    M.Pierno
  7.  

    Excellent move!

    Andrew Moylan
  8.  

    You nailed it Wolfram \m/

    longcao
  9.  

    Raspi – The NeXT big thing.

  10.  

    This is great! A big ‘Thanks
    to you and team.

    Shijor Shamsudeen
  11.  

    Amazing. Just yesterday we had decided to buy a bunch of Pis for our small, rural New Zealand primary school…and now this! Location is truly no longer a barrier. Our stronger students, who are waltzing through CodeAcademy and Project Euler will love this!

  12.  

    This is a really amazing step…

  13.  

    Fantastic News!!!! I cannot wait to build a Wolfram device with a Pi.

  14.  

    Very remarkable! Admirable! The Wolfram Language can have a profound impact in research and education in Mathematics. Projects like Theorema 2.0 can leverage the Wolfram Language creations to foster a new paradigm of research and collaboration, in which smart formats like CDFs can substitute old journal formats, for instance, and mathematical content can be accessible efficiently through the Internet!
    Deeply interested in how an increasing network of mathematicians, scientists and engineers can leverage these new powers to create a global (computational!) knowledge bases of definitions, proved theorems, models and algorithms, in a way that scales the outcome of the efforts of professionals, and uses the Internet and machine learning capabilities to engineer coordinated discovery and create meaningful professional connections.
    Deeply interested also in how these portable computational knowledge can have a profound impact in creating educational content, or program chips, etc!

    David Mateos-Núñez
  15.  

    Impressed with this, thanks.

  16.  

    Ummm… this has already been created. It’s called SKYNET! Can’t wait!

    Brett
  17.  

    This will change dramatically all industrial automation systems. Up to now they were quite primitive. But with that approach it will easily be possible to develop automation system with a high degree of intelligence.
    With that, industry will not only make major advances but also save major amounts of money, because industrial production processes can get optimised, so that less resources are needed, maintenance can be done early enough, so that stillstands can get avoided and the production machines can be designed much safer. And that will save many lives.

    Claus Martin
  18.  

    I just installed it on my Raspberry Pi…it looks great! Thanks Mr. Wolfram!

  19.  

    Congrats on a truly awesome accomplishment. I agree that the benefits will greatly outweigh the cost in time the efforts of the company’s teams over the years, from the first days of the standalone kernel to now. What a tool set!

    A former version 2 user.

    Bill Kiele
  20.  

    can’t wait. better get a Raspberry now.

    Tony
  21.  

    MapThread[Happiness,{All,At Mathematica}], great work!

    ade
  22.  

    Superb idea, and most generous! Now all I need to do is find the time to take advantage of it on my Pi :)

  23.  

    Thank you, this really opens up some amazing possibilities.

    Brian
  24.  

    I was looking for this. My plan is to develop intelligent module for control systems. Initially, I planned to use Smaltalk, but avaibility of many functions in Mathematica changed my mind.

  25.  

    I was so mad that Texas Tech’s Mechanical Engineering department makes you take a Matlab class and then the professors expect you to learn Mathmatica nearly over night. I dropped a class because of that idiotic notion. Just wasn’t worth my time to learn another programming language (that is locked to my Mac might I add) to pass a class that I could go take down the road cheaper without the need for either Mathmatica or Matlab. Maybe I’ll look into picking Mathmatica up a bit more now…

    Colin
Hide comments »