Tag: pretty-printing
design
Teaching LFE to Format Itself, Part 2: Someone Already Solved This
Looking for a principled way to decide layout, we found Racket's raco fmt and the 2023 paper beneath it — a provably optimal pretty-printer. It was exactly what we needed, with exactly one problem: it is slowest precisely on the S-expressions a Lisp formatter sees most.
design
Teaching LFE to Format Itself, Part 1: A Hand-Written Formatter
The origin of LFE's code formatter — the hand-written engine that shipped inside rebar3_lfe, the one genuinely hard BEAM-specific obstacle (comments), and the maintainability wall that taught us we'd been writing the formatting convention as code when it wanted to be data.