← All projects
Project record1 mention
Originally shared on Hacker News

Literate programming with PDF as source of truth for LLMs (llm_rabbit_hole_dek)

This project revisits Donald Knuth's literate programming using PDF as the source-of-truth artifact (instead of Markdown or raw source code) for LLM consumption, enabled by local llama.cpp being able to OCR PDF images generated by TeX. Code and data are embedded as \verbatim in \LaTeX, with CWEB as the next step; a sample document contains C and Rust code in \verbatim. The ultimate goal is machine- and human-readable proofs on algorithms.

Last shared
01 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Literate programming with PDF as source of truth for LLMs (llm_rabbit_hole_dek)

    This project revisits Donald Knuth's literate programming using PDF as the source-of-truth artifact (instead of Markdown or raw source code) for LLM consumption, enabled by local llama.cpp being able to OCR PDF images generated by TeX. Code and data are embedded as \verbatim in \LaTeX, with CWEB as the next step; a sample document contains C and Rust code in \verbatim. The ultimate goal is machine- and human-readable proofs on algorithms.

    Posted by @ontouchstart · Original source ↗

    Source text · @ontouchstart · · Source ↗

    I started to revisit literate programming defined by Donald Knuth and explore using PDF as the source of truth artifact (instead of Markdown or program source code itself) for LLM to consume.