Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
63 views

How can I access the main window (:stage) from a menu click event in Cljfx? I need it for two reasons: to open a file chooser, and to resize the window. A minimal example: (ns a (:require [cljfx.api ...
kamwitsta's user avatar
  • 460
0 votes
1 answer
50 views

I am having no luck calling advanceExact in various Lucene DocValues subclasses, for example: user> (.advanceExact doc-values 1) Execution error (IllegalArgumentException) at user/eval24512 (REPL:...
Ryan Tate's user avatar
  • 1,613
1 vote
1 answer
117 views

I am trying to do a few things at once with a Clojure macro but it's not working. I want to either learn how to fix it or understand why it is impossible. I want to: Create a Java interface in ...
MonkeyWithDarts's user avatar
0 votes
1 answer
95 views

I have use care where I have to process several clojure projects and find the imports of java libraries in each clojure namespace I an invoking clj-kondo from my code for each .clj file as follows: (...
user193116's user avatar
  • 3,568
1 vote
3 answers
80 views

I'm new to Clojure and learning. I'm trying to create a java Path object in Clojure using Path.of() method, but when I call this (import '(java.nio.file Path)) (Path/of "~/projects") I get ...
SimpleSample's user avatar
1 vote
1 answer
84 views

The GraalJS documentation for host access states that its enough to add the annotation @HostAccess.Export My code looks like this: (ns graaljs.core (:gen-class) (:import (org.graalvm.polyglot ...
yuner.bekir's user avatar
0 votes
2 answers
107 views

I want to ensure I'm using unboxed and unreflected arithmetic on arrays of floats, but I can't get it to compile. How can I type hint a float in a function like this? (defn ff2a ^"[F" ; ...
Jeff's user avatar
  • 45
2 votes
1 answer
198 views

(ns training-clj.querys (:require [honey.sql :as honey] [next.jdbc.sql :as jdbc])) (defn get-by-username [db username] (let [query (honey/format {:select [:*] ...
newbie's user avatar
  • 21
1 vote
1 answer
95 views

I've namespace myorg.helpers.fs-input-stream -Its definition is (ns myorg.helpers.fs-input-stream) (gen-class :name "myorg.helpers.FsInputStream" :extends java.io.ByteArrayInputStream :...
user51's user avatar
  • 10.6k
1 vote
1 answer
351 views

I couldn't find any examples online. Can anyone point me to an example of how to select data from Google BigQuery in Clojure via Java interop? [com.google.cloud/google-cloud-bigquery "2.16.0"...
Edward J. Stembler's user avatar
1 vote
2 answers
115 views

I created a new Clojure app with clojure -Tclj-new app :name myname/myapp and added the javafx deps to deps.edn org.openjfx/javafx-controls {:mvn/version "17.0.2"} org.openjfx/javafx-base {:...
keriuz's user avatar
  • 13
3 votes
1 answer
380 views

I've main clojure file - (ns main.main (:gen-class)) (defn -main "I don't do a whole lot ... yet." [& args] (println "Hello, World!")) I've build.gradle ...
user51's user avatar
  • 10.6k
0 votes
1 answer
195 views

I am new to functional programming and have a use case where I have a list of Books, I want to iterate over it, do some mapping and return a new List. My code (defn map-book [books] ((doseq [x books]...
HoppyPanda's user avatar
1 vote
0 answers
669 views

I have been getting at clojure.lang.Compiler.analyzeSeq(Compiler.java:7114) at clojure.lang.Compiler.analyze(Compiler.java:6789) at clojure.lang.Compiler.analyzeSeq(Compiler.java:7094) at ...
HoppyPanda's user avatar
1 vote
1 answer
180 views

I'm using maven with several modules, one in java, another in clojure. I'm calling a clojure function from java and want to pass in a HashMap as a parameter and return a HashMap. (I ran lein uberjar ...
Stephan Kennedy's user avatar
1 vote
1 answer
1k views

There are existing answers to similar questions, but they tend to use Maven, which is not an option for my project. Also, I have not found any which give concrete examples of the syntax you use to ...
James Strieter's user avatar
2 votes
1 answer
112 views

I found the amazing question How can I use clojure as scripting language for a Java program? which helped tremendously, but I can't figure out how to get an existing Java instance into Clojure. The ...
David Stocking's user avatar
-2 votes
2 answers
132 views

In Clojure, it is not possible to use Case forms with Vars: (case (resolve 'inc) #'inc 1) Execution error (IllegalArgumentException) at user/eval2061 (REPL:1). No matching clause: #'clojure.core/inc ...
erdos's user avatar
  • 3,603
0 votes
1 answer
139 views

I have a clojure class (a namespace with a (:gen-class) clause). I then need to pass a constructed object to a java function. this works (java_function (my-clojure-class.)) However, if I need to ...
gash's user avatar
  • 65
1 vote
0 answers
31 views

I have code block in java where I am trying to add customCodecProvider for mongo (use 'clojure.reflect 'clojure.pprint) (pprint (reflect org.bson.codecs.configuration.CodecRegistries)) { :bases #{...
arjunsv3691's user avatar
0 votes
1 answer
123 views

I am using mongo java driver along with clojure for mongo connection, to establish connection in java I am using following code snippet import com.mongodb.MongoClient; import com.mongodb....
arjunsv3691's user avatar
0 votes
0 answers
103 views

I have a project that's using Clojure + JNI in order to access some operating-system specific APIs. The native code in this process runs some of its work on background threads, and when doing so ...
Eric D's user avatar
  • 141
1 vote
0 answers
192 views

I am encountering a deserialization issue that is only showing when I run my code via a test runner. Running an assembled uberjar (with AOT compilation) does not show this behavior and neither does ...
Erp12's user avatar
  • 652
1 vote
1 answer
285 views

In Clojure, what is the best way to determine the size of a map? Import java library "java.lang.instrument.Instrumentation" and use .getObjectSize. However, the library cannot be imported. ...
madeinQuant's user avatar
  • 1,823
-1 votes
1 answer
1k views

I am trying to call some Clojure code from Java, but I get this error when trying to "require" the file: Could not locate proj/core__init.class, proj/core.clj or proj/core.cljc on classpath. ...
Ghosty Frosty's user avatar
1 vote
0 answers
86 views

I have been using ubergraph last few weeks up until this morning, but now am having compiling problem. In my project.clj's dependencies, ubergraph is declared: (defproject graph-alg "0.1.0-...
freebirds's user avatar
0 votes
1 answer
145 views

I am trying to create a simple clojurescript which'll display the width of the browser window. My app.cljs look like the following: (ns acme.frontend.app (:use [jayq.core :only [$]]) (:require-macros [...
user3570501's user avatar
0 votes
0 answers
53 views

Package Clojure and Java(springboot) source codes into a JAR file with leiningen i run lein uberjar , so it happen enter image description here
big dong's user avatar
2 votes
0 answers
258 views

I am working on an Android app which makes use of Clojure for carrying out some of the computation in the backend. However, I am unable to figure out a way to invoke my Clojure methods in Android. My ...
Delarge's user avatar
  • 21
1 vote
1 answer
243 views

In some of my testing I am comparing json result between some http calls, today I am just comparing strings, which is too naive and not reliable for example if order changes. Can you please recommend ...
ohassidi's user avatar
0 votes
3 answers
178 views

I have a small function used for debugging: (set! *warn-on-reflection* true) (defn debug [x] (doto x (->> println :>))) When I call my function in a loop, I get the following reflection ...
erdos's user avatar
  • 3,603
7 votes
2 answers
734 views

The following example function, which uses Clojure's special form for java interop to call a class constructor, causes a reflection warning: (defn test-reflection-err [] (new java.util.HashMap {})) ...
fraxture's user avatar
  • 5,594
2 votes
2 answers
2k views

People, I decided to rewrite this post entirely to show it in a clear way. First of all, thanks for all the support. I appreciate that. This is the exercise in "The Clojure Workshop - Packt" ...
Claudio Ferreira's user avatar
2 votes
2 answers
541 views

I want to use Clojure code in my Java application: ; clj.clj (ns utils (:gen-class :name clj.Clj :methods [#^{:static true} [clj [] String]]) (defn -clj [] "Hello from Clojure!")...
Loading BG's user avatar
2 votes
1 answer
113 views

Imagine, I've a Clojure function similar to that one (defn ABC [tag v] (let [value (->> (str/split v #",") (map str/trim) (map u/capitalize) ...
FoxyBOA's user avatar
  • 5,836
3 votes
2 answers
919 views

Hi Currently I am using java.data (https://github.com/clojure/java.data) to convert java pojos to clojure compatible types. It does not work for nested objects. For ex: class Abc { Map<String, ...
ppp456878's user avatar
  • 165
1 vote
1 answer
264 views

is it possible to proxy a class like this and override both methods? public abstract class C { ... public abstract void m(String a); public void m(Integer a) {} } this doesn't work: (proxy [C] [...
estolua's user avatar
  • 676
6 votes
1 answer
3k views

I'm very new to all things JVM and want to start a Java project that involves a Clojure library as a dependency. I've seen this question on how to run Clojure code from Java, but when I try to run the ...
Alex Eftimiades's user avatar
1 vote
3 answers
1k views

I am newbie to Clojure. I am invoking Clojure function using java and I want to record the time a particular line of clojure code execution takes: Suppose if my clojure function is: (defn ...
ppp456878's user avatar
  • 165
1 vote
1 answer
692 views

Something is puzzling me after reading the this great answer to a related question: There are two possibilities to share a function that I wrote in Clojure with Java developers The first one is ...
Jorge D's user avatar
  • 43
1 vote
2 answers
176 views

In my Java library I have a function void f(Integer[][] grid) { and I want to call it from Clojure (f (to-array-2d [[1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1] [0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0]...
interstar's user avatar
  • 27.5k
1 vote
2 answers
388 views

I can do the following and it works... => (. java.awt.event.KeyEvent getKeyText 10) "Enter" But, I have an instance of java.awt.event.KeyEvent called ev. For example, => (class ev) java.awt....
Joel M's user avatar
  • 381
0 votes
1 answer
106 views

I'm trying to create a scripting language that compiles to Clojure, to then run it on the JVM. Each individual script, in the same JVM instance, but in an isolated manner. Yet, when I see the ...
caeus's user avatar
  • 3,794
0 votes
1 answer
102 views

I was exploring Clojure java.jmx API Reference and trying the examples mentioned there e.g. ;; Can I serve my own beans? Sure, just drop a Clojure ref ;; into an instance of clojure.java.jmx.Bean, ...
Nikita Fedyashev's user avatar
3 votes
1 answer
754 views

I am writing Clojure code interacting with external Java library. One of the method returns Java Optional object. Let's assume that it returns Optional<String> and I need to change the string ...
ntalbs's user avatar
  • 29.6k
0 votes
1 answer
482 views

I have files which are created via clojure frontendapp.jar backendapp.jar and take an environment variable, APP_PORT What I want to understand is how do I pass variables to the jar files so that ...
user3700919's user avatar
2 votes
1 answer
182 views

Twilio docs for Java lib MVN for this lib I'm trying to use Twilio from Clojure. Pretty new to Clojure dev, so I'm trying to get to grips with importing libs, in general. My project.clj looks ...
Matt Lally's user avatar
1 vote
0 answers
290 views

Twilio docs for Java lib MVN for this lib I'm trying to use Twilio from Clojure. Pretty new to Clojure dev, so I'm trying to get to grips with importing libs, in general. My project.clj: (...
Matt Lally's user avatar
1 vote
0 answers
168 views

I followed this example Insta Declarative DSL where we use Clara with instaparse to use a DSL and generate rules. everything works for me as expected but one issue. I am not able to access the ...
Kural Manivannan's user avatar
0 votes
1 answer
454 views

I am newbie with Clojure and I am trying to print EDN output to valid JSON format using Cheshire custom encoder for classes defined in java. My EDN file: {:xyz #XyzBuilder "testString"} Clojure code: ...
ppp456878's user avatar
  • 165

1
2 3 4 5 6