ribs Units API

website·Indexed 30 days ago

https://cranst0n.github.io/ribs/

A library for handling physical quantities and units, providing classes for frequency (Hertz, Kilohertz, Megahertz), temperature scales (Celsius, Fahrenheit, Kelvin, Rankine), angles (Radians, Degrees, Gradians, Arcminutes, Arcseconds), and other physical quantities such as Momentum, MagneticFlux, ElectricPotential, and LuminousFlux.

Tokens
845.2K
Snippets
6.8K
Records
8.7K
Agent score
74%

What's inside ribs

  1. Overview of RSeq<A> mixin

    RSeq<A> is a mixin that represents an ordered, indexed sequence of elements of type A. It extends RIterable<A> by adding positional access via operator [] and a length property, as well as providing a rich set of sequence operations including sorting, slicing, searching, combinations, and permutations.

    Common implementations include:

    • Immutable: IList, IVector, NonEmptyIList
    • Mutable: ArrayDeque, ListBuffer
    • Others: Buffer, Chunk, IChain, ILazyList, IndexedSeq, IQueue, Range
  2. Overview of RillDecoder<A>

    RillDecoder<A> is a streaming binary decoder that drives a Decoder over a Rill of BitVectors, emitting decoded values as they become available. It is typically built by composing static factories and combinators. To execute a decoder, use the toPipe, toPipeByte, or decode methods.
    final decoder = RillDecoder.many(Codecs.int32);
    final ints = Rill.emits(bytes).through(decoder.toPipeByte);
  3. Overview of Decoder<A> mixin

    The Decoder<A> abstract mixin is used to decode a Json value or a cursor position into a Dart type A. It is annotated with @immutable. Developers should use static factory methods and primitive instances as building blocks, combining them using provided combinators to handle complex data structures.
  4. Overview of ListBuffer<A>

    ListBuffer<A> is a mutable buffer backed by a singly-linked IList. It is designed for efficient element accumulation, supporting O(1) append and prepend operations. It can be converted to an IList in O(1) time without copying. To ensure data integrity, it uses a mutation tracker so that iterators fail fast if the buffer is modified while being iterated.
  5. Overview of Rill<O>

    Rill<O> is a lazy, effectful, chunked stream of values of type O. It is backed by a Pull<O, Unit>. Operations on a Rill are lazy and do not execute until a compile terminal (such as compile.drain) is called. For efficiency, elements are delivered in Chunks, and most operators are chunk-transparent.
  6. Overview of ribs Core functional types and collections

    The ribs Core module provides foundational functional types including Option, Either, and Validated, as well as a comprehensive hierarchy of immutable collections: IList, IMap, ISet, and IVector.
  7. Overview of Gen<A> random generator

    Gen<A> is a final class used to generate random values of type A. It is designed as a monad, allowing the construction of complex generators from simpler ones using map and flatMap. It optionally integrates with a Shrinker<A> to minimize failing counter-examples during property-based testing. It implements the Functor, Applicative, and Monad interfaces.
  8. Overview of AbstractMMap<K, V>

    AbstractMMap<K, V> is an abstract class that serves as a base for map implementations. It implements several core interfaces: RIterableOnce, RIterable, RMap<K, V>, and MMap<K, V>. It is designed to handle collections of records (key-value pairs) and provides a foundation for immutable or read-only map operations.
  9. Overview of IORuntime

    The IORuntime abstract class provides the scheduling primitives used by the IO fiber interpreter to run asynchronous work, yield control, and manage timers. While a defaultRuntime is provided using Dart's built-in Timer API, custom runtimes (such as RealIORuntime or TestIORuntime) can be implemented for specialized scheduling requirements or testing.