This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-02
Channels
- # admin-announcements (29)
- # aws (11)
- # beginners (247)
- # boot (11)
- # business (1)
- # cider (73)
- # clara (5)
- # cljs-dev (37)
- # cljsrn (29)
- # clojure (86)
- # clojure-dev (9)
- # clojure-indonesia (1)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-russia (195)
- # clojure-sg (2)
- # clojure-uk (3)
- # clojurecup (1)
- # clojurescript (296)
- # clojurex (2)
- # code-reviews (6)
- # core-async (3)
- # cursive (33)
- # datavis (9)
- # datomic (11)
- # funcool (31)
- # hoplon (1)
- # ldnclj (8)
- # lein-figwheel (5)
- # leiningen (5)
- # luminus (4)
- # off-topic (3)
- # om (172)
- # onyx (13)
- # re-frame (5)
- # reagent (84)
Thank you @ikitommi
Is there anybody who can consult on queues and executors? I'm building email service in my monolith app, and the app has few producers of standardized email task. Producers store these tasks to a single queue. And I want to add a consumer to this queue, but I don't know how to initialize it properly. I imagine it should be some managed thread, controlled by a thread pool, or executor or something. So, what is a proper way to initialize the consumer? I would read some sources and examples if you know some. Thanks.
@dm3 hm, I'll check that, thanks.
@ognivo you usually just create an executor via the Executors
class (eg. (Executors/newFixedThreadPool 2)
, which will always have 2 threads running)
Can this code be made more simpler : (apply concat (reduce (fn[acc it] (if (= (count it) 3) (conj acc (drop-last it)) (conj acc it))) [] (partition-all number number list)))
(fn [s cnt] (flatten (map
#(if (= cnt (count %)) (butlast %) %)
(partition cnt cnt nil s))))
Here's the best solution I found on there: #(apply concat (partition-all (dec %2) %2 %1))
You get used to them. You can always write out (fn [x coll] ...)
if it helps you understand
I am trying to get the project map with merged profiles (that is displayed with lein pprint), during the session, e.g. lein repl, then access the value within the repl. Is there a good way to do this?
Clojure 1.8.0-RC3 is now available - please test! https://groups.google.com/d/msg/clojure/psZJDF0m6Xk/2IkXmVXSAAAJ
@alexmiller: How can I upgrade from 1.7.0
if you're using leiningen, then replace 1.7.0 with 1.8.0-RC3 in your project.clj file
so your dependency will say "[org.clojure/clojure "1.8.0-RC3"]"
[org.clojure/clojure "1.8.0-RC3"]
@alexmiller: Any gotchas one should be aware of?
you can read the changelog at https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fclojure%2Fclojure%2Fblob%2Fmaster%2Fchanges.md&sa=D&sntz=1&usg=AFQjCNFCBcK2Z_mEyKn-DnjkiVMv_8owlA
ok, not that :)
leiningen will download it the next time you run a command that needs it
@alexmiller: thanks, I now see clojure-1.8-rc3 when I do lein repl
@thheller: that's probably what I was looking for, thanks a lot.
@alexmiller: curious, what kind of performance gains does the direct linking produce?
i realise that’s a wide-open, fairly unscientific question
I'm populating some atoms that are def
'd at the top level of a namespace (using them as caches) and it seems that after some time its value is lost. Is there a scenario where the JVM (or some other substrate) might deallocate it or garbage collect it?
jaen, ghadi in development, that's fully likely… and I've not noticed it in deployed environments. you're both probably correct. thank you!
I'm working on a pedestal app and see that changes in other namespaces (besides service) are not picked up when I recompile them. For example a change in the home-page function works great when it is in service.clj ["/" {:get home-page}] but if I move it to another namespace such as foo.clj and say ["/" {:get foo/home-page}] changes there don't get reloaded. I'm using emacs and a repl, is there a good set up that would cause all changes to get reloaded?
@juliobarros: One possibility is to dispatch your routes to Vars (`#'home-page`) instead of function values. More generally, adopt a workflow that automatically reloads namespaces when their dependencies change. For an example, see https://github.com/stuartsierra/reloaded
Thanks @stuartsierra I wish the pedestal template used component by default.
@alexmiller: clarification on the 1.8 changelog: "With this change, clojure.core itself is compiled with direct linking”. Does that mean, “only if -Dclojure.compiler.direct-linking=true” is set, or is clojure.core compiled with direct linking in official releases?
Not sure what you mean @timvisher
@timgilbert: does the functionality of the above exist as a named function?
I guess I'm not sure what you're trying to do, are you dissocing a few keys out of a map?
There is not a (dissoc-in)
function analogous to (assoc-in)
or (update-in)
@timvisher: (dissoc map :key1 :key2 …)
But you can (update-in nested-map [:key :key] dissoc :child)
basically does a version of dissoc exist that accepts a list of keys to dissoc. that's my question
Oh right
I bet you could get close with (select-keys)
but I don't know of a function in core
Well, there is select-keys
but it takes the keys you want. I don’t think there’s any core dissoc-keys
function.
Yeah, AFAIK that's about as simple as you can make it
Cider updated on Melpa and I absent-mindedly updated to the new version. It wants cider-nrepl 0.10.0-SNAPSHOT, which was fine. But it doesn't recognize the updated version of nrepl (0.2.12) that I also have installed. If I start a lein repl
, 0.2.12 is used, but not in Cider. And I can't figure out why. Any ideas?
More fun with polygon meshes and a new subdivision algorithm: https://images4.sw-cdn.net/model/picture/625x465_4108313_13235571_1449095437.jpg
@meow: Keep posting your updates, inspiring to see!
@codemartin: Thank you! Glad you like them.
@meow: That is seriously amazing. How are you doing the rendering? Is there some clojure hook for GL?