<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions</title>
<link>https://ask.clojure.org/index.php/questions</link>
<description></description>
<item>
<title>Reflection warning when long hint on an argument</title>
<link>https://ask.clojure.org/index.php/15067/reflection-warning-when-long-hint-on-an-argument</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I noticed some reflection warning that goes away when &lt;em&gt;removing&lt;/em&gt; a hint from fn arguments. I would like to understand the reason for this.&lt;/p&gt;
&lt;p&gt;Example, loading this code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(set! *warn-on-reflection* true)

(defn duration-of-seconds
  (^java.time.Duration [^long seconds]
   (java.time.Duration/ofSeconds seconds)))

(defn sleep
  [seconds]
  (Thread/sleep (duration-of-seconds seconds)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Raises a reflection warning:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;call to static method sleep on java.lang.Thread can't be resolved (argument types: java.lang.Object).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, just removing the &lt;code&gt;^long&lt;/code&gt; hint from the &lt;code&gt;duration-of-seconds&lt;/code&gt; fn argument, makes the reflection warning go away.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15067/reflection-warning-when-long-hint-on-an-argument</guid>
<pubDate>Fri, 01 May 2026 19:49:31 +0000</pubDate>
</item>
<item>
<title>Default implementation of AsElements to treat numbers as numbers, not strings</title>
<link>https://ask.clojure.org/index.php/15060/default-implementation-aselements-numbers-numbers-strings</link>
<description>&lt;p&gt;I'm slowly converting some code from using &lt;code&gt;xml/element&lt;/code&gt; to &lt;code&gt;xml/sexp-as-element&lt;/code&gt;, and I've noticed a discrepancy. &lt;code&gt;xml/element&lt;/code&gt; does (almost) no processing of the &quot;content&quot;, inserting it directly (unless it's &lt;code&gt;nil&lt;/code&gt;). &lt;code&gt;xml/sexp-as-element&lt;/code&gt; calls &lt;code&gt;(str)&lt;/code&gt; on the &quot;content&quot; if it's not seq of some kind (vector or ISeq) or a keyword. This means that &lt;code&gt;(= (xml/element :foo {} 1) (xml/sexp-as-element [:foo 1]))&lt;/code&gt; is false.&lt;/p&gt;
&lt;p&gt;There are probably other differences, but this one seems relatively big, as there's no way to use numbers in &lt;code&gt;xml/sexp-as-element&lt;/code&gt; without calling &lt;code&gt;extend-protocol&lt;/code&gt; yourself.&lt;/p&gt;
&lt;p&gt;May I recommend/request adding this extension? It will make &lt;code&gt;xml/sexp-as-element&lt;/code&gt; match &lt;code&gt;xml/element&lt;/code&gt; for numbers, and make &lt;code&gt;xml/sexp-as-element&lt;/code&gt; match hiccup in general.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(extend-protocol clojure.data.xml.protocols/AsElements
  java.lang.Number
  (as-elements [n] [n]))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>data.xml</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15060/default-implementation-aselements-numbers-numbers-strings</guid>
<pubDate>Tue, 28 Apr 2026 16:10:26 +0000</pubDate>
</item>
<item>
<title>Installing Clojure on IPv6-only machine</title>
<link>https://ask.clojure.org/index.php/15051/installing-clojure-on-ipv6-only-machine</link>
<description>&lt;p&gt;Since GitHub (still) do not support IPv6 it is not possible to follow the instructions at &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/guides/install_clojure&quot;&gt;https://clojure.org/guides/install_clojure&lt;/a&gt; (for Linux, say) to install the Clojure CLI on a machine running ONLY IPv6 (in this case Hertzner).&lt;/p&gt;
&lt;p&gt;When downloading the .tar.gz-file manally and uploading it directly, installing the CLI tools is possilbe.&lt;/p&gt;
&lt;p&gt;The problems seem to continue installing common clojure dependencies, like data.json 2.5.2, which leads to this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -X:server
Error building classpath. Failed to read artifact descriptor for org.clojure:data.json:jar:2.5.2
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.clojure:data.json:jar:2.5.2
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:255)
	at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:171)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(DefaultRepositorySystem.java:263)
	at clojure.tools.deps.extensions.maven$read_descriptor.invokeStatic(maven.clj:115)
	at clojure.tools.deps.extensions.maven$fn__1340.invokeStatic(maven.clj:143)
	at clojure.tools.deps.extensions.maven$fn__1340.invoke(maven.clj:143)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps$expand_deps$children_task__959$fn__961$fn__962.invoke(deps.clj:299)
    ...
Caused by: java.net.SocketException: Network is unreachable
at java.base/sun.nio.ch.Net.connect0(Native Method)
at java.base/sun.nio.ch.Net.connect(Net.java:546)
at java.base/sun.nio.ch.Net.connect(Net.java:535)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.jar
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All this seem a bit bisarre of course. Workarounds would make me happy!&lt;/p&gt;
</description>
<category>Tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15051/installing-clojure-on-ipv6-only-machine</guid>
<pubDate>Fri, 24 Apr 2026 23:21:53 +0000</pubDate>
</item>
<item>
<title>&quot;Nested&quot; vs &quot;lateral&quot; exception causes</title>
<link>https://ask.clojure.org/index.php/15031/nested-vs-lateral-exception-causes</link>
<description>&lt;p&gt;Currently, &lt;code&gt;clojure.core/ex-info&lt;/code&gt; must take a &lt;code&gt;msg&lt;/code&gt; and data &lt;code&gt;map&lt;/code&gt;, and may take a &lt;code&gt;cause&lt;/code&gt;, which must be another &lt;code&gt;Throwable&lt;/code&gt;, which may have its own &lt;code&gt;cause&lt;/code&gt;, etc. etc..&lt;/p&gt;
&lt;p&gt;This supports the case of &quot;nested&quot; exceptions quite well, e.g. in the case of compilation exceptions being caused by macroexpansion exceptions, potentially with their own cause, and works well for fail-on-first-problem situations.&lt;/p&gt;
&lt;p&gt;There's also the situation of &quot;lateral&quot; exceptions, e.g. in the case of test runners or static analysers, which is not supported. In this case, if we take &lt;code&gt;lazytest&lt;/code&gt; as a concrete example, the test runner throws an exception if any of the test cases it runs throws an exception, but the overall cause of the overall exception, conceptually, is &lt;em&gt;all&lt;/em&gt; the individual exceptions.&lt;/p&gt;
&lt;p&gt;Currently, the only to do this is to make some bespoke thing in the data &lt;code&gt;map&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I propose changing &lt;code&gt;clojure.core/ex-info&lt;/code&gt; to take &lt;code&gt;[msg map &amp;amp; causes]&lt;/code&gt;, which would be a non-breaking change (or, while we're at it, make the &lt;code&gt;map&lt;/code&gt; arg optional as well and default it to &lt;code&gt;{}&lt;/code&gt;, but that's a separate topic).&lt;/p&gt;
&lt;p&gt;That leaves the question of how to handle &lt;code&gt;ex-cause&lt;/code&gt;. To my understanding, to change it to return the cause or the list of causes, would maybe be a breaking change for general exception handling libraries or something, but would not imo pose any significant problem. Alternatively, we might have &lt;code&gt;ex-causes&lt;/code&gt; to always return a list, and change &lt;code&gt;ex-cause&lt;/code&gt; to &lt;code&gt;(comp first ex-causes)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Any thoughts? I don't trust myself to spearhead a PR alone on this but I'd love to contribute, certainly the pure-clojure side of things seems straightforward enough (and I'd love to patch this into &lt;code&gt;lazytest&lt;/code&gt;, but that's again a different topic).&lt;/p&gt;
</description>
<category>Errors</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15031/nested-vs-lateral-exception-causes</guid>
<pubDate>Sun, 05 Apr 2026 14:18:26 +0000</pubDate>
</item>
<item>
<title>Destructuring {:as opts} unexpected behaviour with seq</title>
<link>https://ask.clojure.org/index.php/15028/destructuring-as-opts-unexpected-behaviour-with-seq</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I found out something weird in some old code, where I wanted to pass the first map in a sequence and by mistake the code was working while actually passing the sequence itself!&lt;/p&gt;
&lt;p&gt;After digging to make sense of this, I found out it has to do with the &lt;code&gt;{:as opts}&lt;/code&gt; destructuring.&lt;/p&gt;
&lt;p&gt;Here's some code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; even if something is assigned sequential vs associative
;; the `:as` is transparent
(let [[:as opts] {1 2 3 4}]
  opts)
#_=&amp;gt; {1 2, 3 4}
(let [{:as opts} [1 2 3 4]]
  opts)
#_=&amp;gt; [1 2 3 4]
;; however with a seq it's returned as a map
(let [{:as opts} (seq [1 2 3 4])]
  opts)
#_=&amp;gt; {1 2, 3 4}

;; and it only gets weirder!
(let [{:as opts} (seq [{:k :v}])]
  opts)
#_=&amp;gt; {:k :v}
(let [{:as opts} (seq [{:k1 :v1} {:k2 :v2}])]
  opts)
#_=&amp;gt; {{:k1 :v1} {:k2 :v2}}
(let [{:as opts} (seq [{:k1 :v1} {:k2 :v2} {:k3 :v3}])]
  opts)
#_=&amp;gt; {{:k1 :v1} {:k2 :v2}, :k3 :v3}
(let [{:as opts} (seq [{:k1 :v1} {:k2 :v2} :not-a-map])]
  opts)
;; java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword
(let [{:as opts} (seq [1 2 3])]
  opts)
;; java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In my case I didn't realize my code was wrong because &lt;code&gt;{:as opts} {:k :v}&lt;/code&gt; is the same as &lt;code&gt;{:as opts} (seq [{:k :v}])&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To me this is behaviour I would expect closer to &lt;code&gt;&amp;amp; {:as opts}&lt;/code&gt; rather than just plain map destructuring &lt;code&gt;{:as opts}&lt;/code&gt;. Maybe both behaviours should be separated?&lt;/p&gt;
&lt;p&gt;I think this should be tackled either by&lt;br&gt;
1. make &lt;code&gt;:as&lt;/code&gt; transparent regardless of what comes in to always bind&lt;br&gt;
2. throw an error earlier when it's not of the expected destructuring&lt;br&gt;
3. Document this very unexpected edge case in &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/special_forms#associative-destructuring&quot;&gt;https://clojure.org/reference/special_forms#associative-destructuring&lt;/a&gt;&lt;br&gt;
4. Separate the keyword arguments use case from plain map destructuring? (Assuming both are now mixed together)&lt;/p&gt;
</description>
<category>Sequences</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15028/destructuring-as-opts-unexpected-behaviour-with-seq</guid>
<pubDate>Sat, 04 Apr 2026 23:50:39 +0000</pubDate>
</item>
<item>
<title>Optimize `eduction`</title>
<link>https://ask.clojure.org/index.php/15027/optimize-eduction</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</guid>
<pubDate>Fri, 03 Apr 2026 14:25:17 +0000</pubDate>
</item>
<item>
<title>Missing protocol error will hang on infinite `(range)` input in ClojureScript but not Clojure</title>
<link>https://ask.clojure.org/index.php/15026/missing-protocol-error-infinite-range-clojurescript-clojure</link>
<description>&lt;p&gt;functions like &lt;code&gt;transient&lt;/code&gt;, &lt;code&gt;assoc&lt;/code&gt;, etc  will throw helpful missing-protocol error when receiving invalid input but it will hang if it receives infinite &lt;code&gt;(range)&lt;/code&gt;.&lt;br&gt;
this is related to issue below&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/14578/even-range-hangs?show=14578#q14578&quot;&gt;https://ask.clojure.org/index.php/14578/even-range-hangs?show=14578#q14578&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;however, missing-protocol only hang in clojurescript but not clojure so I am wondering if this difference is intended.&lt;/p&gt;
&lt;p&gt;example calls that should throws&lt;br&gt;
- &lt;code&gt;(transient (range))&lt;/code&gt;&lt;br&gt;
- &lt;code&gt;(assoc (range) :a 1)&lt;/code&gt;&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15026/missing-protocol-error-infinite-range-clojurescript-clojure</guid>
<pubDate>Fri, 03 Apr 2026 11:16:47 +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</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</guid>
<pubDate>Thu, 02 Apr 2026 18:48:37 +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</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</guid>
<pubDate>Sun, 29 Mar 2026 13:14:25 +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</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</guid>
<pubDate>Fri, 27 Mar 2026 13:43:44 +0000</pubDate>
</item>
<item>
<title>Why doesn't defn also implicitly name the anonymous function it defines for recursion?</title>
<link>https://ask.clojure.org/index.php/15000/doesnt-defn-implicitly-anonymous-function-defines-recursion</link>
<description>&lt;p&gt;Why doesn't &lt;code&gt;defn&lt;/code&gt; implicitly name the function to create a named recursion point?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.walk/macroexpand-all
  '(defn foo [x]
     (foo x)))
