Re: mutual reference in FP style

2012-07-07 Thread Philip Potter
Sounds like zippers may be able to help you here. When you use a zipper to descend into a tree, it automatically generates a trail of breadcrumbs to enable you to ascend back to the top, without needing backreferences in the original data structure. And it's purely functional, too. Phil On Jul 7,

question convert python array to clojure ?

2012-07-07 Thread Antonio Recio
How I can write this python array in clojure? FlipImageFilterType::FlipAxesArrayType flipAxes; if( atoi( argv[3] ) == 0 ) { flipAxes[0] = true; flipAxes[1] = false; } else { flipAxes[0] = false; flipAxes[1] = true; } -- You received this message because you

Re: question convert python array to clojure ?

2012-07-07 Thread Antonio Recio
Before I wrote the c++ version, the python version is: if int(sys.argv[3]) == 0: flipAxes = (True, False)else: flipAxes = (False, True) How I can convert it to clojure? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

[ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-07 Thread Peter Taoussanis
Hey everyone! First of two library releases today... Github: https://github.com/ptaoussanis/nippy Clojars: https://clojars.org/com.taoensso/nippy Features (taken from readme): * Simple, high-performance all-Clojure de/serializer. * Comprehensive, extensible support for all major data types. *

[ANN] Update: Timbre 0.6.0, a (sane) logging library for Clojure

2012-07-07 Thread Peter Taoussanis
Hi - second promised release for today! Github: https://github.com/ptaoussanis/timbre Clojars: https://clojars.org/com.taoensso/timbre Changes: * Now supports namespace black/whitelist filtering with wildcards. * Now includes a logging-level aware logging profiler based on the old Contrib pro

[ANN] Drift-db version 1.1.0 released

2012-07-07 Thread Matt
Drift-db version 1.1.0 released Drift-db is a library and companion project to Drift which gives you a standard interface for updating databases from migrations. In version 1.1.0: 1. Added support for Postgresql 2. Added offset and order-by as parameters to sql-find 3. Added an update-column fu

Re: [ANN] Drift-db version 1.1.0 released

2012-07-07 Thread Matt
Forgot the link: https://github.com/macourtney/drift-db On Saturday, July 7, 2012 9:38:03 AM UTC-4, Matt wrote: > > Drift-db version 1.1.0 released > > Drift-db is a library and companion project to Drift which gives you a > standard interface for updating databases from migrations. > > In versio

Re: Jade / Jade4J

2012-07-07 Thread Kyle Cordes
On Friday, July 6, 2012 at 5:57 PM, Kyle Cordes wrote: > There is a tool that looks like it might do something similar for html -> > Hiccup: > > https://github.com/hozumi/hiccup-bridge > Update: Takahiro Hozumi (author of the above tool) cleaned up some bits, and it now is quite useful for c

Re: mutual reference in FP style

2012-07-07 Thread Warren Lynn
Alan: Thanks. This solution actually may work for me. Although I think the recursive call in theory may run out of stack, my tree won't be close to that kind of depth. On Saturday, July 7, 2012 2:52:03 AM UTC-4, Alan Malloy wrote: > > If the value is something easy to compute, like a backrefer

Re: mutual reference in FP style

2012-07-07 Thread Warren Lynn
On Saturday, July 7, 2012 3:42:58 AM UTC-4, Philip Potter wrote: > > Sounds like zippers may be able to help you here. When you use a zipper to > descend into a tree, it automatically generates a trail of breadcrumbs to > enable you to ascend back to the top, without needing backreferences in t

Re: [ANN] ClojureScript release 0.0-1443

2012-07-07 Thread Stuart Sierra
By the way, why does lein-cljsbuild pin to a specific ClojureScript release? Can that be a project-level dependency decision? -S On Friday, July 6, 2012 3:49:29 PM UTC-4, Evan Mezeske wrote: > > Thanks for the quick turnaround on this release, Stuart! > > I just pushed out [lein-cljsbuild "0.2.4

Re: Jade / Jade4J

2012-07-07 Thread MichaƂ Marczyk
On 5 July 2012 04:32, Kyle Cordes wrote: > If anyone is aware of a Clojure wrapper for this, or has found 4j to work > well as-is, I'd appreciate hearing about it. >From a cursory glance at the documentation, data is passed into jade4j in the form of Java maps and lists; presumably these are not

Re: question convert python array to clojure ?

2012-07-07 Thread Michael Klishin
Antonio Recio: > if int(sys.argv[3]) == 0: > flipAxes = (True, False) > else: > flipAxes = (False, True) > > How I can convert it to clojure? https://gist.github.com/fa13f8dd721e8202f7ff MK mich...@defprotocol.org signature.asc Description: Message signed with OpenPGP using GPGMail

Re: [ANN] ClojureScript release 0.0-1443

2012-07-07 Thread Evan Mezeske
There's some discussion about that going on here: https://github.com/emezeske/lein-cljsbuild/issues/105 . The user can, AFAIK, specify the org.clojure/clojurescript version in their project, and that will take precedence over the version that lein-cljsbuild depends on. I guess my main reason

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-07-07 Thread Balint Erdi
That's right. So the reducers library in ClojureScript will probably also use less memory then working with sequential operations but it will not get any speed boost since in the Javascript VM it will not run in parallel. Is that right? Balint On Friday, July 6, 2012 2:31:21 PM UTC+2, Las wrot

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-07-07 Thread David Nolen
On Sat, Jul 7, 2012 at 5:26 PM, Balint Erdi wrote: > That's right. So the reducers library in ClojureScript will probably also > use less memory then working with sequential operations but it will not get > any speed boost since in the Javascript VM it will not run in parallel. Is > that right? >

POST not working with compojure 1.1.0 and ring-jetty-adapter 1.1.0

2012-07-07 Thread ArturoH
Hello Everybody, I'm not sure that I am having a version problem but this very simple example does not work for me. I get the POST form but when I subit the POST back I do not see the variable content just a simple "The message was ::". I run it with "lein run". Any help will be greatly appreci

Re: POST not working with compojure 1.1.0 and ring-jetty-adapter 1.1.0

2012-07-07 Thread James Reeves
On 7 July 2012 23:24, ArturoH wrote: > I'm not sure that I am having a version problem but this very simple example > does not work for me. I get the POST form but when I subit the POST back I > do not see the variable content just a simple "The message was ::". I run it > with "lein run". Any hel

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-07 Thread Brent Millare
Nice work, is there support for tagged literals and clojurescript? On Saturday, July 7, 2012 8:38:42 AM UTC-4, Peter Taoussanis wrote: > > Hey everyone! First of two library releases today... > > Github: https://github.com/ptaoussanis/nippy > Clojars: https://clojars.org/com.taoensso/nippy > > Fea

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-07 Thread Peter Taoussanis
Hi Brent, Tagged literals are supported: Nippy falls back to the reader whenever it encounters something it doesn't know how to serialize: (def my-uuid (java.util.UUID/randomUUID)) => #uuid "c463d8d3-49f4-4e40-9937-8a9699b1af1d" (thaw-from-bytes (freeze-to-bytes my-uuid)) => #uuid "c463d8d3-49f

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-07 Thread Sun Ning
Really nice work, I have been looking for such library for my RPC framework for a long time. Can't wait to test it out. By the way, do you have a performance comparison between Nippy and carbonite(the one wraps kryo) ? I think it's a pretty good idea to exchange data in clojure literal, and

Re: [ANN] Nippy, a fast Clojure serializer and drop-in reader replacement

2012-07-07 Thread Peter Taoussanis
Hi Sun, Can't wait to test it out. > Great- thank you! Let me know how it goes and if you run into any problems. > By the way, do you have a performance comparison between Nippy and > carbonite(the one wraps kryo) ? > Not yet, but plan to. I should probably also compare to JSON and a few o