A Ruby YAML parser
Recently I built the psych-pure gem, a pure-Ruby implementation of a YAML 1.2 parser and emitter. It fully conforms to the YAML 1.2 specification, passes the entire YAML test suite, and allows you to preserve comments when loading and dumping YAML documents. This post explains how and why.
Motivation
First, let’s talk about YAML. YAML is a surprisingly complex data serialization format. It supports a wide variety of data types and syntactic structures, making it both powerful and a huge pain to implement correctly. If you check out matrix.yaml.info you’ll see that very few of the YAML parsers in use fully conform to the YAML 1.2 spec.
Notably, the one used by Ruby — libyaml — errors out…





![[7/4] Speak to LLMs with voice-to-text](https://digitalpress.fra1.cdn.digitaloceanspaces.com/xhtzjbw/2025/12/christmas-llm-post-7-4-1.png)
















![[6/4] git worktrees with parallel agents in practice](https://digitalpress.fra1.cdn.digitaloceanspaces.com/xhtzjbw/2025/12/coding-cooks-5_4.png)
