This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # aws (1)
- # babashka (1)
- # beginners (41)
- # bristol-clojurians (2)
- # clara (2)
- # cljs-dev (7)
- # clojure (18)
- # clojure-europe (1)
- # clojure-finland (2)
- # clojure-uk (9)
- # clojurescript (5)
- # community-development (2)
- # data-science (14)
- # events (1)
- # fulcro (12)
- # joker (12)
- # malli (2)
- # reitit (1)
- # xtdb (1)
does the comp in transducers behave differently (the fns are executed from left to right), as compared to regular comps (fns are executed right to left)
comp is always right to left. It feels backwards for transducers because the argument of the resulting function is a reduction stage, not the value itself
As it is known that
pmap ’s parallel level is somehow limited by number of cores of the machine, is there a way to simply specify a number and go beyond the limit? For example,
(pmap 100 f (range 1000))that runs 100 threads
pmap does not give much control over anything. claypoole and/or using the Java Executors framework directly give you more control, and are not terribly difficult to learn.
@U0CMVHBL2 I want to do IO operations concurrently.
If I use claypoole, lets say initialize a threadpool of 5, however I have a single core processor.
For IO I am using blocking
clj-http.client/get wrapped in an
claypoole/future so will my cp-threads still get interleaved, or will they get blocked due to the blocking nature of IO ?
a thread that does a blocking IO call will be blocked, but any other threads that are not currently blocked should be able to make progress
@U0CMVHBL2 so does that mean that in my above scenario I will never get 5 concurrent http calls ? How do I achieve that ?
What I mean is that once the http-call is made and the thread is waiting to receive the response. During this interval my assumption is that the thread will not be blocked, bcoz its waiting for the OS to respond back with the result from the network call.
After 1 thread makes a blocking call (any blocking call), that 1 thread is blocked, but if there are 4 other threads that are not waiting for a blocking call to return, then the other 4 threads should be runnable and can make progress, and the OS scheduler should cause that to happen for you.
Hi. How to find this
(:import [com.sun.jna Library Native Platform] in Github what lib provides this ?
I'm almost afraid to ask. What's the deal with Java 9+ platform modules? What kind of challenges are there for us as Clojure developers? Is it a threat or we are ok? Is there a summarized informations about this topic?
@ales.najmann danielcompton has written on java 9 and 11 wrt clojure - here is one of the docs: https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-9/ - i think some of what you asked about is touched on in there