Fork me on GitHub
Alex Miller (Clojure team)00:10:40

You might also want to look at java.util.Scanner

Michael Stokley02:10:33

i'm running into an error trying to start a repl for a project via the clj command line tool

Error building classpath. Could not acquire write lock for 'artifact:tractsoft:beekeeper:0.1.1'
java.lang.IllegalStateException: Could not acquire write lock for 'artifact:tractsoft:beekeeper:0.1.1'
i'm not seeing much discussion of this on forums. has anyone run into this?

Michael Stokley02:10:16

here's the full trace

Error building classpath. Could not acquire write lock for 'artifact:tractsoft:beekeeper:0.1.1'
java.lang.IllegalStateException: Could not acquire write lock for 'artifact:tractsoft:beekeeper:0.1.1'
	at org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapter$AdaptedLockSyncContext.acquire(
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(
	at clojure.lang.MultiFn.invoke(
	at java.base/
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.base/java.util.concurrent.ThreadPoolExecutor$
	at java.base/

Alex Miller (Clojure team)02:10:05

what version of the CLI are you on?

Alex Miller (Clojure team)02:10:18

and can you share your deps.edn with me?

Michael Stokley02:10:34

~/projects/one-deps-repl(main *%) $ clj -version
Clojure CLI version

Alex Miller (Clojure team)02:10:22

latest is and you might want to try updating to that, but in the case it's still happening, you can add -Sthreads 1 and that may also help

šŸ‘€ 1
Alex Miller (Clojure team)02:10:47

I have an open issue for this, would appreciate any repro info before you update if you are able to share deps.edn

Michael Stokley02:10:04

ok, i updated the CLI

Michael Stokley02:10:08

got a whole new error

Michael Stokley02:10:37

i will now try -Sthreads 1

Alex Miller (Clojure team)02:10:14

well that's not going to help you with that error - it's just not finding the artifact in the s3 bucket, which could be permissions or something else

Michael Stokley02:10:56

ah, ok. that gives me a direction to go in. thank you!

Alex Miller (Clojure team)02:10:59

:bucket "mt2-maven", :path "tractsoft/beekeeper/0.1.1/beekeeper-0.1.1.pom"

Alex Miller (Clojure team)02:10:42

I would hold off on the threads thing until you see something that looks like a concurrency error

šŸ‘ 1
Alex Miller (Clojure team)02:10:10

this is probably well beyond "beginners", feel free to follow up in #tools-deps

Michael Stokley02:10:42

i've graduated out of the beginners channel :star-struck:

šŸŽ“ 5
clojure-spin 1
Frederico Benevides08:10:25

Hi. I'm getting this error No value supplied for key: true while using :require to load two namespaces. If I require just one, the code works. My code:

(ns manjaro.main                                                                                                      
  (:require [manjaro.pacman :as pacman                                                                                
             manjaro.yay :as yay]))
Does anyone have some idea?


it needs to be two vectors like this:

(ns manjaro.main                                                                                                      
  (:require [manjaro.pacman :as pacman]                                                                                
             [manjaro.yay :as yay]))

šŸ™Œ 1

Hi, I have the following function where I have to iterate over a map inside an and :

(let [attrs {:type "synonym"}
      entry {:tag :name :attrs {:type "primary"}}]
  (when (and true (for [attr-key (keys attrs)]
                    (= (attr-key attrs) (attr-key (:attrs entry)))))
    (prn "test")))
I think it essentially boils down to (when (and '(false)) (prn "test)) , but I'm not sure how to get the values out of the list.


Instead of looping over each attribute, you can pull out all attributes and compare them to the desired ones


(let [attrs {:type "synonym"}
      entry {:tag :name :attrs {:type "synonym"}}
      entry-attrs (:attrs entry)]
  (= attrs (select-keys entry-attrs (keys attrs))))


That makes so much more sense than what I was doing. Thank you very much.


A direct answer to your original question is to use (every? true? ...) , but for this particular problem I'd do it this way instead šŸ™‚


Hi! Newbie here running into issues when trying to run migrations from this project in lein. this works:

(load "db/migration")
(in-ns 'db.migration)
but this doesn't:
(in-ns 'db.migration)
#object[clojure.lang.Namespace 0x298f9e91 "db.migration"]
db.migration=> (migrate-up!)
CompilerException java.lang.RuntimeException: Unable to resolve symbol: migrate-up! in this context, compiling:(/private/var/folders/qx/b7z7n0r10612_85l9btz2x5w0000gn/T/form-init7653181204673703865.clj:1:1) 
is this expected? do I need to load every file in order to be able to run it?

Alex Miller (Clojure team)13:10:36

yes, without some kind of load or require, the vars are not available in the Clojure runtime

šŸ‘ 1
David Pham15:10:41

Anyone would know how to make an http request with Kerberos authentication?

David Pham15:10:05

I think I could find a way to wrap Java code to make it work, but I wondered if there was any solution that was compatible with the main http client like in clj-http or org.httpkit.client?


I think a good example to copy would be the aws-api lib from cognitect - they use their own http client which oddly I can't find the repo for, but the general idea should translate regardless of the client lib.

David Pham16:10:19

Maybe could you je more precise? I have absolutely zero knowledge in authentication


"authentication" is a very broad concept. I don't think you can really generalize it. Usually the way I break this down for a specific API is to figure out the API calls I need (usually a series of http calls that create a context with the server then acquire a token), then how to use the result (eg. attaching the the token I acquired as a payload to another http request).


oh! I think I misunderstood your question - if what you want to know is specifically about how to interact with kerberos I didn't offer anything useful


you mention wrapping the java code - that's what I'd do actually, just use a java lib for kerberos auth via interop

šŸ‘ 1

(def a [{:a "a", :price 200} {:b "b", :price 200}]) I have a vector above and I wanted to sum up the price and output is 400 Initially I thought (apply + (:price a)) should work, what am I doing wrong ?


Let's break it down into two steps. First we want to extract all the prices, then sum them together. First step: How do you go from [{:a "a", :price 200} {:b "b", :price 200}] to a list of prices?


price should sum up


(apply + (map :price a))

šŸ™Œ 1

I think I ask earlier but I cannot find the answer back. are there any good free tutorials to learn how to make a website


iā€™m long out of the game, but i remember getting me going easily.