Yup, it will handle all Clojure data types in arbitrary nesting. It
will be customizable if you don't like the defaults (though that might
not be documented or finalized right away).

With the cl-format stuff (and this is a branch of the same project
since it shares a bunch of code and I didn't want 3 projects), I have
started labeling and checking in labeled jar files for easy download.
I will start doing the same with the pretty-print version when it
stabilizes a little bit.

My algorithm is basically the XP algorithm which is more or less
linear on the size of the input. Therefore, it is suitable for pretty
printing very large quantities of stuff.

Pretty printing operates on structure not on strings. For the simple
Clojure case, you'll be able to simply use "read" to pull in forms and
then hand them to the pretty printer to format, but reacting to
"unreadable" forms will be the enclosing program's problem.

The pretty printer will be very useful for formatting code. My current
that is to ship it with two built in configurations: one vanilla and
one for Clojure code. The latter (which will probably be the default)
will be aware of special forms and macros (like defn and defmacro) and
macros with "& bodies" and will format them specially.

These will be easy enough to extend (for html rendering or colorizing,
for instance).

The interesting thing in an IDE is that you may want to think more
incrementally, though that might not be too hard.

Hope that answers your questions!

Tom



On Feb 5, 4:48 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Hello,
>
> Really naive questions concerning the features :
>
> Will it be able to work on large chunks of code, such as an entire file ?
> Will it have to run on the runtime of the pretty printed code, or will it be
> able to pretty print any code given as a String ?
> How would it handle the case of ncorrect code ?
>
> As you may have guess, my questions are related to the more synthetic one :
> will it make a good candidate for a "formatter" feature for an IDE  -
> clojuredev for example - ? ;-)
>
> 2009/2/6 Tom Faulhaber <tomfaulha...@gmail.com>
>
>
>
>
>
> > I'm about half-way through creating one at
> >http://github.com/tomfaulhaber/cl-format/tree/pprint
>
> > It should be ready in a week or two, depending on how much work and
> > family intrude on my hacking.
>
> > Any particular features folks are interested in?
>
> > Tom
>
> > On Feb 5, 3:59 pm, Jeffrey Straszheim <straszheimjeff...@gmail.com>
> > wrote:
> > > Is there a pretty printer out there for Clojure anywhere?  I'm crying
> > > now without one.
>
> --
> Cordialement,
>
> Laurent PETIT
--~--~---------~--~----~------------~-------~--~----~
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