a project template containing clj, cljs cljc files

2016-03-05 Thread Sunil S Nandihalli
Hi everybody, I am trying to port an old project which uses cljx plugin and reagent to use cljc and reader-conditionals. I was wondering if somebody can share a simple template which has clj, cljs and cljc files in it? Thanks and regards, Sunil. -- You received this message because you are subs

Re: Doing matrix arithmetic with complex numbers

2016-03-05 Thread Mars0i
You might want to post this on the Numerical clojure group as well or instead. I've never tried using complex numbers with core.matrix. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com N

Re: Clojure beginner: IF statement error!

2016-03-05 Thread Mars0i
Just spelling out what the previous comments implied: You're giving 'if' five arguments: (= M 0) 1 "in case pow is 0 return 1" (do (* N (recur N (- M 1) "decrease power M each itr" 'if' needs at least two arguments, and is normally used with three. If you delete the strings, your code wi

Re: Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ
Algebraic data types are exactly what I'm looking for, actually. I think I'll try something like that. On Saturday, 5 March 2016 16:28:22 UTC-8, Bobby Eickhoff wrote: > > Note also that I'm giving each Zone "object" it's own :type property. > That's how I'm able to dispatch on the type. It al

Re: ClojureScript sequence implementation does not print

2016-03-05 Thread William la Forge
I found what I needed. In cljs.core we have this (extend-protocol IPrintWithWriter ...) Which defines how to print various sequences. On Friday, March 4, 2016 at 8:07:29 PM UTC-5, William la Forge wrote: > > I've implemented sequences in Clojure with no problems. But I'm a lot > weaker when

Re: Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread Bobby Eickhoff
Note also that I'm giving each Zone "object" it's own :type property. That's how I'm able to dispatch on the type. It also plays well with multimethods. On Saturday, March 5, 2016 at 7:26:27 PM UTC-5, Bobby Eickhoff wrote: > > It sounds like what you're describing is (structurally) an algebrai

Re: Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread Bobby Eickhoff
It sounds like what you're describing is (structurally) an algebraic data type, i.e. a generic type with specific variants. I've been able to do something like this in my own projects. Here I'm considering Zone the general type and each variant is Zone:Hand, Zone:Deck, &c. (def Zone:Hand ..

Prismatic Schema - Why is "both" deprecated?

2016-03-05 Thread JvJ
I've noticed that there is the function "both" in Schema. Both says that it can be replaced by conditional, but I'm not sure exactly how to go about doing this. Can someone provide an example? Thanks -- You received this message because you are subscribed to the Google Groups "Clojure" group

Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ
I've been using Schema, and there's a kind of type definition that I'm having trouble with. I'm not sure exactly how to describe it, so I'll provide an example. I'm working on a digital card game in which there are numerous zones that a card may be in. Each card needs to know which zone it is

Prismatic Schema - Self-reference in schema definitions

2016-03-05 Thread JvJ
I've been using Schema, and there's a kind of type definition that I'm having trouble with. I'm not sure exactly how to describe it, so I'll provide an example. I'm working on a digital card game in which there are numerous zones that a card may be in. Each card needs to know which zone it i

[ANN] Nginx-Clojure v0.4.4 is out

2016-03-05 Thread xfeep
Changes about v0.4.4 : 1. New Feature: experimental nginx body filter by Java/Clojure/Groovy (issue #107 ) 2. New Feature: read request body by event callback (issue #109