diff --git a/cppjit/2_transform_it.ipynb b/cppjit/2_transform_it.ipynb index a6c0532..128fd59 100644 --- a/cppjit/2_transform_it.ipynb +++ b/cppjit/2_transform_it.ipynb @@ -55,7 +55,7 @@ "source": [ "## Why the tracer cannot do it\n", "\n", - "Try the usual thing. If JAX is installed, `jax.grad` fails on the compiled call: it sees an opaque Python callable, not a traceable computation. (Skip this cell if JAX is not installed.)" + "Try the usual thing. If JAX is installed, `jax.grad` fails on the compiled call: it sees an opaque Python callable, not a traceable computation. (Without JAX, as in the browser, the cell only says so.)" ] }, { @@ -75,7 +75,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "JAX not installed; the point stands: a tracer needs the law rewritten in its own language\n" + "No JAX here, as expected in the browser: a tracer needs the law rewritten in its own language\n" ] } ], @@ -89,7 +89,7 @@ " except Exception as e:\n", " print(\"JAX on the C++ as written:\", type(e).__name__, \"-- the tracer cannot enter a compiled function; it has no graph to differentiate\")\n", "except ImportError:\n", - " print(\"JAX not installed; the point stands: a tracer needs the law rewritten in its own language\")" + " print(\"No JAX here, as expected in the browser: a tracer needs the law rewritten in its own language\")" ] }, { diff --git a/cppjit/3_fit_it.ipynb b/cppjit/3_fit_it.ipynb index b40d3b6..5f11af8 100644 --- a/cppjit/3_fit_it.ipynb +++ b/cppjit/3_fit_it.ipynb @@ -251,7 +251,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "jax / optimistix not installed: skipped\n" + "No JAX or Optimistix here, as expected in the browser: the SciPy fit above is the comparison\n" ] } ], @@ -265,7 +265,7 @@ " sol = optx.minimise(lambda p, a: loss_jax(p), optx.BFGS(rtol=1e-10, atol=1e-12), jnp.asarray(p0), max_steps=200, throw=False)\n", " print(\"JAX/optimistix:\", np.asarray(sol.value), \"in\", int(sol.stats[\"num_steps\"]), \"steps\")\n", "except ImportError:\n", - " print(\"jax / optimistix not installed: skipped\")" + " print(\"No JAX or Optimistix here, as expected in the browser: the SciPy fit above is the comparison\")" ] }, { diff --git a/lite/README-build.md b/lite/README-build.md index 2063801..ee00d9b 100644 --- a/lite/README-build.md +++ b/lite/README-build.md @@ -167,8 +167,10 @@ LTO). `tools/build-wasm-kernel.sh` takes that install through `LLVM_WASM_DIR`, a carries that kernel (the -Oz + LTO build of 2026-11-04, verified twice in the browser on the smoke cells and the five notebooks). `build-kernel.yml` still builds against the conda package: until the LLVM install is published as a cell or release asset it can download, a rerun of that workflow proposes the larger kernel's digest. With the smaller kernel the -wire figures in the table above drop by 8.2 MB (the module's gzip size, 32.5 to 24.3 MB): about 41.6 MB for the first -notebook, 61.6 MB with SciPy and matplotlib loaded; to be re-measured on the public site. +wire figures in the table above drop by about 8 MB. Measured on the public site on 2026-11-05 with an empty cache: 42.0 MB +for the first notebook (28.0 MB of it the kernel), 72.0 MB for notebook 4 when the run is faster than the background +download and SciPy is fetched twice, about 62 MB at reading pace. Shipping matplotlib's mathtext and monospace fonts +(to silence the findfont warnings) adds 1.5 MB to its lazy tarball. The preloaded filesystem (`xcpp.data`) left out what a notebook kernel never includes (the sysroot's SDL, GL, X11 and sanitizer headers, the other architectures' intrinsics in clang's resource directory, `pydoc_data`): 46.5 to 27.5 MB raw, diff --git a/lite/empack_config.yaml b/lite/empack_config.yaml index ef09854..703adc2 100644 --- a/lite/empack_config.yaml +++ b/lite/empack_config.yaml @@ -112,11 +112,10 @@ packages: pattern: share/cmake/** - &id021 pattern: '**/*.pc' + # matplotlib's default mathtext set asks for DejaVu Sans Display, the STIX and the Computer Modern fonts, and the + # monospace family for DejaVu Sans Mono: without them every figure logs a findfont fallback per font. Only the serif + # family stays out (the notebooks never ask for it). - pattern: '**/mpl-data/fonts/ttf/DejaVuSerif*' - - pattern: '**/mpl-data/fonts/ttf/DejaVuSansMono*' - - pattern: '**/mpl-data/fonts/ttf/DejaVuSansDisplay*' - - pattern: '**/mpl-data/fonts/ttf/STIX*' - - pattern: '**/mpl-data/fonts/ttf/cm*.ttf' - pattern: '**/mpl-data/fonts/afm/**' - pattern: '**/mpl-data/fonts/pdfcorefonts/**' - pattern: '**/mpl-data/sample_data/**'