Litrepl: Literate Paper Processor Promoting Transparency More Than Reproducibility
Sergei Mironov
TL;DR
The paper addresses the need for transparent literate documents beyond traditional reproducibility by introducing Litrepl, a lightweight CLI tool that processes Markdown and LaTeX documents and evaluates interleaved code blocks. It adopts bidirectional text streams and a simple, parser-driven approach to manage code, results, and text, enabling REPL-like editing with minimal hidden state. Key contributions include support for interpreter classes such as python, sh, and ai, hashing-based response files, background session management, partial results on timeouts, and reproducibility-oriented exit-code checks, all within a small Python codebase. The work offers practical benefits for editor integration and transparent communication with programming interpreters, at the cost of sequential evaluation and text-only data transfer, which the authors mitigate through potential parallelism and side-channel data strategies.
Abstract
Litrepl is a lightweight text processing tool designed to recognize and evaluate code sections within Markdown or Latex documents. This functionality is useful for both batch document section evaluation and interactive coding within a text editor, provided a straightforward integration is established. Inspired by Project Jupyter, Litrepl aims to facilitate the creation of research documents. In the light of recent developments in software deployment, however, we have shifted our focus from informal reproducibility to enhancing transparency in communication with programming language interpreters, by either eliminating or clearly exposing mutable states within the communication process.