; =&amp;gt;
(def foo
  (fn*
    ([x]
     (foo x))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This could instead expand to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def foo
  (fn* foo ; note the foo here
    ([x]
     (foo x))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How it works right now, &lt;code&gt;foo&lt;/code&gt; resolves to a global var &lt;code&gt;#'foo&lt;/code&gt;, which is created when the &lt;code&gt;(def ...)&lt;/code&gt; form is analyzed. In the second case, it resolves directly to the function object. Thus, it should save us a var dereference at runtime in this case.&lt;/p&gt;
&lt;p&gt;EDIT: Found out, this is exactly what &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/compilation#directlinking&quot;&gt;direct linking&lt;/a&gt; is used for.&lt;/p&gt;
</description>
<category>Macros</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15000/doesnt-defn-implicitly-anonymous-function-defines-recursion</guid>
<pubDate>Sat, 21 Mar 2026 13:49:43 +0000</pubDate>
</item>
<item>
<title>Controlled Bailout, Jira issue 2213</title>
<link>https://ask.clojure.org/index.php/14999/controlled-bailout-jira-issue-2213</link>
<description>&lt;p&gt;I would like to improve &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.atlassian.net/browse/CLJ-2213&quot;&gt;Issue 2213&lt;/a&gt; as follows. Do you think, this makes sense? Shall I become contributor for this? &lt;/p&gt;
&lt;p&gt;The new description would be:&lt;/p&gt;
&lt;p&gt;When developing Input-Process-Output tools I am often in the situation, that I have a sequence of activities (e.g. opening a file, spec checking a file, calling external tools, creating files), which each could fail in certain ways. Clojure does not have a good way to control such a sequence of activities in a way that all sorts of things, which could go wrong, can be handled comfortably. In imperative programming languages concepts like early exit or bailout are used. These are not not very functional. Unfortunately practical problems are often like this.&lt;/p&gt;
&lt;p&gt;The issue is a bit more general and a solution would be nice not only for those who develop such sort of tools. So I can give a simple example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [config-file (get-file-from-network xy)
      config-file (parse-edn config-file)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As all these steps can fail, we could instead implement it like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)]
  (if-let [config-file (parse-edn config-file)]
    (if (spec-check config-file)
      (do-something-with config-file))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now the code has suffered already a lot. The sequential nature of the problem is lost. And it is not even doing what we need. We have to report to the user what went wrong.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)]
  (if-let [config-file (parse-edn config-file)]
    (if (spec-check config-file)
      (do-something-with config-file)
      :file-has-syntax-errors)
    :file-not-valid-edn)
  :file-cannot be openned)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But this is still not doing what we need. We have to provide more information about each failure. If a file cannot be openned, is it because the file does not exist or we do not have read permissions? And what did the spec check tell us? So we cannot just use &lt;code&gt;nil&lt;/code&gt; as a universal failure. We must deliver more information when failing. And we cannot use if-let, either. So we are not even done.&lt;/p&gt;
