Re: [ANN] Counterclockwise 0.26.0

2014-07-13 Thread casper
Nice. Keep up the awesome work :) On Thursday, July 10, 2014 10:53:59 PM UTC+2, laurent.petit wrote: > > Hello, > > Counterclockwise 0.26.0 has just been released. > > This version fixes lots of longstanding, unnerving usability issues. > > Please see the Changelog for detailed explanations: > >

Recursive definition in core.logic

2014-09-21 Thread Casper
I have been looking through core.logic tutorials and while I "get it" I haven't had the big epiphany yet. One thing that keeps nagging me is how to make a relation that isn't "fixed". An example is https://github.com/swannodette/logic-tutorial in which there is defined some relations such as pa

Re: [ANN] Release 0.35.0 of Counterclockwise

2016-09-09 Thread casper
Great! I was actually fearing that CCW had been abandoned, so good to see you are still around (even though I am a few months late). And just because there is not a lot of activity in here: I still use CCW more or less full time, and I appreciate the work update. On Saturday, July 9, 2016 at

Transit problems with msgpack

2015-11-24 Thread Casper
.getBytes string "UTF-8"))) (def reader (transit/reader in :msgpack)) (transit/read reader) Any idea what is going on? /Casper -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Propagating data through dependencies

2014-05-15 Thread Casper
This is not strictly a Clojure question, but I'll ask it here since I am solving it in Clojure. I have already made one solution which works, but I am interested in whether there are other and better approaches. I have a number of different products and some are dependant on others: A <- B B <

Re: Propagating data through dependencies

2014-05-15 Thread Casper
On Thursday, May 15, 2014 11:18:31 PM UTC+2, David Pidcock wrote: > You said b can't be billed after B. But it sounds like it can't be billed > before. > > Say b is ready at 1, can you bill it at 1 and then B at 2? > They should actually be billed at the same time (yeah, I didn't explain that

Re: Propagating data through dependencies

2014-05-15 Thread Casper
Yeah maybe, but both b and B should basically be billed at max of their associated dates, which might affect the things that depend on B. So I don't think b can be dropped completely. On Thursday, May 15, 2014 11:30:35 PM UTC+2, David Pidcock wrote: > > If, say C cannot depend on any b directly,

Re: Propagating data through dependencies

2014-05-15 Thread Casper
Nice thanks, I didn't know propaganda. I am not sure if it applies to this problem, but it looks interesting so I'll have a look. On Friday, May 16, 2014 12:10:29 AM UTC+2, François Rey wrote: > > I'm not sure I totally understand your use case, but somehow it sounds > like these libraries may

Type hints and records

2011-10-10 Thread casper
I am using a record to wrap a number of java classes, which I then access various properties on. I am trying to avoid reflection so I type have type hinted, however when accessing the values in the record the type hints are lost. It might look something like this (defrecord Rec [^Integer i]) (def

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: 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: 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

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: 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

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: 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: 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: 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: 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: 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: [ANN] moderns-cljs tutorial 6

2012-11-14 Thread Casper Clausen
with the examples. /Casper On Tuesday, November 13, 2012 5:41:49 PM UTC+1, Mimmo Cosenza wrote: > > Hi all, > I'm always a little bit afraid in announcing my small results as a > clojure/cljurescript newbie to such a smart community of programmers. > > I just publishe

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

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