$ show numworks/epsilon
This repository is the NumWorks Epsilon operating system and firmware for a graphing calculator. It is a complete software stack including a custom GUI framework (Escher), a symbolic math engine (PoincarΓ©), a MicroPython interpreter, numerous educational apps (calculation, graphing, statistics, inference, finance, sequences, etc.), and low-level hardware drivers (Ion) for real devices and a cross-platform SDL-based simulator. The architecture is monolithic: all components share a custom memory pool, a responder-based UI framework, and a common record-based persistent storage system. Key entry points are the bootloader, the Ion::Main function, and an app container that launches snapshots of each app. The system handles user input through keyboard events, renders via a 2D graphics library (Kandinsky), and persists data (scripts, preferences, calculations) in a file-system-like record store. External dependencies include a vendored SDL 2.0 (for simulation), a bespoke MicroPython port, OpenBSD math functions, and an embedded SQLite memory allocator. While the math engine and many apps are well-crafted, the large third-party code and numerous platform backends introduce moderate technical drift risk.
The LLM identified 3 files worth highlighting for reuse:
A fixed-capacity, stack-allocated string template (`OMG::String<CAPACITY>`) that avoids dynamic memory allocation. It provides common string operations (append, search, comparison) with a small, self-contained header and a trivial implementation. Reusable in any embedded or memory-constrained C++ project without dependencies.
A collection of constexpr functions and constants for inspecting and constructing IEEE754 floating-point values (single and double precision). It provides low-level bitfield access, NaN / infinity / sign checks, and endian-agnostic reinterpretation. This is a standalone utility that can be extracted for any project needing portable float introspection.
A templated global singleton wrapper (`OMG::GlobalBox<T>`) that stores a pointer to a single global instance. It supports boxing (set) and retrieval, and a `TrackedGlobalBox` variant with change tracking via flags. The pattern is clean, minimal, and decoupled from any specific framework, making it reusable for any project requiring a non-owning global registry.