&lt;p&gt;This problem report asks for a better solution for this conceptual challenge.&lt;/p&gt;
&lt;p&gt;This example depicts a conflict that should not happen when using an appropriate programming language: First we are able to quickly make a prototype. But in the end the final code has not much in common with the first code any more. The final design is not driven by the problem domain, but by the technical need for an error handling. The need for a bailout mechanism in this example imposes too many huge code changes.&lt;/p&gt;
&lt;p&gt;The principal problem with all these solutions is that they coerce a sequence of actions into something which is not a sequence. If your problem is a sequence, then the implementation should also be a sequence.&lt;/p&gt;
&lt;h2&gt;Idea: Exceptions&lt;/h2&gt;
&lt;p&gt;As an alternative implementation I went with Exceptions. But it feels wrong, because I am talking about things, that are expected to fail. I cannot just use the Exceptions that are comming out of Java for example when opening a file for read. I need detailed information, what went wrong. If you are a command line tool, it is expected from you, that you provide good error messages. I ended up catching and rethrowing exceptions everywhere in the program.&lt;/p&gt;
&lt;h2&gt;Idea: Like for/doseq&lt;/h2&gt;
&lt;p&gt;For me I created a small macro, that extends &lt;code&gt;let&lt;/code&gt;. Then I use this syntax:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [[config-file error] (get-file-from-network xy)
      :escape     error
      config-file (parse-edn config-file)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This often allows a surprisingly intuitive code. For example here:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let [[config-file error-code] (get-file-from-network xy)
      :escape     (if (= error-code :does-not-exist) 
                    :file-xy-does-not-exist)
      :escape     (if (= error-code :io-error)
                    :file-xy-cannot-be-read)
      [config-file error-code] (parse-edn config-file)
      :escape     (if error-code :file-xy-not-legal-edn)
      syntax-ok?   (spec-check config-file)]
  (do-something-with config-file))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is inspired by the &lt;code&gt;for&lt;/code&gt;/&lt;code&gt;doseq&lt;/code&gt;. But I don't claim that this is a good solution for Clojure (although I think so). But I think, the &lt;code&gt;let&lt;/code&gt; macro is a good candidate when improving how Clojure can be used for such imperative things.&lt;/p&gt;
&lt;h2&gt;Idea: Using &lt;code&gt;if-let&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;I also investigated the solution, that was originally proposed by this issue.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(if-let [config-file (get-file-from-network xy)
         config-file (parse-edn config-file)
         config-file-ok? (spec-check config-file)]
  (do-something-with config-file)
  :error)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This problem with this solution is that none of the bindings are available in the else part. That makes it very hard to react accordingly. This is a nice and small new language feature. But I don't think, that in practice it would be of help so often. The example from the original issue was very artificial with mathematical operations that cannot fail. The first draft of this issue with that artificial example does not actally describe a real problem. That is why this issue has completelly been rewritten.&lt;/p&gt;
