20 Repos
Shared behaviors that operate on multiple types via generic parameters.
Distinct from Generic Types: Specifically targets traits that are themselves generic, as opposed to generic types.
Explore 20 awesome GitHub repositories matching programming languages & runtimes · Generic Traits. Refine with filters or upvote what's useful.
type-fest is a library of reusable utility types for performing complex transformations and validations on objects, arrays, strings, and numeric ranges in TypeScript. It provides a collection of type definitions designed to handle advanced structural changes and constraints. The project distinguishes itself by offering specialized logic for string literal processing, such as casing transformations and pattern-based modifications, and type-level arithmetic for calculating numeric ranges and absolute values. It also includes utilities for enforcing deep immutability, ensuring union mutual exclu
Provides a set of types for type-level arithmetic and numeric range validation.
fp-ts is a TypeScript library that brings pure functional programming patterns to the language through algebraic data types, type class abstractions, and composable combinators. It provides foundational data types like Option for optional values, Either for typed error handling, and Task for lazy asynchronous computations, all designed to make invalid states unrepresentable and side effects explicit. The library is built on category theory concepts, offering type classes such as Functor, Applicative, Monad, Semigroup, and Monoid with lawful instances for common data structures. The library di
Simulates higher-kinded types in TypeScript to enable generic abstractions over type constructors.
This project is an interactive programming education resource and tutorial designed for learning the Rust programming language and systems programming concepts. It provides a collection of runnable and editable code examples that serve as a practical reference for language syntax and implementation. The resource features an interactive code sandbox that allows users to execute and test code snippets in real time. It emphasizes the verification of technical accuracy by executing embedded code blocks during the build process to ensure all examples remain functional. The content covers a compre
Explains how to define and implement traits that accept generic type parameters.
100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply
Shows how to extract common behaviors like sorting into generic functions.
Arktype is a TypeScript runtime validation library and schema orchestrator. It synchronizes TypeScript types with runtime data validation, allowing users to define type-safe schemas that ensure unknown data adheres to specific structures during application execution. The project distinguishes itself by using set-theory type analysis to determine intersections and subtype compatibility, alongside JIT-compiled validation functions for optimized performance. It supports advanced type modeling through branded type constraints, recursive alias resolution, and the ability to generate runtime valida
Provides utility types to verify if a value is a number, integer, or specific constant like Infinity or NaN.
ts-toolbelt is a collection of specialized utilities for manipulating and validating TypeScript types. It provides a toolkit for performing complex transformations on objects, unions, and functions to enforce strict data consistency at compile time. The library features dedicated transformers for function types, including utilities for currying, composition, and signature extraction. It also includes an object type manipulator for deep merging, patching, and reshaping complex structures. The capability surface extends to literal string processing, type-level arithmetic, and tuple operations.
Provides helper types for performing mathematical addition and validation on numeric types.
language-ext is a functional programming framework for C# that provides a suite of immutable data structures and monadic types. It enables the implementation of pure functional programming patterns, utilizing containers to manage side effects, optional values, and error handling. The library is distinguished by its advanced concurrency and state management tools, including a software transactional memory system and lock-free atomic references. It also provides specialized utilities for distributed systems, such as vector clocks for causality tracking and deterministic data conflict resolution
Simulates higher-kinded generics using traits to define common behaviors across different type constructors.
The Rust RFCs repository is the formal home for the Rust language evolution process, housing the structured design documents and community review mechanisms that govern changes to the Rust programming language, its compiler, and its standard library. It defines the complete lifecycle for proposing, discussing, and implementing substantial changes through RFC documents, from initial submission and community feedback through final comment periods and sub-team sign-offs. The repository codifies the governance and collaboration processes that shape Rust's development, including mechanisms for com
Defines the core numeric trait hierarchy used for generic programming over primitive types in Rust.
Dies ist eine Rust-Bibliothek zur Bildverarbeitung, die für das Kodieren und Dekodieren verschiedener Bilddateiformate sowie die Manipulation von Pixeln entwickelt wurde. Sie bietet ein Toolkit zur digitalen Bildbearbeitung und eine Reihe von Bildformat-Codecs, um Daten aus Dateien zu lesen und Speicherpuffer in Standardformate zu schreiben. Die Bibliothek verfügt über eine reine Rust-Verarbeitungspipeline, um Speichersicherheit und plattformübergreifende Kompatibilität zu gewährleisten. Sie enthält ein erweiterbares Hook-System für die dynamische Formatregistrierung, das es externen Crates ermöglicht, zur Laufzeit benutzerdefinierte Dekoder und Enkoder zu registrieren. Der Funktionsumfang umfasst Geometriemanipulationen wie Skalieren, Zuschneiden und Rotieren von Bildern sowie Farbmanagement für Farbraumkonvertierungen und Gradientengenerierung. Sie enthält Tools zum Extrahieren und Einbetten von Metadaten wie Exif- und ICC-Profilen und bietet Funktionen für die Anwendung visueller Filter und Anpassungen des Erscheinungsbilds. Die Qualitätssicherung erfolgt durch Fuzz-Testing, bei dem durch randomisierte Eingabegenerierung Schwachstellen beim Parsen von Binärdateien identifiziert werden.
Defines common behaviors for image types and pixel formats using Rust traits to enable generic processing logic.
Dieses Projekt ist eine lokalisierte Bildungsressource zum Erlernen der Programmiersprache Rust und bietet ein umfassendes Handbuch sowie technische Spezifikationen, die ins vereinfachte Chinesisch übersetzt wurden. Es dient als Lehrmittel zum Studium von Sprachidiomen, Speichermanagement und Typsystemen. Das Repository konzentriert sich auf die Lokalisierung von Softwaredokumentation und übersetzt offizielle Leitfäden ins vereinfachte Chinesisch, um die Zugänglichkeit für Nicht-Muttersprachler zu erhöhen. Es nutzt ein Markdown-basiertes System zur Organisation der Inhalte und unterstützt den Export in mehrere Formate wie statisches HTML, PDF und EPUB für die Web- und Offline-Ansicht. Der Inhalt deckt eine breite Palette technischer Rust-Domänen ab, einschließlich Speichermanagement-Primitiven wie Ownership und Borrowing, fortgeschrittenem Sprachdesign mit Traits und Generics sowie umfassenden Strategien zur Fehlerbehandlung. Zudem werden Programmiergrundlagen, Datenmodellierung und der Einsatz von Produktivitätstools für Build- und Dependency-Management detailliert beschrieben.
Explains how to specify sets of methods that different types must implement to enable generic code restrictions.
Cats ist eine funktionale Programmierbibliothek für Scala und eine Typklassen-Bibliothek, die darauf ausgelegt ist, algebraische Muster und funktionale Abstraktionen zu implementieren. Sie bietet einen standardisierten Satz an Schnittstellen und ein modulares Toolkit aus funktionalen Wrappern und Containern, um Ad-hoc-Polymorphismus und generische Programmierung über unterschiedliche Typen hinweg zu ermöglichen. Das Projekt dient als Standard für funktionale Abstraktion und bietet eine Monad-Transformer-Suite zur Komposition verschachtelter, effektbehafteter Kontexte und zur Handhabung mehrerer rechnerischer Seiteneffekte innerhalb einer einzigen Pipeline. Es ermöglicht zudem die Konstruktion eingebetteter domänenspezifischer Sprachen, indem Programmlogik als Datenstrukturen dargestellt wird, die unabhängig von ihren Definitionen interpretiert werden. Die Bibliothek deckt breite Funktionsbereiche ab, einschließlich algebraischer Datenmanipulation zum Kombinieren und Reduzieren von Werten, typsicherem Zustandsmanagement und funktionaler Fehlerbehandlung zur Formalisierung von Fehlerakkumulation und -wiederherstellung. Sie bietet zudem Werkzeuge für das Management effektbehafteter Berechnungen und die Erweiterung von Standard-Collection-Typen um funktionale Fähigkeiten. Die Bibliothek enthält Mechanismen zur Validierung algebraischer Gesetze, um sicherzustellen, dass Typklassen-Instanzen mathematische Eigenschaften einhalten.
Defines type constructors capable of taking other type constructors as parameters for generic functional containers.
nalgebra ist eine Bibliothek für lineare Algebra für Rust, die Matrix- und Vektoroperationen mit Unterstützung für Dimensionen zur Kompilier- und Laufzeit bietet. Sie fungiert als Bibliothek für numerische Analysen und dünnbesetzte Matrizen (Sparse Matrices) und bietet ein mathematisches Framework, das in eingebetteten Umgebungen und WebAssembly ohne die Rust-Standardbibliothek ausgeführt werden kann. Das Projekt zeichnet sich als Bibliothek für geometrische Transformationen aus und nutzt homogene Koordinaten, Quaternionen und Isometrien, um 3D-Rotationen, Translationen und Projektionen zu handhaben. Es implementiert eine Vielzahl von Matrix-Zerlegungen – einschließlich LU, QR, Cholesky, SVD und Eigenwertzerlegung –, um lineare Systeme zu lösen und Matrizen zu analysieren. Die Bibliothek deckt breite Funktionsbereiche ab, darunter geometrisches Rechnen für räumliche Transformationen, Computergrafik-Dienstprogramme für die Komposition von Projektionsmatrizen und den Export von Shader-Daten sowie spezialisierte Verwaltung dünnbesetzter Matrizen mittels komprimierter Zeilen- und Spaltenspeicherung. Sie bietet zudem Datenverwaltungstools für die Matrix-Initialisierung, Größenänderung und das Parsen von Matrix-Market-Dateien.
Uses generic traits to provide a consistent interface for different matrix decompositions and linear solvers.
Scalaz is a functional programming library for Scala that provides a collection of purely functional data structures and type classes. It functions as a framework for organizing functional behaviors into hierarchies to enable generic programming and type-safe transformations. The library includes tools for composing and managing nested functional effects within a single type stack through a monad transformer system. It provides data structures for representing and combining input, output, and optionality effects. The project covers a broad surface of functional abstractions, including the im
Implements native higher-kinded type definitions to create generic interfaces for containers and effects.
Returns ist eine Bibliothek für funktionale Programmierung für Python, die typsichere Container zur Verwaltung von Zustand, Fehlerbehandlung und Optionalität bereitstellt. Sie dient als monadische Container-Bibliothek und typsicheres Fehlerbehandlungs-Framework, das traditionelle Try-Catch-Blöcke und Null-Checks durch Result- und Optional-Container ersetzt, um Ausnahmen als Daten zu behandeln. Das Projekt zeichnet sich durch die Verwendung eines spezialisierten Mypy-Plugins zur statischen Analyse aus, um funktionale Pipelines zu validieren und Higher-Kinded-Types zu emulieren. Es bietet Mechanismen zur Isolierung von Seiteneffekten durch IO-Container und bietet ein Framework für typsichere Dependency-Injection, das die Bereitstellung von Abhängigkeiten bis zur finalen Ausführung einer Berechnung aufschiebt. Die Bibliothek deckt ein breites Spektrum funktionaler Primitive ab, einschließlich Currying, partieller Anwendung und der Komposition deklarativer Datenpipelines. Sie unterstützt asynchrones Workflow-Management durch das Einwickeln von Coroutines in Container, um nicht-blockierende Operationen zu verketten, und enthält Utilities für das Ressourcen-Lebenszyklusmanagement sowie die Verifizierung algebraischer Gesetze für benutzerdefinierte Container.
Simulates higher-kinded types to allow generic functions to operate across various container types.
ndarray ist eine Bibliothek für mehrdimensionale Arrays für Rust, die als Framework für lineare Algebra und wissenschaftliches Rechnen dient. Sie bietet die Kerninfrastruktur für die Erstellung und Manipulation von n-dimensionalen Arrays und fungiert sowohl als paralleler Array-Prozessor als auch als Toolkit für numerische Datenanalysen. Die Bibliothek zeichnet sich durch effizientes Slicing und Memory-Views aus, was den Datenaustausch ohne Kopieren ermöglicht. Sie nutzt optimierte Backend-Mathe-Bibliotheken für schnelle Matrixmultiplikationen und verteilt rechenintensive mathematische Iterationen auf mehrere CPU-Threads, um die Verarbeitung zu beschleunigen. Das Projekt deckt ein breites Spektrum mathematischer Operationen ab, darunter elementweise Arithmetik, achsenbasierte Datenaggregation und Skalarproduktberechnungen. Zudem sind umfassende Hilfsprogramme für die Array-Manipulation enthalten, wie Reshaping, Flattening, Stacking und die Generierung von Koordinatengittern, sowie Unterstützung für die randomisierte Array-Generierung und Serialisierung.
Uses generics and numeric traits to apply mathematical operations across different numeric types and dimensions.
redis-rs ist eine Client-Bibliothek für die Interaktion mit Redis-Datenspeichern unter Verwendung synchroner und asynchroner Rust-Schnittstellen. Sie dient als Treiber für Daten-Caching, Sitzungsverwaltung und allgemeine Datenspeicherung. Die Bibliothek bietet spezialisierte Unterstützung für Redis-Cluster-Umgebungen, einschließlich cluster-bewusstem Node-Routing und verteilter Datenverwaltung. Sie zeichnet sich durch Zero-Copy-Deserialisierung zur Minimierung von Speicherallokationen und ein gemultiplextes Verbindungsmodell aus, das es mehreren gleichzeitigen Anfragen ermöglicht, eine einzige Netzwerkverbindung zu teilen. Das Projekt deckt ein breites Funktionsspektrum ab, einschließlich JSON-Dokumentspeicherung, Befehls-Pipelining mit partieller Fehlerbehandlung und Connection-Pooling. Sichere Konnektivität wird durch TLS-Verschlüsselung und tokenbasierte Authentifizierung via Azure Entra ID gewährleistet. Die Entwicklung wird durch Connection-Mocking für Unit- und Integrationstests unterstützt.
Uses generic conversion traits to map raw Redis responses into strongly typed Rust values.
petgraph ist eine Bibliothek für Graphendatenstrukturen für die Programmiersprache Rust. Sie bietet eine Sammlung von Tools zur Darstellung und Manipulation von Graphen und fungiert als Netzwerkanalyse-Tool sowie als umfassende Suite für Graphenalgorithmen. Die Bibliothek lässt sich mit Graphviz DOT integrieren, um Graphendaten zu importieren, zu exportieren und zu parsen, was die Visualisierung erleichtert. Sie zeichnet sich durch spezialisierte Netzwerkanalyse-Funktionen aus, wie etwa die Erkennung von Cliquen, Brückenkanten, Artikulationspunkten und Subgraphen-Isomorphismen. Ihr Funktionsumfang deckt eine breite Palette von Algorithmen ab, darunter Berechnungen kürzester Pfade, Netzwerkflussanalyse, Berechnung minimaler Spannbäume und topologische Knotensortierung. Die Bibliothek unterstützt zudem die synthetische Graphengenerierung für Simulationen und Tests sowie die Filterung von Graphenkomponenten, um virtuelle Datenansichten zu erstellen. Die Implementierung nutzt indexbasierte Knotenreferenzierung und Adjazenzlisten-Darstellungen zur Verwaltung der Graphenkonnektivität und zur Speicheroptimierung.
Defines common graph behaviors via generic interfaces to allow different internal storage layouts.
This project is an educational resource and technical reference library designed to assist experienced systems engineers in transitioning from C++ to Rust. It provides a structured curriculum that maps familiar programming patterns, syntax, and memory management techniques to their counterparts in the Rust ecosystem. The platform focuses on bridging the mental model gap between manual memory management and Rust’s ownership and borrowing rules. By aligning complex type systems, trait-based polymorphism, and template metaprogramming, it clarifies how to achieve performance parity through zero-c
Clarifies how trait-based polymorphism and generic types in Rust serve as equivalents to C++ template metaprogramming.
RAML is a declarative YAML-based specification language used for modeling RESTful interfaces and data structures. It functions as a contract-first API framework and modeling standard, establishing a formal agreement for service communication and a single source of truth before implementation begins. The specification enables the automation of functional mock servers and the generation of language-specific client SDKs directly from the definition files. It supports a modular approach to API design through the use of external libraries, overlays for extending contracts, and reusable traits and
Applies reusable sets of methods and headers to multiple endpoints to ensure consistency across similar API resources.
This library is a collection of zero-overhead C++ abstractions designed to replace primitive types with strict wrappers. By leveraging template metaprogramming, it enforces compile-time type safety and validates data integrity, ensuring that logic errors are caught during the build process rather than at runtime. The project distinguishes itself by providing a zero-cost abstraction layer that maps high-level type safety wrappers directly to machine instructions. It utilizes static type identity enforcement to treat logically distinct data as incompatible types, even when they share the same u
Provides strict numeric type enforcement to prevent accidental data loss or invalid arithmetic.