Re: [ANN] Counterclockwise - Clojure plugin for Eclipse

2013-10-12 Thread Casper Clausen
Nice work, looking forward to using this. I'm wondering though, what is the best or "official" way to import a lein project? I've never been able to figure it out, so I always do lein pom and import as maven project and then convert to leiningen project. Is there a better way? On Saturday,

Re: Reading namespaced keywords

2013-09-17 Thread Casper Clausen
ead-string ":l/test") > :l/test > > > Dave > > > > On Tue, Sep 17, 2013 at 4:03 PM, Casper Clausen > > wrote: > >> I am reading a bunch of clojure files using the build-in reader (or >> tools.reader, it has the same problem) and I am running i

Reading namespaced keywords

2013-09-17 Thread Casper Clausen
I am reading a bunch of clojure files using the build-in reader (or tools.reader, it has the same problem) and I am running into a problem regarding namespaced keywords (is that the right term?) such as ::l/test. => (read-string "::l/test") RuntimeException Invalid token: ::l/test clojure.lang

Re: ANN swag a DSL for documenting Compojure routes using Swagger

2013-08-16 Thread Casper Clausen
Nice work. Looking forward to giving it a spin. On Thursday, August 15, 2013 12:13:11 PM UTC+2, ronen wrote: > > Swagger is a cool project > for documenting Restful API's, > > Swag is a DSL that wraps Compojure routes enabling them to be listed and

Re: Idiomatic way to write dependency resolving algorithms?

2013-06-09 Thread Casper Clausen
ot; "e"]} "c" {:dependencies ["d" "e"]} "d" {:dependencies ["c"]} "e" {:dependencies []}}) (resolve-dep graph "c") => java.lang.StackOverflowError On Sunday, June 9, 2013 10:30:51 AM UTC+2, Casper Clausen wrote: >

Re: Idiomatic way to write dependency resolving algorithms?

2013-06-09 Thread Casper Clausen
Here is a similar algorithm I did for work a while back: (defn- find-next-node [deps used-nodes] (some (fn [[k v]] (if (empty? (remove used-nodes v)) k)) deps)) (defn topsort "Takes a map of dependencies between items and performs a topological sort. E.g. (topsort {1 [2 3] 3 [] 2 [3]}) =

Re: JSON escaping

2013-02-08 Thread Casper Clausen
Don't know about cheshire, but the newest version of clojure.data.json has a :escape-slash option which does the trick. On Saturday, February 9, 2013 12:18:50 AM UTC+1, Jonathon McKitrick wrote: > > I'm generating JSON for salesforce/apex consumption, and apparently Apex > does not like correctl

Re: Why is this code so slow?

2013-02-03 Thread Casper Clausen
Given that I don't know much about how scala does optimizations, I find the question of why the scala version is faster than the Java version even more interesting. It seems to me that in Scala, the list (don't know the actual data type which is created) of 1 to 20 is created each time isDivisi

Re: [ANN] moderns-cljs tutorial 6

2012-11-14 Thread Casper Clausen
I just want to chime in and say good work. This exactly what I have been looking for as a gentle introduction to clojurescript. If I can make one suggestion, it would be nice to have each chapter accompanied by a project for that chapter. It would mean a lot less copy and paste to follow along

Re: future with user specified ExecutorService

2012-10-27 Thread Casper Clausen
+1 That would be nice. This may not be the right place for the suggestion though. On Thursday, October 25, 2012 2:43:58 PM UTC+2, Max Penet wrote: > > wrong commit: > https://github.com/mpenet/clojure/commit/9c6e47524dc21c6bdfaa9d0cc2a69377cc69cbf3 > > > On Thursday, October 25, 2012 2:35:01 P

Re: Typed Clojure 0.1-alpha2

2012-04-21 Thread Casper Clausen
Looks interesting. Personally I always thought clojure's handling of function arity is a bit strange. I don't understand why calling a function like this (defn testfn [one two] ...) (test-fn 1) is not at least a compiler warning, possibly with a switch for the compiler for strict checking. I un

Re: PersistentHashMaps coming to ClojureScript

2012-04-21 Thread Casper Clausen
Excellent! Any idea how this implementation would compare performance wise to the java implementation if imported to Clojure? On Apr 20, 8:36 pm, Michał Marczyk wrote: > It's pure ClojureScript. Hopefully a step towards CinC, yes. :-) > > Sincerely, > Michał > > On 20 April 2012 20:32, Brent Mill

Re: Type hints and records

2011-10-20 Thread Casper Clausen
Thanks for the clarification. Just to clear up any confusion, the .toString example was just the simplest example I could think of that illustrated was I was seeing with regards to reflection and type hints :) On Oct 20, 4:22 am, Michael Fogus wrote: > Another potential option is to implement a

Re: Type hints and records

2011-10-19 Thread Casper Clausen
Thanks, that works nicely! Is it intended or just incidental that type hints are not retained using the :-notation? There doesn't seem to be much advantage to not including type hints when available. On Oct 11, 1:02 am, Stuart Halloway wrote: > > I am using a record to wrap a number of java cla