&lt;p&gt;Or course we could still bind everything, which was not failed. But I don't think, we would want that. It would have very interesting consequences to the compiling model.&lt;/p&gt;
&lt;h2&gt;Idea: Threading macros&lt;/h2&gt;
&lt;p&gt;As this issue is a about a sequence of activities, a new type of threading macro (e.g. &lt;code&gt;let-&amp;gt;&lt;/code&gt;) could also be an intuitive solution. But I have not tried anything like this.&lt;/p&gt;
&lt;h2&gt;Final Words&lt;/h2&gt;
&lt;p&gt;The principle challenge is, that all these solutions establish a sort of alternative control flow. It is a hard challenge to do this right, especially in a functional language. Like exceptions, that immediatelly exit and magically jump somewhere else. Clojure as a practically language could address this challenge.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14999/controlled-bailout-jira-issue-2213</guid>
<pubDate>Sat, 21 Mar 2026 10:14:48 +0000</pubDate>
</item>
<item>
<title>Is the recent change to flow's futurize safe?</title>
<link>https://ask.clojure.org/index.php/14994/is-the-recent-change-to-flows-futurize-safe</link>
<description>&lt;p&gt;Previously flow's futurize would rethrow any exceptions thrown by the function when deref'ed. With the recent changes to return a CompletableFuture it no longer does that and instead if the function throws deref'ing will just hang forever.&lt;/p&gt;
</description>
<category>core.async</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14994/is-the-recent-change-to-flows-futurize-safe</guid>
<pubDate>Tue, 17 Mar 2026 15:54:00 +0000</pubDate>
</item>
<item>
<title>Evaluating forms using eval can create a valid undesirable recursion point</title>
<link>https://ask.clojure.org/index.php/14991/evaluating-forms-using-create-valid-undesirable-recursion</link>
<description>&lt;p&gt;When the &lt;code&gt;eval&lt;/code&gt; function in Clojure is called with an argument that is an instance of &lt;code&gt;IPersistentCollection&lt;/code&gt; which likely isn't a special def-like form (the first element isn't a symbol at all or it does not start with &lt;code&gt;&quot;def&quot;&lt;/code&gt;), the form is first wrapped in an anonymous function which then gets compiled and invoked, which indirectly evaluates the original form.&lt;/p&gt;
&lt;p&gt;There aren't any extra checks performed and it makes forms like these 2 valid, which should normally be rejected and a compiler exception should be thrown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(recur)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(let []
  (print &quot;Hello&quot;)
  (Thread/sleep 1000)
  (recur))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where the 2nd form keeps printing &quot;Hello&quot; and loops infinitely over the outer wrapper function.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14991/evaluating-forms-using-create-valid-undesirable-recursion</guid>
