pretty-printing library (extracted from metalua.table)