The Wolfram Language is here

Now what?

Wolfram just launched Wolfram Cloud, a development and deployment environment for building applications using the Wolfram Language. The Wolfram Language introduction video (that I recommend you watch before reading on) went viral in programmer circles — people got really excited about this.

As a programmer watching the demo video of the Wolfram Language you are immediately overwhelmed with the sense that this is the future. This is the programming language we’ve all been waiting for. One language to rule them all. Finally. Mission accomplished.

Now that the Wolfram Cloud is live and you can actually play with it (for free in limited form) — I can confirm, indeed, it’s very impressive. Following the tutorials and examples you combine all kinds of data sources with each other easily, and do super complicated computations quickly and present them in impressive ways.

But then you think step back and think…

How can I use this in my daily work or life?

And then you draw a blank.

I had a similar situation with Wolfram Alpha, Wolfram’s “search engine” launched a few years ago. It’s an impressive service that allows you to search impressive quantities of data with natural language. But after asking what the temperature was of your day of birth in your birthplace (22C for me, if you were wondering) divided by the number of earthquakes in Sudan between 1950 and 1990 — you’re kind of done. What else do you want to know?

The Wolfram Language has the same problem. I can imagine you’re a data scientist or mathematician and you have all kinds of uses for this. But I’m not. So after trying a few examples, I’m done playing.

As I’m a web developer, possibly I could use the Wolfram language to build a cool web app. It seems to have tools to build interactive UIs. Turning formulas into web services is built-in and also easy to do. But is that a good idea? The Wolfram Language — beside being cool, and, well, “the future of programming” — is also the world’s most proprietary language.

The Wolfram Language is the world’s most proprietary language

You can deploy services to the Wolfram Cloud for free in limited capacity (you get some free computation time), but beyond that you have to start coughing up dough. You can host your own Wolfram Cloud, but that isn’t exactly free either. Once you’re committed to building stuff in the Wolfram Language you’re completely locked in. There’s no way out. No migration path, no open source implementation — and there will likely never be. The Wolfram Language isn’t something you build an alternative compiler for, because really, the language is just a relatively tiny aspect — the real investment is the gajillion petabyte of data that Wolfram has gathered over the past decades — and they’re not going to upload that to Github.

Nevertheless, there’s a lot of inspiration that can be drawn from the Wolfram Language and its development environment. Of particular interest to me is its “Notebook” style of development, which is really a beefed up REPL.

Many languages offer a REPL (Read-Eval-Print Loop) that allows you to quickly test out a few lines of code. However, in practice “real” applications are developed in a text editor editing text files, not inside a REPL. In the Wolfram Language, your Notebook (REPL session) is your application. After you define a function, it persists between sessions. You can do everything from a notebook, even deploy services to the Wolfram Cloud.

A snippet of a notebook (REPL) session where the “langflag” function (defined at the top) is tested and eventually deployed to the cloud

I’m fascinated by this idea — the idea of making whatever you do in the REPL persistent, and the idea of deploying your application from there as well with a single function call — talk about an Integrated Development Environment.

However, if a REPL is going to be your development environment then you need a UI that’s more sophisticated than your average terminal-based Python, Ruby or Clojure REPL.

In a sense, the LogicBlox REPL that we built is one step in this direction. Rather than giving you a “dumb” input line you enter commands in an advanced ACE-based editor — which means you get features like syntax highlighting, code completion and potentially errors and warnings while you type. While the effects of commands you enter don’t persist between sessions (because we create an empty workspace every time) you can download your work, and upload it later allowing you to continue. However, like with most software development platforms — its purpose is primarily to play and test things, not build real apps.

Apple has recently also adopted the idea of a REPL with Playgrounds for its new Swift language. However, it, too, is like most REPLs in use today: a tool for playing and exploration, not development. That’s a valuable thing, don’t get me wrong, but I think the idea of using the REPL (or Notebook) as a your main development environment for applications is something worth exploring. Something worth exploring outside of an extremely proprietary environment.