moomou

(ノ≧∇≦)ノ ミ ┸┸

Xing: The Interactive Notebook I Always Wanted

Posted at — Dec 1, 2026

Introduction #

Earlier this year, in Software for One, I wrote about using coding agents to build small personal tools in an afternoon. That shift has accelerated faster than I expected. AI coding has now unlocked the ability to create almost any software at scale, not just single-purpose menu-bar utilities, but full interactive systems with custom editors, isolated compute workers, AST analysis, and hot-reloadable plugin runtimes.

When implementation is no longer the bottleneck, the idea matters a lot more. Taste, product judgment, and clarity about what actually creates friction in your workflow become the scarce part of building software.

One tool that has annoyed me for years is the Python notebook. It is late 2026 and the default options for interactive Python compute are still JupyterHub and Marimo, and both still feel subpar in daily research work. Jupyter makes it too easy to corrupt global state, stores notebooks as noisy JSON that diffs poorly, has no native way to branch an experiment in place, and expects ipykernel inside every environment. Marimo fixes reactivity and uses plain Python files, but its strict single-definition DAG fights you the moment you want to compare two versions of the same model or variable, and it still wants its own package installed in your virtualenv.

So I built xing (internally codenamed loom), the interactive Python notebook I always wanted. Here is a 34-second walkthrough from the promo page:

34-second walkthrough of xing. Visit the promo page for chapter markers and screenshots, or open the MP4 directly.

What Notebooks Are For in the AI Coding Age #

Building xing was a good reminder of why having the right idea matters more than how fast an agent can emit code. The agent’s first draft was a flashy 2D spatial node-graph canvas with dataflow wires and duplicated columns of cells whenever you branched. It looked busy, felt distinctly AI-generated, and was genuinely confusing to use. Pushing back on that, stripping the UI down to a minimalist top-down linear layout, and insisting on real workflow ergonomics is what made the project click.

Midway through iterating, a bigger realization changed the goal of the project altogether. In an age where AI is already superhuman at writing software, what is an interactive notebook even for? You do not need a notebook to write boilerplate or assemble production pipelines anymore; a coding agent in a terminal does that faster and cleaner.

What a notebook is really for now is learning, exploration, and experimentation: working through a concept from first principles, inspecting tensors and plots, testing why a model collapses into concentric circles instead of learning rotations, and iterating in tight scientific feedback loops.

In that world, interactive computing should put AI front and center instead of bolting a chat sidebar onto a 2015 notebook UI. A human writes rough sketches, comments, or partial hypotheses, and relies on AI inside the live execution loop, with direct visibility into runtime shapes, upstream cells, tracebacks, and rendered plots, to fill in code, fix errors, run controlled ablations, and explain what actually happened.

Core Ideas in Xing #

Pure-Stdlib Compute Worker Over Any .venv #

The only constraint I wanted to keep was my existing Python and .venv setup. Xing’s compute worker uses only the Python standard library and communicates with the server over TCP JSONL, so you never have to install ipykernel, marimo, or any extra dependency into a research environment. You point it at any Python 3.10+ virtualenv (PyTorch, CUDA, scientific stacks) and attach immediately.

Rich introspection turns on automatically whenever libraries like PyTorch, NumPy, Pandas, or Matplotlib are imported inside the active venv: a Tensor X-Ray with summary stats, NaN/Inf warnings, and slice scrubbing, nn.Module parameter views, paged DataFrames, and live streaming loss charts. Notebooks save as clean, git-diffable .loom.py Python files, and existing .ipynb or Marimo notebooks import directly.

Linear Cell-Level Branching #

Trying two ideas side by side is the core loop of experimentation, and it is where most notebook tools fall apart. Copying a whole notebook or duplicating a column of downstream cells creates clutter you immediately regret maintaining.

Xing keeps a strictly linear top-down flow. Clicking Fork (or pressing f) creates an inline variant tab inside that exact cell, for example ReLU-64 alongside SiLU-Fourier, without duplicating anything below it. Execution scopes, outputs, and plots are cached by the cumulative upstream branch path (v_0/v_1/.../v_i). Flipping tabs flip-books cached downstream figures instantly, and an inline Compare view puts exported scalar metrics and rendered plots side by side. When one variant wins, Keep collapses it cleanly back into the main spine.

Isolated Sandbox Cells with AST-Targeted CoW #

Half the mess in a working notebook comes from quick diagnostic probes: printing intermediate activations, perturbing model weights, or checking a sanity plot. In Jupyter, those probes share mutable global state and quietly invalidate or corrupt downstream cells.

Pressing s after any cell inserts a dashed Sandbox side-spur. It inherits upstream memory through AST-targeted Copy-on-Write snapshotting and never feeds or marks downstream cells stale.

Because os.fork() breaks active CUDA contexts, xing handles isolation inside the worker by inspecting the sandbox cell’s AST and cloning only the variables it actually references. It passes a shared copy.deepcopy memo across those clones so internal aliasing stays intact on both CPU and GPU (for example, an nn.Module and its Optimizer keep pointing at the same cloned parameters while remaining decoupled from the parent scope). Large unreferenced datasets are never copied, and Python/NumPy/Torch RNG states plus os.environ are restored afterward. If a probe turns out to be worth keeping, one click promotes it into the main notebook.

AI Front and Center in the Loop #

Interactive computing with AI turned out to need three distinct workflows rather than one generic chat box:

Self-Building Plugins Without Restarting the Kernel #

I built xing plugin-first around a small Cordis spatiotemporal composability kernel with revertible effects, reactive coeffects, and transactional hot module reloading.

Almost everything outside the core execution loop is a hot-reloadable plugin fiber: Run Tracker, Branch Diff, AI Assist, Experiment Orchestrator, Persistent Agent, Revision History, Host/GPU Telemetry, Error Jump, and the right-edge Cell Navigator.

In practice, this turns the notebook into a tool that can evolve while you use it. During a real study in xing, when I wanted runtime stack traces linkified so clicking a frame jumped straight to the cell line, or wanted the variable X-Ray inspector to link back to the defining cell, I just asked the embedded agent to add it. The plugin hot-reloaded with automatic rollback on errors and zero server restarts, leaving my GPU kernel and trained weights untouched in memory.

Keyboard-First Craft #

A few quiet details make long sessions pleasant: out-of-the-box Vim and Jupyter bindings (j/k, a/b, dd/yy/p, u, f to fork, s to sandbox), automatic disk-persisted revision history with unified diffs and one-click undo across both human and AI edits, a minimalist right-edge tick-rail cell navigator (the same pattern used on this blog), ?file=...#cell_id deep links, and calm Swiss Light and Matte Dark themes.

Sharing the Idea, Not the Code #

If you visit the promo page or GitHub repository, you will notice that I am sharing the walkthrough video and design write-up rather than packaging and open-sourcing the implementation.

That is intentional. When coding agents can build software at scale, code itself is no longer the scarce artifact. A decent coding agent can take the ideas above — linear cell-level branching, AST-targeted CoW sandboxes, hot-reloadable plugins, and runtime-aware AI loops — and churn out a working implementation tailored to your own stack, keybindings, and preferred model CLI in an afternoon.

Shipping a public codebase means maintaining configuration matrices, cross-platform edge cases, and extension APIs for workflows I do not have. Sharing the idea passes along the part that actually took real iteration: figuring out what an interactive compute studio should look like when AI is already doing most of the coding. Take the pieces you like, change the ones you disagree with, and let your agent build your own version.