Self-Hosting Architecture Compiler Lowering Active

InstaCalc .ic Migration Dashboard

Tracking the transformation of InstaCalc into a 100% self-describing declarative system

Overall Self-Describing Readiness
78%
Standard Library (.ic)
155 / 355
50 pure algebraic + 105 lowered loop/iteration
Lines of Code Saved
3,800
74% reduction (5,144 JS/TS → 1,344 .ic)
Visual Art & Audio
100%
Mascot, 7 foes, weapons & procedural soundtrack
Host JS Fallbacks
199
Unit algebra, BigInt, AST diagnostics & WebGL/DOM
Component Migration Scorecard Breakdown by architectural subsystem
1. Visual Art & Sprite Assets (ASCII Palettes & Matrices) 100% in .ic
2. Game Simulation Kernels & Physics (SoA @ 120M ticks/s) 90% in .ic
3. Procedural Audio Engine (Chords, ADSR, FM Ratios) 80% in .ic
4. Standard Library & Math Functions (Pure .ic + Lowered) 44% pure / 100% declarable
5. Tokenizer & Parser AST Infrastructure (Host Pratt/Nearley) 20% (.ic escape hooks)
Standard Library Function Census
All (355)
Pure .ic Today (50)
Lowered Iteration (105)
Host JS Escape (199)
Function Module / Domain Status Representation in .ic vs JS
acosh(x) trig.ic Pure .ic ln(x + sqrt(x^2 - 1))
clamp(x, min, max) shaping.ic Pure .ic min(max(x, min), max)
vec_dist(x1,y1,x2,y2) geom.ic Pure .ic sqrt((x2-x1)^2 + (y2-y1)^2)
pmt(r, n, p, f, t) excel.ic Pure .ic if(r==0, -(p+f)/n, -(r*(f+p*(1+r)^n))/((1+r*t)*((1+r)^n-1)))
fibonacci(n) math.ic Pure .ic round((1.618^n - (-0.618)^n) / 2.236)
reduce(arr, fn, init) IcCompiler Lowering Lowered .ic Monomorphic for-loop (0 heap allocations)
average(arr) stats.ic Lowered .ic reduce(arr, (a, b) => a + b, 0) / count(arr)
gcd(a, b) math.ic Lowered .ic Euclidean loop lowering in .ic
nsolve(fn, guess) solver.ic Lowered .ic Bounded Newton-Raphson iteration loop
stdev(arr) stats.ic Lowered .ic sqrt(average(map(arr, x => (x - avg)^2)))
round(x, [unit]) Scalar Units Host JS `Math.round(x)` (lifts compound unit algebra)
nchoosek(n, k) Combinatorics Host JS Arbitrary-precision BigInt factorial product
cagr(...) Financial Types Host JS Returns percentage format descriptor
fetch(url) Host I/O Host JS Browser Fetch API / Network bridge
LOC Savings Analysis

Replacing imperative boilerplate with pure mathematical sheets:

Standard Library -77% (1,474 → 338 LOC)
Game Logic & Tuning -79% (2,420 → 511 LOC)
Procedural Soundtrack -79% (450 → 95 LOC)
Pixel Sprite Art -50% (800 → 400 LOC)