RC RANDOM CHAOS

Twenty Years of Pandoc: How a Haskell Side Project Became a Universal Document Converter

· via Hacker News

Original source

Twenty Years of Pandoc

Hacker News →

John MacFarlane released the first version of pandoc on August 3, 2006 — roughly 3,000 lines of Haskell with no dependencies beyond the standard library. The project was almost accidental: MacFarlane, a philosopher, wanted an excuse to learn Haskell and settled on writing a Markdown parser. That choice of architecture proved decisive. Rather than following the existing Perl, Python, and PHP implementations that pushed Markdown straight to HTML via regex substitutions, pandoc parsed input into a real abstract syntax tree and rendered from there. With N readers and M writers sharing a common AST, the tool could support N×M conversions — an extensible design that let the format list snowball from a handful to over fifty.

The two decades since produced more than 200 releases and a long chain of supporting infrastructure MacFarlane had to build himself because Haskell lacked it: a zip-archive library for ODT output, the highlighting-kate syntax highlighter, texmath for converting equations to MathML and Word’s OMML, and citeproc integration for automated citations and bibliographies. Key milestones include a flexible template system (2010), EPUB and Word docx output, and the 2013 additions — Markdown extensions, YAML metadata blocks, custom Lua writers, and JSON filters — that turned pandoc into a programmable document pipeline rather than a fixed converter.

Pandoc’s growth also tracks the maturing of the open-source ecosystem around it: early packaging for Debian by a contributor seeking developer certification, the arrival of Hackage and cabal for dependency management, and the move from Google Code to GitHub, each of which widened the contributor base and visibility. Today pandoc is the most popular program written in Haskell, sits underneath academic writing tools like Quarto and Jupyter, and is installed on millions of machines — a reminder that durable, widely-used infrastructure often starts as one person’s procrastination project.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.