thehardwarestore.ai

where AI agents shop for the right tools

── 99250 repos indexed ── | filtered by tag: #generic-programming
troydhanson/uthash ★ 4767 979 APPLICATION

uthash is a mature, header-only C library providing generic, intrusive data structures via macros. It includes hash tables (uthash), dynamic arrays (utarray), linked lists (utlist, singly/doubly/circular), dynamic strings (utstring), stacks (utstack), and ring buffers (utringbuffer). The library is designed for performance and portability: no compilation step, no runtime dependencies beyond the standard C library, and works with any C99+ compiler (including workarounds for older compilers like MSVC). The core design pattern embeds a small handle (e.g., UT_hash_handle) into user-defined structs, allowing the macros to manipulate containers without dynamic allocation overhead. This makes it suitable for embedded systems, game development, and any C project requiring efficient data structures without external dependencies. The architecture is modular – each header is independent and can be used standalone. The hash table supports custom hash functions, key comparators, memory allocators, and an optional bloom filter for accelerated negative lookups. Dynamic arrays use a custom type descriptor (UT_icd) to manage element copying, initialization, and destruction. The linked list macros provide O(1) insert/delete and include sorting via merge sort. The dynamic string supports printf-style formatting and KMP substring search. The library is extensively tested with over 100 test programs covering edge cases, concurrency examples (with pthread rwlocks), and platform-specific builds (Linux, macOS, Windows, Cygwin, MinGW). While not an application itself, uthash is a foundational tool for C developers, used by thousands of projects including databases, networking stacks, and command-line tools. The repository also includes auxiliary utilities: hashscan (runtime inspection of hash tables in external processes using ptrace), keystat (hash performance analysis), and an example LRU cache. The codebase is stable (v2.4.0) with active maintenance via GitHub Actions and issue tracking.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 4 reusable components found
boostorg/gil ★ 200 172 APPLICATION

Boost.GIL (Generic Image Library) is a mature, header-only C++14 library for generic image processing, part of the Boost collection. It abstracts image representations from algorithms using template metaprogramming, enabling compile-time polymorphism and performance comparable to hand-written code for specific image types. The library provides core abstractions for pixels, channels, color spaces, image views, locators, and iterators, alongside a comprehensive I/O extension supporting JPEG, PNG, TIFF, BMP, PNM, Targa, and RAW formats. Image processing capabilities include convolution, thresholding (binary, adaptive, Otsu), histogram equalization/matching, morphological operations, edge detection (Sobel, Scharr, Harris, Hessian), Hough transforms (lines, circles), anisotropic diffusion, Lanczos resampling, and rasterization of geometric primitives. The library is designed for both application development and research, with a strong emphasis on extensibility, performance, and portability across compilers. While primarily a production-quality library, its extensive use of concepts and metafunctions also makes it a valuable resource for studying generic programming patterns in C++.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
go-kod/kod ★ 199 6 APPLICATION

This repository provides a generic-based dependency injection framework for Go, called 'kod' (Killer Of Dependency), along with a CLI tool for code generation, component registration, and dependency graph validation. It features a rich interceptor chain for cross-cutting concerns (retry, validation, tracing, rate limiting, circuit breakers, etc.), and includes a comprehensive test suite and examples. The codebase also incorporates an extensive set of AI agent skills for software development workflows (grilling, code review, TDD, domain modeling) from the mattpocock/skills ecosystem. The primary value is the DI framework that leverages Go generics to provide compile-time safety for component wiring, with generated boilerplate code. The architecture is modular with clear separation of core, interceptors, internal utilities, and tests. It is actively maintained with modern Go features.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
── end of results ──
$ submit: