brandonbloom / fipp

Fast Idiomatic Pretty Printer for Clojure
525 stars 44 forks source link

ClojureScript Support #7

Closed brandonbloom closed 9 years ago

brandonbloom commented 11 years ago

Requires either A) Switching to core.async or B) Porting transduce

jonase commented 11 years ago

A clojurescript port is available in my cljs branch. It uses the rrb-vector work by @michalmarczyk and my transduce cljs branch. If you grep for TODO you'll find a few open questions but it seems to work pretty well.

lynaghk commented 10 years ago

Is there still interest in a ClojureScript version of this library? I have a project that could use it, so I could take a crack at using cljx to make the codebase for both this and transduce portable.

AlexBaranosky commented 10 years ago

I would love it.

brandonbloom commented 10 years ago

Go for it! I'll review/merge when I get back to my desk on Tuesday

Sent from my iPhone

On Apr 27, 2014, at 11:48 PM, Kevin Lynagh notifications@github.com wrote:

Is there still interest in a ClojureScript version of this library? I have a project that could use it, so I could take a crack at using cljx to make the codebase for both this and transduce portable.

— Reply to this email directly or view it on GitHub.

shaunlebron commented 9 years ago

Providing pretty-printing in ClojureScript is a major priority (CLJS-710).

The inline EDN editor in Ankha could use one also, so that every field isn't on its own line.

I've started porting clojure.pprint to cljs, but noticed that pprint is very slow on the jvm, so it'll probably be slower in js. I may be wasting time.

fipp pretty-prints large edn's very quickly in my tests, so this may supplant clojure.pprint for cljs.

brandonbloom commented 9 years ago

Happy to contribute Fipp to CLJS if @swannodette et al are at all interested.

clojens commented 9 years ago

@brandonbloom Yeah the answer is in Jira. They still desire a full pprint namespace including most, if not all, pprint functions (e.g. print-table, cl-format and so on). Hence David mentioned it should probably stay a third party library. Either way, I could use a CLJS pprinter as well. So +1 regardless ^^

brandonbloom commented 9 years ago

I really don't like CLJX, don't have the time/energy to maintain a CLJS port myself, and wouldn't want the code duplicated in a single repository. In the absence of a superior "feature expressions" sort of thing, I'd rather just have an external tracking port repository. For example, how David Miller tracks Clojure's commits and updates ClojureCLR. I'd be happy to provide support and guidance to anybody who wants to maintain such a port. And, if a good quality port, I'll happily link to it from my README.

jonase commented 9 years ago

@brandonbloom If I remember correctly I think my port was working pretty well. I had a clear use case for it back then but I don't think I ended up actually using it.

If I find some time I could create a separate project based on my branch and try to bring it up to speed with the latest version of fipp.

brandonbloom commented 9 years ago

Seems like there's meaningful progress on Feature Expressions for Clojure 1.7 with backing from Rich. I'm going to hold out until then.

brandonbloom commented 9 years ago

The clj17 branch has been heavily refactored and should now be much much easier to port to cljs via 1.7's .cljc files / feature expressions.

brandonbloom commented 9 years ago

The master branch now has experimental support for cljs!

There's a couple of known issues and some cljs patches to make, but I'll be using Fipp from cljs-land, so I'll take on that work as needed. Closing this issue.

Thanks all for the input/interest/etc.

Cheers, Brandon