<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Search results for goedkope fc points besuche die website buyfc26coins.com. einfach und unkompliziert, super..zypn</title>
<link>https://ask.clojure.org/index.php/search?q=goedkope+fc+points+besuche+die+website+buyfc26coins.com.+einfach+und+unkompliziert%2C+super..zypn</link>
<description></description>
<item>
<title>Literals for Unicode code points (and perhaps also sequences thereof)</title>
<link>https://ask.clojure.org/index.php/14875/literals-unicode-code-points-perhaps-also-sequences-thereof?show=14875#q14875</link>
<description>&lt;p&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.oracle.com/technical-resources/articles/javase/supplementary.html&quot;&gt;For historical reasons&lt;/a&gt; the JVM type system's support for Unicode code points is poor, and while this is usually invisible to the developer it becomes a hassle when String literals containing non-Latin1 code points are used in code.  It also becomes particularly problematic when cross-platform (cljc) code is attempting to do this, since other platforms may not share this historical oddity so solutions that &quot;work&quot; in ClojureJVM may break in other dialects.&lt;/p&gt;
&lt;p&gt;For example, the &lt;a rel=&quot;nofollow&quot; href=&quot;https://emojipedia.org/transgender-flag#technical&quot;&gt;transgender flag emoji&lt;/a&gt; (a single grapheme cluster that happens to be defined by 5 Unicode code points) cannot easily be constructed at the REPL or in a source file without detailed knowledge of the JVM's history (and associated knowledge of UTF-16, an increasingly obsolete character encoding).&lt;/p&gt;
&lt;p&gt;Using the documented code points for this grapheme cluster with the JVM's Unicode escaping mechanism does &lt;em&gt;not&lt;/em&gt; give the expected outcome:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/gM2XsWBG/Screenshot-2026-01-12-at-11-13-38-AM.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The correct, but unintuitive solution is to remember that the JVM does not directly support Unicode code points in the supplemental planes, and then to translate the supplemental code point &lt;code&gt;U+1F3F3&lt;/code&gt; into its UTF-16 code unit / surrogate pair representation:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/60b1ZLXh/Screenshot-2026-01-12-at-11-15-56-AM.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Note: I had to use screenshots for this, since ask.clojure doesn't appear to support Unicode supplemental code points properly either...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Question/request/proposal&lt;/strong&gt;&lt;br&gt;
Clojure can sidestep this issue in a purely accretive manner, providing better consistency across the JVM and other runtimes, by adding direct support for Unicode literals.&lt;/p&gt;
&lt;p&gt;This would involve adding a new literal syntax that represents a single Unicode code point, and perhaps also a new literal syntax that represents a sequence of Unicode code points (perhaps supporting not only the novel Unicode code point literal, but also the existing Character and String literals).  Both of these new literals would produce a standard JVM (or JavaScript, or ...) String object, in whatever native encoding those objects employ on their respective platforms - after such literals are read, it's all just the extant String data type - there is no runtime impact.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;An &lt;em&gt;example&lt;/em&gt; literal syntax&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;While I am not proposing a specific syntax for these new literals here (though such a task is a necessary step), for illustrative purposes here is an example of what these literals &lt;em&gt;might&lt;/em&gt; approximately look like:&lt;/p&gt;
&lt;p&gt;Single Unicode code point literals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;#U+0061&lt;/code&gt;: produces a String containing the Latin letter a: &lt;code&gt;&quot;a&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#U+1F921&lt;/code&gt;: produces a String containing &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.compart.com/en/unicode/U+1F921&quot;&gt;the clown emoji&lt;/a&gt; (which ask.clojure cannot display)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sequences of Unicode code point literals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;#U+[U+0061 U+0020 U+1F921]&lt;/code&gt;: produces the 3 grapheme cluster String: &lt;code&gt;&quot;a &amp;lt;clown emoji&amp;gt;&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#U+[&quot;a &quot; U+1F921]&lt;/code&gt;: produces the same String, but demonstrates why it may be useful to support a mix of literals within the sequence (for readability)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#U+[\a \space U+1F921]&lt;/code&gt;: ditto&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#U+[U+1F3F3 U+FE0F U+200D U+26A7 U+FE0F]&lt;/code&gt;: produces a String containing a single grapheme cluster (the transgender flag emoji)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This final example is an ideal test case, since the transgender flag emoji is a single Unicode grapheme cluster, defined by 5 Unicode code points, but on the JVM (for the historical reason listed originally) is made up of &lt;em&gt;6&lt;/em&gt; Characters.&lt;/p&gt;
&lt;p&gt;Note that the sequence literal may not be necessary, since &lt;code&gt;str&lt;/code&gt; could be used with the single code point literal syntax; e.g. &lt;code&gt;(str #U+1F3F3 #U+FE0F #U+200D #U+26A7 #U+FE0F)&lt;/code&gt;.  Whether shifting the cost of string concatenation from read-time to runtime matters or not is another topic worthy of deeper consideration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other notes&lt;/strong&gt;&lt;br&gt;
Orthogonal to this proposal (at least from a Clojure core perspective; from a user perspective they're closely related), it would also be useful if Clojure core (perhaps in the &lt;code&gt;clojure.string&lt;/code&gt; namespace) had functions to turn Strings into sequences of code points (as integers) and vice versa.  Both the JVM and JavaScript provide native APIs for doing this (and presumably other platforms do too), but providing these as standard functions in Clojure core (similar to what was done with &lt;code&gt;parse-long&lt;/code&gt;, &lt;code&gt;parse-double&lt;/code&gt;, and &lt;code&gt;parse-boolean&lt;/code&gt; in Clojure v1.11) has value and is also purely accretive.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14875/literals-unicode-code-points-perhaps-also-sequences-thereof?show=14875#q14875</guid>
<pubDate>Mon, 12 Jan 2026 20:02:41 +0000</pubDate>
</item>
<item>
<title>proxy-super is not threadsafe, it should be made safe or documented to be unsafe</title>
<link>https://ask.clojure.org/index.php/3352/proxy-super-threadsafe-should-made-safe-documented-unsafe?show=3352#q3352</link>
<description>&lt;p&gt;Coming from java you might expect proxy-super to be pretty innocuous, but proxy-super operates by mutating the proxy object then restoring it after the call to proxy-super is invoked. This can lead to very weird behavior. If you have a proxy with method M, which invokes proxy-super, then while that proxy-super is running all calls to M on that proxy object will immediately invoke the super M not the proxied M.  &lt;/p&gt;
&lt;p&gt;Actually making proxy-super safe (not just threadsafe, but also safe when invoked later on in the same callstack) seems like it might be really hard, but it would be nice. Alternatively some blinking hazard lights in the docstring might be a good idea.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/3352/proxy-super-threadsafe-should-made-safe-documented-unsafe?show=3352#q3352</guid>
<pubDate>Wed, 05 Jul 2017 17:43:53 +0000</pubDate>
</item>
<item>
<title>clojure.java.data/from-java throws stack overflow</title>
<link>https://ask.clojure.org/index.php/14379/clojure-java-data-from-java-throws-stack-overflow?show=14379#q14379</link>
<description>&lt;p&gt;I use the following function to get scrollpoints from a  client io.qdrant.client.QdrantClient&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client ...) =&amp;gt; io.qdrant.client.QdrantClient

(defn make-scroll-points [collection-name k v]
  (builder/to-java Points$ScrollPoints
                   Points$ScrollPoints$Builder
                   (Points$ScrollPoints/newBuilder)
                   {:collectionName collection-name
                    :filter (builder/to-java Points$Filter
                                             Points$Filter$Builder
                                             (Points$Filter/newBuilder)
                                             {:addMust (ConditionFactory/matchKeyword (name k) (str v))}
                                             {})
                    :limit 1
                    :withPayload (WithPayloadSelectorFactory/enable true)}
                   {}))

(def scroll-points (qdrant/make-scroll-points  &amp;lt;collection-name&amp;gt; :user &quot;user-1&quot;))

(def scrolled (.get (.scrollAsync client scroll-points)))
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;(bean scrolled)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;works,  but when i do&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.java.data/from-java scrolled)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get a stackoverflow error&lt;/p&gt;
</description>
<category>java.data</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14379/clojure-java-data-from-java-throws-stack-overflow?show=14379#q14379</guid>
<pubDate>Mon, 10 Feb 2025 10:39:57 +0000</pubDate>
</item>
<item>
<title>Does Clojure have an anti LLM code contributions policy? Would it make sense for Clojure to adopt one?</title>
<link>https://ask.clojure.org/index.php/15004/clojure-contributions-policy-would-make-sense-clojure-adopt?show=15004#q15004</link>
<description>&lt;p&gt;LLM use appears to have a bunch of ethical and practical problems, the most pressing one seems to be the plagiarism that seems to be pretty excessive even for code and even when not baited:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mastodon/mastodon/issues/38072#issuecomment-4105681567&quot;&gt;Video clip of apparently a lawyer live demoing what seems to be Co-Pilot plagiasm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don't know anything about law, but the lawyer at one point says: &quot;This is a copyright infringement.&quot; I've also found this: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.twobirds.com/en/insights/2025/landmark-ruling-of-the-munich-regional-court-(gema-v-openai)-on-copyright-and-ai-training&quot;&gt;https://www.twobirds.com/en/insights/2025/landmark-ruling-of-the-munich-regional-court-(gema-v-openai)-on-copyright-and-ai-training&lt;/a&gt; It seems to talk about &quot;fair use&quot; of AI model training.&lt;/p&gt;
&lt;p&gt;Also see this high-profile incident: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pcgamer.com/software/ai/microsoft-uses-plagiarized-ai-slop-flowchart-to-explain-how-github-works-removes-it-after-original-creator-calls-it-out-careless-blatantly-amateuristic-and-lacking-any-ambition-to-put-it-gently/&quot;&gt;https://www.pcgamer.com/software/ai/microsoft-uses-plagiarized-ai-slop-flowchart-to-explain-how-github-works-removes-it-after-original-creator-calls-it-out-careless-blatantly-amateuristic-and-lacking-any-ambition-to-put-it-gently/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also this field study that appears to be putting the plagiarism rate at seemingly at least 2-5%: &lt;a rel=&quot;nofollow&quot; href=&quot;https://dl.acm.org/doi/10.1145/3543507.3583199&quot;&gt;https://dl.acm.org/doi/10.1145/3543507.3583199&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This article mentions a study that apparently puts the plagiarism rate at 8–15% as a minimum for the easily detectable kind: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.theatlantic.com/technology/2026/01/ai-memorization-research/685552/&quot;&gt;https://www.theatlantic.com/technology/2026/01/ai-memorization-research/685552/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don't know what this means legally, but at least morally and ethically this seems sad.&lt;/p&gt;
&lt;p&gt;Apparently, some people in the Clojure space already spoke out against LLMs, but I wasn't able to find any anti LLM policy. If there was such a policy, I would expect it to be mentioned in the following places:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/dev/developing_patches&quot;&gt;https://clojure.org/dev/developing_patches&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/community/contributing&quot;&gt;https://clojure.org/community/contributing&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I simply wanted to suggest that perhaps the project may want to adopt such a policy.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here are some other projects that have already done so: &lt;a rel=&quot;nofollow&quot; href=&quot;https://asahilinux.org/docs/project/policies/slop/&quot;&gt;Asahi Linux&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.elementary.io/contributor-guide/development/generative-ai-policy&quot;&gt;elementaryOS&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeberg.org/forgejo/governance/src/commit/19ef60442456b92156a242ad1bbc1bcda98bef3b/AIAgreement.md#agreement&quot;&gt;Forgejo&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://gitlab.gnome.org/World/gedit/gedit/-/blob/master/docs/guidelines/no-llm-tools.md?ref_type=heads&quot;&gt;Gedit&lt;/a&gt;,  &lt;a rel=&quot;nofollow&quot; href=&quot;https://wiki.gentoo.org/wiki/Project:Council/AI_policy&quot;&gt;Gentoo&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://gitlab.gnome.org/GNOME/gimp/-/blob/master/.gitlab/merge_request_templates/default.md?plain=1#L11-12&quot;&gt;GIMP&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CODE_OF_CONDUCT.md#code-of-conduct&quot;&gt;GoToSocial&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/love2d/love/commit/147d39251c2618852c026f8cadf95f0ffd6a746f&quot;&gt;Löve2D&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://discourse.gnome.org/t/loupe-no-longer-allows-generative-ai-contributions/27327&quot;&gt;Loupe&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.netbsd.org/developers/commit-guidelines.html&quot;&gt;NetBSD&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.postmarketos.org/policies-and-processes/development/contributing-and-ai.html&quot;&gt;postmarketOS&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-generated-content&quot;&gt;Qemu&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://gitlab.redox-os.org/redox-os/redox/-/blob/master/CONTRIBUTING.md#ai-policy&quot;&gt;RedoxOS&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://book.servo.org/contributing/getting-started.html#ai-contributions&quot;&gt;Servo&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/nothings/stb/blob/master/CONTRIBUTING.md#ai-and-llm-are-forbidden&quot;&gt;stb libraries&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://ziglang.org/code-of-conduct/#strict-no-llm-no-ai-policy&quot;&gt;Zig&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My deepest apologies if there already is such a policy, or if I'm asking in the wrong space.&lt;/p&gt;
</description>
<category>Meta</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15004/clojure-contributions-policy-would-make-sense-clojure-adopt?show=15004#q15004</guid>
<pubDate>Sun, 29 Mar 2026 13:14:25 +0000</pubDate>
</item>
<item>
<title>Create a vector with a non-`get` IFn</title>
<link>https://ask.clojure.org/index.php/14325/create-a-vector-with-a-non-get-ifn?show=14325#q14325</link>
<description>&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Create a new flavor of vector that is identical to the built-in vector, except when invoked, uses a different function (a variadic function defined by me, but &lt;code&gt;concat&lt;/code&gt; is a good stand-in for demonstration purposes) instead of &lt;code&gt;get&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Invoking a built-in vector implies &lt;code&gt;get&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def A (vector :a :b :c))
(get A 1) ;; =&amp;gt; :b
(A 1) ;; =&amp;gt; :b
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No matter what we create to accomplish this task, the standard vector should behave exactly as before.&lt;/p&gt;
&lt;p&gt;The new flavor of vector would behave ever-so-slightly differently. First, some example definitions using a new function, &lt;code&gt;foo-vector&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def B (foo-vector :a :b :c)) ;; =&amp;gt; [:a :b :c]
(def C (foo-vector 'foo 'bar 'baz)) ;; =&amp;gt; ['foo 'bar 'baz]
(def D (foo-vector 42 99)) ;; =&amp;gt; [42 99]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All the usual functions work as before, because, for the most part, they are Clojure vectors.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(first B) ;; =&amp;gt; :a
(get C 1) ;; =&amp;gt; 'bar
(count D) ;; =&amp;gt; 2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The only difference would appear when a &quot;foo-vector&quot; is invoked: Instead of an implied &lt;code&gt;get&lt;/code&gt;, it's an implied &lt;code&gt;concat&lt;/code&gt; (or some other variadic function, but &lt;code&gt;concat&lt;/code&gt; works well for discussion).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(B C D) ;; =&amp;gt; [:a :b :c 'foo 'bar 'baz 42 99]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bonus points: Regular vectors and &quot;foo-vectors&quot; containing the same values would satisfy 'equals'.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(= (vector 1 2 3) (foo-vector 1 2 3)) ;; =&amp;gt; true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In all respects, &quot;foo-vectors&quot; &lt;code&gt;B&lt;/code&gt;, &lt;code&gt;C&lt;/code&gt;, and &lt;code&gt;D&lt;/code&gt; &lt;em&gt;are&lt;/em&gt; vectors, with the exception that when appearing as the first element of a list (i.e., in the function position), an alternative function is called (in our example, &lt;code&gt;concat&lt;/code&gt;) instead of &lt;code&gt;get&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Question: What does &lt;code&gt;foo-vector&lt;/code&gt; look like to create this new flavor of vector?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I do not know where to begin researching this problem other than regurgitating terms like &lt;code&gt;IFn&lt;/code&gt;, &lt;code&gt;deftype&lt;/code&gt;, &lt;code&gt;extends&lt;/code&gt;, etc. I greatly appreciate any help.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14325/create-a-vector-with-a-non-get-ifn?show=14325#q14325</guid>
<pubDate>Thu, 02 Jan 2025 07:25:05 +0000</pubDate>
</item>
<item>
<title>How to persist Clojure data structures to disk?</title>
<link>https://ask.clojure.org/index.php/14203/how-to-persist-clojure-data-structures-to-disk?show=14203#q14203</link>
<description>&lt;p&gt;Hello,&lt;br&gt;
I'm building a web crawler in Clojure that records its results in a map of maps. The data structure basically looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{&quot;https://example.org&quot; {:base-url &quot;https://example.org&quot;
                        :crawled {&quot;/blog&quot; {:relevant true :status 200}
                                  &quot;/contact&quot; {:relevant false :status 200}}
 &quot;https://foo.com&quot; {:base-url &quot;https://foo.com&quot;
                    :crawled {&quot;/home&quot; {:relevant true :status 200}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The web crawler is feed with a list of websites. However, for the sake of efficiency I want to avoid crawling already crawled websites. Therefore, I was looking for a way to persist the above data structure so that it can be consulted in subsequent runs to check if a given website was already crawled. (Of course, I have other reasons to store the results too, e.g. to do various analysis on the captured data)&lt;/p&gt;
&lt;p&gt;First, I thought &lt;strong&gt;EDN&lt;/strong&gt; would be a perfect solution. To my surprise, &lt;code&gt;clojure.edn&lt;/code&gt; does not have &lt;code&gt;write&lt;/code&gt; functions. A lot of advice online says to use &lt;code&gt;pr-str&lt;/code&gt;. However, using &lt;code&gt;pr-str&lt;/code&gt; has caveats as pointed out in &lt;a rel=&quot;nofollow&quot; href=&quot;https://nitor.com/en/articles/pitfalls-and-bumps-clojures-extensible-data-notation-edn&quot;&gt;https://nitor.com/en/articles/pitfalls-and-bumps-clojures-extensible-data-notation-edn&lt;/a&gt; (e.g. possbile truncations when &lt;em&gt;print-length&lt;/em&gt; is set). And it's totally possible to generate invalid edn as pointed out in this comment by @alexmiller: &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/10278/should-pr-str-on-a-function-produce-valid-edn-syntax?show=10282#c10282&quot;&gt;https://ask.clojure.org/index.php/10278/should-pr-str-on-a-function-produce-valid-edn-syntax?show=10282#c10282&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Despite &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojuredocs.org/clojure.edn&quot;&gt;https://clojuredocs.org/clojure.edn&lt;/a&gt; claiming that it is &quot;designed to be used in a similar way to JSON or XML&quot; I have the impression it is more geared towards writing edn files by hand (i.e. configuration files).&lt;/p&gt;
&lt;p&gt;Looking for alternatives, I stumbled upon Transit. However, its mainly intended &quot;as a wire protocol for transferring data between applications&quot;. And the README further says&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If storing Transit data durably, readers and writers are expected to use the same version of Transit and you are responsible for migrating/transforming/re-storing that data when and if the transit format changes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because in Clojure, data is code and code is data and because of the existence of EDN, I really thought persisting simple data structures like the above would be a breeze in Clojure. &lt;/p&gt;
&lt;p&gt;Instead I see these sub-optimal options with my current knowledge:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hope that &lt;code&gt;pr-str&lt;/code&gt; produces valid EDN without loss in my particular case&lt;/li&gt;
&lt;li&gt;Build a custom XML serialization&lt;/li&gt;
&lt;li&gt;Use Transit&lt;/li&gt;
&lt;li&gt;Use JSON?! (what about keywords etc.?!)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is there a more idiomatic way to store and read back in simple Clojure data structures?&lt;/p&gt;
</description>
<category>Collections</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14203/how-to-persist-clojure-data-structures-to-disk?show=14203#q14203</guid>
<pubDate>Tue, 22 Oct 2024 08:45:52 +0000</pubDate>
</item>
<item>
<title>fn? and multimethods</title>
<link>https://ask.clojure.org/index.php/14169/fn-and-multimethods?show=14169#q14169</link>
<description>&lt;p&gt;The docstring for &lt;code&gt;clojure.core/fn?&lt;/code&gt; says &quot;Returns true if x implements Fn, i.e. is an object created via fn.&quot;, defined in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/10541c0254973ce045305499d4b5622073ede622&quot;&gt;this commit from 2008&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Multimethods semantically act as functions. They're not collections (maps), they're not pieces of data that work like functions for ease (keywords), they're procedures with behavior and input and output. Protocol methods semantically act like functions as well. However, multimethods don't respond to &lt;code&gt;fn?&lt;/code&gt; because they don't implement &lt;code&gt;clojure.lang.Fn&lt;/code&gt;, they implement &lt;code&gt;clojure.lang.AFn&lt;/code&gt;, whereas protocol methods do respond to &lt;code&gt;fn?&lt;/code&gt; because they are created with &lt;code&gt;fn*&lt;/code&gt; in the &lt;code&gt;defprotocol&lt;/code&gt; macro.&lt;/p&gt;
&lt;p&gt;This has led to confusion in my code where I have a sequence of function-like objects and in certain cases I want to select only the &quot;semantically function&quot; objects. It has forced me to write &lt;code&gt;fn+?&lt;/code&gt; which is implemented as &lt;code&gt;(or (fn? x) (instance? clojure.lang.MultiFn x))&lt;/code&gt;. Now, having written it, it works fine and my immediate problem is solved. However, I think this points to an underlying semantic mismatch between multimethods and their implementation.&lt;/p&gt;
&lt;p&gt;It would benefit me and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/marick/suchwow/blob/111cd4aa21ee23552742701bfe52e593b65fb0f8/src/such/types.clj#L30-L33&quot;&gt;others&lt;/a&gt; to have this mismatch cleaned up.&lt;/p&gt;
</description>
<category>Multimethods</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14169/fn-and-multimethods?show=14169#q14169</guid>
<pubDate>Mon, 07 Oct 2024 21:25:33 +0000</pubDate>
</item>
<item>
<title>Namespace starting with `com` broken in graaljs replenv</title>
<link>https://ask.clojure.org/index.php/4930/namespace-starting-with-com-broken-in-graaljs-replenv?show=4930#q4930</link>
<description>With graal installed:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ java -version &lt;br /&gt;
openjdk version &amp;quot;1.8.0_212&amp;quot;&lt;br /&gt;
OpenJDK Runtime Environment (build 1.8.0_212-20190420112649.buildslave.jdk8u-src-tar--b03)&lt;br /&gt;
OpenJDK GraalVM CE 19.0.0 (build 25.212-b03-jvmci-19-b01, mixed mode)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version &amp;quot;1.10.520&amp;quot;}}}' -m cljs.main -re graaljs&lt;br /&gt;
ClojureScript 1.10.520&lt;br /&gt;
cljs.user=&amp;gt; (ns com.foo)&lt;br /&gt;
&lt;br /&gt;
com.foo=&amp;gt; (defn bar [])&lt;br /&gt;
#'com.foo/bar&lt;br /&gt;
com.foo=&amp;gt; (bar)&lt;br /&gt;
Execution error (Error) at (&amp;lt;cljs repl&amp;gt;:1).&lt;br /&gt;
(intermediate value).foo.bar.call is not a function&lt;br /&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4930/namespace-starting-with-com-broken-in-graaljs-replenv?show=4930#q4930</guid>
<pubDate>Wed, 15 May 2019 14:15:41 +0000</pubDate>
</item>
<item>
<title>How to access non-jar artifacts (aar, zip) downloaded via tools.deps in build.clj?</title>
<link>https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build?show=14862#q14862</link>
<description>&lt;p&gt;I want to access an aar/zip artifact in build.clj that's already downloaded via deps.edn:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps
 {com.newrelic.agent.android/android-agent {:local/root &quot;build/jars/android-agent.jar&quot;
                                            :doc        &quot;extracted from aar&quot;}
  com.newrelic.agent.java/newrelic-api     {:local/root &quot;build/jars/newrelic-api.jar&quot;
                                            :doc        &quot;extracted from newrelic-java.zip&quot;}}
 :aliases
 {:build {:deps       {io.github.clojure/tools.build            {:mvn/version &quot;0.10.11&quot;}
                       com.newrelic.agent.java/newrelic-java    {:mvn/version &quot;8.25.1&quot;
                                                                 :extension   &quot;zip&quot;}
                       com.newrelic.agent.android/android-agent {:mvn/version &quot;7.6.14&quot;
                                                                 :extension   &quot;aar&quot;}}
          :ns-default build}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In build.clj I need to unpack this zip and extract a jar from it.&lt;br&gt;
And I don't have to hardcode .m2 paths or duplicate the version.&lt;/p&gt;
&lt;p&gt;How can it be done?&lt;/p&gt;
&lt;p&gt;See &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.deps/blob/46661e929ab702d0ee532188edb58d06b39cef6c/src/main/clojure/clojure/tools/deps/extensions/maven.clj#L172&quot;&gt;https://github.com/clojure/tools.deps/blob/46661e929ab702d0ee532188edb58d06b39cef6c/src/main/clojure/clojure/tools/deps/extensions/maven.clj#L172&lt;/a&gt;&lt;/p&gt;
</description>
<category>tools.deps</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14862/how-access-non-jar-artifacts-aar-downloaded-tools-deps-build?show=14862#q14862</guid>
<pubDate>Wed, 24 Dec 2025 08:55:46 +0000</pubDate>
</item>
<item>
<title>Is taggedliteral's equality check inefficient?</title>
<link>https://ask.clojure.org/index.php/15002/is-taggedliterals-equality-check-inefficient?show=15002#q15002</link>
<description>&lt;p&gt;Following on from a very interesting article about tagged literals: &lt;a rel=&quot;nofollow&quot; href=&quot;https://buttondown.com/tensegritics-curiosities/archive/when-you-run-out-of-types/&quot;&gt;https://buttondown.com/tensegritics-curiosities/archive/when-you-run-out-of-types/&lt;/a&gt; I noticed that the implementing class checks for value equality before checking for tag equality.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (form != null ? !form.equals(that.form) : that.form != null) return false;
if (tag != null ? !tag.equals(that.tag) : that.tag != null) return false;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This leads to the following type of comparison that could be answered immediately but instead takes over a second:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;impl=&amp;gt; (time (= (tagged-literal 'foo (seq (range 1e7))) (tagged-literal 'bar (butlast (seq (range 1e7))))))
&quot;Elapsed time: 1911.677375 msecs&quot;
false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;it checks if these huge seqs are equal and then compares the associated symbols. Swapping this seems identical semantically but with less computation.&lt;/p&gt;
</description>
<category>Records and Types</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15002/is-taggedliterals-equality-check-inefficient?show=15002#q15002</guid>
<pubDate>Fri, 27 Mar 2026 13:43:44 +0000</pubDate>
</item>
<item>
<title>Support for automatic promotion to BigDecimal in +', *', etc.</title>
<link>https://ask.clojure.org/index.php/14752/support-for-automatic-promotion-to-bigdecimal-in-etc?show=14752#q14752</link>
<description>&lt;p&gt;Is there support for BigDecimal promotion in the &lt;code&gt;+'&lt;/code&gt;, &lt;code&gt;*'&lt;/code&gt;, etc. &lt;code&gt;clojure.core&lt;/code&gt; functions?&lt;/p&gt;
&lt;p&gt;When I run the following code in the REPL:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(* 2 Double/MAX_VALUE)     ;; ##Inf, Doesn't auto-promote as was expected.
(*' 2 Double/MAX_VALUE)    ;; ##Inf, Expected that it would auto promote.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Following cases also didn't work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(*' Double/MAX_VALUE 2)        ;; ##Inf, Moving around the arguments.
(*' 2.0 Double/MAX_VALUE)      ;; ##Inf, Using a Double literal instead.
(*' Double/MAX_VALUE 2.0)      ;; ##Inf
(*' Double/MAX_VALUE 2.0M)     ;; ##Inf, Using a BigDecimal literal instead.
(*' 2.0M Double/MAX_VALUE)     ;; ##Inf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I decided to check the Clojure compiler source for promotion, and based on my limited understanding of the code I see that &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L634&quot;&gt;DoubleOps&lt;/a&gt; is using the implementation of &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L76&quot;&gt;addP&lt;/a&gt; of &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L75&quot;&gt;OpsP&lt;/a&gt; abstract class (which just calls the normal &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L671&quot;&gt;add&lt;/a&gt; function)  while there is one present for &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L449&quot;&gt;LongOps&lt;/a&gt; which can be found &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/6a4ba6aedc8575768b2fff6d9c9c7e6503a0a93a/src/jvm/clojure/lang/Numbers.java#L494&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Is this a bug? And if yes, I would like to work on the fix and I'll check the &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/dev/dev&quot;&gt;Development&lt;/a&gt; page of Clojure to do the needfull.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14752/support-for-automatic-promotion-to-bigdecimal-in-etc?show=14752#q14752</guid>
<pubDate>Mon, 10 Nov 2025 04:15:47 +0000</pubDate>
</item>
<item>
<title>`find` docstring enhancement proposal</title>
<link>https://ask.clojure.org/index.php/14828/find-docstring-enhancement-proposal?show=14828#q14828</link>
<description>&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/b4ea0f824b2eea039dfc06b796ed601e35cbeab6/src/clj/clojure/core.clj#L1550&quot;&gt;docstring&lt;/a&gt; for &lt;code&gt;clojure.core/find&lt;/code&gt; states&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Returns the map entry for key, or nil if key not present.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Formatted lower-cased with a space, it is not immediately apparent that 'map entry' is a term of art referring to a specific thing. 'map entry' might be mis-interpreted as a casual synonym for 'the entry of a map associated to a key', i.e., the value.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proposal #1&lt;/strong&gt;&lt;br&gt;
Reword the &lt;code&gt;find&lt;/code&gt; docstring to be more precise about what is returned.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Returns a clojure.lang.MapEntry containing key and the associated value, or nil if key not present.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Proposal #2&lt;/strong&gt;&lt;br&gt;
If you don't want to make a &lt;a rel=&quot;nofollow&quot; href=&quot;https://groups.google.com/g/clojure/c/FVcrbHJpCW4/m/Fh7NsX_Yb7sJ&quot;&gt;commitment&lt;/a&gt; to returning a MapEntry, reword to&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Returns a sequential collection containing key and the associated value, or nil if key not present.&lt;/code&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14828/find-docstring-enhancement-proposal?show=14828#q14828</guid>
<pubDate>Thu, 11 Dec 2025 12:41:48 +0000</pubDate>
</item>
<item>
<title>[clojure.edn] Leading zeros in numbers</title>
<link>https://ask.clojure.org/index.php/14798/clojure-edn-leading-zeros-in-numbers?show=14842#a14842</link>
<description>&lt;p&gt;clojure.edn allow leading zeros ending up reading such number as octal representation. The problem is that it is also allowed to have indefinite amount of leading zeros for octals:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;000000000000042  ;; =&amp;gt; 34
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and when there is a suffix &quot;M&quot; that forces floating point representation the same string become float 42 stripping all leading zeros.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;000000000000042M ;; =&amp;gt; 42M
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At the same time EDN specification forbids integers with leading zeros at all even for floats.&lt;br&gt;
I found a ticket about leading zeros in data.json but I think it should be expanded to cover clojure as well.&lt;/p&gt;
&lt;p&gt;In the same scope but origin is in the EDN spec:&lt;br&gt;
float specification allows leading zeroes in exponent and only zeros in fractional parts:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;0.00000000...00
0.0e0001
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;probably because of that clojure.edn read such numbers without error too. &lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14798/clojure-edn-leading-zeros-in-numbers?show=14842#a14842</guid>
<pubDate>Thu, 04 Dec 2025 13:31:23 +0000</pubDate>
</item>
<item>
<title>a) how: programmatically set REPL ‘context’ ‘prj-1 aware’? b) how: programmatically switch REPL ‘context’ ‘prj-n aware’?</title>
<link>https://ask.clojure.org/index.php/14422/programmatically-context-programmatically-switch-context?show=14422#q14422</link>
<description>&lt;p&gt;Ok, regardless of editor, running &lt;em&gt;clj&lt;/em&gt; in a directory will start a repl that has &quot;project context&quot; to project deps.edn in &lt;em&gt;that&lt;/em&gt; directory, and that is the way that &lt;em&gt;most&lt;/em&gt; Clojure developers create a &lt;em&gt;connected&lt;/em&gt; repl.&lt;/p&gt;
&lt;p&gt;The implication seems to be to work on a &lt;em&gt;different&lt;/em&gt; project one must (System/exit 0) VM and start another VM using &lt;em&gt;clj&lt;/em&gt; command to ‘create a connected repl’ to project deps.edn in a different directory? This appears to be idiomatically (colloquially) referred to as ‘restarting the REPL’ I believe?&lt;/p&gt;
&lt;p&gt;Seems rather draconian for a dev env, let alone a lisp dev env? I thought the highly dynamic heritage of lisp replete with multiple REPLs was universally sought after? &lt;strong&gt;10 years later&lt;/strong&gt; and no multiple REPLs for clojure? Personally, I’m somewhat surprised, but maybe nobody really wants, needs or requires multiple clojure REPLs? I think multiple REPLs could be transformational in many use cases IMHO, or maybe I’m really ‘out of the loop’ no pun intended?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;03-10-2015&lt;/strong&gt; Clojure stream socket repl discussion (&lt;a rel=&quot;nofollow&quot; href=&quot;https://groups.google.com/g/clojure-dev/c/Dl3Stw5iRVA/m/mgwvmEnjnBoJ&quot;&gt;https://groups.google.com/g/clojure-dev/c/Dl3Stw5iRVA/m/mgwvmEnjnBoJ&lt;/a&gt;) several notable sub-quotes:&lt;/p&gt;
&lt;p&gt;“I think it is important, with tooling, to have the broadest, open notion of the types of 'use cases' for Clojure, and for workflows of people using Clojure, lest you actually limit them. I hope people are able to write their languages and DSLs, test embedded control/debug consoles, design next-generation REPLs and debuggers, grab data dumps etc, all from their REPL. That's the heritage of Lisp. Many people are doing data science, languages, genetics, rule-systems etc type things with Clojure, not just web apps&lt;/p&gt;
&lt;p&gt;But it is quite common in rich Common Lisp IDEs like Lispworks for people to have multiple listener (REPL) sessions open at the same time (against the same runtime). You can launch long running processes that produce streaming output, switch to another listener and continue interaction and development, have separate listeners for separate contexts/state/command-history etc. There's a lot to Lisp development that's not RPC.&lt;/p&gt;
&lt;p&gt;Note multiple listeners, data inspectors and more. Maybe not the latest GUIs, but the capabilities should be a source of inspiration for any Clojure IDE.”&lt;/p&gt;
&lt;p&gt;Previously hinted personal end goal: exploit ‘critical mass’ for a (truly) ‘dynamic’ clojure dev env, including dynamic java recompilation, namespace reloading, etc. and include at a minimum:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;clojure.repl.deps&lt;/li&gt;
&lt;li&gt;clojure.tools.build.api (clojure.tools.build)&lt;/li&gt;
&lt;li&gt;clojure.tools.deps&lt;/li&gt;
&lt;li&gt;clojure.tools.deps.cli.api (clojure.deps.cli)&lt;/li&gt;
&lt;li&gt;clojure.tools.namespace&lt;/li&gt;
&lt;li&gt;clojure.tools.tools.api (clojure.tools.tools)&lt;/li&gt;
&lt;li&gt;GitHub - clj-commons/virgil: Recompile Java code without restarting&lt;br&gt;
the REPL (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clj-commons/virgil&quot;&gt;https://github.com/clj-commons/virgil&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;other polyglot ‘evaluation/compilation’ TBD&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also included a few tools to help come back up to speed quicker:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub - nubank/morse: A graphical, interactive tool for browsing&lt;br&gt;
Clojure data (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/nubank/morse&quot;&gt;https://github.com/nubank/morse&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;[clj-ns-browser/clj-ns-browser &quot;2.0.0-SNAPSHOT&quot;] – Clojars&lt;br&gt;
(&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojars.org/clj-ns-browser/versions/2.0.0-SNAPSHOT&quot;&gt;https://clojars.org/clj-ns-browser/versions/2.0.0-SNAPSHOT&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Eventually will look at many ‘current projects’ including: GitHub - HumbleUI/HumbleUI: Clojure Desktop UI framework (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/HumbleUI/HumbleUI&quot;&gt;https://github.com/HumbleUI/HumbleUI&lt;/a&gt;) as stated to build better apps than possible with web, AND access full power of your computer (multithreaded), wouldn’t that be convenient?&lt;/p&gt;
&lt;p&gt;Another quote from &lt;strong&gt;03-10-2015&lt;/strong&gt; Clojure stream socket repl discussion (&lt;a rel=&quot;nofollow&quot; href=&quot;https://groups.google.com/g/clojure-dev/c/Dl3Stw5iRVA/m/IHoVWiJz5UIJ&quot;&gt;https://groups.google.com/g/clojure-dev/c/Dl3Stw5iRVA/m/IHoVWiJz5UIJ&lt;/a&gt;):&lt;/p&gt;
&lt;p&gt;“REPL stands for something - Read, Eval, Print, Loop. It does not stand for - Eval RPC Server/Window.”&lt;/p&gt;
&lt;p&gt;Anyway, that would be ERSW, seriously, I couldn’t agree more, a required lisp feature, for me anyway: multiple simultaneous-concurrent (multi-threaded) REPLs, I refer to as ‘Clojure Listeners’ (‘in-process’ or ‘against the same runtime’) non-socket non-nREPL non-LSP non-network non-middleware non-multi-VM based REPL approaches that support multiple simultaneous dev management ‘native VM’ approaches for polyglot projects ala GraalVM.&lt;/p&gt;
&lt;p&gt;[SEE Multiple Clojure Listeners] (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mgrisius/clj-mode/blob/0.9/Clojure_Listener_2025-02-23_09-02-41.jpg&quot;&gt;https://github.com/mgrisius/clj-mode/blob/0.9/Clojure_Listener_2025-02-23_09-02-41.jpg&lt;/a&gt;) &lt;/p&gt;
&lt;p&gt;Note JavaScript Listener “JS-1” pictured. Could have python, R, ruby, or whatever language(s) available in GraalVM. ‘Clojure Listeners’ used with or without emacs, ‘regardless of editor’, in any Java VM for that matter. Could easily have multi-threaded socket-based listeners . . .&lt;/p&gt;
&lt;p&gt;Clojure Listeners: multi-threaded, full history, type ahead, line editing, completion, pop-up menus, colorized output, colorized-balanced-brackets-([{, etc. Also working on other listener features: multi-line editing, enhanced source lookup, doc lookup, repo-artifact search, embeddable .e.g. in morse, etc. all leveraging the ‘purest clojure value chain possible’!&lt;/p&gt;
&lt;p&gt;As previously mentioned, my basic ‘old style’ simple.bat with (~60mb) über jar simple compatibility with emacs lisp-inferior-mode works good with ‘legacy’ approach and new ‘CLI deps.edn approach’ basic use so far, both with ~1 second startup time. Zero optimization has been done thus far, e.g. GraalVM native image, etc.&lt;/p&gt;
&lt;p&gt;My forward-looking goal &amp;amp; reason for asking initial question: compatibility with future clojure tool direction(s), NOT invent the next ‘technical debt’ ad hoc one-off hack. My Holy Graal: I want a fully dynamic long running VM under full clojure programmatic control.&lt;/p&gt;
&lt;p&gt;So, the question remains: &lt;strong&gt;a) how to programmatically set REPL with ‘context’ for ‘project-1 aware’? b) how to programmatically switch REPL ‘context’ to ‘project-n aware’?&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14422/programmatically-context-programmatically-switch-context?show=14422#q14422</guid>
<pubDate>Sun, 23 Feb 2025 16:56:50 +0000</pubDate>
</item>
<item>
<title>Optimize `eduction`</title>
<link>https://ask.clojure.org/index.php/15027/optimize-eduction?show=15027#q15027</link>
<description>&lt;h2&gt;Problem statement&lt;/h2&gt;
&lt;p&gt;Eduction is useful part of the transducer ecosystem, which has a benefit/aim of improved performance. However, the function &lt;code&gt;eduction&lt;/code&gt; only has a single varargs arity, which adds multiple function calls and and &lt;code&gt;seq&lt;/code&gt; traversal allocations.&lt;/p&gt;
&lt;p&gt;As seen in &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clj-kondo/clj-kondo/pull/2801&quot;&gt;this PR&lt;/a&gt; to clj-kondo, manually passing in an xform directly can improve both overall performance and lower allocations.&lt;/p&gt;
&lt;h2&gt;Proposal&lt;/h2&gt;
&lt;p&gt;Adding arities to &lt;code&gt;eduction&lt;/code&gt; can sidestep those allocations and seq traversals, improving baseline performance of all &lt;code&gt;eduction&lt;/code&gt; invocations.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn eduction2
  {:arglists '([xform* coll])
   :added &quot;1.7&quot;}
  ([coll] (-&amp;gt;Eduction identity coll))
  ([f1 coll] (-&amp;gt;Eduction f1 coll))
  ([f1 f2 coll] (-&amp;gt;Eduction (comp f1 f2) coll))
  ([f1 f2 f3 coll] (-&amp;gt;Eduction (comp f1 f2 f3) coll))
  ([f1 f2 f3 f4 &amp;amp; args]
   (-&amp;gt;Eduction (apply comp f1 f2 f3 f4 (butlast args)) (last args))))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Transducers</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15027/optimize-eduction?show=15027#q15027</guid>
<pubDate>Fri, 03 Apr 2026 14:25:17 +0000</pubDate>
</item>
<item>
<title>requiring an empty .clj without an alias should fail as with an alias</title>
<link>https://ask.clojure.org/index.php/15022/requiring-an-empty-clj-without-alias-should-fail-with-alias?show=15022#q15022</link>
<description>&lt;p&gt;if file a/b/c.clj is &quot;empty&quot;&lt;/p&gt;
&lt;p&gt;it creates an empty ns: (and does not fail) when doing&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[a.b.c])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;while when using &quot;:as&quot; it fails correctly with error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[a.b.c] :as c)
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;Syntax error compiling at ... ; namespace 'a.b.c' not&lt;br&gt;
found after loading '/a/b/c'&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;see here for initial discussion:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1775155101843229?thread_ts=1775153939.803389&amp;amp;cid=C03S1KBA2&quot;&gt;https://clojurians.slack.com/archives/C03S1KBA2/p1775155101843229?thread_ts=1775153939.803389&amp;amp;cid=C03S1KBA2&lt;/a&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15022/requiring-an-empty-clj-without-alias-should-fail-with-alias?show=15022#q15022</guid>
<pubDate>Thu, 02 Apr 2026 18:48:37 +0000</pubDate>
</item>
<item>
<title>Using https://developers.google.com/web/tools/puppeteer/ from Clojure ?</title>
<link>https://ask.clojure.org/index.php/9612/using-https-developers-google-tools-puppeteer-from-clojure?show=9612#q9612</link>
<description>&lt;p&gt;Is there a way to use &lt;a rel=&quot;nofollow&quot; href=&quot;https://developers.google.com/web/tools/puppeteer/&quot;&gt;https://developers.google.com/web/tools/puppeteer/&lt;/a&gt; from Clojure?&lt;/p&gt;
&lt;p&gt;Googling, there are lots of &quot;puppet&quot; related Clojure libraries, but none appear to be for web scraping with Chrome.&lt;/p&gt;
&lt;p&gt;Is there a way to use &lt;a rel=&quot;nofollow&quot; href=&quot;https://developers.google.com/web/tools/puppeteer/&quot;&gt;https://developers.google.com/web/tools/puppeteer/&lt;/a&gt; from Clojure?&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/9612/using-https-developers-google-tools-puppeteer-from-clojure?show=9612#q9612</guid>
<pubDate>Fri, 18 Sep 2020 04:15:31 +0000</pubDate>
</item>
<item>
<title>How to use core.async from cljr command line tool?</title>
<link>https://ask.clojure.org/index.php/14766/how-to-use-core-async-from-cljr-command-line-tool?show=14766#q14766</link>
<description>&lt;p&gt;At some point it would be good to facilitate use of core.async from cljr command line tool (clr.core.cli).&lt;/p&gt;
&lt;p&gt;I think what's required is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer&quot;&gt;clojure/tools.analyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer.clr&quot;&gt;clojure/tools.analyzer.clr&lt;/a&gt; (depends on tools.analyzer, clr.tools.reader, clr.core.memoize -&amp;gt; clr.core.cache -&amp;gt; clr.data.priority-map)&lt;/li&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clr.core.async&quot;&gt;clojure/clr.core.async&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;also, archive &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clr.tools.analyzer&quot;&gt;clojure/clr.tools.analyzer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not urgent because it's possible to procure core.async from NuGet but it would be convenient if it could also be procured via git.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14766/how-to-use-core-async-from-cljr-command-line-tool?show=14766#q14766</guid>
<pubDate>Mon, 24 Nov 2025 06:05:40 +0000</pubDate>
</item>
<item>
<title>TDEPS-269: checksums should use sha256sum instead of shasum</title>
<link>https://ask.clojure.org/index.php/14906/tdeps-269-checksums-should-use-sha256sum-instead-of-shasum?show=14906#q14906</link>
<description>&lt;p&gt;This commit broke our Docker build: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/brew-install/commit/d6d540756cb0a6342374db529d07f1de35d5bc71&quot;&gt;https://github.com/clojure/brew-install/commit/d6d540756cb0a6342374db529d07f1de35d5bc71&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;because &lt;code&gt;shasum&lt;/code&gt; is a perl executable provided on Fedora by &lt;code&gt;perl-Digest-SHA-1&lt;/code&gt; rpm, but it's not available on the UBI platform. The standard way to validate checksums is through &lt;code&gt;sha256sum&lt;/code&gt; provided by &lt;code&gt;coreutils&lt;/code&gt; on most (if not all) linux distributions.&lt;/p&gt;
&lt;p&gt;The jira ticket even talks about sha256sum, but then the commit doesn't use it: &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/jira/software/c/projects/TDEPS/issues?jql=project%20%3D%20TDEPS%20ORDER%20BY%20created%20DESC&amp;amp;selectedIssue=TDEPS-269&quot;&gt;https://clojure.atlassian.net/jira/software/c/projects/TDEPS/issues?jql=project = TDEPS ORDER BY created DESC&amp;amp;selectedIssue=TDEPS-269&lt;/a&gt;&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14906/tdeps-269-checksums-should-use-sha256sum-instead-of-shasum?show=14906#q14906</guid>
<pubDate>Tue, 27 Jan 2026 11:17:20 +0000</pubDate>
</item>
<item>
<title>bug   bigdec</title>
<link>https://ask.clojure.org/index.php/14809/bug-bigdec?show=14809#q14809</link>
<description>&lt;p&gt;&lt;img src=&quot;https://mysys-images.oss-cn-beijing.aliyuncs.com/clojure-bigdec.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14809/bug-bigdec?show=14809#q14809</guid>
<pubDate>Fri, 05 Dec 2025 05:09:44 +0000</pubDate>
</item>
<item>
<title>clojure.edn and clojure allows keywords with empty (&quot;&quot;) namespaces</title>
<link>https://ask.clojure.org/index.php/14811/clojure-edn-clojure-allows-keywords-with-empty-namespaces?show=14811#q14811</link>
<description>&lt;p&gt;Following links and snippets are about clojure.edn but because this logic is the same in clojure it also affects clojure reader as well.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L28&quot;&gt;Here&lt;/a&gt; is how symbol pattern is defined:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[:]?([\D&amp;amp;&amp;amp;[^/]].*/)?(/|[\D&amp;amp;&amp;amp;[^/]][^/]*)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is eagerly matching prefix until &lt;strong&gt;the last&lt;/strong&gt; slash character, after that it matches symbol name.&lt;/p&gt;
&lt;p&gt;Then &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L289-L311&quot;&gt;there&lt;/a&gt; is a wrong analysis of matched groups happen: ns is incorrectly set to everything until the last slash with &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/EdnReader.java#L296&quot;&gt;validation&lt;/a&gt; that it is not ends with :/&lt;/p&gt;
&lt;p&gt;Then in Symbol.intern call there is an another lookup for &lt;strong&gt;the first&lt;/strong&gt; slash to split symbol into namespace and name.&lt;/p&gt;
&lt;p&gt;The result is that keywords like this: &quot;:/-/-&quot;, end up with namespace set to empty string &quot;&quot;.&lt;/p&gt;
&lt;p&gt;Looks like the least intrusive way to fix it is to use the same logic to find namespace borders in both places:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;during symbol reading, lookup the first / to set ns instead of using the first matching group&lt;/li&gt;
&lt;li&gt;in symbol interning the logic is correct&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another option is to use different regular expression: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[:]?([\D&amp;amp;&amp;amp;[^/]][^/]*/)?(/|[\D&amp;amp;&amp;amp;[^/]].*[^/])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This matches symbol prefix til &lt;strong&gt;the first&lt;/strong&gt; slash keeping restriction &quot;name can't end with slash&quot;.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14811/clojure-edn-clojure-allows-keywords-with-empty-namespaces?show=14811#q14811</guid>
<pubDate>Fri, 05 Dec 2025 09:56:54 +0000</pubDate>
</item>
<item>
<title>shasum not found error when using ./posix-install on linux</title>
<link>https://ask.clojure.org/index.php/14987/shasum-not-found-error-when-using-posix-install-on-linux?show=14987#q14987</link>
<description>&lt;p&gt;I was redeploying an AWS beanstalk application. I was installing clojure using the commands from the clojure install guide for posix&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;commands:
  01_install_clojure:
    command: |
      curl -L -O https://github.com/clojure/brew-install/releases/latest/download/posix-install.sh
      chmod +x posix-install.sh
      sudo ./posix-install.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I believe this used to work, but it now fails with &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./posix-install.sh: line 30: shasum: command not found
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using the linux instructions worked just fine. I can provide more info about the linux envorionment, but it was using aws' &quot;Corretto 17 running on 64bit Amazon Linux 2023/4.10.0&quot; platform which is one of the builtin java platforms for beanstalk.&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14987/shasum-not-found-error-when-using-posix-install-on-linux?show=14987#q14987</guid>
<pubDate>Wed, 11 Mar 2026 21:49:11 +0000</pubDate>
</item>
<item>
<title>Persistent collections can implement equiv() more efficiently</title>
<link>https://ask.clojure.org/index.php/11124/persistent-collections-implement-equiv-more-efficiently?show=11124#q11124</link>
<description>&lt;p&gt;I found that structural equality between persistent collections makes very few assumptions which lead to inefficient implementations, especially for vectors and maps.&lt;/p&gt;
&lt;p&gt;The thrust of the implementation is dispatching via methods which directly iterate over the underlying arrays.&lt;/p&gt;
&lt;p&gt;These implementations aren't the prettiest or most idiomatic but they're efficient. If this gets implemented it would look different in Java anyway.&lt;/p&gt;
&lt;p&gt;I tried these alternative implementations and found dramatic speed ups:&lt;/p&gt;
&lt;h3&gt;Vector&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;(let [die (clojure.lang.Reduced. false)]
  (defn vec-eq
    [^PersistentVector v ^Iterable y]
    (let [iy (.iterator y)]
      (.reduce v (fn [_ x] (if (= x (.next iy)) true die)) true))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This works well when comparing vectors and for vector x list&lt;br&gt;
Current implementation goes through a loop from 0 to count and calls nth for every element. nth calls arrayFor() every time, while both reduce and an iterator get the backing array once per array.&lt;/p&gt;
&lt;h3&gt;Map&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;(let [o (Object.)
      die (clojure.lang.Reduced. false)
      eq (fn [m2] (fn [b k v]
                   (let [v' (.valAt ^IPersistentMap m2 k o)]
                     (if (.equals o v')
                       die
                       (if (= v v') true die)))))]
  (defn map-eq
    [m1 m2]
    (.kvreduce ^IKVReduce m1 (eq m2) true)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here, too, the implementation iterates directly over the underlying array structure.&lt;br&gt;
Current implementation casts the array to seq then iterates over it while getting entries from the other map via the &lt;code&gt;Map&lt;/code&gt; interface.&lt;br&gt;
This implementation avoids casting the map to a sequence and does not allocate entries.&lt;/p&gt;
&lt;h3&gt;Sequences&lt;/h3&gt;
&lt;p&gt;When the receiver is a list the object compared against it and the receiver will be cast to a seq.&lt;/p&gt;
&lt;p&gt;It could be more efficient to compare it with other collections via an iterator&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn iter-eq
  [^Iterable x ^Iterable y]
  (let [ix (.iterator x)
        iy (.iterator y)]
    (loop []
      (if (.hasNext ix)
        (if (= (.next ix) (.next iy))
          (recur)
          false)
        true))))
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Benchmarking&lt;/h3&gt;
&lt;p&gt;With criterium, vec-eq wins both cases. There are diminishing returns with size increase but still at n=64 vec-eq is twice as fast as =.&lt;br&gt;
map-eq is also 2-3x faster for bigger maps and up to 10x faster for smaller maps&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(doseq [n [1 2 4 8 16 32 64]
        :let [v1 (vec (range n))
              v2 (vec (range n))]]
  (println 'iter-eq n (iter-eq v1 v2))
  (cc/quick-bench (iter-eq v1 v2))
  (println 'vec-eq n (vec-eq v1 v2))
  (cc/quick-bench (vec-eq v1 v2))
  (println '= n (= v1 v2))
  (cc/quick-bench (= v1 v2)))


(doseq [n [1 2 4 8 16 32 64]
        :let [v1 (vec (range n))
              v2 (list* (range n))]]
  (println 'iter-eq n (iter-eq v1 v2))
  (cc/quick-bench (iter-eq v1 v2))
  (println 'vec-eq n (vec-eq v1 v2))
  (cc/quick-bench (vec-eq v1 v2))
  (println '= n (= v1 v2))
  (cc/quick-bench (= v1 v2)))
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;(doseq [n [1 2 4 8 16 32 64]
        :let [m1 (zipmap (range n) (range n))
              m2 (zipmap (range n) (range n))]]
  (cc/quick-bench (map-eq m1 m2))
  (cc/quick-bench (= m1 m2)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Addendum:&lt;br&gt;
Also checked the following cases:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(doseq [n [10000 100000]
        :let [v1 (vec (range n))
              v2 (assoc v1 (dec (count v1)) 7)]]
  (cc/quick-bench (vec-eq v1 v2))
  (cc/quick-bench (iter-eq v1 v2))
  (cc/quick-bench (= v1 v2)))

(doseq [n [100000]
        :let [m1 (zipmap (range n) (range n))
              m2 (assoc m1 (key (last m1)) 7)]]
  (cc/quick-bench (map-eq m1 m2))
  (cc/quick-bench (= m1 m2)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Optimized implementations still win by huge margins&lt;/p&gt;
</description>
<category>Collections</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11124/persistent-collections-implement-equiv-more-efficiently?show=11124#q11124</guid>
<pubDate>Thu, 30 Sep 2021 16:57:25 +0000</pubDate>
</item>
<item>
<title>clojure.core.cache caches delays that hold exceptions as of version 1.2.254</title>
<link>https://ask.clojure.org/index.php/14965/clojure-core-cache-caches-delays-that-hold-exceptions-version?show=14965#q14965</link>
<description>&lt;p&gt;As of version 1.2.254 of &lt;code&gt;org.clojure/core.cache&lt;/code&gt;, using a &lt;code&gt;value-fn&lt;/code&gt; that throws will cause an entry to be added to the cache associated with a Delay with &lt;code&gt;:status :failed&lt;/code&gt; and the exception as a value.&lt;/p&gt;
&lt;p&gt;The code below can be used to compare the behavior between versions 1.1.234 and 1.2.254.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[clojure.core.cache.wrapped :as cw])

(def counter (atom 0))

(defn value-fn [v]
  (prn :value-fn-called)
  (swap! counter inc)
  (if (= @counter 1)
    (throw (ex-info &quot;thrown&quot; {}))
    v))

(def test-cache (cw/lu-cache-factory {} :threshold 10))

(reset! counter 0)
; this will throw
(cw/lookup-or-miss test-cache &quot;throw&quot; value-fn)
; in 1.1.234 this will call value-fn again and not throw; in 1.2.254, it won't call and return
; the cached delay result, which is an exception
(cw/lookup-or-miss test-cache &quot;throw&quot; value-fn)

; evict to force call to value-fn
(cw/evict test-cache &quot;throw&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is related to work done in &lt;a rel=&quot;nofollow&quot; href=&quot;http://clojure.atlassian.net/browse/CCACHE-65&quot;&gt;CCACHE-65&lt;/a&gt; to avoid cache stampede in multi-threaded applications, and could be related to what has been reported in &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CMEMOIZE-31&quot;&gt;CMEMOIZE-31&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This was initially reported &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1771873303347759&quot;&gt;in Clojurians Slack&lt;/a&gt;.&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14965/clojure-core-cache-caches-delays-that-hold-exceptions-version?show=14965#q14965</guid>
<pubDate>Mon, 23 Feb 2026 19:43:34 +0000</pubDate>
</item>
<item>
<title>Is it legal for a namespace to start with a number?</title>
<link>https://ask.clojure.org/index.php/14962/is-it-legal-for-a-namespace-to-start-with-a-number?show=14962#q14962</link>
<description>&lt;p&gt;There are rules (informally in the spec, formally in the reader) about disallowing symbols to start with numbers: &lt;code&gt;(def 1asdf 5)&lt;/code&gt; However, there aren't rules about namespaces (either middle segments or as the final segment) starting with numbers, leading to their usage in the wild. (For example: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/marick/Midje/tree/bee206983db22c6dc92044fd7b5b0365bbd44fc6/test/implementation/parsing/0_to_fact_form&quot;&gt;https://github.com/marick/Midje/tree/bee206983db22c6dc92044fd7b5b0365bbd44fc6/test/implementation/parsing/0_to_fact_form&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Is this intentional? Should such namespaces be considered legal or not?&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14962/is-it-legal-for-a-namespace-to-start-with-a-number?show=14962#q14962</guid>
<pubDate>Mon, 23 Feb 2026 18:53:53 +0000</pubDate>
</item>
<item>
<title>`(max &quot;x&quot; &quot;y&quot;)` used to return &quot;y&quot;, now it returns &quot;x&quot;</title>
<link>https://ask.clojure.org/index.php/14847/max-x-y-used-to-return-y-now-it-returns-x?show=14847#q14847</link>
<description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;With cljs 1.12.42:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user=&amp;gt; (max &quot;x&quot; &quot;y&quot;)
&quot;y&quot;
cljs.user=&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With cljs 1.12.134:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user=&amp;gt; (max &quot;x&quot; &quot;y&quot;)
&quot;x&quot;
cljs.user=&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Probably related to &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJS-3425&quot;&gt;CLJS-3425&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojurescript/commit/274701280de787b598071460cdac0a3709a5bc11&quot;&gt;this commit&lt;/a&gt; which added &lt;code&gt;NaN&lt;/code&gt; checks:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn ^number max
  &quot;Returns the greatest of the nums.&quot;
  ([x] x)
  ([x y]
   (cond
     (NaN? x) x
     (NaN? y) y
     (&amp;gt; x y) x
     :else y))
  ([x y &amp;amp; more]
   (reduce max (cljs.core/max x y) more)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user=&amp;gt; (NaN? &quot;x&quot;)
true
cljs.user=&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hence the result.&lt;/p&gt;
&lt;p&gt;Not sure what the expected result should be since min/max are only supposed to work with numbers but current behavior is surprising.&lt;/p&gt;
&lt;p&gt;See also: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/jank-lang/clojure-test-suite/pull/839&quot;&gt;https://github.com/jank-lang/clojure-test-suite/pull/839&lt;/a&gt;.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14847/max-x-y-used-to-return-y-now-it-returns-x?show=14847#q14847</guid>
<pubDate>Mon, 22 Dec 2025 13:45:04 +0000</pubDate>
</item>
<item>
<title>flow monitoring tool serves resources from unqualified path</title>
<link>https://ask.clojure.org/index.php/14748/flow-monitoring-tool-serves-resources-from-unqualified-path?show=14748#q14748</link>
<description>&lt;p&gt;For flow monitoring, HTML, CSS, and javascript assets are served from the resource path &quot;public/&quot;. If there is another library on the classpath that also has a resource at &quot;public/index.html&quot;, then flow monitoring's assets will get clobbered and serve the wrong web page instead. Alternatively, flow monitoring may clobber someone else's resources.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async.flow-monitor/blob/6248a5d8e4228ab5974289559e3cb11ff3152263/src/clojure/core/async/flow_monitor.clj#L104&quot;&gt;https://github.com/clojure/core.async.flow-monitor/blob/6248a5d8e4228ab5974289559e3cb11ff3152263/src/clojure/core/async/flow_monitor.clj#L104&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This can be addressed by moving resources to a qualified path like &quot;clojure/core/async/flow_monitor/public/index.html&quot;.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14748/flow-monitoring-tool-serves-resources-from-unqualified-path?show=14748#q14748</guid>
<pubDate>Tue, 04 Nov 2025 20:57:47 +0000</pubDate>
</item>
<item>
<title>Is it valid for metadata to have metadata?</title>
<link>https://ask.clojure.org/index.php/14927/is-it-valid-for-metadata-to-have-metadata?show=14927#q14927</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am implementing a pretty printer and while adding/testing support for &lt;code&gt;*print-meta*&lt;/code&gt; I noticed that &lt;code&gt;pr&lt;/code&gt; prints an object whose metadata has metadata in the following way:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user&amp;gt; (binding [*print-meta* true]
        (pr-str (with-meta 'foo (with-meta {:bar :baz} {:frob :zork}))))
&quot;^^{:frob :zork} {:bar :baz} foo&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When reading such a form, only the &quot;outermost&quot; metadata is preserved:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user&amp;gt; (binding [*print-meta* true]
        (let [s (pr-str (with-meta 'foo (with-meta {:bar :baz} {:frob :zork})))
              o (clojure.edn/read-string s)]
          {:o o
           :meta (meta o)
           :metameta (meta (meta o))}))
{:o foo, :meta {:bar :baz}, :metameta nil}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The behaviour is the same for &lt;code&gt;clojure.core/read-string&lt;/code&gt; and also the &lt;code&gt;tools.reader&lt;/code&gt; readers.&lt;/p&gt;
&lt;p&gt;Can anyone clarify for me if this is either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;simply GIGO&lt;/li&gt;
&lt;li&gt;a bug in the printer&lt;/li&gt;
&lt;li&gt;a bug in the readers&lt;/li&gt;
&lt;li&gt;a state that should be somehow disallowed&lt;/li&gt;
&lt;li&gt;something else?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Neither the &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/metadata&quot;&gt;metadata reference&lt;/a&gt; nor the &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/reader#metadata&quot;&gt;reader reference&lt;/a&gt; explicitly allow or disallow such a thing, as far as I can tell. Should they?&lt;/p&gt;
&lt;p&gt;N.B. this is not an issue in any kind of production context and I'm not aware of any library or program that constructs such a thing. It's simply something I tested to see if/how it would break the pretty printer I'm building.&lt;/p&gt;
&lt;p&gt;EDIT:&lt;/p&gt;
&lt;p&gt;I dug into this some more with Nicola. Here's a perhaps much clearer case that demonstrates the reader isn't propagating nested metadata:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user&amp;gt; (let [o ^^:foo {1 2} {3 4}]
        {:o o :meta (meta o) :metameta (meta (meta o))})
{:o {3 4}, :meta {1 2}, :metameta nil}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;:metameta&lt;/code&gt; should be &lt;code&gt;{:foo true}&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L979-L982&quot;&gt;this section of MetaReader.invoke&lt;/a&gt; we are iterating over the entries of the meta map and manually associng them into the existing meta of the object; any metadata on the meta map itself is not preserved. I have a patch that adds a failing test case and correctly propagates the the meta map's metadata. If this is worth a ticket then I'm more than happy to attach it to that or send it to you directly.&lt;/p&gt;
</description>
<category>Metadata</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14927/is-it-valid-for-metadata-to-have-metadata?show=14927#q14927</guid>
<pubDate>Thu, 12 Feb 2026 15:45:20 +0000</pubDate>
</item>
<item>
<title>Choosing between core.async pipelines</title>
<link>https://ask.clojure.org/index.php/14732/choosing-between-core-async-pipelines?show=14732#q14732</link>
<description>&lt;p&gt;It's no longer clear what kind of pipeline is suitable for what kind of task in &lt;code&gt;core.async&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Previously, my understanding was that anything I/O-bound should go into &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async.clj#L682-L686&quot;&gt;&lt;code&gt;pipeline-blocking&lt;/code&gt;&lt;/a&gt;, while CPU-bound tasks went into regular (i.e. &lt;code&gt;:compute&lt;/code&gt;) &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async.clj#L665-L680&quot;&gt;&lt;code&gt;pipeline&lt;/code&gt;&lt;/a&gt;. But a while back &lt;code&gt;:compute&lt;/code&gt; pipelines were &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/commit/3429e3e1f1d49403bf9608b36dbd6715ffe4dd4f&quot;&gt;changed&lt;/a&gt; to use threads instead of go-blocks. And now, with the introduction of &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/news/2025/10/01/async_virtual_threads&quot;&gt;virtual threads&lt;/a&gt;, &lt;code&gt;pipeline-async&lt;/code&gt; seems like the right choice for I/O-bound tasks.&lt;/p&gt;
&lt;p&gt;It seems that workloads are being classified into one of &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/v1.9.829-alpha2/src/main/clojure/clojure/core/async/impl/dispatch.clj#L130-L132&quot;&gt;three types&lt;/a&gt;: &lt;code&gt;:compute&lt;/code&gt;, &lt;code&gt;:io&lt;/code&gt;, and &lt;code&gt;:mixed&lt;/code&gt;. Is &lt;code&gt;:async&lt;/code&gt; meant to be the equivalent of &lt;code&gt;:io&lt;/code&gt;, and &lt;code&gt;:blocking&lt;/code&gt; the equivalent of &lt;code&gt;:mixed&lt;/code&gt;? I don't think that's original semantics, but it seems to be the mapping now.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14732/choosing-between-core-async-pipelines?show=14732#q14732</guid>
<pubDate>Sun, 26 Oct 2025 22:19:12 +0000</pubDate>
</item>
<item>
<title>Why is `list` defined with a RestFn instead of `create` method?</title>
<link>https://ask.clojure.org/index.php/14820/why-is-list-defined-with-a-restfn-instead-of-create-method?show=14820#q14820</link>
<description>&lt;p&gt;Stemming from a &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1765287690702079&quot;&gt;conversation on slack&lt;/a&gt;, I learned that &lt;code&gt;list&lt;/code&gt; is not a function created with &lt;code&gt;fn*&lt;/code&gt; but an instance of the class &lt;code&gt;clojure.lang.PersistentList$Primordial&lt;/code&gt;. This leads to inconsistencies, such as &lt;code&gt;(vary-meta list assoc :hello :world)&lt;/code&gt; throwing an error instead of returning an &lt;code&gt;AFunction&lt;/code&gt; with metadata. Reading through the git history, it looks like this approach was chosen very early (commit &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/a0d9ca6b9746767376ef8546889d7c44a9332ba5&quot;&gt;&quot;made list return a PersistentList, not a seq&quot;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Is there a reason why this approach was taken versus a &lt;code&gt;create(ISeq args)&lt;/code&gt; overload like &lt;code&gt;vector&lt;/code&gt; and &lt;code&gt;hash-map&lt;/code&gt;?&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14820/why-is-list-defined-with-a-restfn-instead-of-create-method?show=14820#q14820</guid>
<pubDate>Tue, 09 Dec 2025 15:18:48 +0000</pubDate>
</item>
<item>
<title>Optimized str function</title>
<link>https://ask.clojure.org/index.php/14990/optimized-str-function?show=15003#a15003</link>
<description>&lt;p&gt;Opimized version of str function:    &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn my-str
  (^String [] &quot;&quot;)
  (^String [^Object x]
   (if (nil? x) &quot;&quot; (. x (toString))))
  (^String [^Object x &amp;amp; ys]
   (let [sb (StringBuilder. (if (nil? x) &quot;&quot; (. x (toString))))]
     (loop [ys (seq ys)]
       (if-not (nil? ys)
         (let [x (.first ys)]
           (if-not (nil? x)
             (.append sb (.toString ^Object x)))
           (recur (.next ys)))))
     (.toString sb))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Benchmarks:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [xs (vec (range 1000))]
    (criterium/bench
      (apply my-str xs)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Evaluation count : 2577840 in 60 samples of 42964 calls.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;         Execution time mean : 23.611394 µs

(let [xs (vec (range 1000))]
    (criterium/bench
      (apply str xs)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Evaluation count : 1375200 in 60 samples of 22920 calls.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;         Execution time mean : 42.015320 µs
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Sequences</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14990/optimized-str-function?show=15003#a15003</guid>
<pubDate>Mon, 16 Mar 2026 11:12:53 +0000</pubDate>
</item>
<item>
<title>`flow/ping-proc` can be slow or fail to respond, even when process isn't busy</title>
<link>https://ask.clojure.org/index.php/14911/flow-ping-proc-slow-fail-respond-even-when-process-isnt-busy?show=14911#q14911</link>
<description>&lt;p&gt;I've run into a few cases where &lt;code&gt;flow/ping&lt;/code&gt; and &lt;code&gt;flow/ping-proc&lt;/code&gt; are slow and timeout.&lt;/p&gt;
&lt;p&gt;I was able to track the issue down to this line &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/b871f3519de6843a9f5ce66cf8d5c6cbe44d3222/src/main/clojure/clojure/core/async/flow/impl.clj#L273&quot;&gt;https://github.com/clojure/core.async/blob/b871f3519de6843a9f5ce66cf8d5c6cbe44d3222/src/main/clojure/clojure/core/async/flow/impl.clj#L273&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(async/&amp;gt;!! c
            (walk/postwalk datafy
                           #::flow{:pid pid, :status status
                                   :state state,
                                   :count count
                                   :ins pins :outs pouts}))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This causes the state of the flow process to be traversed and datafied.&lt;/p&gt;
&lt;p&gt;In one case, I had some process state that threw an exception when datafied due to an incomplete datafy extension. This caused &lt;code&gt;flow/ping-proc&lt;/code&gt; to silently fail. No errors were reported.&lt;/p&gt;
&lt;p&gt;In some other cases, the flow processes were working with large values. Walking the process state was slow and caused pings to respond slowly.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14911/flow-ping-proc-slow-fail-respond-even-when-process-isnt-busy?show=14911#q14911</guid>
<pubDate>Wed, 28 Jan 2026 18:01:40 +0000</pubDate>
</item>
<item>
<title>Hide Warnings from Com.Google.Cloud.Translate</title>
<link>https://ask.clojure.org/index.php/10092/hide-warnings-from-com-google-cloud-translate?show=10092#q10092</link>
<description>&lt;p&gt;Howdy.  I am using this excellent wrapper over google translate. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/billwinkler/google-translate&quot;&gt;https://github.com/billwinkler/google-translate&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, whenever I invoke &lt;br&gt;
&lt;code&gt;(gt/translate!  ... :from &quot;&quot; :to &quot;&quot;)&lt;/code&gt; &lt;br&gt;
I get warnings printed to the console / REPL.&lt;br&gt;
I would really like to not see these warnings:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;WARNING: Ignoring Application Default Credentials GOOGLE_APPLICATION_CREDENTIALS: using explicit setting for API key instead.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I am relatively new to logging and understand the java side of things is a mess, is there any way I can prevent seeing these warnings in the REPL ?&lt;/p&gt;
</description>
<category>REPL</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10092/hide-warnings-from-com-google-cloud-translate?show=10092#q10092</guid>
<pubDate>Tue, 26 Jan 2021 02:38:21 +0000</pubDate>
</item>
<item>
<title>Improving curl options for CLI install scripts (brew-install)</title>
<link>https://ask.clojure.org/index.php/14900/improving-curl-options-for-cli-install-scripts-brew-install?show=14900#q14900</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I'm the maintainer for Heroku's Clojure buildpack. It uses the install scripts from clojure/brew-install to install the CLI. I noticed intermittent install failures related to the download of the Clojure tools. I believe most of them could be avoided with a slightly changed curl command line options.&lt;/p&gt;
&lt;p&gt;I opened a PR before realizing that PRs will not be accepted, so I'm starting this thread to properly get the discussion going. For reference, the closed PR can be found here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/brew-install/pull/10&quot;&gt;https://github.com/clojure/brew-install/pull/10&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I believe these options would improve the download behaviour for all users, but especially when used in automations:&lt;/p&gt;
&lt;p&gt;--connect-timeout 3 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--connect-timeout&quot;&gt;https://curl.se/docs/manpage.html#--connect-timeout&lt;/a&gt;)&lt;br&gt;
Prevents hanging when server is unreachable.&lt;/p&gt;
&lt;p&gt;--fail (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#-f&quot;&gt;https://curl.se/docs/manpage.html#-f&lt;/a&gt;)&lt;br&gt;
Exit with error code 22 for HTTP responses with status codes &amp;gt;= 400.&lt;/p&gt;
&lt;p&gt;--max-time 60 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#-m&quot;&gt;https://curl.se/docs/manpage.html#-m&lt;/a&gt;)&lt;br&gt;
Maximum time in seconds for the entire transfer operation. Prevents hanging indefinitely with slow connections.&lt;/p&gt;
&lt;p&gt;--no-progress-meter (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--no-progress-meter&quot;&gt;https://curl.se/docs/manpage.html#--no-progress-meter&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.67.0 (Nov 2019). Disables the progress bar for cleaner output. But less drastic than --silent and will still output diagnostic information (i.e. retries).&lt;/p&gt;
&lt;p&gt;--retry-max-time 60 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry-max-time&quot;&gt;https://curl.se/docs/manpage.html#--retry-max-time&lt;/a&gt;)&lt;br&gt;
Retry only within this time period (60 seconds). After this time expires, no more retries will be attempted.&lt;/p&gt;
&lt;p&gt;--retry 5 (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry&quot;&gt;https://curl.se/docs/manpage.html#--retry&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.12.3 (Dec 2004). Retry up to 5 times on transient errors (timeouts, HTTP 408, 429, 500, 502, 503, 504, 522, 524).&lt;/p&gt;
&lt;p&gt;--retry-connrefused (&lt;a rel=&quot;nofollow&quot; href=&quot;https://curl.se/docs/manpage.html#--retry-connrefused&quot;&gt;https://curl.se/docs/manpage.html#--retry-connrefused&lt;/a&gt;)&lt;br&gt;
Introduced in curl 7.52.0 (Dec 2016). Consider connection refused as a transient error for --retry.&lt;/p&gt;
&lt;p&gt;These are obviously opinionated and my ask is not for these options specifically. Happy to get anything that will improve the situation. :)&lt;/p&gt;
&lt;p&gt;Manuel&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14900/improving-curl-options-for-cli-install-scripts-brew-install?show=14900#q14900</guid>
<pubDate>Mon, 26 Jan 2026 12:39:44 +0000</pubDate>
</item>
<item>
<title>Does clojure-clr work on Android?</title>
<link>https://ask.clojure.org/index.php/14512/does-clojure-clr-work-on-android?show=14512#q14512</link>
<description>&lt;p&gt;&lt;strong&gt;EDIT: &lt;/strong&gt; Answer is YES. Below is my long-winded exploration.&lt;/p&gt;
&lt;p&gt;I see one of the reasons for clojure-clr-next is it will work on more platforms, is Android one of those?&lt;/p&gt;
&lt;p&gt;I'm using Termux to operate dotnet on Android.&lt;/p&gt;
&lt;p&gt;Both the clojure-clr global dotnet tool and locally compiled clojure-clr fail with exit code 1, no exceptions or anything. I tried dotnet-trace and it gets a partial trace, but no minidump. Puzzling as with the partial trace, the  documentation indicates an expectation of a minidump, maybe there is some unmet condition to emit the minidump I'm not aware of yet (env variables for it didn't work).&lt;/p&gt;
&lt;p&gt;In the trace here is an early line followed by some of the last lines:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
&quot;system.linq!System.Linq.Enumerable.SelectManyS\ingleSelectorIterator\u003cSystem.Reflection.As\sembly,System.Type\u003e.MoveNext()&quot;&lt;/p&gt;
&lt;p&gt;[...]&lt;br&gt;
&quot;system.collections!System.Collections.Generic.\&lt;br&gt;
SortedSet\u003cSystem.Collections.Generic.KeyVa\luePair\u003cSystem.Int32,clojure.lang.CljCompi\ler.Ast.FnMethod\u003e\u003e.AddIfNotPresent(Sy\stem.Collections.Generic.KeyValuePair`2\u003cin\t,&lt;/p&gt;
&lt;p&gt;[...last line...]&lt;br&gt;
&quot;ManagedModule!System.Buffers.SharedArrayPool\u\003cSystem.Byte\u003e.Trim()&quot;&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So maybe something to do with reflection, or that SharedArrayPool?&lt;/p&gt;
&lt;p&gt;I tried inserting some logging to Clojure.Main, but nothing logged as it appears to fail before CljMain.Main() is called. Possibly fails during setting up attributes on one of the classes, in one of the Symbol.intern() or RT.var() calls or somewhere else?&lt;/p&gt;
&lt;p&gt;Couldn't run the &lt;code&gt;dotnet msbuild build.proj -t:Test -p:TestTargetFramework=net8.0&lt;/code&gt;, fails with:&lt;br&gt;
&lt;code&gt;Clojure.Main -&amp;gt; /data/data/com.termux/files/home/dev/clojure-clr/Clojure/Clojure.Main/bin/Debug/net8.0/Clojure.Main.dll
  ClojureCompileAssets = ''
  ClojureMainAssets = ''
  ClojureTestsAssets = ''
/data/data/com.termux/files/home/dev/clojure-clr/Clojure/build.proj(177,5): error MSB3073: The command &quot;dotnet run --project /data/data/com.termux/files/home/dev/clojure-clr/Clojure/Clojure.Main --framework net8.0 -c Debug -p:TargetOS=linux-bionic -p:TargetPlatform=arm64 -p:TargetFramework=net8.0 -p:TargetFrameworks='net8.0' -- run_test.clj&quot; exited with code 1.&lt;/code&gt;&lt;br&gt;
I had to edit build.proj a bit to get custom -p:TargetFrameworks and such to pass through, but still fails with exit code 1.&lt;/p&gt;
&lt;p&gt;Well I'll continue poking around in this uncharted territory.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14512/does-clojure-clr-work-on-android?show=14512#q14512</guid>
<pubDate>Sat, 19 Apr 2025 19:59:28 +0000</pubDate>
</item>
<item>
<title>clojure.core/subs should use type hints of ^CharSequence, NOT ^String</title>
<link>https://ask.clojure.org/index.php/14889/clojure-core-subs-should-use-type-hints-charsequence-string?show=14889#q14889</link>
<description>&lt;p&gt;This is related to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/4616/clojure-interfaces-specify-charsequence-instead-possible&quot;&gt;this ancient ask&lt;/a&gt;, but it would be ideal if &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojuredocs.org/clojure.core/subs&quot;&gt;&lt;code&gt;clojure.core/subs&lt;/code&gt;&lt;/a&gt; was type hinted with &lt;code&gt;^CharSequence&lt;/code&gt; rather than &lt;code&gt;^String&lt;/code&gt;, and used the &lt;code&gt;subSequence()&lt;/code&gt; method instead of &lt;code&gt;substring()&lt;/code&gt; (since the latter doesn't exist in &lt;code&gt;CharSequence&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;The single parameter version of &lt;code&gt;subs&lt;/code&gt; would need to call &lt;code&gt;s.length()&lt;/code&gt; as the second argument in the call to &lt;code&gt;subSequence()&lt;/code&gt; (there is no single-arg version of that method, unlike &lt;code&gt;substring()&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;More generally, there are substantial benefits in using &lt;code&gt;CharSequence&lt;/code&gt; instead of &lt;code&gt;String&lt;/code&gt; throughout Clojure core, not only in the context of Java interop, but also when using custom String-like data structures (e.g. &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/IGJoshua/ropes&quot;&gt;ropes&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;[edit] @alexmiller mentioned this in another forum (and I'm capturing it here for posterity), but this might also require that the result be &lt;code&gt;str&lt;/code&gt;ed, to ensure the return type remains unchanged (&lt;code&gt;subSequence()&lt;/code&gt; returns a &lt;code&gt;CharSequence&lt;/code&gt;, unlike &lt;code&gt;substring&lt;/code&gt;, which might break callers).  There may be performance implications of adding that call for types other than &lt;code&gt;String&lt;/code&gt; (but existing callers should be unaffected, since &lt;code&gt;String.toString()&lt;/code&gt; is identity).&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14889/clojure-core-subs-should-use-type-hints-charsequence-string?show=14889#q14889</guid>
<pubDate>Tue, 13 Jan 2026 18:10:48 +0000</pubDate>
</item>
<item>
<title>Confusing error message on deps.edn wrong git/url dependency</title>
<link>https://ask.clojure.org/index.php/14283/confusing-error-message-on-deps-edn-wrong-git-url-dependency?show=14283#q14283</link>
<description>&lt;p&gt;When you misspell the &lt;code&gt;:git/url&lt;/code&gt; of a git dependency (or the dep name used to infer a url) the error says :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Cloning: https://github.com/MISSPELLED-ORG-OR-REPO-PATH
Error building classpath. Unable to clone /home/user/.gitlibs/_repos/https/github.com/MISSPELLED-ORG-OR-REPO-PATH
fatal: could not read Username for 'https://github.com': terminal prompts disabled
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I find the the 3 sentences confusing since they mention classpath, a local folder, username, and terminal prompts disabled. &lt;/p&gt;
&lt;p&gt;It would be great if it more clearly can express that no repo could be found with the provided URL, or at least remove the last sentence &lt;code&gt;fatal: could not read Username for 'https://github.com': terminal prompts disabled&lt;/code&gt; which I find misleading.&lt;/p&gt;
&lt;p&gt;Maybe the &lt;code&gt;Unable to clone&lt;/code&gt; could be followed by the url instead of the local folder also?&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14283/confusing-error-message-on-deps-edn-wrong-git-url-dependency?show=14283#q14283</guid>
<pubDate>Thu, 05 Dec 2024 10:17:00 +0000</pubDate>
</item>
<item>
<title>qualified versus simple classnames when using `gen-class` compiled classes</title>
<link>https://ask.clojure.org/index.php/14434/qualified-versus-simple-classnames-using-compiled-classes?show=14434#q14434</link>
<description>&lt;p&gt;Using the qualified name of a subclass compiled by &lt;code&gt;gen-class&lt;/code&gt; to access the superclass' members throws an exception. Using the simple name proceeds as expected.&lt;/p&gt;
&lt;p&gt;Here's an example that I've tried to cut down as much as possible, but it's still lengthy. All files are relative to the project root directory, indicated as &lt;code&gt;&amp;lt;project root&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Define a class in file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example/SomeClass.java&lt;/code&gt; with two members, a static field and a static method.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package com.example;

public class SomeClass {

    public static int aField = 99;

    public static String aStaticMethod(int i) {
	    return &quot;aStaticMethod received &quot; + i;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Define a subclass in file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example/SomeSubClass.java&lt;/code&gt; that extends the previous class.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package com.example;

public class SomeSubClass extends SomeClass {
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compile with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ javac -d target/classes/ src/com/example/SomeClass.java
$ javac -d target/classes/ -cp target/classes/ src/com/example/SomeSubClass.java
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we have files&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;project root&amp;gt;/target/classes/com/example/SomeClass.class
&amp;lt;project root&amp;gt;/target/classes/com/example/SomeSubClass.class
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let's see how Clojure handles those two classes. In file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example2/demo.clj&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns demo)

;; javac-compiled SuperClass
(import com.example.SomeClass)

(com.example.SomeClass/aField) ;; 99
(com.example.SomeClass/aStaticMethod 123) ;; &quot;aStaticMethod received 123&quot;

;; javac-compiled SubClass
(import com.example.SomeSubClass)

(com.example.SomeSubClass/aField) ;; 99
(com.example.SomeSubClass/aStaticMethod 456) ;; &quot;aStaticMethod received 456&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All fine and good: Clojure can resolve the superclass members &lt;code&gt;aField&lt;/code&gt; and &lt;code&gt;aStaticMethod&lt;/code&gt; by using the qualified name &lt;code&gt;com.example.SomeSubClass&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now, in file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example/ExtendSomeClass.clj&lt;/code&gt;, define another subclass --- &lt;code&gt;ExtendSomeClass&lt;/code&gt; ---  this time using Clojure's &lt;code&gt;gen-class&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns com.example.ExtendSomeClass)

(gen-class
 :name com.example.ExtendSomeClass
 :extends com.example.SomeClass)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Back in file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example2/demo.clj&lt;/code&gt;, compile &lt;code&gt;ExtendSomeClass&lt;/code&gt; by evaluating&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(compile 'com.example.ExtendSomeClass)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which produces in directory &lt;code&gt;&amp;lt;project root&amp;gt;/target/classes/com/example/&lt;/code&gt; the following four files&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ExtendSomeClass.class&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ExtendSomeClass.class$fn__NNNN.class&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ExtendSomeClass.class$loading__NNNN__auto__NNNN.class&lt;/code&gt;&lt;br&gt;
&lt;code&gt;ExtendSomeClass__init.class&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I would expect the behavior of the &lt;code&gt;gen-class&lt;/code&gt;-compiled ExtendSomeClass to be substantially the same as the javac-compiled SomeSubClass. However, I obtain an exception when I attempt to access the static members inherited from the superclass with the qualified classname.&lt;/p&gt;
&lt;p&gt;Returning to file &lt;code&gt;&amp;lt;project root&amp;gt;/src/com/example2/demo.clj&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(import com.example.ExtendSomeClass)

(com.example.ExtendSomeClass/aField)
;; java.lang.RuntimeException
;; No such var: com.example.ExtendSomeClass/aField

(com.example.ExtendSomeClass/aStaticMethod 789)
;; java.lang.RuntimeException
;; No such var: com.example.ExtendSomeClass/aStaticMethod
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Interestingly, using the unqualified classname works as expected.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ExtendSomeClass/aField) ;; 99
(ExtendSomeClass/aStaticMethod 789) ;; &quot;aStaticMethod received 789&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Q: &lt;strong&gt;How can I understand the difference in the behavior of a &lt;code&gt;gen-class&lt;/code&gt;-compiled subclass and the javac-compiled subclass. Should I double-check how the classpaths align to the directory structure?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Appendix:&lt;br&gt;
I disassembled the class files and observed the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Compiled from &quot;SomeClass.java&quot;
public class com.example.SomeClass ...

Compiled from &quot;SomeSubClass.java&quot;
public class com.example.SomeSubClass extends com.example.SomeClass ...

public class com.example.ExtendSomeClass extends com.example.SomeClass ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(This last result is missing the &quot;Compiled from ___.java&quot; first line.)&lt;/p&gt;
&lt;p&gt;And when I make a demonstration to see how the &lt;code&gt;gen-class&lt;/code&gt;-compiled class works from java-land:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;package com.example;

import com.example.ExtendSomeClass;

public class TestExtendSomeClass {

    public static void main(String[] args) {
	    System.out.println(com.example.ExtendSomeClass.aStaticMethod(123));
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I am able to access the superclass fields with the qualified class name.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ java -cp target/classes/ com.example.TestExtendSomeClass 
aStaticMethod received 123
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14434/qualified-versus-simple-classnames-using-compiled-classes?show=14434#q14434</guid>
<pubDate>Fri, 28 Feb 2025 11:55:45 +0000</pubDate>
</item>
<item>
<title>Replace core.async’s internal LinkedList queue with ArrayDeque?</title>
<link>https://ask.clojure.org/index.php/14696/replace-core-asyncs-internal-linkedlist-queue-arraydeque?show=14696#q14696</link>
<description>&lt;p&gt;Hi! While reading the channel implementation I noticed the internal queue is a &lt;code&gt;java.util.LinkedList&lt;/code&gt;:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/channels.clj&quot;&gt;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/channels.clj&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The common JVM guidance these days is to prefer &lt;code&gt;java.util.ArrayDeque&lt;/code&gt; for FIFO/LIFO queues due to better locality and lower GC overhead. For example, the JDK docs state: “This class is likely to be faster than Stack when used as a stack, and faster than LinkedList when used as a queue.”&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html&quot;&gt;https://docs.oracle.com/javase/8/docs/api/java/util/ArrayDeque.html&lt;/a&gt;&lt;br&gt;
Related SO discussion: &lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/6163166/why-is-arraydeque-better-than-linkedlist&quot;&gt;https://stackoverflow.com/questions/6163166/why-is-arraydeque-better-than-linkedlist&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A few questions for the maintainers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Was &lt;code&gt;LinkedList&lt;/code&gt; originally chosen for a specific reason (e.g., very old JDK compatibility)?&lt;/li&gt;
&lt;li&gt;Are there behaviors in channels that specifically rely on &lt;code&gt;LinkedList&lt;/code&gt; (e.g., allowing null, I believe channels disallow nil anyway, or particular iterator characteristics), or would &lt;code&gt;ArrayDeque&lt;/code&gt; be a drop-in replacement for the add/remove-from-ends operations used?&lt;/li&gt;
&lt;li&gt;If we provide a small PR and benchmark showing an improvement (lower allocations / better throughput under contention), would such a change be considered?&lt;/li&gt;
&lt;li&gt;Since &lt;code&gt;ArrayDeque&lt;/code&gt; is available on Java 8+, and current Clojure/core.async baselines target that or newer, is there any remaining compatibility concern?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Context: there was an older conversation in Clojurians (#clojure) that suggested ArrayDeque could reduce GC pressure under load and that the original choice may have been influenced by older JDKs:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians.slack.com/archives/C03S1KBA2/p1526551888000376&quot;&gt;https://clojurians.slack.com/archives/C03S1KBA2/p1526551888000376&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If this sounds reasonable, I’m happy to run the core.async test suite, add JMH-style benchmarks focused on channel put/take hot paths, and submit a PR.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14696/replace-core-asyncs-internal-linkedlist-queue-arraydeque?show=14696#q14696</guid>
<pubDate>Tue, 02 Sep 2025 08:02:18 +0000</pubDate>
</item>
<item>
<title>CVE-warning in org.fressian/fressian &lt;- org.clojure/data.fressian</title>
<link>https://ask.clojure.org/index.php/14872/cve-warning-org-fressian-fressian-org-clojure-data-fressian?show=14873#a14873</link>
<description>&lt;p&gt;Dependency Information&lt;br&gt;
When running clj-watson in a project with     &lt;/p&gt;
&lt;p&gt;org.clojure/data.fressian {:mvn/version &quot;1.1.1&quot;}&lt;/p&gt;
&lt;p&gt;I get the following warning, refering to  &lt;a rel=&quot;nofollow&quot; href=&quot;https://nvd.nist.gov/vuln/detail/cve-2018-10054&quot;&gt;CVE-2018-10054&lt;/a&gt; (relates to a vulnerability in H2 and its usage in older versions of datomic). I assume this is a false positive.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;NAME: org.fressian/fressian&lt;br&gt;
VERSION: 0.6.8&lt;/p&gt;
&lt;p&gt;DEPENDENCY FOUND IN:&lt;/p&gt;
&lt;p&gt;[org.clojure/data.fressian]&lt;/p&gt;
&lt;p&gt;FIX SUGGESTION:&lt;/p&gt;
&lt;h3&gt;Vulnerabilities&lt;/h3&gt;
&lt;p&gt;SEVERITY: HIGH&lt;br&gt;
IDENTIFIERS: CVE-2018-10054&lt;br&gt;
CVSS: 8.8 (version 3.1)&lt;br&gt;
PATCHED VERSION: Information not available.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14872/cve-warning-org-fressian-fressian-org-clojure-data-fressian?show=14873#a14873</guid>
<pubDate>Fri, 09 Jan 2026 12:45:21 +0000</pubDate>
</item>
<item>
<title>Improve javadoc especially for tool usage</title>
<link>https://ask.clojure.org/index.php/14715/improve-javadoc-especially-for-tool-usage?show=14715#q14715</link>
<description>&lt;p&gt;In order to provide a hot key in VS Code to show the JavaDocs associated with a selected form (class name or the type of an expression), I wrote the following Joyride script:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/seancorfield/vscode-calva-setup/blob/develop/joyride/scripts/javadoc.cljs#L15&quot;&gt;https://github.com/seancorfield/vscode-calva-setup/blob/develop/joyride/scripts/javadoc.cljs#L15&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This highlights three issues that could be addressed/improved:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;On JDKs later than 15, the javadoc machinery falls back to JDK 8, unless you explicitly call &lt;code&gt;add-remote-javadoc&lt;/code&gt; for at least &lt;code&gt;java.&lt;/code&gt; and &lt;code&gt;javax.&lt;/code&gt;. This is a known issue that should be addressed in Clojure 1.13 per &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2920&quot;&gt;https://clojure.atlassian.net/browse/CLJ-2920&lt;/a&gt; -- hopefully it will assume the URL structure for JDKs going forward so we don't run into this problem again, unless Oracle changes their URL structure again (hopefully, unlikely).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;javadoc-url&lt;/code&gt; is private so tools have to use &lt;code&gt;#'&lt;/code&gt; to access it, which makes it feel like this is just an implementation detail and subject to change. It would be nice for tools if this was part of the public, documented API for &lt;code&gt;clojure.java.javadoc&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inner classes are not handled well. If you ask for the &lt;code&gt;javadoc-url&lt;/code&gt; for &lt;code&gt;java.util.Map$Entry&lt;/code&gt;, you get a URL with &lt;code&gt;Map$Entry.html&lt;/code&gt; which doesn't exist. Since inner classes are documented in their outer class, removing &lt;code&gt;$[a-zA-Z0-9_]+&lt;/code&gt; from the class name or from the URL would really help here.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here's an example REPL session for Clojure 1.12.2 on JDK 24, showing these issues:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;user=&amp;gt; (clojure-version)
&quot;1.12.2&quot;
user=&amp;gt; (require 'clojure.java.javadoc)
nil
user=&amp;gt; (#'clojure.java.javadoc/javadoc-url &quot;java.util.concurrent.ExecutionException&quot;)
&quot;http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutionException.html&quot;
user=&amp;gt; (#'clojure.java.javadoc/javadoc-url &quot;java.util.Map$Entry&quot;)
&quot;http://docs.oracle.com/javase/8/docs/api/java/util/Map$Entry.html&quot;
user=&amp;gt; &lt;/code&gt;&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14715/improve-javadoc-especially-for-tool-usage?show=14715#q14715</guid>
<pubDate>Tue, 16 Sep 2025 17:54:13 +0000</pubDate>
</item>
<item>
<title>Why do core.async timeouts rely on non-monotonic system clock?</title>
<link>https://ask.clojure.org/index.php/13420/why-do-core-async-timeouts-rely-on-non-monotonic-system-clock?show=13421#a13421</link>
<description>&lt;p&gt;&lt;code&gt;clojure.core.async/timeout&lt;/code&gt; uses &lt;code&gt;System/currentTimeMillis&lt;/code&gt; to calculate its deadline (see &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/322adc72852bb79c143ebe5d203d100534fda8f2/src/main/clojure/clojure/core/async/impl/timers.clj#L29&quot;&gt;here&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/322adc72852bb79c143ebe5d203d100534fda8f2/src/main/clojure/clojure/core/async/impl/timers.clj#L62&quot;&gt;here&lt;/a&gt;). While &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/System.html#currentTimeMillis()&quot;&gt;the docstring for &lt;code&gt;System/currentTimeMillis&lt;/code&gt;&lt;/a&gt; doesn't mention it explicitly, it's quite clearly unsuitable for this purpose because it returns the current time as reported by the OS. Since that time can change arbitrarily (e.g. by correction via NTP), the deadline calculations may end up inconsistent. This behavior is very much intended, see e.g. &lt;a rel=&quot;nofollow&quot; href=&quot;https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8061480&quot;&gt;this ticket&lt;/a&gt; where it was suggested to switch &lt;code&gt;System/currentTimeMillis&lt;/code&gt; over to a monotonic clock where possible. It was refused with the following comment:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;System.currentTimeMillis() is required to return milliseconds since the epoch and should reflect external changes to the system/wall-clock time. CLOCK_MONOTONIC_COARSE does not provide that and so can not be used for this purpose.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Also, the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/concurrent/ScheduledExecutorService.html&quot;&gt;docstring for &lt;code&gt;java.util.concurrent.ScheduledExecutorService&lt;/code&gt;&lt;/a&gt; states this quite plainly:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;All schedule methods accept relative delays and periods as arguments, not absolute times or dates. It is a simple matter to transform an absolute time represented as a Date to the required form. For example, to schedule at a certain future date, you can use: schedule(task, date.getTime() - System.currentTimeMillis(), TimeUnit.MILLISECONDS). Beware however that expiration of a relative delay need not coincide with the current Date at which the task is enabled due to network time synchronization protocols, clock drift, or other factors.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since all we care about here is deltas, it seems advisable to switch to &lt;code&gt;System/nanoTime&lt;/code&gt; instead. Unfortunately, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/System.html#nanoTime()&quot;&gt;its docstring&lt;/a&gt; &lt;em&gt;also&lt;/em&gt; doesn't make its properties very obvious. It doesn't mention that it's a monotonic clock but only hints at it by stating:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Returns the current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds. This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. [...] The values returned by this method become meaningful only when the difference between two such values, obtained within the same instance of a Java virtual machine, is computed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A case in point for using it is OpenJDK's implementation of &lt;code&gt;java.util.concurrent.ScheduledThreadPoolExecutor&lt;/code&gt; whose &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/openjdk/jdk/blob/c86592d38d651beac40f1da43c718a2d4b17bd19/src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java#L524-L530&quot;&gt;deadline calculation method does so&lt;/a&gt;, as well as its &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/openjdk/jdk/blob/c86592d38d651beac40f1da43c718a2d4b17bd19/src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java#L244-L246&quot;&gt;&lt;code&gt;getDelay&lt;/code&gt; implementation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Furthermore--if it's anything to go by--various StackOverflow posts also discuss this and arrive at the same conclusion, e.g. &lt;a rel=&quot;nofollow&quot; href=&quot;https://stackoverflow.com/questions/510462/is-system-nanotime-completely-useless/54566928#54566928&quot;&gt;this one&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Nonetheless, nanoTime() should still be preferred for implementing timed blocking, interval waiting, timeouts, etc. to currentTimeMillis() because the latter is a subject to the &quot;time going backward&quot; phenomenon (e. g. due to server time correction), i. e. currentTimeMillis() is not suitable for measuring time intervals at all. See this answer for more information.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;See also &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/10306/core-cache-ttlcacheq-timer-is-not-monotonic?show=10306#q10306&quot;&gt;a similar question about &lt;code&gt;core.cache&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13420/why-do-core-async-timeouts-rely-on-non-monotonic-system-clock?show=13421#a13421</guid>
<pubDate>Wed, 01 Nov 2023 16:26:33 +0000</pubDate>
</item>
<item>
<title>Porting clojure libraries w/ java interop to clojure-clr</title>
<link>https://ask.clojure.org/index.php/14684/porting-clojure-libraries-w-java-interop-to-clojure-clr?show=14684#q14684</link>
<description>&lt;p&gt;I've been browsing around to understand the ecosystem.&lt;/p&gt;
&lt;p&gt;I see some libraries are ported to use CLR interop, like core.logic, some are part way finished, like core.async.&lt;/p&gt;
&lt;p&gt;Here is one maintainer's concerns, they would much like to point CLR users at a fork with CLR interop maintained by someone else:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/weavejester/medley/pull/96&quot;&gt;https://github.com/weavejester/medley/pull/96&lt;/a&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/weavejester/medley/pull/65&quot;&gt;https://github.com/weavejester/medley/pull/65&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For fun I examined how to use formal logic to do the code translation. Using Spec, and core.logic for code generation perhaps. I think it would require a lot of knowledge representation.&lt;/p&gt;
&lt;p&gt;It might be easier, for these non-core/crucial libraries to use LLMs to do the code translation, and direct the outputs into a set of forks. Perhaps the core libraries used as training data on what to do. This author has some great insights and details on a plausible workflow(s) including with the utility of editor integration. He has done interop translation and work with clojure:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://m.youtube.com/watch?v=oNhqqiKuUmw&quot;&gt;https://m.youtube.com/watch?v=oNhqqiKuUmw&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As it is only the interop which requires translation (subsets of clojure files), with a skilled hand there might be better results than some of what he illustrates.&lt;/p&gt;
&lt;p&gt;I looked around for a spec for the dotnet core API. I saw one they used to maintain but couldn't find a recent one. Though, all this LLM stuff is beyond me at this time. I thought to share some of my exploration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Found the dotnet API spec/reference for netstandard 2.1.0, I think someone wrote they since moved it into dotnet/runtime but I couldn't find it there, dunno if this helps: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/dotnet/standard/blob/v2.1.0/src/netstandard/ref/System.IO.cs&quot;&gt;https://github.com/dotnet/standard/blob/v2.1.0/src/netstandard/ref/System.IO.cs&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14684/porting-clojure-libraries-w-java-interop-to-clojure-clr?show=14684#q14684</guid>
<pubDate>Fri, 15 Aug 2025 01:31:53 +0000</pubDate>
</item>
<item>
<title>Support characters beyond basic multilingual plane</title>
<link>https://ask.clojure.org/index.php/14790/support-characters-beyond-basic-multilingual-plane?show=14790#q14790</link>
<description>&lt;p&gt;For now characters are defined as &lt;code&gt;\uXXXX&lt;/code&gt; so it is not possible to encode character beyond BMP. Surrogate pairs is a common way to encode such characters but LispReader explicitly throws when it sees it - &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1217-L1218&quot;&gt;https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L1217-L1218&lt;/a&gt;&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14790/support-characters-beyond-basic-multilingual-plane?show=14790#q14790</guid>
<pubDate>Tue, 02 Dec 2025 15:10:36 +0000</pubDate>
</item>
<item>
<title>Double colon (&quot;::&quot;) in the middle or at the end of identifier.</title>
<link>https://ask.clojure.org/index.php/14787/double-colon-in-the-middle-or-at-the-end-of-identifier?show=14787#q14787</link>
<description>&lt;p&gt;Right now double colon is allowed only when used as a start of not empty identifier prefix. I wonder is there some explanation why it is forbidden anywhere else?&lt;/p&gt;
&lt;p&gt;I found original commit, where this was introduced. &lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure/commit/005ea1b5f96c5bb762e155032a865e29ad71bcf3&quot;&gt;https://github.com/clojure/clojure/commit/005ea1b5f96c5bb762e155032a865e29ad71bcf3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But commit message has no explanation why it allows only non-repeating colon&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14787/double-colon-in-the-middle-or-at-the-end-of-identifier?show=14787#q14787</guid>
<pubDate>Thu, 27 Nov 2025 12:15:33 +0000</pubDate>
</item>
<item>
<title>Skip stacktrace creation in ExceptionInfo</title>
<link>https://ask.clojure.org/index.php/14634/skip-stacktrace-creation-in-exceptioninfo?show=14634#q14634</link>
<description>&lt;p&gt;Many libraries and applications use exceptions as control flow or data collection, which allows for handling complex situations with more consistent and legible code. Some libraries use custom throwables (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/IGJoshua/farolero&quot;&gt;IGJoshua/farolero&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/NoahTheDuke/lazytest&quot;&gt;NoahTheDuke/lazytest&lt;/a&gt;) and some use ExceptionInfos (&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/scgilardi/slingshot/&quot;&gt;scgilardi/slingshot&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/fmnoise/flow&quot;&gt;fmnoise/flow&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/pangloss/pure-conditioning&quot;&gt;pangloss/pure-conditioning&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/exoscale/ex&quot;&gt;exoscale/ex&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;One of the reasons that libraries reach for custom throwables is because they want to skip creation of a stack trace (which isn't used and would be thrown away immediately). Stack traces in Java are already fairly expensive to create, and then the filtering work done in &lt;code&gt;ExceptionInfo&lt;/code&gt; greatly increases that expense, making them much slower than needed. (There's an Ask about this but I can't find it.) This performance cost pressures developers to use custom throwables if their code will ever be used in a &quot;hot path&quot;, which harms portability and ease of development. (I want to write Clojure, not Java, and I want it to be usable in Clojurescript and Babashka and whatever other dialects might arise.)&lt;/p&gt;
&lt;p&gt;I know that there's a rejected Jira ticket (&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2423&quot;&gt;CLJ-2423&lt;/a&gt;) for supporting the &quot;enableSuppression&quot; flag, but in light of these use-cases, I'd like to bring it up again.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14634/skip-stacktrace-creation-in-exceptioninfo?show=14634#q14634</guid>
<pubDate>Thu, 17 Jul 2025 14:46:52 +0000</pubDate>
</item>
<item>
<title>javadoc-data-fn does not find selected method for inherited methods</title>
<link>https://ask.clojure.org/index.php/14921/javadoc-data-does-not-find-selected-method-inherited-methods?show=14931#a14931</link>
<description>&lt;p&gt;Even though java.util.jar.JarEntry/.getName is a valid qualified method, the selected method docs aren't found.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; java.util.jar.JarEntry/.getName
 #function[...]

&amp;gt; (clojure.java.doc.api/javadoc-data-fn
   &quot;java.util.jar.JarEntry/.getName&quot;
   nil)
{:classname &quot;java.util.jar.JarEntry&quot;,
 :class-description-html &quot;&amp;lt;section ...&quot;,
 :class-description-md &quot;All Implemented...&quot;,
 :methods
 [{:signature &quot;getAttributes()&quot;,
   :description
   &quot;Returns the Manifest Attributes for this entry, or null if none.&quot;,
   :static? false,
   :return-type &quot;Attributes&quot;,
   :clojure-call &quot;java.util.jar.JarEntry/.getAttributes&quot;}
  ...],
 :selected-method []}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14921/javadoc-data-does-not-find-selected-method-inherited-methods?show=14931#a14931</guid>
<pubDate>Sat, 07 Feb 2026 19:55:52 +0000</pubDate>
</item>
<item>
<title>clojure.java.doc.api/javadoc-data-fn does not include constructor info</title>
<link>https://ask.clojure.org/index.php/14920/clojure-java-doc-javadoc-data-does-include-constructor-info?show=14932#a14932</link>
<description>&lt;p&gt;It would be helpful to include the constructor summary info from the javadoc. I tried querying the class as well as the /new method value.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.java.doc.api/javadoc-data-fn 
 &quot;java.io.PushbackReader/new&quot; nil)
(clojure.java.doc.api/javadoc-data-fn 
 &quot;java.io.PushbackReader&quot; nil)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I've integrated java.doc into my IDE and it's been very helpful. Thanks!&lt;/p&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14920/clojure-java-doc-javadoc-data-does-include-constructor-info?show=14932#a14932</guid>
<pubDate>Fri, 06 Feb 2026 05:58:34 +0000</pubDate>
</item>
<item>
<title>`pipeline-blocking` uses `thread` internally instead of `io-thread`</title>
<link>https://ask.clojure.org/index.php/14738/pipeline-blocking-uses-thread-internally-instead-of-thread?show=14738#q14738</link>
<description>&lt;p&gt;&lt;code&gt;pipeline-blocking&lt;/code&gt; is explicitly meant for blocking operations (implying I/O). However, internally it uses &lt;code&gt;thread&lt;/code&gt; rather than &lt;code&gt;io-thread&lt;/code&gt; for processing: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L637-L640&quot;&gt;https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async.clj#L637-L640&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Since 1.9.829-alpha2 this has practical implications, as only &lt;code&gt;io-thread&lt;/code&gt; will utilize virtual threads, when available.&lt;/p&gt;
&lt;p&gt;Can this be fixed / changed?&lt;br&gt;
If not, can an explicit &lt;code&gt;pipeline-io&lt;/code&gt; (or similar)  function be added to support this use case?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14738/pipeline-blocking-uses-thread-internally-instead-of-thread?show=14738#q14738</guid>
<pubDate>Wed, 29 Oct 2025 15:54:00 +0000</pubDate>
</item>
<item>
<title>An undocumented breaking change in data.json</title>
<link>https://ask.clojure.org/index.php/14728/an-undocumented-breaking-change-in-data-json?show=14728#q14728</link>
<description>&lt;p&gt;between the versions &lt;code&gt;1.1.0&lt;/code&gt; and &lt;code&gt;2.0.0&lt;/code&gt;, data.json introduced a breaking change: The &lt;code&gt;JSONWriter#-write&lt;/code&gt; signature changed from &lt;code&gt;[object out]&lt;/code&gt; to &lt;code&gt;[object out options]&lt;/code&gt;&lt;br&gt;
On this commit:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/data.json/commit/8f070ba94dc7c469f303259ce5f5bfa0b53d50bd&quot;&gt;https://github.com/clojure/data.json/commit/8f070ba94dc7c469f303259ce5f5bfa0b53d50bd&lt;/a&gt;&lt;br&gt;
In release notes &lt;code&gt;Release 2.0.0 on 2021-Mar-19 &lt;/code&gt;, there is no mention to &lt;code&gt;JSONWriter&lt;/code&gt; or &lt;code&gt;-write&lt;/code&gt; protocol changes.&lt;/p&gt;
&lt;p&gt;I know it's a very old problem, but I think this documentation could be present.&lt;/p&gt;
</description>
<category>data.json</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14728/an-undocumented-breaking-change-in-data-json?show=14728#q14728</guid>
<pubDate>Thu, 23 Oct 2025 17:18:23 +0000</pubDate>
</item>
</channel>
</rss>