hie-bios is a Haskell library and CLI tool that manages the configuration and initialization of GHC API sessions for IDE tools like haskell-language-server. It finds and loads a 'Cradle' configuration from a `hie.yaml` file or via implicit detection (e.g., stack.yaml, cabal.project), then obtains the necessary GHC compiler flags by invoking build tools (cabal, stack, or a user-supplied script). It supports multiple cradle types (cabal, stack, bios, direct, multi, none) and handles the full lifecycle: locating the project root, parsing configuration, running build tools with wrapper scripts to capture flags, caching interface files, and setting up GHC's DynFlags and targets. The architecture is modular, with clear separation between config parsing, cradle resolution, process execution, and GHC session management. The code is well-structured, uses modern Haskell patterns (monad transformers, CPS for temporary files), and has an extensive test suite covering various project layouts and tool combinations. Key reusable components include the process utility module (HIE.Bios.Process) for running commands with temp-file outputs and caching, and the GHC version compatibility layer (HIE.Bios.Ghc.Gap).
This repository contains CANopenNode, a full-featured, portable ANSI C implementation of the CANopen protocol stack compliant with EN 50325-4 (CiA 301) and related standards (CiA 302, 303, 304, 305, 309). It is designed for embedded microcontrollers and real-time industrial automation systems. The stack implements Network Management (NMT) with heartbeat and node guarding, SDO server/client with expedited/segmented/block transfer, PDO with dynamic mapping, Emergency messages, SYNC, Time-stamp, LSS, Safety-Related Data Objects (SRDO), and an ASCII gateway for remote management (CiA 309-3). The architecture is modular, with each protocol in its own directory (301/, 303/, 304/, 305/, 309/). Central orchestration is provided by `CANopen.c` with a main processing loop `CO_process()` that should be called cyclically. The stack is configuration-driven via compile-time macros in `CO_config.h`, allowing feature enable/disable to reduce footprint. A hardware abstraction layer (`CO_driver.h`) separates CAN bus specifics, and example blank drivers (`CO_driver_blank.c`, `CO_storageBlank.c`) facilitate porting to new platforms. Key design patterns include a generic Object Dictionary interface with extension callbacks, a reusable circular FIFO buffer with protocol parsing, storage abstraction with CRC integrity, and non-blocking state machines. The codebase adheres to MISRA C:2012 (with documented exceptions) and includes Doxygen documentation. While primarily a library, the repository contains an example application skeleton and a generated device profile XML. Technical debt includes the FIFO and gateway modules being excluded from static analysis, certain static variables limiting reentrancy, and the trace feature being non-functional. The project is actively maintained with a large user base and multiple derivative repositories for specific platforms (Linux, STM32, PIC, etc.).
This repository is a comprehensive educational resource that implements a wide range of data structures and algorithms in both JavaScript and TypeScript. It is organized by chapter, mirroring the book 'Learning JavaScript Data Structures and Algorithms' by Loiane Groner. The codebase covers fundamental data structures (arrays, stacks, queues, linked lists, sets, dictionaries, hash tables), trees (binary search trees, AVL trees, red-black trees, Fenwick trees, segment trees), heaps, tries, graphs, and classic algorithms (BFS, DFS, Dijkstra, Floyd-Warshall, Prim, Kruskal, heap sort, etc.). Each implementation is accompanied by Jest tests and many files include both .js and .ts versions. The code is well-structured, uses modern JavaScript/TypeScript features (private fields, generics, arrow functions), and includes JSDoc comments. While primarily educational, the implementations are clean and could serve as reference or be extracted for reuse in other projects. Known minor bugs exist in some hash table collision resolution implementations (e.g., get() always returns undefined in separate chaining, hash function returns NaN in linear probing).