Re: [ClojureScript] Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-11 Thread David Nolen
As I said above, you must specify Clojure 1.7.0-beta2 as your Clojure dependency. On Mon, May 11, 2015 at 3:59 AM, Max Gonzih wrote: > On Sunday, May 10, 2015 at 11:24:54 PM UTC+2, Dmitri Sotnikov wrote: > > Is there possibly anything else missing in the package, figwheel doesn't > appear to fin

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-11 Thread Ruslan Prokopchuk
Thanks for the tip, `:libs ["lib"]` is more convenient and does not produce error. понедельник, 11 мая 2015 г., 9:52:16 UTC+3 пользователь David Nolen написал: > Enhancing :libs support was pretty finicky work so I'm not particularly > surprised by the regression. Looking into it. In the meantim

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-11 Thread Max Gonzih
On Sunday, May 10, 2015 at 11:24:54 PM UTC+2, Dmitri Sotnikov wrote: > Is there possibly anything else missing in the package, figwheel doesn't > appear to find the repl ns. > > > > > > lein figwheel > Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.pom from > central >

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread David Nolen
Enhancing :libs support was pretty finicky work so I'm not particularly surprised by the regression. Looking into it. In the meantime you don't need specify each library, `:libs ["lib"]` should suffice. David On Mon, May 11, 2015 at 1:10 AM, Ruslan Prokopchuk wrote: > With 3269 I have the follo

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread Ruslan Prokopchuk
With 3269 I have the following error: java.lang.IllegalArgumentException: /home/ul/Projects/project1/lib/transformflatgeom.js is not a relative path at clojure.java.io$as_relative_path.invoke (io.clj:405) config is: :compiler { :output-to "resources/public/js/dev.js" :output-dir "

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread Rangel Spasov
0.0-3269 fixed it for me, thanks guys! On Sunday, May 10, 2015 at 7:20:13 AM UTC-7, David Nolen wrote: > > Just cut 0.0-3269 which adds the missing analysis and source map bits back > into the artifacts. It also cleans up :libs support and fixes a related > regression with Closure compatible lib

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread David Nolen
ClojureScript now requires Clojure 1.7.0-beta2 On Sunday, May 10, 2015, Dmitri wrote: > Is there possibly anything else missing in the package, figwheel doesn't > appear to find the repl ns. > > lein figwheel > Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.pom > from centr

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread Dmitri
Is there possibly anything else missing in the package, figwheel doesn't appear to find the repl ns. lein figwheel Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.pom from central Retrieving org/clojure/clojurescript/0.0-3269/clojurescript-0.0-3269.jar from central Exceptio

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread David Nolen
Just cut 0.0-3269 which adds the missing analysis and source map bits back into the artifacts. It also cleans up :libs support and fixes a related regression with Closure compatible libraries that follow classpath conventions (like transit-js). Both :libs Closure libraries and classpath aware Closu

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-10 Thread David Nolen
It appears there are still some important bits missing from the artifacts. Working through the issues and will cut a release soon. David On Sun, May 10, 2015 at 12:22 AM, Rangel Spasov wrote: > Hey guys, > > 0.0-3264 fails for me with: > > clojure.lang.ExceptionInfo: failed compiling > file:res

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-09 Thread Sean Corfield
Sounds like you need to a lein clean? That's normally the error you see if you have old versions of compiled files laying around... On Sat, May 9, 2015 at 9:22 PM, Rangel Spasov wrote: > Hey guys, > > 0.0-3264 fails for me with: > > clojure.lang.ExceptionInfo: failed compiling > file:resources/p

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-09 Thread Rangel Spasov
Hey guys, 0.0-3264 fails for me with: clojure.lang.ExceptionInfo: failed compiling file:resources/public/js/compiled/out/cljs/core.cljs at clojure.core$ex_info.invoke (core.clj:4591) Caused by: java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'cloju

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-09 Thread David Nolen
Just released 0.0-3264, it fixes a critical issue where .js files were missing from the artifacts due to the changed build. Also included are a several fixes around the :libs feature, REPLs, and stack trace mapping. David On Fri, May 8, 2015 at 3:23 PM, David Nolen wrote: > ClojureScript, the C

Re: ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-08 Thread David Nolen
I forgot to add that with this release there are now AOTed artifacts for ClojureScript and all of its Clojure dependencies. [org.clojure/clojurescript "0.0-3255" :classifier "aot" :exclusions [org.clojure/tools.reader org.clojure/data.json]] [org.clojure/tools.reader "0.9.2" :classifier "aot"] [or

ANN: ClojureScript 0.0-3255 - pretty printer & latest Closure Compiler / Library

2015-05-08 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information: [org.clojure/clojurescript "0.0-3255"] A big thanks goes out to Jonathan Boston and Shaun Lebron for this release. Thanks

Re: ANN: fipp - Fast Idiomatic Pretty-Printer

2013-01-12 Thread Brandon Bloom
Done: https://github.com/brandonbloom/fipp/commit/e7ae2cce42b9f0baf0f8e242b669fc19aad57ed3 Thanks! On Saturday, January 12, 2013 4:23:41 AM UTC-8, Michael Klishin wrote: > > Brandon, > > Please provide dependency information in the README, otherwise Clojure > beginners won't be able to use your

Re: ANN: fipp - Fast Idiomatic Pretty-Printer

2013-01-12 Thread Michael Klishin
Brandon, Please provide dependency information in the README, otherwise Clojure beginners won't be able to use your project. If you need an example: https://github.com/michaelklishin/welle#maven-artifacts -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- You receive

ANN: fipp - Fast Idiomatic Pretty-Printer

2013-01-11 Thread Brandon Bloom
Hi all, I decided to create a new pretty printer in the spirit of "Data All The Things!" And it's fast too! Fipp, the Fast Idiomatic Pretty-Printer for Clojure, is a pretty printer with linear runtime and bounded space requirements. Unlike clojure.pprint's side-ef

Re: ANN: Pretty printer is now part of contrib

2009-04-07 Thread Michael Wood
On Tue, Apr 7, 2009 at 5:30 PM, Laurent PETIT wrote: [...] > It seems to me that clojure core already does what you say : a clojure.jar > and a clojure-src.jar. But then again, it's just for java source, not > clojure source. > > Maybe clojure-contrib could be aligned to what clojure core does ?

Re: ANN: Pretty printer is now part of contrib

2009-04-07 Thread Laurent PETIT
Indeed, it is, in the world of java source files. And indeed, even in the IDEs, it is possible to have both jars in the classpath and then gain the same benefits I myself cited above in the thread. Maybe I was confused because I made a parallel between java classes <> native platform code (via JI

Re: ANN: Pretty printer is now part of contrib

2009-04-07 Thread Paul Stadig
Isn't it somewhat standard procedure in the Java world (or at least the Maven world...sorry to bring that up again :)) to distribute with a clojure-contrib.jar and clojure-contrib-sources.jar, one being only the compiled classes and the other only being the source files? Paul On Tue, Apr 7, 2009

Re: ANN: Pretty printer is now part of contrib

2009-04-07 Thread BrianS
I use clojure-contrib quite a bit, and I find a lot of value out of having the clj files in the JAR. First, I find it easier to debug a project, second there are example CLJ files in the source code on how to use the libraries, and those are of great interest, and it is much easier to get to these

Re: ANN: Pretty printer is now part of contrib

2009-04-06 Thread Laurent PETIT
Hi, 2009/4/6 Tom Faulhaber > Another question is whether we should duplicate the classes and > the .clj files in the jar or should we just compile all of them. Is > there some value to having the source there? There certainly some value for both scenario : having classes seems an absolute req

Re: ANN: Pretty printer is now part of contrib

2009-04-06 Thread Tom Faulhaber
There are a bunch of things in the build file that "do nothing without complaining" when clojure.jar isn't set. I didn't want to make a radical change to the build file with this checkin but I didn't want users to not get the pretty printer and wonder why either. More g

Re: ANN: Pretty printer is now part of contrib

2009-04-06 Thread Stuart Halloway
Hi Tom, I think that the ant test tasks should depend on the compilation tasks, and that users will just have to specify a clojure.jar. Either that or the default test suite should be smart enough to skip the pretty printer tests with ant.jar not specified. Stuart > By (semi-)popu

ANN: Pretty printer is now part of contrib

2009-04-05 Thread Tom Faulhaber
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

Re: ANN: A pretty printer for Clojure

2009-03-14 Thread budu
I just tried it, this is fantastic! We'll finally be able to debug macros while keeping our sanity. Many thanks for this and I hope it will be added directly into Clojure. On Mar 12, 3:05 am, Tom Faulhaber wrote: > I have now "released" the first version of my pretty printer

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread David Nolen
Everyone, > > > > >> > Thanks for the kind words. I'm glad you like it. > > > > >> > David's use case in slime/swank was one of the motivators for me > > >> > writing this. Thanks for showing us how to do the integration

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Tom Faulhaber
; >> > David's use case in slime/swank was one of the motivators for me > >> > writing this. Thanks for showing us how to do the integration, David! > >> > I hope we see a lot of other use cases like that. > > >> > Upcoming is the ability to crea

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread David Nolen
rds. I'm glad you like it. >> > >> > David's use case in slime/swank was one of the motivators for me >> > writing this. Thanks for showing us how to do the integration, David! >> > I hope we see a lot of other use cases like that. >> > >>

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread David Nolen
g this. Thanks for showing us how to do the integration, David! > > I hope we see a lot of other use cases like that. > > > > Upcoming is the ability to create custom dispatch tables which will > > open the door to an even broader set of use cases. > > > > On Mar

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Tom Faulhaber
> Are you planning to include scripts at some point that support pretty > printing a source file? For example, I'd like to do this from a > terminal window: > > $ cljpp foo.clj > foo2.clj Mark, Yeah, I've thought about that and the simple version is very straight- forward and I'm planning to do

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Tom Faulhaber
:56 am, Rich Hickey wrote: > > > On Mar 12, 2009, at 3:05 AM, Tom Faulhaber wrote: > > > > I have now "released" the first version of my pretty printer as part > > > of my cl-format library. It is released under the EPL. > > > > The pretty printer h

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Mark Volkmann
On Thu, Mar 12, 2009 at 2:05 AM, Tom Faulhaber wrote: > > I have now "released" the first version of my pretty printer as part > of my cl-format library. It is released under the EPL. > > The pretty printer has two functions that you probably care about: > > (pp

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Tom Faulhaber
r set of use cases. On Mar 12, 1:56 am, Rich Hickey wrote: > On Mar 12, 2009, at 3:05 AM, Tom Faulhaber wrote: > > > > > > > I have now "released" the first version of my pretty printer as part > > of my cl-format library. It is released under the EPL.

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Konrad Hinsen
On Mar 12, 2009, at 8:05, Tom Faulhaber wrote: > I have now "released" the first version of my pretty printer as part > of my cl-format library. It is released under the EPL. From what I have seen in my first tests, this is likely to become an essential part of my Clojure env

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread David Nolen
2009 at 3:05 AM, Tom Faulhaber wrote: > > I have now "released" the first version of my pretty printer as part > of my cl-format library. It is released under the EPL. > > The pretty printer has two functions that you probably care about: > > (pprint obj) will pretty

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Jeffrey Straszheim
Awesome! I expect I'll be trying it out tonight. Oh, and I hope this goes into contrib -- it'll keep my classpath shorter. On Thu, Mar 12, 2009 at 2:05 AM, Tom Faulhaber wrote: > > I have now "released" the first version of my pretty printer as part > of my cl-f

Re: ANN: A pretty printer for Clojure

2009-03-12 Thread Rich Hickey
On Mar 12, 2009, at 3:05 AM, Tom Faulhaber wrote: > > I have now "released" the first version of my pretty printer as part > of my cl-format library. It is released under the EPL. > > The pretty printer has two functions that you probably care about: > > (pprint o

ANN: A pretty printer for Clojure

2009-03-12 Thread Tom Faulhaber
I have now "released" the first version of my pretty printer as part of my cl-format library. It is released under the EPL. The pretty printer has two functions that you probably care about: (pprint obj) will pretty print the given object, and (pp) at the REPL will pretty print the l

Re: Pretty Printer

2009-02-05 Thread Jeffrey Straszheim
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

Re: Pretty Printer

2009-02-05 Thread Tom Faulhaber
ore, 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 "

Re: Pretty Printer

2009-02-05 Thread Laurent PETIT
thub.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 > wrote: > > Is

Re: Pretty Printer

2009-02-05 Thread Jeffrey Straszheim
t > 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 >

Re: Pretty Printer

2009-02-05 Thread Tom Faulhaber
wrote: > Is there a pretty printer out there for Clojure anywhere?  I'm crying > now without one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Pretty Printer

2009-02-05 Thread Jeffrey Straszheim
Is there a pretty printer out there for Clojure anywhere? I'm crying now without one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

XML Pretty Printer

2009-01-10 Thread James Reeves
I've written a small XML pretty printing library that may be useful for debugging XHTML or XML outputs, especially those generated from libraries like clj-html or compojure.html. Usage is straightforward: => (use 'ppxml) nil => (ppxml "Hello") Hello I've uploaded the library to the g

Re: Adapting a functional pretty-printer to Clojure

2008-11-25 Thread Rich Hickey
> > > This approach might just be too inefficient -- perhaps it would be > > > best to implement the pretty-printer in an imperative style after all. > > > OTOH it is pretty darn nifty... > > ...or would be if Google Groups didn't wrap so well... I've adde

Re: Adapting a functional pretty-printer to Clojure

2008-11-24 Thread [EMAIL PROTECTED]
On Nov 25, 12:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Nov 25, 12:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > This approach might just be too inefficient -- perhaps it would be > > best to implemen

Re: Adapting a functional pretty-printer to Clojure

2008-11-24 Thread [EMAIL PROTECTED]
On Nov 25, 12:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > This approach might just be too inefficient -- perhaps it would be > best to implement the pretty-printer in an imperative style after all. OTOH it is pretty darn nifty... user> (pp

Re: Adapting a functional pretty-printer to Clojure

2008-11-24 Thread [EMAIL PROTECTED]
e, but it runs out of heap space on my machine trying to print (pp (range 10)). (pp (range 75000)) works fine. This approach might just be too inefficient -- perhaps it would be best to implement the pretty-printer in an imperative style after all. One reason I don't like this rewrite is th

Re: Adapting a functional pretty-printer to Clojure

2008-11-24 Thread Chouser
On Mon, Nov 24, 2008 at 5:27 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I believe I have fixed all of my stack-space issues except for this > one annoying function (rewritten from the original since the > multimethod wasn't buying me much): > > (defn flatten [x] > (let [type (:type x)]

Re: Adapting a functional pretty-printer to Clojure

2008-11-24 Thread [EMAIL PROTECTED]
I believe I have fixed all of my stack-space issues except for this one annoying function (rewritten from the original since the multimethod wasn't buying me much): (defn flatten [x] (let [type (:type x)] (cond (or (= type :NIL) (= type :TEXT)) x (= type :CONCAT)

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread steve...@acm.org
er/papers/prettier/prettier.pdf) and did a > > rote translation of it into Clojure. Then I wrote printing routines > > for sequences and maps -- very barebones. They work OK: > > I started working on a pretty-printer as well.  I wouldn't show it to > anybody yet, but I also don't

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread [EMAIL PROTECTED]
On Nov 18, 1:20 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks for the advice. I think this works for show-list-children: > > (defn insert-line [x y] >   (doc-concat x (doc-concat (doc-line) y))) > > (defn show-list-children [x] >   (cond (empty? x) >         (doc-nil) >         (=

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread [EMAIL PROTECTED]
On Nov 18, 1:12 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Tue, Nov 18, 2008 at 1:05 PM, [EMAIL PROTECTED] > > <[EMAIL PROTECTED]> wrote: > > > Your implementation needs to get the whole value of pr-str before > > deciding that it is too long to put on a single line. > > That's certainly what i

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread [EMAIL PROTECTED]
On Nov 18, 12:53 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > As always: don't copy code blindly! Take a step back and look from a > distance, how you can *translate* the code. For example, in the > show-list-children function, the recursion is just used for iteration. > It starts with x,

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread Chouser
On Tue, Nov 18, 2008 at 1:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Your implementation needs to get the whole value of pr-str before > deciding that it is too long to put on a single line. That's certainly what it does, but I don't think it has to. My plan was to use *print-length

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread Meikel Brandmeyer
Hi, Am 18.11.2008 um 17:29 schrieb [EMAIL PROTECTED]: What could be some good strategies to adapt the code I have here to Clojure, where tail calls are not eliminated and structs are not lazy? There is the lazy-map package[1], which also allows lazy (struct)maps. However it is not updated to

Re: Adapting a functional pretty-printer to Clojure

2008-11-18 Thread Chouser
printing routines > for sequences and maps -- very barebones. They work OK: I started working on a pretty-printer as well. I wouldn't show it to anybody yet, but I also don't want any unnecessary duplicated effort. So I'll go ahead and show what I've got so far, and then we c

Adapting a functional pretty-printer to Clojure

2008-11-18 Thread [EMAIL PROTECTED]
Hello everyone, I looked at Wadler's "A Prettier Printer" paper (http:// homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf) and did a rote translation of it into Clojure. Then I wrote printing routines for sequences and maps -- very barebones. They work OK: user> (def something '(a b c