Fork me on GitHub
#beginners
<
2021-07-18
>
dehli02:07:23

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 https://clojure.org/reference/deps_and_cli#_git) 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)?

phronmophobic03:07:50

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

phronmophobic03:07:59

I'm not an expert on the cli stuff, but I think the cli version can be different than the clojure version, https://clojure.org/releases/tools#_releases

dehli03:07:11

Version: 1.10.3.855

phronmophobic03:07:09

you can try just using :sha rather than :git/sha as a work around, https://clojurians.slack.com/archives/C6QH853H8/p1625875870182300

dehli03:07:25

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.

Alex Miller (Clojure team)04:07:52

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

dehli04:07:03

Thanks, that explains it!

Alex Miller (Clojure team)04:07:10

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

Alex Miller (Clojure team)04:07:47

That’s the source of the last error

dehli12:07:53

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!

siva03: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

siva05: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

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

dgb2321:07:34

Project Loom sounds very cool at first glance

dgb2321:07:47

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

lsenjov22:07:48

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();

Alex Miller (Clojure team)20:07:04

(def converterToMat (OpenCVFrameConverter$ToMat.))

Alex Miller (Clojure team)20:07:41

(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