Library for helping print things prettily, in Clojure
The article showcases a library called clj-commons/pretty
that aims to provide developers with a tool to print things in a visually appealing way in Clojure. The library offers features like ANSI fonts and formatted exceptions, which can be useful when dealing with stack traces or comparing binary data.
One of the key features of clj-commons/pretty
is its ability to print out sequences of bytes with color-coding inspired by the popular tool hexyl
. This can be particularly helpful when working with binary data and trying to identify differences between two sequences.
The library is compatible with Clojure 1.10 and above, making it accessible to a wide range of developers. However, it's worth noting that some parts of the library, such as the clj-commons.ansi
namespace, can also be used with Babashka. However, due to the differences in exception handling between JVM and Babashka, not all features may be compatible.
Overall, clj-commons/pretty
provides developers with a convenient way to format and print data in a visually appealing manner, making it easier to analyze and debug code.