defprotocol fails oddly in repl only

2016-05-29 Thread CGAT
Whenever I do a defprotocol in the clojurescript repl, even a trivial one like (defprotocol IFoo (foo [this])) it fails with an error `Can't change/establish root binding of: *unchecked-if* with set at line 1 '. Everything else seems to work as expected. When compiled outside the repl, such

defprotocol fails oddly in repl only

2016-05-29 Thread CGAT
Whenever I do a defprotocol in the clojurescript repl, even a trivial one like (defprotocol IFoo (foo [this])) it fails with an error `Can't change/establish root binding of: *unchecked-if* with set at line 1 '. Everything else seems to work as expected. When compiled outside the repl, such

Re: BigDecimal and ==, with a proposed fix

2013-08-01 Thread CGAT
ook at it and see if you think it is correct. > > Andy > > > On Thu, Aug 1, 2013 at 9:28 PM, CGAT >wrote: > >> My understanding of == is that it is intended to establish numerical >> equivalence >> across types. But I think that basic contract

BigDecimal and ==, with a proposed fix

2013-08-01 Thread CGAT
My understanding of == is that it is intended to establish numerical equivalence across types. But I think that basic contract fails with BigDecimal. For instance, (== 1M 1.0M) ; => false because the scale properties of these numbers are different. So then of course: [(== 1 1N 1.0)

Re: Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-14 Thread CGAT
his seems to have to do with some deep class loading magic. But this strikes me as a bug in the sense that the above should under all circumstances be a guarantee made by map->A. On Thursday, December 13, 2012 11:49:20 PM UTC-5, CGAT wrote: > > I've now put :aot [ns1] in the proje

Re: Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-13 Thread CGAT
? Help!? On Thursday, December 13, 2012 11:13:29 PM UTC-5, CGAT wrote: > > Without AOT, the classLoader's are not the same > > (str (.getClassLoader A)) > > WebappClassLoader > delegate: false > repositories: >

Re: Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-13 Thread CGAT
ass an-A-record))) clojure.lang.DynamicClassLoader@3ac803e6 I'll try AOT compile next, as that DynamicClassLoader seems to suggest. But I'm not sure what else can be done. On Thursday, December 13, 2012 10:53:53 PM UTC-5, CGAT wrote: > > I did not AOT compile it, though I c

Re: Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-13 Thread CGAT
fix it. > > peace, Chris Jeris > > On Thu, Dec 13, 2012 at 6:13 PM, CGAT >wrote: > >> I have a frustrating situation and would appreciate any help. >> The call >> >>(instance? A an-A-record) >> >> is returning false when an-A-record

Help: instance? always false for record type (in tomcat but not in jetty)

2012-12-13 Thread CGAT
I have a frustrating situation and would appreciate any help. The call (instance? A an-A-record) is returning false when an-A-record is in fact an instance of A. This is in a noir/compojure/ring server. But the problem *only* *occurs *when run under tomcat, *not* when run under Jett

Re: Proposal/request: Give clojure.core/conj a unary implementation

2012-11-03 Thread CGAT
conj ...). Instead, use `into`, > > which does the same thing but faster and with fewer characters. > > > > > > On Saturday, November 3, 2012 3:27:24 PM UTC-7, CGAT wrote: > >> > >> It would be nice if clojure.core/conj had a unary implementation >

Proposal/request: Give clojure.core/conj a unary implementation

2012-11-03 Thread CGAT
It would be nice if clojure.core/conj had a unary implementation ([coll] coll) The motivating use case is when one is conjoining sequences of items to a collection all at once: (apply conj coll seqable) such as (apply conj #{1 2 3} [2 4 6 8 10]). Currently (1.4.0), this will rais