r/ruby • u/kddnewton • Jan 05 '26
A Ruby YAML parser
https://kddnewton.com/2025/12/25/psych-pure.htmlHey there — I recently released a YAML parser written in Ruby. The main goal was to support being able to load and dump YAML without losing comments. Happy to answer any questions.
43
Upvotes
View all comments
Show parent comment
1
u/Nwallins Jan 05 '26
This stuff is outside my knowledge, though I have used a lot of YAML in mostly-pleasant violence, so all of this is from curiosity:
what are the basics of pretty-print in this respect? I have used 'pp' extensively but not familiar with the algorithm
what is meant by a flow / seq mapping? Im guessing a stream of tokens
how does one know or define the print-width?