Skip to main content

Questions tagged [clojure]

Clojure is a modern Lisp dialect for the Java Virtual Machine (with versions for the CLR and JavaScript). More than merely an implementation of Lisp in Java, Clojure provides access to Java's classes and ecosystem.

clojure
1 vote
1 answer
98 views

Syntax error macroexpanding defact, upgrading clojure 1.9 to 1.12

I'm getting the following error when upgrading from clojure 1.9 to clojure 1.12 Syntax error macroexpanding defact at (up/lib/pvm/fact.clj:23:18). Don't know how to create ISeq from: clojure.lang....
Jarrod Stone's user avatar
1 vote
0 answers
34 views

Datomic and Paramaterized :where clauses

I have this: (defn entities [entity-map] (db/q '[:find [(pull ?e pattern) ...] :in $ pattern ?primary-field :where [?e ?primary-field]] (:pattern entity-map) (:primary entity-...
Scott Klarenbach's user avatar
0 votes
0 answers
40 views

Generate aliased namespaced tags with Ctags

I'm trying to configure Universal Ctags to recognize functions imported from different namespaces with an alias. The language I'm using is Clojure (I also give an example in Javascript), so every ...
Jp_'s user avatar
  • 6,103
0 votes
1 answer
38 views

Error when trying to run ClojureScript on Windows

I try to run ClojureScript "hello-world" project on Windows 10 Home 22H2 19045.4529. I follow documentation from https://clojurescript.org/guides/quick-start and get following output: C:\...
mikeeeeeee's user avatar
2 votes
0 answers
78 views

How to fix java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine in java 21

I've a clojure project with deps.edn which uses the library clj-async-profiler My main function in the project contains the below code - (ns com.myns.cli (:gen-class) (:require [clj-async-...
user51's user avatar
  • 9,819
1 vote
2 answers
54 views

Trying to import libraries in Clojure

I have a problem with a code I am developing in Clojure: (ns problem2 (:require [cheshire.core :as json] [clojure.spec.alpha :as s] [invoice-spec])) (...
Luis Carlos Castillo Martin's user avatar
1 vote
1 answer
47 views

Not able to send post request with Content Type "x-www-form-urlencoded" with Clojure

I'm basically trying to do the following cURL command in Clojure: curl --location '<auth-url>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=...
Kim's user avatar
  • 41
1 vote
1 answer
53 views

Set Clojure CLASSPATH on Windows

I have been struggling to modify my classpath in order to import clojure modules on my Windows machine. I have already updates my environment variable through powershell but I get the same error: ...
Big Dot's user avatar
  • 11
1 vote
1 answer
66 views

GraalVM cannot find BouncyCastle provider

I've got a Clojure program that I am trying to compile into a native image using GraalVM. The program is just a main function: (defn -main [& args] (println (Signature/getInstance "EDDSA&...
RokL's user avatar
  • 2,783
1 vote
1 answer
36 views

How can I integrate pac4j with clojure ring

I'm working to build a clojure ring app and use Shiro for authn/authz. I saw pac4j can bring in OpenID Connect authentication for a lot of services. I saw there is no pac4j implementation for clojure ...
ieugen's user avatar
  • 2,305
1 vote
1 answer
66 views

How to interoperate from clojure with java varargs methods

According with docs I have to use into-array but it doesn't work. (java.nio.file.Paths/get (into-array ["myfolder" "aaa.txt"])) ; Execution error (ClassCastException) at msm.config/...
Don Tomato's user avatar
  • 3,475
0 votes
3 answers
57 views

Catch a compiler exception in macroexpand

I have an assertion that checks key correctness at compile time: (defn assert-keys [check-map valid-keys] (let [k (set (keys check-map))] (when-not (set/subset? k valid-keys) (throw (ex-...
Lars Melander's user avatar
0 votes
2 answers
45 views

How to pass list of args to variadic macro

I have a macro (I've simplified everything a lot): (defmacro m1 [error & messages] `(if ~error (str "Error: " ~@messages) (str ~@messages))) It works pretty well. But now I ...
Don Tomato's user avatar
  • 3,475
3 votes
5 answers
142 views

Clojure reduce not producing expected results

Why does the first reduce not work but the second does? The order of the comparisons should be the same... (reduce (fn [{:keys [minimum maximum]} new-number] {:minimum (if (and minimum (< ...
Antonio Smith's user avatar
0 votes
1 answer
36 views

How to require a .clj fle from another project on my local machine?

Let's say you create two projects with Leiningen (side by side in a folder called projects) with lein new ping and lein new pong. Then you implement a little function in ping\src\ping\core.clj: (defn ...
Jorge D's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
1180