Shared Abstractions
Build around reusable algebraic and arithmetic traits instead of isolated numeric APIs.
A modern scientific computing foundation centered around algebraic abstraction, numerical reliability, and ecosystem interoperability.
LunaFlow envisions MoonBit as a language capable of supporting serious mathematical software: from lightweight numerical utilities to rigorous scientific computing, symbolic manipulation, and future proof-oriented systems. We believe a mathematical ecosystem should not be built as a pile of unrelated APIs. It should be organized around precise abstractions:
With this architecture, one algorithm can be written once and reused across different mathematical worlds.
LunaFlow’s mission is to provide a foundational mathematical interoperability layer for MoonBit.
LunaFlow is not designed as a closed framework. Existing libraries should not need to be rewritten from scratch to participate. If a library can expose the required mathematical capabilities, LunaFlow should be able to integrate it into higher-level abstractions such as complex numbers, linear algebra, and future symbolic computation.
Abstraction before implementation. Mathematical software should begin with clear structures and laws. Implementation details matter, but they should not leak into every layer of the ecosystem.
Small traits, strong composition. Instead of defining one oversized numeric interface, LunaFlow separates algebraic structures from analytic capabilities. This keeps abstractions flexible and avoids forcing every type into an unsuitable model.
Semantics must be explicit. A floating-point number, an arbitrary-precision value, a decimal value, and an interval-like value may all support arithmetic, but they do not mean the same thing. LunaFlow aims to preserve these semantic differences rather than hiding them behind a single vague interface.
Interoperability over isolation. MoonBit’s mathematical ecosystem should allow independent libraries to work together. LunaFlow provides the common language that lets different packages become part of the same computational world.
One algorithm, many mathematical worlds. A well-designed generic algorithm should be reusable across different numeric representations. LunaFlow makes this possible through trait-based abstraction and carefully layered packages.
The long-term goal of LunaFlow is to become a foundation for advanced mathematical computing in MoonBit.
LunaFlow is still evolving, but its direction is clear: to turn MoonBit’s abstraction capabilities into a real mathematical ecosystem.
We are building not just a collection of math packages, but a composable foundation for future scientific computing in MoonBit.