Wolfram Language Paclet Repository: first look​
​by Bob Sandheinrich
“But the real solution to your problem is a paclet repository”. This has become a common response to questions since we released the Wolfram Function Repository in 2019. I am grateful that now I can tell people that the Wolfram Language Paclet Repository is available--and we’re looking for input from developers.

Understanding Paclets

Before you can understand a paclet repository, you need basic understanding of a paclet. Paclets are the standard tool for updating and extending Wolfram Language systems. Paclets are not new; they have been around for decades. During that time, Wolfram developers have released bug fixes as well as new features in between Wolfram Language version releases by making paclets available on a server. Usually, these paclets work silently without users knowing that they have been downloaded and installed. If you use Wolfram Language on your computer regularly, you probably have more paclets installed than you realize. I have over 700:
In[]:=
Short[PacletFind[All]]
Out[]//Short=
PacletObject
Name: Bob
Version: 1.0.0
,PacletObject
Name: ResourceSystemInternalTools
Version: 0.53.0
,PacletObject
Name: ResourceSystemInternalTools
Version: 0.52.0
,729,PacletObject
Name: GUIKit
Version: 1.0.0
,PacletObject
Name: WSMLink
Version: 13.0.0
,PacletObject
Name: WSM
Version: 13.0.0


Solving Problems

“How do I submit two functions that depend on each other?”
“How do I return a new object type so that it works in other functions?”
“The reviewers said my name was too generic, but that is the best name within my discipline, why can’t I use it?”
“Can I create a new option symbol in my function?”
“Can I submit a function that adds menu items?”
“How long will the review process take? My boss wants this published today.”
These are some of the questions I’ve received for the Function Repository that made me suggest what was then a non-existent paclet repository.
The Paclet Repository is different from the Function Repository in many ways. The two most important differences are: paclets are a more general, powerful and integrated tool for extending Wolfram Language systems, and the Wolfram Language Paclet Repository is open for developers to directly publish content without review. Both these differences impact the Paclet Repository in many ways.
The Function Repository is ideal for independent functions. Functions take inputs and return outputs and may have side effects, but Wolfram Language code supports much more. Symbols can be options, objects, wrappers, flags, tokens, and can be interdependent with a family of other symbols. Paclets are the way to distribute these families of interdependent symbols so that they can be installed and seamlessly integrated into the Wolfram Language.
Additionally, code is not the only way that a paclet can affect a Wolfram Language system. Stylesheets, palettes, documentation, and data can all be included in paclets. Simply put, any solution that can be solved in the Wolfram Language can be packaged and distributed as a paclet.
The second crucial difference between the Function Repository and the Paclet Repository is that developers of paclets can publish their paclet directly without going through the review process of the Function Repository. This is why in the Paclet Repository, all paclets and their functions have the publisher’s name at the beginning. You should trust the publisher of a paclet before you start using it.

Our First Set of Paclets

The Paclet Repository is just getting started. I hope that soon the content generated by Wolfram staff will be a small part of the repository. But we’ve put several useful paclets there already.
For the first time, the CodeEquivalanceUtilities paclet makes public the powerful tools that power the evaluation of student answers in some of Wolfram’s educational systems. The following function attempts to determine whether two pieces of code are equivalent without evaluating the code:
In[]:=
CodeEquivalentQ
[RandomInteger/@Range[5],Array[RandomInteger,5]]
Out[]=
True
Notice that the
CodeEquivalentQ
blob above is the typeset form of the new PacletSymbol. It is the same as PacletSymbol[“Wolfram/CodeEquivalenceUtilities”, “CodeEquivalentQ”]. For most symbols this will work just like the underlying symbol (in this case Wolfram`CodeEquivalenceUtilities`CodeEquivalentQ) while also handling the downloading and loading of the paclet.
Another great paclet in the initial set is called Mockingbird. The functions in Mockingbird let you create custom definitions in scoped, temporary, evaluation environments. For example, I create a new environment:
In[]:=
smallangles=
MockDefinitionGroup
[{Sin[x_]/;Abs[x]<1:=x,Cos[x_]/;Abs[x]<1:=1-x^2/2}]
Out[]=
Wolfram`Mockingbird`MockDefinitionGroupSin[x_]/;Abs[x]<1:=x,Cos[x_]/;Abs[x]<1:=1-
2
x
2

Then I use it:
In[]:=
ListLinePlotTranspose@
MockEvaluate
[smallangles,Table[{Sin[th],Cos[th]},{th,-Pi,Pi,.1}]],TicksNone
Out[]=
Finally, the Paclet Repository is an opportunity to find some content that doesn’t meet the strict qualifications of the Wolfram Language or even the less strict standards of the Function Repository. Of course I’m talking about games!
For the hardcore Wolfram Language user that also enjoys Wordle, you can now play Wolfle from the Paclet Repository:
In[]:=
Wolfle
[]
Out[]=

Compatibility

Ideally, we would like paclets in the Paclet Repository to be easy to use for anyone with a Wolfram Language version that supports a particular paclet. Practically, we hope to make all the features work for users in versions newer than 12.1. Currently, many features like PacletSymbol require version 13.0 or higher.

Contributing

Any developer can publish paclets in the Wolfram Language Paclet Repository. We have worked hard to make the process as straightforward and painless as possible. But, there is still work to do before we will be satisfied with calling the developer tools “released”. We will make another announcement then. Until then, everyone is invited to participate in the Beta period. Developer tools are available in version 13.0 and developer documentation is available on the website.

More Information

I have so much more to say about the paclet repository. In this post I did not get into publisher IDs, paclet documentation, installing vs loading paclets, managing PacletSites, how ResourceObject fits in or many other topics. However, the following references contain all that information and more. Also, please ask questions here in Community. We’ll try to answer anything we can.
◼
  • The Wolfram Language Paclet Repository home page
  • ◼
  • Quick start guide for paclet users
  • ◼
  • Quick start guide for paclet contributors
  • ◼
  • Wolfram Language Paclet functionality guide page
  • ◼
  • Paclet developer documentation
  • ◼
  • PacletTools — advanced functionality for paclet developers