Release Notes¶
2024-09-Restructure — Modular Package Migration¶
We reorganised the public API into the malbolge/ package so the interpreter, generator, and helpers ship as a cohesive Python package. The legacy MalbolgeInterpreter.py entry point has been removed during this refactor.
- New imports: Replace
from MalbolgeInterpreter import ...withfrom malbolge import MalbolgeInterpreter, ProgramGenerator, GenerationConfig. The package re-exports interpreter types, generator utilities, and encoding helpers for convenience. - CLI usage: Invoke tooling through the module namespace (
python -m malbolge.cli ...) instead of calling files inside the repository root. - Examples and notebooks: Update any
%run MalbolgeInterpreter.pyor relative imports to point at themalbolgepackage. All bundled documentation and examples have been migrated and can be used as references. - Compatibility shims: The legacy shim previously located at the repository root is no longer published. Downstream projects should depend on the package layout introduced in this release.
- Cycle detection controls: The
runcommand now accepts--cycle-limit Nto raise or lower tracking bounds and--no-cycle-detectionto disable loop tracking outright. CLI output now always reportscycle_detected,cycle_repeat_length, andcycle_tracking_limitedto surface the interpreter's diagnostics. - Thread safety improvements:
MalbolgeInterpreternow serializes access with an internal re-entrant lock; concurrent calls reuse the same machine safely, while still encouraging per-thread instances for maximum throughput. - Benchmark comparisons: The committed
benchmarks/baseline.jsonstores reference metrics. Usebenchmarks/compare_baseline.pyto diff new captures against it, surfacing fastest/average timing deltas and enforcing regression budgets in CI. - Baseline summaries: Run
benchmarks/summarize_baseline.pyto dump a compact text summary suitable for dashboards or change discussions. - Cycle repeat histograms:
benchmarks/cycle_repeat_report.pyrenders ASCII histograms of repeat-length telemetry so cycle diagnostics are easy to review, and CI attaches the generated summary/histogram artifacts to every run. The interpreter benchmark suite now includes syntheticloop_small(repeat length two) andloop_limited(tracking limit) cases to keep telemetry meaningful.benchmarks/render_benchmark_reports.pyalso produces a Markdown bundle combining summary and histogram outputs for dashboards.
Refer to AGENTS.md and docs/TUTORIAL.md for the latest development workflow, testing commands, and deep dives into the CLI and API surface.