Re: Why does the `def-` not exist?

2018-03-01 Thread Leon Grapenthin
I guess unqualified meta keywords are reserved for the compiler anyway so it 
could just warn if it doesn't know a unqualified kw.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Loop causing OutOfMemoryError: GC overhead limit exceeded ?

2018-03-01 Thread Rob Nikander


I have some Clojure code that throws this, occasionally. Unfortunately I 
can’t paste my real function here, but it looks much like the one below. 
(Changed variable names and simplified some irrelevant - I hope - details). 
Anything jump out as a memory-leak? 


It queries a DB table to get a list of records. For performance reasons, it 
runs multiple smaller queries by time period (min-t, max-t), and furthering 
breaks the results into chunks, as it accumulates the final vector 
`records`.


I thought each loop/recur would drop the data from the previous loop 
iteration. But maybe not?


  (defn find-db-records [db min-time max-time]

(let [records (atom [])

  num-processed (atom 0)]

  (loop [min-t min-time]

(let [max-t (plus-minutes min-t 30) ;; 30 minutes at a time

  results (jdbc/query db

 ["select id, a, b, c from sometable where t > ? 
and t <= ? order by t" 

   min-t max-t])

  row-groups (partition-all 200 results)]

  (doseq [rows row-groups :let [foo (make-foo rows)]]

(doseq [{:keys [id a b c] :as row} rows]

  (if (relevant-record? foo a b)

(let [d (compute-d a b c)]

  (swap! records conj {:id id :a a :d d})))

  (swap! num-processed inc)))

  (if (before? max-t max-time)

(recur max-t)

{:records @records :num-processed @num-processed})


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojure Discord server

2018-03-01 Thread overtoxic9


On Friday, May 19, 2017 at 7:49:14 PM UTC-4, Luke Burton wrote:
>
>
> Hi all,
>
> After reading about some of the hassles people had with Slack, I posted 
> earlier today in /r/clojure A Discord for Clojurians 
> 
> . 
>
> We've had about 50 people pass through the Discord so far. Please drop by 
> and see if you like it. To reiterate what I mentioned in the reddit post – 
> this is very much an experiment, and a fun one at that. 
>
> I spent a portion of today hacking together a repl-bot that lives in 
> #repl-bot. Everything said in that channel will be evaluated in a very 
> non-judgemental manner by the repl-bot. Even, as we discovered, 
> System/exit. All part of the fun.
>
> We also found that Clojure has full syntax highlighting support in 
> Discord. So far, threaded conversations are the major missing feature as 
> compared to Slack. 
>
> Hopefully this little experiment will help the community figure out future 
> directions for reliable community collaboration, whatever they may be.
>
> The URL for joining the Discord server: https://discord.gg/v9QMy9D
>
> Luke.
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Loop causing OutOfMemoryError: GC overhead limit exceeded ?

2018-03-01 Thread Daniel
This code looks fine. You don't need the atoms, but I don't think that's your 
trouble.

How do you know this code is causing the error? Unless this is all your code 
does, descriptions of the error suggest the memory leak might be coming from 
anywhere. This tight loop might trigger too many successive GCs though: have 
you observed if the error only occurs under load, or under large time 
intervals? Some combination?

Maybe running without -server so the GC will behave less aggressively?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.