<pubDate>Mon, 16 Mar 2026 23:17:54 +0000</pubDate>
</item>
<item>
<title>Optimized str function</title>
<link>https://ask.clojure.org/index.php/14990/optimized-str-function</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</guid>
<pubDate>Mon, 16 Mar 2026 11:12:53 +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</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</guid>
<pubDate>Wed, 11 Mar 2026 21:49:11 +0000</pubDate>
</item>
<item>
<title>tools.cli: capture unrecognized options as unparsed arguments</title>
<link>https://ask.clojure.org/index.php/14977/tools-cli-capture-unrecognized-options-unparsed-arguments</link>
<description>&lt;p&gt;I frequently write a command that accepts options and in turn execute a shell command passing arguments through; I want to be able to specify additional arguments to that shell command.&lt;/p&gt;
&lt;p&gt;In tools.cli, the :in-order key &lt;em&gt;almost&lt;/em&gt; does what i want:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
(require '[clojure.tools.cli :as cli])&lt;br&gt;
=&amp;gt; nil&lt;br&gt;
(def opts [[&quot;-d&quot; &quot;--debug&quot;]])&lt;br&gt;
=&amp;gt; #'net.lewisship.cli-tools-test/opts&lt;br&gt;
(cli/parse-opts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[&quot;--foo&quot;]
[]
:in-order true)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;=&amp;gt; {:options {}, :arguments [], :summary &quot;&quot;, :errors [&quot;Unknown option: \&quot;--foo\&quot;&quot;]}&lt;br&gt;
(cli/parse-opts&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[&quot;xxx&quot; &quot;--foo&quot;]
[]
:in-order true)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;=&amp;gt; {:options {}, :arguments [&quot;xxx&quot; &quot;--foo&quot;], :summary &quot;&quot;, :errors nil}&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, it will assume an undefined option is an error until the first non-option argument is consumed.&lt;/p&gt;
&lt;p&gt;I would like a further option that is like :in-order but accepting of these unrecognized options.  Maybe, :passthru-options would be a good name?&lt;/p&gt;
&lt;p&gt;I can work on a patch if we have some consensus on direction.&lt;/p&gt;
</description>
<category>tools.cli</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14977/tools-cli-capture-unrecognized-options-unparsed-arguments</guid>
<pubDate>Fri, 06 Mar 2026 00:35:16 +0000</pubDate>
</item>
<item>
<title>It's difficult to figure out options I can pass to slurp function.</title>
<link>https://ask.clojure.org/index.php/14975/its-difficult-to-figure-out-options-can-pass-slurp-function</link>
<description>&lt;p&gt;&lt;code&gt;(doc slurp)&lt;/code&gt; says&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;clojure.core/slurp&lt;br&gt;
([f &amp;amp; opts])&lt;br&gt;
  Opens a reader on f and reads all its contents, returning a string.&lt;br&gt;
  See clojure.java.io/reader for a complete list of supported arguments.&lt;/p&gt;
&lt;p&gt;(doc clojure.java.io/reader) says&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;clojure.java.io/reader&lt;br&gt;
([x &amp;amp; opts])&lt;br&gt;
  Attempts to coerce its argument into an open java.io.Reader.&lt;br&gt;
   Default implementations always return a java.io.BufferedReader.&lt;/p&gt;
&lt;p&gt;   Default implementations are provided for Reader, BufferedReader,&lt;br&gt;
   InputStream, File, URI, URL, Socket, byte arrays, character arrays,&lt;br&gt;
   and String.&lt;/p&gt;
&lt;p&gt;   If argument is a String, it tries to resolve it first as a URI, then&lt;br&gt;
   as a local file name.  URIs with a 'file' protocol are converted to&lt;br&gt;
   local file names.&lt;/p&gt;
&lt;p&gt;   Should be used inside with-open to ensure the Reader is properly&lt;br&gt;
   closed.&lt;/p&gt;
&lt;p&gt;I read the source code, and I was confused even more.&lt;/p&gt;
</description>
<category>Docs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14975/its-difficult-to-figure-out-options-can-pass-slurp-function</guid>
<pubDate>Fri, 27 Feb 2026 06:41:39 +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</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</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</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</guid>
<pubDate>Mon, 23 Feb 2026 18:53:53 +0000</pubDate>
</item>
<item>
<title>Feature Request:Make anonymous fn/reify class name IDs per namespace instead of one global counter</title>
<link>https://ask.clojure.org/index.php/14935/feature-request-anonymous-namespace-instead-global-counter</link>
<description>&lt;p&gt;  Compiled anonymous functions and reify classes get names like ns$fn__4532, where the numeric suffix comes from a global AtomicInteger counter&lt;br&gt;
  (RT.nextID()).&lt;/p&gt;
&lt;p&gt; This counter is shared across the entire runtime and is consumed by fn classes, reify classes, constants tables, gensyms, etc.&lt;/p&gt;
&lt;p&gt;  The problem is that because the counter is global, any code change shifts the IDs for everything compiled after it. This makes profiling across builds&lt;br&gt;
  really painful, you can't meaningfully compare flame graphs because all the class names change even in code you didn't touch.&lt;/p&gt;
&lt;p&gt;  I'd like to propose scoping the ID counter per-namespace instead. Since the namespace is already part of the class name prefix, uniqueness is still&lt;br&gt;
  guaranteed. This would eliminate the cascading effect across unchanged namespaces and make profiling diffs actually useful.&lt;/p&gt;
&lt;p&gt;I'm not sure what's the downsides of this, but from what I saw of AtomicInteger, it isn't used a lot to break things.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14935/feature-request-anonymous-namespace-instead-global-counter</guid>
<pubDate>Wed, 18 Feb 2026 15:34:38 +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</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</guid>
<pubDate>Thu, 12 Feb 2026 15:45:20 +0000</pubDate>
</item>
<item>
<title>does deps.edd support &quot;exclusion&quot; with wild cards ?</title>
<link>https://ask.clojure.org/index.php/14922/does-deps-edd-support-exclusion-with-wild-cards</link>
<description>&lt;p&gt;maven supports this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;dependency&amp;gt;
      &amp;lt;groupId&amp;gt;org.apache.hadoop&amp;lt;/groupId&amp;gt;
      &amp;lt;artifactId&amp;gt;hadoop-common&amp;lt;/artifactId&amp;gt;
      &amp;lt;version&amp;gt;${hadoop.version}&amp;lt;/version&amp;gt;
      &amp;lt;exclusions&amp;gt;
        &amp;lt;exclusion&amp;gt;
          &amp;lt;groupId&amp;gt;*&amp;lt;/groupId&amp;gt;
          &amp;lt;artifactId&amp;gt;*&amp;lt;/artifactId&amp;gt;
        &amp;lt;/exclusion&amp;gt;
      &amp;lt;/exclusions&amp;gt;   
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;while Clojure does not , it seems&lt;/p&gt;
</description>
<category>Clojure CLI</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14922/does-deps-edd-support-exclusion-with-wild-cards</guid>
<pubDate>Sat, 07 Feb 2026 21:12:28 +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</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</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</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</guid>
<pubDate>Fri, 06 Feb 2026 05:58:34 +0000</pubDate>
</item>
<item>
<title>TypedArrays don't implement ICounted in cljs</title>
<link>https://ask.clojure.org/index.php/14919/typedarrays-dont-implement-icounted-in-cljs</link>
<description>&lt;p&gt;I just discovered that JS TypedArrays (&lt;code&gt;Uint8Array&lt;/code&gt; et al) do not implement &lt;code&gt;ICounted&lt;/code&gt; out of the box, even though it's trivial to make them do so. As a result &lt;code&gt;count&lt;/code&gt; doesn't work on them; this is in contrast to Clojure where &lt;code&gt;count&lt;/code&gt; works on arrays of primitives. Can/should this be added, or is the current behaviour intended?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(count (js/Uint8Array. [1 2 3]))
;; Execution error (Error) at (&amp;lt;cljs repl&amp;gt;:1).
;; No protocol method ICounted.-count defined for type object: 1,2,3
;=&amp;gt; :repl/exception!

(extend-protocol ICounted
 js/Uint8Array 
 (-count [this] (alength this)))
;=&amp;gt; #object [Function]

(count (js/Uint8Array. [1 2 3]))
;=&amp;gt; 3
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14919/typedarrays-dont-implement-icounted-in-cljs</guid>
<pubDate>Thu, 05 Feb 2026 12:37:54 +0000</pubDate>
</item>
<item>
<title>bit-count in cljs but not clj</title>
<link>https://ask.clojure.org/index.php/14917/bit-count-in-cljs-but-not-clj</link>
<description>&lt;p&gt;The &lt;code&gt;bit-count&lt;/code&gt; function ships as part of CLJS but not CLJ, which means I end up using a reader conditional to use &lt;code&gt;Long/bitCount&lt;/code&gt; on the JVM side when I write cljc files. It would be nice if I could just use &lt;code&gt;bit-count&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;(I chose &quot;compiler&quot; for category because there's no option for &quot;standard library&quot;) &lt;/p&gt;
</description>
<category>Compiler</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14917/bit-count-in-cljs-but-not-clj</guid>
<pubDate>Fri, 30 Jan 2026 09:21:40 +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</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</guid>
<pubDate>Wed, 28 Jan 2026 18:01:40 +0000</pubDate>
</item>
<item>
<title>Core Cache and Count</title>
<link>https://ask.clojure.org/index.php/14910/core-cache-and-count</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I notice that in the wrapped namespace of core.cache, there is a &lt;strong&gt;has?&lt;/strong&gt; function that checks the wrapped cache if it has an element or not. It does this by delegating to the underlying cache &lt;strong&gt;c/has?&lt;/strong&gt; function of the wrapped cache.&lt;/p&gt;
&lt;p&gt;For reporting purposes, I need to get the current size of the cache (with the caveat of course that the size could be approximate, given the particular nature of a particular cache - but approximation is fine).&lt;/p&gt;
&lt;p&gt;Unfortuantely, a &lt;strong&gt;size&lt;/strong&gt; or &lt;strong&gt;count&lt;/strong&gt; function doesn't exist in the wrapped namespace, it only exists on the wrapped cache itself - thus doing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(count @wrapped-cache)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; does return the value. &lt;/p&gt;
&lt;p&gt;It would be good, however,  if there was also a similar function in the wrapped namespace, something like this (using &lt;strong&gt;size&lt;/strong&gt; as the function name, but could be something else):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn size
   [cache-atom]
   (c/count @cache-atom)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The rationale being that having this function exposed in the wrapped namespace keeps the code consistent - i.e., whilst I can continue to do:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(count @wrapped-cache)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It would more preferrable to keep using the wrapped namespace (as I do with other operations, such as evict), i.e., something along the lines of:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(wrapped/size wrapped-cache)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Do you think this suggestion might be something that could be included in the wrapped namespace?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;-=david=-&lt;/p&gt;
</description>
<category>core.cache</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14910/core-cache-and-count</guid>
<pubDate>Wed, 28 Jan 2026 16:54:22 +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</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</guid>
<pubDate>Tue, 27 Jan 2026 11:17:20 +0000</pubDate>
</item>
<item>
<title>definterface doesn't expose gen-interface's :extends for interface extension</title>
<link>https://ask.clojure.org/index.php/14903/definterface-doesnt-interfaces-extends-interface-extension</link>
<description>&lt;p&gt;gen-interface allow :extends to specify one or more interfaces, which will be extended by this interface. &lt;/p&gt;
&lt;p&gt;definterface doesn't expose this.&lt;/p&gt;
&lt;p&gt;Use case is working with primitives (where protocols don’t help), to get things to dispatch nicely in a zero boxing primitive transducer implementation.&lt;/p&gt;
</description>
<category>Java Interop</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14903/definterface-doesnt-interfaces-extends-interface-extension</guid>
<pubDate>Mon, 26 Jan 2026 19:49:08 +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</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</guid>
<pubDate>Mon, 26 Jan 2026 12:39:44 +0000</pubDate>
</item>
<item>
<title>clojure.java.doc.api/javadoc-data-fn does not include return types for methods</title>
<link>https://ask.clojure.org/index.php/14898/clojure-java-javadoc-data-does-include-return-types-methods</link>
<description>&lt;p&gt;Calling &lt;code&gt;clojure.java.doc.api/javadoc-data-fn&lt;/code&gt; returns data about methods of a java class in the &lt;code&gt;:methods&lt;/code&gt; and &lt;code&gt;:selected-method&lt;/code&gt; entries. It does not include any directly accessible description of the return types for methods. The return type for a method can be found indirectly in the &lt;code&gt;:method-description-html&lt;/code&gt; and &lt;code&gt;:method-description-md&lt;/code&gt; entries of the &lt;code&gt;:selected-method&lt;/code&gt;s (but not the &lt;code&gt;:methods&lt;/code&gt; entries).&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def jdoc-data
  (clojure.java.doc.api/javadoc-data-fn &quot;CharSequence/.charAt&quot;
                                        nil))
  
(def my-method (-&amp;gt; jdoc-data :selected-method first))

&amp;gt; my-method
{:signature &quot;charAt(int index)&quot;,
 :description &quot;Returns the char value at the specified index.&quot;,
 :static? false,
 :clojure-call &quot;^[int] CharSequence/.charAt&quot;,
 :method-description-html &quot;&amp;lt;section class ...&quot;,
 :method-description-md &quot;### charAt {#charAt(int)}\n\nchar charAt (int index)...&quot;}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>java.doc</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14898/clojure-java-javadoc-data-does-include-return-types-methods</guid>
<pubDate>Tue, 20 Jan 2026 22:26:31 +0000</pubDate>
</item>
<item>
<title>How to force clojure.spec generator to skip a field</title>
<link>https://ask.clojure.org/index.php/14893/how-to-force-clojure-spec-generator-to-skip-a-field</link>
<description>&lt;pre&gt;&lt;code&gt;(gen/let [x (s/gen (s/keys :opt [::a]))
          y (s/gen (s/keys :opt [::a]) {::a ???})])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If &lt;code&gt;x&lt;/code&gt; generates without &lt;code&gt;::a&lt;/code&gt;, I'd also like to generate &lt;code&gt;y&lt;/code&gt; without &lt;code&gt;::a&lt;/code&gt;.  I can't presently see a way to express that.&lt;/p&gt;
</description>
<category>Spec</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14893/how-to-force-clojure-spec-generator-to-skip-a-field</guid>
<pubDate>Thu, 15 Jan 2026 07:58:46 +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</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</guid>
<pubDate>Tue, 13 Jan 2026 18:10:48 +0000</pubDate>
</item>
<item>
<title>Is invoking an anonymous primitive function expected to use the primitive interface?</title>
<link>https://ask.clojure.org/index.php/14888/invoking-anonymous-primitive-function-primitive-interface</link>
<description>&lt;p&gt;Invoking an anonymous primitive function seems to not use the primitive interface.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(set! *unchecked-math* :warn-on-boxed)
(let [f (fn ^double [] 1.0)]
  (+ 1.0 (f)))
;; Boxed math warning
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is this expected behaviour? &lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14888/invoking-anonymous-primitive-function-primitive-interface</guid>
<pubDate>Tue, 13 Jan 2026 14:28:41 +0000</pubDate>
</item>
<item>
<title>Reader docs say foo.bar is a qualified symbol but qualified-symbol? is false</title>
<link>https://ask.clojure.org/index.php/14882/reader-docs-say-foo-qualified-symbol-qualified-symbol-false</link>
<description>&lt;p&gt;The reader reference on clojure.org says &quot;Symbols containing / or . are said to be 'qualified'.&quot; but &lt;code&gt;qualified-symbol?&lt;/code&gt; is defined to return true if the argument is a &quot;symbol with a namespace&quot;.&lt;/p&gt;
&lt;p&gt;Almost every reference to a &quot;qualified symbol&quot; in the docs (on clojure.org) refers to a &quot;namespace-qualified symbol&quot; or a &quot;fully-qualified symbol&quot; (also with a namespace).&lt;/p&gt;
&lt;p&gt;The only other type of &quot;qualified symbol&quot; mentioned is on the evaluation page where it refers to a &quot;package-qualified symbol&quot; for a Java class name.&lt;/p&gt;
&lt;p&gt;I suggest changing that original sentence to read &quot;Symbols containing / are said to be 'namespace-qualified' or 'fully-qualified'. Symbols containing . are said to be 'package-qualified' if they identify a Java class name.&quot; or something similar.&lt;/p&gt;
</description>
<category>Docs</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14882/reader-docs-say-foo-qualified-symbol-qualified-symbol-false</guid>
<pubDate>Mon, 12 Jan 2026 21:44:25 +0000</pubDate>
</item>
<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</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</guid>
<pubDate>Mon, 12 Jan 2026 20:02:41 +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</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</guid>
<pubDate>Fri, 09 Jan 2026 12:45:21 +0000</pubDate>
</item>
<item>
<title>false positive warning: &quot;cljs.core/+, all arguments must be numbers&quot;</title>
<link>https://ask.clojure.org/index.php/14870/false-positive-warning-cljs-core-all-arguments-must-numbers</link>
<description>&lt;p&gt;The &lt;code&gt;inc&lt;/code&gt; function below will never receive a nil, but falsely warns that it might:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version &quot;1.12.134&quot;}}}' -M -m cljs.main -re node
ClojureScript 1.12.134

