Drop ASCII-art dividers, colourise example output, ASCII-only source - #1
Merged
sbryngelson merged 2 commits intoJun 14, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two cleanups to the examples' presentation and to source-text hygiene. No library behaviour changes — all edits are display strings, comments, and docstrings.
1. Examples: drop ASCII-art dividers, colourise output
"=" * N/"-" * Nprinted dividers and# ----/# ====comment rules across the examples.examples/_common.py, following the conventional logging palette:head()— bold green section headers (INFO), replacing the old=-banner blocks.aside()— dim explanatory notes, so commentary recedes behind the numbers.showwarningoverride — yellow warnings (WARNING), with each distinct warning shown once per run (collapsesDispatchFloorWarning's per-call-site repeats).NO_COLOR-aware: piped output / redirected files stay plain text. The library's warning filters are untouched (only the render step is overridden).2. ASCII-only source
aneforge/,tests/,bench/, + 3 native.mm/.h) with ASCII equivalents: em/en dash ->-,→->->,×->x,ᵀ->^T,L⁻¹->L^-1,≤/≥-><=/>=,✓->OK,·->*, etc.Verification
ruff check: passes (CI lint job green).python -m compileall/py_compile: clean across all source; native dylib rebuilds from the edited.mm/.h.tests/op_smoketest.py: 22/22 ops correct on the ANE (M5 Pro).pytest tests/, forked): 524/527 passed.Note on the 3 non-passing tests (pre-existing, NOT introduced here)
test_cross_compile.py::test_relu_rejected_below_the_mil_floor— deterministic pre-existing bug:cross_compile_checkfor a sub-MIL-floor family (h11) raisesValueErrorin_targets.pyinstead of returningFalse. Reproduces identically on the unmodified code (the diff to_targets.pyis comment-only).test_train_cifar.py::test_conv2d_pad_grad_matches_torch,::test_group_norm_train_grad_matches_torch— pass in isolation; only segfault (signal 11) during the full forked mass-run (torch/libomp under hundreds of sequential forks).test_train_cifar.pyis unmodified by this PR.Tracking fixes for these separately.