<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>A Pretty Expressive Printer (with Appendices) · HackerPapers discussions</title><link>https://hackerpaper.kaipfister.de/p/2310.01530/</link><description>Collected HN comments and submissions linking this paper.</description><language>en</language><lastBuildDate>Mon, 02 Nov 2026 11:16:22 GMT</lastBuildDate><atom:link href="https://hackerpaper.kaipfister.de/p/2310.01530/feed.xml" rel="self" type="application/rss+xml" /><item><title>A Pretty Expressive Printer (with Appendices) — mentioned by chubot</title><link>https://news.ycombinator.com/item?id=39449613</link><guid isPermaLink="false">urn:hackerpapers:mention:2310.01530:39449613</guid><pubDate>Wed, 21 Feb 2024 02:49:40 GMT</pubDate><description>&lt;p&gt;OK very interesting! I skimmed over the issue and some of the examples. It does seem like there are at least two schools of thought on the pretty printers -- those influenced by the Wadler pretty printing language (functional style), and those more influenced by go fmt (which does no line wrapping) and clang-format (which does). There&amp;#x27;s a very recent paper linked here which has a good survey of the functional style. Table 1 is a nice summary of the different algorithms and IRs, a bunch of them appearing only in the last 10 years. https://lobste.rs/s/aevptj/why_is_prettier_rock_solid A Pretty…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/2310.01530/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>A Pretty Expressive Printer (with Appendices) — mentioned by chubot</title><link>https://news.ycombinator.com/item?id=39438689</link><guid isPermaLink="false">urn:hackerpapers:mention:2310.01530:39438689</guid><pubDate>Tue, 20 Feb 2024 06:58:45 GMT</pubDate><description>&lt;p&gt;I think I agree about the testing and labor of complicated translation rules. But it doesn&amp;#x27;t appear that almost every pretty printer is based on the Wadler algorithm. It seems like MOST of them are not? e.g. clang-format is one of the biggest and best, and it has a model that includes &amp;quot;unwrapped lines&amp;quot;, a &amp;quot;layouter&amp;quot;, a line break cost function, exhaustive search with memoization, and Dijikstra&amp;#x27;s algorithm: https://llvm.org/devmtg/2013-04/jasper-slides.pdf The YAPF Python formatter is based on this same algorithm - https://github.com/google/yapf The Dart formatter used a model of &amp;quot;chunks…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/2310.01530/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item></channel></rss>
