libremiliacr
libremiliacr is my personal standard library that provides utility functions and some extra batteries to Crystal. It’s very similar in nature (and design) to my CL-SDM library for Common Lisp. Like CL-SDM, it’s written in a rather opinionated way.
Documentation for the library can be found here.
Stuff Included
Most of this stuff has been added out of need, or occasionally just to have some syntactic sugar.
- Command line parser.
- Bit reader (read bits at a time instead of bytes).
- Array Pool (reuse arrays to keep memory allocations down).
assert
macro that can have its code inside disabled at compile time (-Dremilib_no_assertions
).- BZip2 compression and decompression.
- String wrapping.
- An alternative/very simple logging framework, including concurrent logging.
- Extra ANSI terminal handling.
- Detection of the Terminology terminal emulator.
- Console-based progress bar.
- Dependency Graph.
- Common Lisp-style string formatting.
- Job pool (a way to spread jobs out over a limited number of Fibers).
- Multiply-Add functions and fast math approximation functions.
- Conversion to and from Common Lisp’s “universal time”.
- A bunch of monkey patched extensions to the standard library that I’ve found I
needed or were useful over time (some of these will be moved into the
RemiLib
module eventually). - Native CRC64 implementation.
- Native xxHash3, xxHash128, xxHash64, and xxHash32 implementations.
- Native SpookyHash implementation.
MmappedFile
class, which allows you to do high-speed read/write operations onmmap()
ed files in a stream-like way..- Configuration and Data File management.