Re: Converting json to work with clojure.spec

2017-08-07 Thread Peter Hull
On Sunday, 4 December 2016 15:11:55 UTC, Jonathon McKitrick wrote: > > That being said, I see the benefits in moving to namespace qualified keys. > Currently, I'm returning structures directly in Compojure handlers, and the > JSON conversion is implicitly handled. I checked Cheshire and didn't

Re: :gen-class method signature help

2017-08-07 Thread Sir Robert Burbridge
Didier, thanks for the reply! 1. I created a wrapper function like this: (defn -score [data context] (score data context)) 2. I tried your suggestion but got an error. Here's the current state: The JS calling code: function genFixture () { return new Array(12).fill(parseFloat(Math

[ANN] com.walmartlabs/lacinia-pedestal 0.3.0

2017-08-07 Thread Howard Lewis Ship
lacinia-pedestal provides the Pedestal support to expose web endpoints backed by Lacinia's GraphQL. This release adds support for GraphQL subscriptions; these are implemented using Jetty WebSockets, and are designed to be compatible with the Apollo client libraries. In addition, there have been a

Re: :gen-class method signature help

2017-08-07 Thread Gregg Reynolds
On Mon, Aug 7, 2017 at 10:56 AM, Sir Robert Burbridge wrote: > Didier, thanks for the reply! > > >1. I created a wrapper function like this: (defn -score [data >context] (score data context)) >2. I tried your suggestion but got an error. Here's the current state: > > The JS calling

Re: :gen-class method signature help

2017-08-07 Thread Gregg Reynolds
Never mind, I see you tried that in your original code. ;) On Mon, Aug 7, 2017 at 1:03 PM, Gregg Reynolds wrote: > > > On Mon, Aug 7, 2017 at 10:56 AM, Sir Robert Burbridge > wrote: > >> Didier, thanks for the reply! >> >> >>1. I created a wrapper function like this: (defn -score [data >>

Re: :gen-class method signature help

2017-08-07 Thread Didier
Arrays in Clojure are different to Lists, and its probably why when you pass arrays to the score fn, that things don't work 100%. If you can coerce those arrays to a java list it would probably work. You can do that in js, but if that doesn't work or seem easy, you could have your -score wrappe

Re: :gen-class method signature help

2017-08-07 Thread Sir Robert Burbridge
Success! I've included the final solution here for completeness and community contribution. 1. Thanks, Didier-- your last bit got me on the right path. 2. Thanks, Gregg-- it turns out gen-class does recognize that syntax, if quoted, like so: #^{:static true} [score ["[Ljava.l

[ANN] Benjamin 0.1.0

2017-08-07 Thread Daniel Szmulewicz
Hello, I'm open-sourcing a library for parameterizable idempotency with side-effects Quite a mouthful, I realize that, so it is accompanied by a blog post that tells the motivation and backstory.

"GC overhead limit exceeded": Deceptive message?

2017-08-07 Thread Nathan Smutz
In the course of processing thousands of XML files (maximum size 388kb; but I am doing a lot of operations with zippers) I got this message: OutOfMemoryError GC overhead limit exceeded com.sun.org.apache.xerces.internal.xni.XMLString.toString I can process about 2,100 before that pops up. I se