Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR straddles two needs, in order of decreasing effort:
Centralizing operator definitions in Decapodes. Operators should de-duplicated and defined in a central location as much as possible. A canon directory for operators should be defined to provide a reference for operators, and a tutorial should be provided for adding operators to Decapodes, removing the need for example pages to exhibit this feature.
Upstreaming operators Issue 286 in CatColab requires as many operators defined in CatColab be upstreamed as possible. This means proposing to add the flat-sharp operator to
default_dec_matrix_generate
The first effort opens several technical questions:
Firstly, an operator may have different definitions. In this case flat-sharp. Because of
@match
, we can still override a definition of any operator by defining the same Symbol with a different function. However adding a polysemous operator todefault_dec_matrix_generate
biases a definition. Is this a design we want?Secondly, the :mag and :neg operators are both included in
default_dec_matrix_generate
anddefault_dec_generate
. Currently, we cannot programmatically know whether the default-generate family of functions implement a symbol unless we check that the function returns an output. I think the smallest footprint solution to multiply-defining operators would be to havedefault_generate
be the fallback case in any default-generate method, and rely on it to handle the case when something is not implemented.However I wonder if a pending feature for this branch--a canonical operators documentation feature a la @docapodes--could also be coupled with the default-generate methods.
Pending Development
List of Operators
Here is a list of operators defined in the
generate
statements for our docs. Those that have been migrated completely to a default-method are checked off.As of this commit I have verified that the docs still build locally.