Re: Formatted printing?
On Oct 13, 1:57 pm, "Michel Salim" <[EMAIL PROTECTED]> wrote: > On Sat, Oct 11, 2008 at 9:58 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: > >> Starting from some Scheme or CL code is a good idea. I'll just adapt > >> it to support literal maps, vectors, and such. > > > A pretty-print for Clojure would be a welcome contribution. In order > > to be an acceptable contribution, though, it would have to be free of > > connections to other code. > > Just to clarify: free of connections meaning something written from > scratch, or would you accepted borrowed code as long as there are no > licensing problem? > >From scratch. Contributions to Clojure must be original work submitted under the CA. This gives Clojure the flexibility to move to multiple or more permissive licenses in the future. Rich --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Formatted printing?
On Sat, Oct 11, 2008 at 9:58 AM, Rich Hickey <[EMAIL PROTECTED]> wrote: >> Starting from some Scheme or CL code is a good idea. I'll just adapt >> it to support literal maps, vectors, and such. >> > > A pretty-print for Clojure would be a welcome contribution. In order > to be an acceptable contribution, though, it would have to be free of > connections to other code. > Just to clarify: free of connections meaning something written from scratch, or would you accepted borrowed code as long as there are no licensing problem? Best regards, -- miʃel salim • http://hircus.jaiku.com/ IUCS • [EMAIL PROTECTED] Fedora • [EMAIL PROTECTED] MacPorts • [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Formatted printing?
On Oct 11, 8:54 am, "Paul Stadig" <[EMAIL PROTECTED]> wrote: > I'm using a clojure source file as a database, by loading the file > modifying it then saving it back to the filesystem. I'm trying to keep > things simple. > > It would be useful to pretty print it so I could inspect it and make > small changes, if necessary. > > It seems like a rather simple problem, and I only need some line > breaks or something simple, some text editors have a problem with > 1,000's of characters on one line. The other problem is that if there > is an error loading the database Clojure says there's an error on line > 1, which is the only line. I'll just code up something simple. > > Starting from some Scheme or CL code is a good idea. I'll just adapt > it to support literal maps, vectors, and such. > A pretty-print for Clojure would be a welcome contribution. In order to be an acceptable contribution, though, it would have to be free of connections to other code. Rich --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Formatted printing?
I'm using a clojure source file as a database, by loading the file modifying it then saving it back to the filesystem. I'm trying to keep things simple. It would be useful to pretty print it so I could inspect it and make small changes, if necessary. It seems like a rather simple problem, and I only need some line breaks or something simple, some text editors have a problem with 1,000's of characters on one line. The other problem is that if there is an error loading the database Clojure says there's an error on line 1, which is the only line. I'll just code up something simple. Starting from some Scheme or CL code is a good idea. I'll just adapt it to support literal maps, vectors, and such. Thanks for your reply, Paul On 10/11/08, Michel Salim <[EMAIL PROTECTED]> wrote: > > > > On Oct 10, 4:37 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: >> I have a "database" that I'm working with that I'm loading using >> >> (def *db* (load-file "path-to-file/db.clj")) >> >> and saving using by basically opening a PrintWriter and using (pr-str >> *db*). >> The output to the file is a clojure data structure, but it is all on one >> line. Is there any existing code for printing out in a formatted way with >> new lines and indents and such? >> > Porting an existing CLisp / Scheme pretty printing tool probably won't > be hard. Is this for printing, or just for better readability? > > Regards, > > -- > Michel Salim > > > --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: Formatted printing?
On Oct 10, 4:37 pm, "Paul Stadig" <[EMAIL PROTECTED]> wrote: > I have a "database" that I'm working with that I'm loading using > > (def *db* (load-file "path-to-file/db.clj")) > > and saving using by basically opening a PrintWriter and using (pr-str *db*). > The output to the file is a clojure data structure, but it is all on one > line. Is there any existing code for printing out in a formatted way with > new lines and indents and such? > Porting an existing CLisp / Scheme pretty printing tool probably won't be hard. Is this for printing, or just for better readability? Regards, -- Michel Salim --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Formatted printing?
I have a "database" that I'm working with that I'm loading using (def *db* (load-file "path-to-file/db.clj")) and saving using by basically opening a PrintWriter and using (pr-str *db*). The output to the file is a clojure data structure, but it is all on one line. Is there any existing code for printing out in a formatted way with new lines and indents and such? Paul --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---