You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read and agree to the community’s code of conduct.
Scope
I propose the addition of one or more Zig source files to an examples/ directory in the root of the project repository. Each file would emulate client code that imports and builds over multiring.zig. Each file would contain at least one passing test. For example, we could show how to:
Use memory allocation to build multirings, e.g., a MultiRingBuilder API
Iterate over the data in a multiring, filtering out (skipping) subrings conditionally
Sort the data nodes in a ring
Find the lowest common superring of any two rings in the same multiring
Remove a (long) chain of data nodes in a ring by cutting links at only the endpoints of the chain
Use a multiring to index the rings in another multiring
Value proposition
The purpose of this project is to provide a minimal set of low-level operations that facilitate the implementation of algorithms over multirings in client code.
To my knowledge, the multiring is a rarely described data structure. (I have not encountered it in the wild, although it may exist out there in some form and under a different name.) It can therefore be unintuitive to reason about this structure and determine whether it fits one’s use case. By adding examples to this repository, we can make it easier for developers to get started with the data structure and, by extension, increase the project’s accessibility.
Examples can demonstrate the value of this data structure (or the absence thereof, in which case we can save other developers time and energy spent thinking about this structure at all). Without examples, a developer may be less likely to consider this repository for use in their application(s) even when the multiring is a strong model for the data.
Supporting information
To recapitulate, the goal is to prescribe and describe basic idioms for working with multiring.zig. Therefore, the contents of the examples don’t have to be sophisticated, but they must be complete and correct.
If this proposal is accepted, then we should also update the pre-commit hook and CI configuration for Zig source code.
The text was updated successfully, but these errors were encountered:
Consumers of this module will have differing requirements and therefore
differing opinions about the design of a higher-level API over the core
ADT. Differences in requirements will affect, for example, the choice
and implementation of algorithms for sorting, how memory is managed and
how undefined behavior is handled.
So, instead of extending the core ADT, we add an example that shows how
the core ADT, which contains only essential complexity, can be embedded
into a type containing a mixture of accidental and essential complexity.
Relates to #5
These methods apply to the entire multiring, not to individual rings, to
illustrate the ease with which we can leverage the core ADT's API.
The filter method allows us to omit rings of arbitrary size
conditionally when traversing the multiring. It highlights how the
structure of the multiring can decrease the time complexity of traversal
without increasing the space complexity.
Relates to #5
Code of conduct
Scope
I propose the addition of one or more Zig source files to an examples/ directory in the root of the project repository. Each file would emulate client code that imports and builds over multiring.zig. Each file would contain at least one passing test. For example, we could show how to:
MultiRingBuilder
APIValue proposition
The purpose of this project is to provide a minimal set of low-level operations that facilitate the implementation of algorithms over multirings in client code.
To my knowledge, the multiring is a rarely described data structure. (I have not encountered it in the wild, although it may exist out there in some form and under a different name.) It can therefore be unintuitive to reason about this structure and determine whether it fits one’s use case. By adding examples to this repository, we can make it easier for developers to get started with the data structure and, by extension, increase the project’s accessibility.
Examples can demonstrate the value of this data structure (or the absence thereof, in which case we can save other developers time and energy spent thinking about this structure at all). Without examples, a developer may be less likely to consider this repository for use in their application(s) even when the multiring is a strong model for the data.
Supporting information
To recapitulate, the goal is to prescribe and describe basic idioms for working with multiring.zig. Therefore, the contents of the examples don’t have to be sophisticated, but they must be complete and correct.
If this proposal is accepted, then we should also update the pre-commit hook and CI configuration for Zig source code.
The text was updated successfully, but these errors were encountered: