Fork me on GitHub

Hi, I’ve got a question about deps.edn. I’m using the latest version of clojure (1.10.3) but when I try to use the :git/sha functionality (mentioned I get an outdated error message (`Library foo has missing :sha in coordinate`). Is there something else I need to do to ensure my tools.deps is updated (or is that functionality not available with my Clojure version)?


what version does it say when you run clojure --help?


I'm not an expert on the cli stuff, but I think the cli version can be different than the clojure version,




you can try just using :sha rather than :git/sha as a work around,


Thanks! When i just use :sha i get a different error (`Error building classpath. No coordinate type found for library`). I’ll try upgrading to the alpha version and see if it has different behavior.


The :git/sha stuff is only in the prereleases, not in 855


Thanks, that explains it!


In 855 you’ll need a :git/url too


That’s the source of the last error


gotcha! I was trying to play around with the derived urls that were mentioned but i’ll hold off until the next release. thanks again for the help!

Sivaram Konanki03:07:55

How can I have million light weight threads in clojure like Go can spawn million goroutines for concurrency ? Do I uses futures, async, tasks on threadpool? How can I achieve this level of concurrency

Sivaram Konanki05:07:05

Is multithreaded go async blocks achieve a lot of concurrency. ? Project loom is WIP and from what I heard it's performance is bad

Cora (she/her)05:07:00

it won't achieve the same kind of concurrency that erlang's beam vm or golang achieve, no. the tradeoffs are different. clojure's go blocks execute on a limited thread pool and only park on certain operations, not including I/O

Cora (she/her)05:07:07

> go blocks should not (either directly or indirectly) perform operations > that may block indefinitely. Doing so risks depleting the fixed pool of > go block threads, causing all go block processing to stop. This includes > core.async blocking ops (those ending in !!) and other blocking IO.

Cora (she/her)06:07:58

in the jvm this gets attacked differently. take a look at http-kit and how they manage to make 600k concurrent connections

Cora (she/her)06:07:03

a common thing I see is using async-io and then handling callbacks on thread-pools. threads are freed while the i/o is waiting when i/o is ready the handlers are dispatched to some kind of executor thread pool to complete

Ben Sless06:07:34

You should also take into account goroutines aren't "free". You can spawn a lot of them but the second they need to actually allocate things on the stack things get hairy. Their default stack size is small. They will slow down significantly one you push the runtime. Use go blocks for " async" operations, threads for CPU and blocking operations. You can pretty easily convert async functions to one which return channels


Project Loom sounds very cool at first glance


also continuations and tail call eliminations are things Clojure should very much like


Pulsar (lightweight erlang-style threads/actors) might also be something to look at, but it doesn’t look like it’s been updated for a couple years

Adrian Smith20:07:35

Hey how would I replicate this call in Clojure?

OpenCVFrameConverter.ToMat converterToMat = new OpenCVFrameConverter.ToMat();


(def converterToMat (OpenCVFrameConverter$ToMat.))


(but note this assumes you've :imported OpenCVFrameConverter$ToMat (that needs a package, not sure what it is)

👍 3
Adrian Smith20:07:06

yep works after adding OpenCVFrameConverter$ToMat to :import like you said, thank you