Fork me on GitHub
#clojure
<
2018-08-27
>
Tom00:08:21

hi anyone available?

Ramzi00:08:44

just ask your question to the whole chat

Tom00:08:25

I'm trying to get dl4j working with clj command, and I get a "no nd4jcpu in java.library.path" error, and other similar library errors

Tom00:08:53

I don't want to use leinigen

Ramzi00:08:18

You need to unzip cuda-9.1-7.1-1.4.1-windows-x86_64.jar and nd4j-cuda-9.1-1.0.0-beta-windows-x86_64.jar somewhere, and add the paths to the native dlls to the java.library.path property when launching your app.

Tom00:08:05

right, I'm also running in a docker container

lilactown00:08:05

does anyone have an example of just a web API that consumes and responds with JSON in retit?

Tom00:08:11

I guess I just expand into the app folder, then use -Jjava.library.path=whatever

lilactown00:08:38

I’m using ring as well

Tom00:08:37

@its.ramzi thanks for the help, I'll probably get it working with that. bye!

valtteri05:08:14

@lilactown did you already check examples in reitit repo? https://github.com/metosin/reitit/tree/master/examples/ring-example/src/example It consumes and responds JSON if your request has Content-Type and Accept headers set properly. See “Content Negotiation” https://metosin.github.io/reitit/ring/default_middleware.html

timmyjose06:08:51

Hello, I needed some help getting leiningen to work on macOS High Sierra (10.13) Please let me know if I need to ask this in a different channel! I have many JDKs installed, and my default currently is JDK 11ea...I installed leiningen using homebrew, and when I try to run lein repl, I get the following error messahe Exception in thread "Thread-1" java.io.IOException: Cannot run program "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home" (in directory "<elided>/testproj"): error=13, Permission denied at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128) at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071) I have lein in /usr/local/bin, and LEIN_HOME is owned by my user name I tried changing the JDK to 1.8 (of course, that didn't work either), and I tried running lein with sudo, and no luck I had also installed the clojure executable using homebrew, and running that starts up a REPL without any problem Is there something I am missing? Or should I install Java in a custom path owned by my user? My JDKs are: $ /usr/libexec/java_home -V Matching Java Virtual Machines (3): 11, x86_64: "Java SE 11-ea" /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home 9, x86_64: "Java SE 9-ea" /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home 1.8.0_112, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home So these are installed in directories owned by root, of course (not sure why this would be a problem though): $ ls -ld /Library/Java/JavaVirtualMachines/ drwxr-xr-x 5 root wheel 160 Aug 27 11:16 /Library/Java/JavaVirtualMachines/

Helins08:08:45

So, I see #clojure on freenode has been deserted

gaverhae10:08:07

@timmyjose While there have been problems with JDKs 9+ because of the new module and permissions system (within the JVM), I've never seen an OS-level permission restriction like that. Especially with JDK 8 leiningen should just work out of the box.

gaverhae10:08:43

Cannot run program "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home" is a very bizarre message in that /Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home is bound to be a directory, not an executable

timmyjose10:08:42

@gaverhae Indeed... it used to work before as well (at least with 1.8)... strangely enough, (as I just replied in the other thread), a reboot seems to have fixed the issue, and the REPL seems to be working fine even with JDK 11ea! Thanks for the help, mate!

hiredman18:08:55

a transducer is a function from a reducing function to a reducing function, no collection

hiredman19:08:22

so for example (into x (map inc) y)

hiredman19:08:55

internally into is a reduce like (reduce conj x y)

hiredman19:08:30

so with (map inc) it becomes (reduce ((map inc) conj) x y)

hiredman19:08:33

clojure.lang.PersistentQueue supports conj so it can be conj'ed on to there, and it supports seq so it can be reduced over (there are many paths to supporting reduce now)