Wolfram Computation Meets Knowledge

Six Reasons Why the Wolfram Language Is (Like) Open Source

Six Reasons Why the Wolfram Language Is (Like) Open Source

A couple of years ago, I wrote a piece outlining why I think that open source isn’t the right business model for Wolfram’s core tech. It generated some (mostly reasonable) debate about the benefits of different models.

Reflecting on that debate recently, I realized that most of the expected practical benefits of open-source software are also strongly apparent in Wolfram tech despite our non–open source approach. So if you can forgive the clickbait title, I thought I’d walk through them:

  1. You can use it for free »
  2. You can view the source code »
  3. You can modify it »
  4. You can contribute
  5. There is a supportive (and supported) community »
  6. There is active development »

1. You Can Use It for Free

Because our central business model is making great software and licensing it for money, it surprises many people to learn that there are quite a few ways to use the Wolfram Language for free. Of course, Wolfram|Alpha is free, but I mean the full Wolfram Language. The easiest way is to create a free Wolfram Cloud account. You have access to the whole language, through a browser or via APIs, for free. True, there are some memory, CPU time and storage limits as it costs us money when you use the free cloud, and you can pay to upgrade those.

Prefer local? Try the Raspberry Pi version. The complete Wolfram Language runs on the $5 computer for free with some commercial use restrictions. Want to run it on a PC? Then there is the Wolfram Engine for macOS, Windows or Linux, free during the development phase of your project, or Wolfram Player, free for running code only but not for writing new code.

So it’s not the “free to do anything” of open-source software, but it is free in many cases.

On top of that, one has to remember that the full tech stack is free at the point of use to millions of people thanks to their institutions’ support. Most good universities have site licenses, so any student or faculty can use the technology unrestricted without personal fees. We even have country arrangements—if you are a student, teacher or academic researcher in Egypt, you have free Mathematica—that’s about 40 million people right there. You might say, “That’s not free because someone is paying,” but isn’t that true for open source? Millions of dollars have been spent so far on Jupyter and related projects just to make thin versions of Mathematica notebooks, funded in part—annoyingly!—by my own personal taxes.

2. You Can View the Source Code

A large and increasing fraction of the Wolfram tech stack is written in the Wolfram Language, and all of that source code is viewable. Just turn off the ReadProtected attribute and ask for the definition. That’s been true since Version 1, but for some time, there was an undocumented but widely known internal function to allow you to browse the definitions in a point-and-click way. That function is now documented in the Wolfram Function Repository as ResourceFunction["PrintDefinitions"].

Here, for example, is the result of ResourceFunction["PrintDefinitions"][URLRead]:

Wolfram Language code example
&#10005



Click functions in the code to see their definitions. Older or core functions written in C are not viewable this way, but of course, some of those are calling actual open-source libraries like MXNet, MKL, GMP and ImageJ, all of whose sources are available to view elsewhere.

3. You Can Modify It

Any public or internal function in the Wolfram Language can be replaced. Look up the source, edit it and evaluate it to replace the built-in rule. More than that, however, the fundamental design of the Wolfram Language, with its universal support for operator overloading, allows you to replace or augment any functionality without even having to look at the source.

For example, suppose I think that I have a better implementation of Sin for small reals, but I don’t want to replace the built-in behavior for large reals, complexes or symbolic arguments:

Sin
&#10005


Clear
&#10005


Unprotect
&#10005


You can see that my new implementation is being used without having disturbed the other behavior. That’s a lot easier than editing source code:

Sin
&#10005


4. You Can Contribute

As I explained in my open-source post, we don’t really believe in user contributions to the core language—although we do like well-described bug reports. But there are many other ways to contribute to the Wolfram Language ecosystem. At the time of writing this post, there are more than two thousand additional Wolfram Language functions in the aforementioned Wolfram Function Repository, contributed by users as well as Wolfram developers. All of them are immediately available within the language as if they were built in (but in reality auto-downloaded and installed on first use) and all with source code.

For example, here is one that I contributed for creating geo surface plots with embedded maps:

ResourceFunction
&#10005


There are also more than 12 thousand Demonstrations that have been contributed for educational purposes, again with source code.

You don’t have to use our delivery systems. You can find many examples of open-source Wolfram Language packages shared in other ways, such as GitHub. Some can be seen at Wolfram Community and PackageData, and we are preparing a new way to share larger packages of Wolfram Language code.

5. There Is a Supportive (and Supported) Community

There are actually two organized communities, each with a slightly different emphasis.

The completely independent Mathematica & Wolfram Language site is at Stack Exchange. Structured in a Q&A format, it has handled more than 80 thousand questions. It’s the only Stack Exchange site dedicated to a single programming language and almost the only one dedicated to a single technology stack.

We also host and actively support Wolfram Community. With over 30 thousand members, it’s a more general site where people can share their work, discuss approaches and ask for help. It’s a great place to find collaborators for packages that you might want to contribute to the community.

You will find many contributions on both sites from Wolfram developers.

6. There Is Active Development

Aside from the minor patches that we regularly push out, we shipped six full releases in 2020 and 2021. The top four averaged about 170 completely new functions on top of many improvements to existing functionality. That number is more than the total operator count in the core Python language.

We Practice “Open Design”

This one wasn’t on the list of things that people said were good about open source because even though you might expect that to be the place where open design happens, it really isn’t. You can often see the history of bugs and pull requests, but not much discussion about design, strategy or why decisions are made.

We also broadcast design review meetings live. You can hear how we decide what functions get into the Wolfram Language, how we work out the minimal set with maximal functionality and how we make sure they fit together as a whole (all those things I talked about in my previous post). You can even ask questions live in the meetings or if you have a good idea for something we are stuck on, suggest it. Sometimes the meetings are full of elegant insights and sometimes they get quite heated, but often they just reveal how hard good design is, as we grind through some difficult, obscure—but important—detail. And you can watch the archive of over five hundred hours of livestreams.

So, while we are not about “free and open-source software” in the usual sense, Wolfram tech is sometimes free, mostly open and always well designed.

Comments

Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.

2 comments

  1. Super useful post. Operator overloading is something I have wished for but didn’t know it existed. Yeah I should have searched harder, obvs.

    Reply
  2. This is a great article. It gives the information in a concise yet complete manner. I think the arguments are compelling.

    Reply