Helper extension package for MORK grounding functions.
Current helpers included:
lengthcarcdrconsdeconspartitionsfactorialfalling_factorial
Example:
(pure (factorial-result $out) $out
(i64_to_string (factorial (i64_from_string 5))))Safe binomial-style usage:
;; C(n,k) = falling_factorial(n,k) / factorial(k)
(pure (choose-result $out) $out
(i64_to_string
(div_i64
(falling_factorial (i64_from_string 25) (i64_from_string 3))
(factorial (i64_from_string 3)))))This package applies a small patch to a MORK checkout:
- Copies
helper_ext.rsintokernel/src/helper_ext.rs - Wires module/import/registration in kernel sources
- Builds MORK release binary
git- Rust toolchain (nightly-compatible for MORK)
cargoperlrg(ripgrep)
git clone https://github.com/tezena/MM2-Helper.git
cd MM2-Helper
bash setup_mork_helper_ext.sh /absolute/path/to/MORKIf /absolute/path/to/MORK does not exist, the script clones upstream MORK there automatically.
/absolute/path/to/MORK/target/release/mork run your_file.mettaIf you update this package later, run the setup command again:
bash setup_mork_helper_ext.sh /absolute/path/to/MORKThe script is designed to be repeatable and keeps wiring in sync.