Fork me on GitHub
#beginners
<
2017-02-25
>
joakimmohn11:02:47

I have a clojure web app running on linode. Any recommendation for software to monitor this app? I just wanna see who connects from where and when really

kgofhedgehogs14:02:45

What is wrong?

(require '[clojure.core.matrix :as matr])
FileNotFoundException Could not locate clojure/core/matrix__init.class or clojure/core/matrix.clj on classpath. clojure.lang.RT.load (RT.java:456)

mavbozo14:02:27

@kgofhedgehogs do you use leiningen's project clj?

kgofhedgehogs14:02:42

I need to add dependency?

mavbozo14:02:51

yes, you need to

kgofhedgehogs14:02:20

So. I need to add this dependency to my project https://cloojure.github.io/doc/core.matrix/ But I get this Could not find artifact org.clojure:core.matrix:jar:0.31.2-SNAPSHOT in clojars () With this dependencies:

:dependencies [[org.clojure/clojure "1.8.0"]
                 [org.clojure/core.matrix "0.31.2-SNAPSHOT"]
                 [org.clojure/math.numeric-tower "0.0.4"]])

mavbozo15:02:07

@kgofhedgehogs it's [net.mikera/core.matrix "0.57.0"]

sova-soars-the-sora17:02:44

@dpsutton Hey man, thanks for all your help so far, I really really appreciate it. I'm still investigating my ajax callback and I finally found the source-code for the method included with sente: ajax-ilte

sova-soars-the-sora17:02:17

So I know how the ajax-lite call works, but I don't know what my ring response from the server should look like so that the client can parse it rightly.

sova-soars-the-sora17:02:41

do I make a :params key and fill it? passing through the :body doesn't seem to work. Anybody got any tips for a newbie ajaxer?

kgofhedgehogs23:02:58

Is there compact way to do this? {0 2, 5 1} -> [2 0 0 0 0 1]

schmee23:02:09

I don’t understand what’s going on, do you have an additional example?

tbaldridge23:02:53

positional setting?

tbaldridge23:02:59

@kgofhedgehogs yeah, there's two things you can do and I'll let you work out the rest 🙂. Firstly we create a vector of 0s for a certain size: (vec (repeat max-size 0))

tbaldridge23:02:08

then using assoc you can update items in that vector:

tbaldridge23:02:30

(assoc v 0 2) (assoc v 5 1)