Fork me on GitHub
#beginners
<
2017-03-30
>
rubek06:03:44

Being on Java 8, I’ll go and have a look on how to add hours there. This is all good info, thanks!

jumar07:03:34

@rubek an interesting wrapper for java 8 time api is https://github.com/dm3/clojure.java-time You might try something like this

(t/time-between (t/local-time 8 0 0) (t/local-time 14 15 0) :minutes)
;;=> 375
You can use :hours but that will give you only the the whole hours (6) You can also use duration:
(t/duration (t/local-time 8 0 0) (t/local-time 14 15 0) )
;;=> #object[java.time.Duration 0xea4b2cc "PT6H15M"]

rubek07:03:11

Oh this is awesome. Thank you, @jumar! Exactly What I was looking for 🎊

jumar07:03:25

no problem.

dimovich11:03:35

back to clojure after a little hiatus, and wondering what I'm missing here

dimovich11:03:54

mapping the function returns false for all the calls, but filter still keeps returning all values

dimovich11:03:25

nvm, works if I use it like that

dimovich11:03:43

(filter #(boolean (element/is-displayed? %)) logins)

sb15:03:34

hello, what is your experience how much data possible store in atoms? I would like to store in atoms, user custom setups

sb15:03:45

maybe is that bad idea?

sb15:03:59

(stability, data-loss, speed etc)

sb15:03:58

what is the optimal limit?

rauh16:03:24

@sb Atom doesn't do much but wrap a data structure. I did some measure a while back and clj maps where about similar size to java maps

rauh16:03:30

In memory consumption

sb16:03:36

Ok, thanks!!

rauh16:03:16

Ballpark number: 43k keys of {"some-uuid" -> ["ab" "cd"]} was 4MB

sb16:03:41

@rauh I would like to store just 1k user data (1k keys x 20 params) (B2B platform), Hopefully I think, in this case that would be ok.

sb16:03:48

many thanks for your response!!

mbcev18:03:21

This is probably a networking issues and not an nrepl issue but I'm not sure. I ran lein repl :headless and get nREPL server started on port 62490 on host 127.0.0.1 - as feedback but I can't use lein repl :connect 192.168.2.174:62490 to connect to the repl. Is this normal behavior? If I use localhost it works sure, but I was trying to test something from another box.

mbcev18:03:28

whenever I try to connect with the box IP I get a ConnectException Connection refused (Connection refused)

rauh18:03:59

@mbcev lein repl :host 0.0.0.0 IIRC

mbcev18:03:47

ohh, okay I found some documentation from your help @rauh I needed lein repl :headless :host 0.0.0.0 on the "server" box. Thanks!