This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (3)
- # beginners (15)
- # boot (5)
- # cider (25)
- # cljs-dev (9)
- # cljsjs (5)
- # clojure (30)
- # clojure-belgium (20)
- # clojure-boston (1)
- # clojure-greece (1)
- # clojure-japan (3)
- # clojure-russia (17)
- # clojure-uk (2)
- # clojurescript (49)
- # clojurewerkz (2)
- # cursive (5)
- # datomic (1)
- # emacs (1)
- # euroclojure (1)
- # hoplon (155)
- # jobs-discuss (17)
- # mount (6)
- # off-topic (1)
- # om (87)
- # proton (2)
- # re-frame (3)
- # remote-jobs (4)
- # spacemacs (2)
- # untangled (12)
Anyone know if it’s possible with prismatic plumbing to control the amount of work done? Basically, iterate one step at a time, producing partial results
I'm calling an async library to upload a dir of file (AWS S3 Transfer using Amazonica) but my program exits before it finishes. Is there some kind of code I can wrap this in so it will wait until all is finished?
Does anyone use
partial in preference to using the shorthand for an anonymous function
#(… %) ?
partial is nice if your function has several arguments and you want to fill in the first, and figure out the rest later
For example, in an application I'm working on right now, I have a function
(defn api-call [resource-name http-client api-key id] ...). I define some convenience functions with
(def basic-info (partial api-call :basic-info).
I’ve just read the Chapter 6 from Living Clojure about core.async. I’m wondering if the “parking” (asynchronous) versions of put and take really scale properly. My impression is that it should be possible to do many thousands of asynchronous executions like
(async\go (async/>! tea-channel :tea)) - and let’s say that we’re not going to consume (take) this messages immediately. If I got it properly the approach is to “park” (make it unavailable for scheduling) the calling thread. Does that mean that new thread is used for each invocation of
(async/go (async/>! tea-channel :tea)) ?
@jumar: no, a parked go block does not make the thread unavailable: https://clojure.github.io/core.async/\#clojure.core.async/go
Well, the following formulation is confusing for me: >>> Additionally, any visible calls to <!, >! and alt!/alts! ? channel operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread (or the only JS thread when in ClojureScript).
I understand this as “Java thread is unavailable for another processing but it doesn’t consume CPU - no busy waiting)
btw. when I look at REPL process in jvisualvm I see many threads (thousands) like “async-dispatch-2435” - they are not running, however, just displayed on Threads tab.
Let's say at a certain part of the code I would like to get all the variables accessible by the current scope, can I do it?
Hi all! Can anyone point me to a solution to bake parameters into my uberjar using Leiningen? I tried the
environ package but it relies on an external file (`.lein-env`).
So, for example: I want to bake a JAR based on the
prod profile in my
project.clj which contains some settings for my production environment. Since I'm using AWS Lambda I cannot use native ENV vars or external files...
@thiagofm: try using (ns-map ns). You could probably filter that for variables somehow
@vincentdm: is there a reason you can’t set your profile variable to a string and refer to that in code? then you can just pull in the variable like in this answer: http://stackoverflow.com/questions/16270805/how-to-get-the-version-of-the-current-clojure-project-in-the-repl
How would I know in my code which profile in the project.clj to refer to? However, in the meanwhile I think I have found what I was looking for: Leiningen lets me pass params using
:jvm-opts, so if i can find a way to read those I think I have what I need.
Oh nice yeah that’s a lot cleaner. If your parameter was only for prod, you could just conditionally check if it was not nil, then you would know that you were in prod.
I did it, I downloaded racket in order to try Typed Racket after the inspiring keynote at Clojure/West https://youtu.be/XTl7Jn_kmio 😄
Hey all! I am try to setup emacs on windows with CIDER. But its not in the package list. This is a clean install. Quick ideas?