20 repository-uri
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.
Aceasta este o bibliotecă Rust pentru procesarea imaginilor, concepută pentru codificarea și decodificarea diverselor formate de fișiere imagine și manipularea pixelilor. Oferă un set de instrumente pentru manipularea imaginilor digitale și o serie de codecuri pentru citirea datelor din fișiere și scrierea bufferelor de memorie în formate standard. Biblioteca dispune de un pipeline de procesare scris în Rust pur pentru a asigura siguranța memoriei și compatibilitatea cross-platform. Include un sistem de tip „pluggable hook” pentru înregistrarea dinamică a formatelor, permițând crate-urilor externe să înregistreze decodoare și encodoare personalizate la runtime. Suprafața de capabilități acoperă manipularea geometrică pentru redimensionare, decupare și rotire, precum și gestionarea culorilor pentru conversii de spațiu și generarea de gradienți. Include instrumente pentru extragerea și încorporarea metadatelor precum profilurile Exif și ICC, și oferă funcții pentru aplicarea filtrelor vizuale și ajustări de aspect. Asigurarea calității este gestionată prin fuzz testing, utilizând generarea de input-uri aleatorii pentru a identifica vulnerabilități în parsarea fișierelor binare.
Defines common behaviors for image types and pixel formats using Rust traits to enable generic processing logic.
Acest proiect este o resursă educațională localizată pentru învățarea limbajului de programare Rust, oferind un ghid cuprinzător și specificații tehnice traduse în chineză simplificată. Servește ca instrument de instruire pentru studierea idiomurilor limbajului, gestionarea memoriei și sistemele de tipuri. Repository-ul se concentrează pe localizarea documentației software, convertind ghidurile oficiale în chineză simplificată pentru a crește accesibilitatea pentru vorbitorii non-nativi de engleză. Utilizează un sistem bazat pe markdown pentru a organiza conținutul și suportă exportul în formate multiple către HTML static, PDF și EPUB pentru vizualizare web și offline. Conținutul acoperă o gamă largă de domenii tehnice Rust, inclusiv primitive de gestionare a memoriei precum ownership și borrowing, design avansat de limbaj implicând traits și generics, și strategii cuprinzătoare de gestionare a erorilor. De asemenea, detaliază fundamentele programării, modelarea datelor și utilizarea instrumentelor de productivitate pentru dezvoltatori pentru gestionarea build-urilor și a dependențelor.
Explains how to specify sets of methods that different types must implement to enable generic code restrictions.
Cats este o bibliotecă de programare funcțională și type class pentru Scala, concepută pentru a implementa tipare algebrice și abstracțiuni funcționale. Aceasta oferă un set standardizat de interfețe și un toolkit modular de wrapper-e și containere funcționale pentru a permite polimorfismul ad-hoc și programarea generică între tipuri disparate. Proiectul servește drept standard de abstracție funcțională, oferind o suită de monad transformer pentru a compune contexte imbricate cu efecte și a gestiona multiple efecte secundare computaționale într-un singur pipeline. De asemenea, permite construirea de limbaje specifice domeniului (DSL) încorporate prin reprezentarea logicii programului ca structuri de date care sunt interpretate separat de definițiile lor. Biblioteca acoperă domenii largi de capabilități, inclusiv manipularea algebrică a datelor pentru combinarea și reducerea valorilor, gestionarea stării cu tipizare sigură și gestionarea funcțională a erorilor pentru a formaliza acumularea și recuperarea acestora. Oferă, de asemenea, instrumente pentru gestionarea computațiilor cu efecte și extinderea tipurilor de colecții standard cu capabilități funcționale. Biblioteca include mecanisme pentru validarea legilor algebrice, asigurând că instanțele de type class respectă proprietățile matematice.
Defines type constructors capable of taking other type constructors as parameters for generic functional containers.
nalgebra este o bibliotecă de algebră liniară pentru Rust care oferă operații cu matrice și vectori cu suport pentru dimensiuni atât la compilare, cât și la runtime. Funcționează ca o bibliotecă de analiză numerică și o bibliotecă de matrice rare (sparse matrix), oferind un framework matematic capabil să ruleze în medii embedded și WebAssembly fără a necesita biblioteca standard Rust. Proiectul se distinge ca o bibliotecă de transformări geometrice, utilizând coordonate omogene, cuaternioni și izometrii pentru a gestiona rotații 3D, translații și proiecții. Implementează o varietate de descompuneri de matrice — inclusiv LU, QR, Cholesky, SVD și eigendecomposition — pentru a rezolva sisteme liniare și a analiza matrice. Biblioteca acoperă arii largi de capabilități, inclusiv calcul geometric pentru transformări spațiale, utilitare de computer graphics pentru compunerea matricelor de proiecție și exportul datelor pentru shadere, precum și gestionarea specializată a matricelor rare folosind stocarea comprimată pe rânduri și coloane. Oferă, de asemenea, instrumente de gestionare a datelor pentru inițializarea matricelor, redimensionare și parsarea fișierelor Matrix Market.
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 is a functional programming library for Python that provides type-safe containers for managing state, error handling, and optionality. It serves as a monadic container library and a type-safe error handling framework, replacing traditional try-catch blocks and null checks with Result and Optional containers to treat exceptions as data. The project is distinguished by its use of a specialized Mypy static analysis plugin to validate functional pipelines and emulate higher kinded types. It provides mechanisms for isolating side effects through IO containers and offers a framework for typ
Simulates higher-kinded types to allow generic functions to operate across various container types.
ndarray is a multidimensional array library for Rust that serves as a linear algebra framework and scientific computing tool. It provides the core infrastructure for creating and manipulating n-dimensional arrays, functioning as both a parallel array processor and a toolkit for numerical data analysis. The library distinguishes itself by providing efficient slicing and memory views, allowing for data sharing without copying. It leverages optimized backend math libraries for high-speed matrix multiplication and distributes heavy mathematical iterations across multiple CPU threads to accelerate
Uses generics and numeric traits to apply mathematical operations across different numeric types and dimensions.
redis-rs este o bibliotecă client pentru interacțiunea cu Redis folosind interfețe Rust sincrone și asincrone. Servește ca driver pentru caching de date, gestionarea sesiunilor și stocarea generală a datelor. Biblioteca oferă suport specializat pentru mediile Redis Cluster, inclusiv rutarea nodurilor conștientă de cluster și gestionarea distribuită a datelor. Se distinge prin deserializarea zero-copy pentru a minimiza alocările de memorie și un model de conexiune multiplexat care permite mai multor cereri concurente să partajeze o singură conexiune de rețea. Proiectul acoperă o suprafață largă de capabilități, inclusiv stocarea documentelor JSON, pipelining-ul comenzilor cu gestionarea erorilor parțiale și pooling-ul conexiunilor. Conectivitatea securizată este asigurată prin criptare TLS și autentificare bazată pe token prin Azure Entra ID. Dezvoltarea este susținută de simularea conexiunilor (mocking) pentru testarea unitară și de integrare.
Uses generic conversion traits to map raw Redis responses into strongly typed Rust values.
petgraph este o bibliotecă de structuri de date de tip graf pentru limbajul de programare Rust. Oferă o colecție de instrumente pentru reprezentarea și manipularea grafurilor, funcționând ca un instrument de analiză a rețelelor și o suită cuprinzătoare de algoritmi pentru grafuri. Biblioteca se integrează cu Graphviz DOT pentru importul, exportul și parsarea datelor de graf pentru a facilita vizualizarea. Se distinge prin oferirea de capabilități specializate de analiză a rețelelor, cum ar fi detectarea clicurilor, a muchiilor de tip bridge, a punctelor de articulare și a izomorfismelor de subgrafuri. Suprafața sa computațională acoperă o gamă largă de algoritmi, inclusiv calcule pentru cel mai scurt drum, analiza fluxului în rețea, calculul arborelui de acoperire minim și sortarea topologică a nodurilor. Biblioteca suportă, de asemenea, generarea de grafuri sintetice pentru simulare și testare, precum și filtrarea componentelor grafului pentru a crea vizualizări virtuale ale datelor. Implementarea utilizează referențierea nodurilor bazată pe index și reprezentări de tip listă de adiacență pentru a gestiona conectivitatea grafului și optimizarea memoriei.
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.