News for hackers. Stuff that matters.
Re:The hardest program I've ever written (2015) by lakecresva on Saturday March 05, 2022 @06:16PM (#30572975)
I also wrote a version of Bernardy's pretty printer, but I never did come up with a satisfactory way of formatting text together with code. The best looking solution of splitting on whitespace and making each word a group, either tacking it onto the current line or splitting onto a new line ends up being exponential even with pretty aggressive optimization. Everything else I tried looked bad.

There are no comments on this comment yet.