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
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
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
>>
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
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
Also, you need to change the name of the "score" function in clojure to
"-score". Yes, that's a dash prefixed to it. Unless you have configured
gen-class to do differently using ":prefix".
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to t
Can you try:
:methods [#^{:static true} [score [java.util.List java.util.List]
java.util.List]]
This says your score function takes two List arguments and returns a list.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
Hi all,
I've got a very small Clojure task I need to get done. If needed, I am
willing to pay someone for it. I expect would be less than an hour's work,
but am not stuck on that =)
*Simple Summary*
I have a small, proprietary clojure library I am trying to embed in NodeJS
via the node-java