cljs.user=&amp;gt; (some-&amp;gt; 1 (#(when (pos? %) %)) inc)
WARNING: cljs.core/+, all arguments must be numbers, got [#{nil clj-nil} number] instead at line 1 &amp;lt;cljs repl&amp;gt;
2
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14870/false-positive-warning-cljs-core-all-arguments-must-numbers</guid>
<pubDate>Tue, 06 Jan 2026 16:51:22 +0000</pubDate>
</item>
<item>
<title>ClojureScript :preloads doesn't work with just cljs.main --repl</title>
<link>https://ask.clojure.org/index.php/14863/clojurescript-preloads-doesnt-work-with-just-cljs-main-repl</link>
<description>&lt;p&gt;Running cljs.main with just &lt;code&gt;--repl&lt;/code&gt; doesn't preload whatever is on :preloads.&lt;/p&gt;
&lt;p&gt;Given that the quickest way of trying ClojureScript is by running a command like :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version &quot;1.12.134&quot;}}}}' -M -m cljs.main --repl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;it would be great (and I think expected) to be able to run a repl with some dev tooling, like :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version &quot;1.12.134&quot;} binaryage/devtools {:mvn/version &quot;1.0.7&quot;}}}}' -M -m cljs.main -co '{:preloads [devtools.preload]}' --repl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but it doesn't work.&lt;/p&gt;
&lt;p&gt;It reads the file (it complains if you misspell the preload namespace) but then nothing gets loaded.&lt;/p&gt;
&lt;p&gt;The problem seems to be related to ClojureScript not compiling the preload namespace when you run with just --repl&lt;/p&gt;
&lt;p&gt;If you create a small single file project (like on the start guide) and then do :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version &quot;1.12.134&quot;} binaryage/devtools {:mvn/version &quot;1.0.7&quot;}}}}' -M -m cljs.main -co '{:preloads [devtools.preload]}' --compile hello-world.core --repl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;it works.&lt;br&gt;
After the compile generates the &lt;code&gt;out&lt;/code&gt; folder you can run just with &lt;code&gt;--repl&lt;/code&gt; and the preload will work.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14863/clojurescript-preloads-doesnt-work-with-just-cljs-main-repl</guid>
<pubDate>Wed, 24 Dec 2025 15:13:56 +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</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</guid>
<pubDate>Wed, 24 Dec 2025 08:55:46 +0000</pubDate>
</item>
<item>
<title>Why does the REPL incorrectly display my command after I press enter?</title>
<link>https://ask.clojure.org/index.php/14848/why-does-repl-incorrectly-display-command-after-press-enter</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I'm having a small bug with the Clojure REPL - when I enter a command, after pressing the enter key, the command gets displayed incorrectly - basically the beginning of the text of the command that I entered is displayed for the first few characters, and then everything after that is overwritten with the same text of the command displayed with an indentation.&lt;/p&gt;
&lt;p&gt;Not sure if that's very clear, so I've added a pair of screenshots, &quot;before and after&quot;, to illustrate.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://arielche.net/clojurereplbugbefore.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://arielche.net/clojurereplbugafter.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;This issue seems similar to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/10025/have-prompts-previous-lines-command-started-disappearing&quot;&gt;this older question&lt;/a&gt;, although in that case the issue was with the &lt;code&gt;rlwrap&lt;/code&gt; library, which was patched afterwards.&lt;/p&gt;
&lt;p&gt;Is there a way to fix this?&lt;/p&gt;
</description>
<category>REPL</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14848/why-does-repl-incorrectly-display-command-after-press-enter</guid>
<pubDate>Mon, 22 Dec 2025 15:01:06 +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</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</guid>
<pubDate>Mon, 22 Dec 2025 13:45:04 +0000</pubDate>
</item>
<item>
<title>Octal escape sequence decoding in strings does not stop at non-octal digit</title>
<link>https://ask.clojure.org/index.php/14846/octal-escape-sequence-decoding-strings-does-stop-octal-digit</link>
<description>&lt;p&gt;Strings suppose to support standard Java escape sequences, including octal escape sequence: [0-7]{1,3} &lt;/p&gt;
&lt;p&gt;In Java decoding of octal sequences stop at the first non-octal digit or any other character if there are 1 or two octal digits in the escape sequence. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jshell&amp;gt; &quot;\18&quot;
$1 ==&amp;gt; &quot;\0018&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But Clojure reads up to 3 potentially octal digits greedily resulting in wrongly consuming non-octal digits:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\18&quot;
Syntax error reading source at (REPL:1:5).
Invalid digit: 8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;non-octal characters:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\1d&quot;
Syntax error reading source at (REPL:1:5).
Invalid digit: d
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And succeed only when there is line terminator or exact three octal digits in supported octal range:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Clojure 1.12.4
user=&amp;gt; &quot;\1&quot;
&quot;&quot;
user=&amp;gt; &quot;\1&quot;
&quot;&quot;
user=&amp;gt; &quot;\12&quot;
&quot;\n&quot;
user=&amp;gt; &quot;\123&quot;
&quot;S&quot;
user=&amp;gt; &quot;\123d&quot;
&quot;Sd&quot;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14846/octal-escape-sequence-decoding-strings-does-stop-octal-digit</guid>
<pubDate>Thu, 18 Dec 2025 09:35:53 +0000</pubDate>
</item>
<item>
<title>Trying to extract vec from vec - conj not working?</title>
<link>https://ask.clojure.org/index.php/14838/trying-to-extract-vec-from-vec-conj-not-working</link>
<description>&lt;p&gt;I'm trying to define a function that will extract a shorter vector from a longer vector. Here is the code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn vfromv [v1 v2 start stop] 
    (loop [i start] 
      (if (&amp;gt; i stop)
        &quot;Stop-val exceeded&quot;
          (do
            (conj v2 (get v1 i))
            (println i)
            (println (get v1 i))
            (if (&amp;gt; i 0) (println (get v2 i)))
            (println v2)
            (recur (inc i))))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Calling the function:&lt;br&gt;
(vfromv [0 1 2 3 4 5 6 7 8 9] [] 2 6)&lt;/p&gt;
&lt;p&gt; gives the repl output:&lt;br&gt;
2&lt;br&gt;
2&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
3&lt;br&gt;
3&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
4&lt;br&gt;
4&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
5&lt;br&gt;
5&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
6&lt;br&gt;
6&lt;br&gt;
nil&lt;br&gt;
[]&lt;br&gt;
&quot;Stop-val exceeded&quot;&lt;/p&gt;
&lt;p&gt;It looks like the conj function isn't working but I can't see why.&lt;/p&gt;
&lt;p&gt;Can anyone help me understand why this isn't working?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description>
<category>Beginner</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14838/trying-to-extract-vec-from-vec-conj-not-working</guid>
<pubDate>Mon, 15 Dec 2025 01:53:12 +0000</pubDate>
</item>
<item>
<title>Aliased namespace in tagged literal</title>
<link>https://ask.clojure.org/index.php/14829/aliased-namespace-in-tagged-literal</link>
<description>&lt;p&gt;&lt;strong&gt;Set up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Tagged literals are defined by setting a namespaced symbol in &lt;code&gt;data_readers.clj&lt;/code&gt; (or &lt;code&gt;data_readers.cljc&lt;/code&gt;). At load, Clojure merges all of the maps defined in &lt;code&gt;data_readers.clj(c)&lt;/code&gt; files found on the classpath into a single map. At read time, the symbol following a &lt;code&gt;#&lt;/code&gt; is checked in the merged data readers map, which determines which var to call with the contents of the following form.&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;#foo/bar [1 2 3]&lt;/code&gt; leads to the reader calling the equivalent of &lt;code&gt;(get *data-readers* 'foo/bar)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem statement&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The tag of a tagged literal must be determined when it is created. The namespace of the chosen tag is set and cannot be changed by a user. Unlike a fully qualified symbol with an aliased namespace, a tagged literal must what was chosen by the author.&lt;/p&gt;
&lt;p&gt;As an author of tagged literals, I want to write tags that will not clash with other tags by giving them complex/deep namespaces. For example, &lt;code&gt;{noahtheduke.lazytest/expect noahtheduke.lazytest/expect}&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As a user of tagged literals, I want to alias the namespace of tags and use it in my code. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; in src/data_readers.clj
{noahtheduke.lazytest/expect noahtheduke.lazytest/expect}

;; in test/noahtheduke/example_project/main-test.clj
(ns noahtheduke.example-project.main-test
  (:require
   [noahtheduke.lazytest :as-alias lt]
   [noahtheduke.lazytest.core :refer [defdescribe it]]))

(defdescribe some-test
  (it &quot;works&quot;
    #lt/expect (= 1 2)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;EDN&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is not related to edn at all and any potential change will be to Clojure itself.&lt;/p&gt;
</description>
<category>Syntax and reader</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14829/aliased-namespace-in-tagged-literal</guid>
<pubDate>Thu, 11 Dec 2025 20:01:16 +0000</pubDate>
</item>
<item>
<title>`find` docstring enhancement proposal</title>
<link>https://ask.clojure.org/index.php/14828/find-docstring-enhancement-proposal</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</guid>
<pubDate>Thu, 11 Dec 2025 12:41:48 +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</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</guid>
<pubDate>Tue, 09 Dec 2025 15:18:48 +0000</pubDate>
</item>
<item>
<title>not-found arg for invoking set (and vector)?</title>
<link>https://ask.clojure.org/index.php/14815/not-found-arg-for-invoking-set-and-vector</link>
<description>&lt;p&gt;Is there a reason that sets (and vectors) don't have a not-found argument for invoke?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;({:a :b} :c :not-found) ;;=&amp;gt; :not-found
user=&amp;gt; (#{:a :b} :c :not-found)
Execution error (ArityException) at user/eval1 (REPL:1).
Wrong number of args (2) passed to: clojure.lang.PersistentHashSet
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In ClojureScript it's already implemented:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user=&amp;gt; (#{:a :b :c} :d :not-found)
:not-found
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However not for vector:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cljs.user=&amp;gt;  ([] 0 :not-found)
Execution error (Error) at (&amp;lt;cljs repl&amp;gt;:1).
No item 0 in vector of length 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If JIRA issue + patch is welcome for this, I'm volunteering.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14815/not-found-arg-for-invoking-set-and-vector</guid>
<pubDate>Sat, 06 Dec 2025 15:58:45 +0000</pubDate>
</item>
</channel>
</rss>