By (semi-)popular demand, I have added the pretty printer and the
Common Lisp format function (which are really the same package) into
clojure.contrib. It all lives in the namespace clojure.contrib.pprint.

Important: If you want to use pretty printing, you will have to
compile all the source code in clojure.contrib and not just put it in
in the jar. To do this, need to tell ant where clojure.jar is so that
it can run the compiler. For example, I use:

  ant -Dclojure.jar=../clojure/clojure.jar

(This is necessary because pretty printing uses a couple of gen-
classed classes to wrap java Writers.)

I haven't done that much work on the pretty printer since my last
announcement, but there are a few improvements:

- I added support for *print-level* and *print-length* to control how
much output you get.
- Support for a bunch more special forms and let-like structures in
*code-dispatch*
- Support for pretty printing Java arrays
- ~3x basic speedup (or 3x less slow, depending on how you look at
it). On my machine, this translates into about 300 lines of code/
second. More to come here...
- Some fixes to allow for deeper structures (as in "very deep")
without blowing the stack.

All in all, it should be a pretty serviceable pretty printer. More
coming, though...

The documentation is still on github, but I've updated it for
clojure.contrib. Look here: http://github.com/tomfaulhaber/cl-format.

Please let me know if you have issues, suggestions, stuff you'd like
to see first, etc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to