Checking out the Wolfram function repository
A recent addition to the Wolfram technology stack is the Wolfram Function Repository. This repository is a public resource that hosts standalone functions contributed by Wolfram Language users suitable for immediate use in any Wolfram Language computation. It was announced earlier this year by Stephen Wolfram in a blog post.
Since its launch in June this year hundreds of functions have already been published to the repository. Among those are core language functions that are useful for any kind of application and highly domain specific functions like KruskalAlgorithm for graph data.
What's remarkable about the Wolfram function repository is that the unit of publication is just a pure Wolfram language function. I have long believed that pure functions are completely sufficient for building software systems of any size. The fact that we have to use complex application frameworks and class libraries is a consequence of the poor expressiveness of the mainstream programming languages that we are stuck with. In this regard, I find the following quote by John Carmack of 'Doom' fame quite intriguing:
Sometimes, the elegant implementation is just a function. Not a method. Not a class. Not a framework. Just a function.
The process of publishing a function the Wolfram Function Repository is straight forward:
- Download the following Wolfram Language template notebook. The notebook is all you need to go through the whole publication process.
- Add the definition of your function the notebook along with documentation, examples and tests.
- Preview the resulting function resource on your local computer or on your Wolfram cloud account.
- Submit the function to the public Wolfram Function Repository with the press of a button in the notebook. The submission will be reviewed by the Wolfram Function Repository team.
- If this is your first submission to the repository, you will be instructed the register a PublisherID with Wolfram.
- After a few days the published function will be available in the repository.
I have gone through the process with an example function TimeSeriesCompress that can be used to remove redundant data points from time series data.
The whole idea of the Wolfram Function Repository can be nicely summed up in the following Stephen Wolfram quote from the introduction blog post:
The idea of the Wolfram Function Repository is to hit a particular sweet spot that allows for powerful functionality to be added while making it manageably easy to maintain good design consistency.