<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions in ClojureCLR</title>
<link>https://ask.clojure.org/index.php/questions/clojureclr</link>
<description>Powered by Question2Answer</description>
<item>
<title>ClojureCLR: case with a boolean-literal branch returns the wrong value when bound to a local</title>
<link>https://ask.clojure.org/index.php/15235/clojureclr-boolean-literal-branch-returns-wrong-value-bound</link>
<description>&lt;p&gt;I was working on an project with claude, and found an issue with AOT compilation and unboxing.  Here is a summary (generated w/ claude)&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;A case whose branches are all boolean-typed, with at least one literal true/false, gives wrong results once its value is bound to a local. The same case in tail position is correct.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; (let [f (fn [k x] (case k :a (= 0 x) :b true false))]
   [(f :a 0) (f :a 1) (f :b 0) (f nil 0) (f :zzz 0)])
  ;=&amp;gt; [true false true false false]   ; correct

 (let [f (fn [k x] (let [r (case k :a (= 0 x) :b true false)] r))]
   [(f :a 0) (f :a 1) (f :b 0) (f nil 0) (f :zzz 0)])
  ;=&amp;gt; [true false true true true]     ; the `false` default reads as true
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;(let [f (fn [k x] (let [r (boolean (case k :a (= 0 x) :b true false))] r))] (f :a 0))
 ;=&amp;gt; InvalidProgramException: Common Language Runtime detected an invalid program.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; Reproduces on 1.12.2, 1.12.3-alpha8, and 1.12.6, with keyword, string, and int keys, with let and loop. Branches that are all calls ((= 0 x), (= 1 x)) are fine, as are cond, if, and a fn-call boundary around the case.&lt;/p&gt;
&lt;p&gt; What I think is happening, from master: BooleanExpr reports ClrType =&amp;gt; typeof(bool) but is not a MaybePrimitiveExpr. CaseExpr unifies its branch types to bool and CanEmitPrimitive only checks that type, so LetExpr declares a bool local and asks the case to emit unboxed. Inside CaseExpr.EmitExpr, the literal branch is not a MaybePrimitiveExpr, so it falls to Emit and pushes a boxed bool onto a stack slot typed bool. The non-null reference reads as true. IfExpr avoids this because its CanEmitPrimitive requires both branches to be MaybePrimitiveExpr.&lt;/p&gt;
&lt;p&gt; This looks like the same gap as CLJCLR-151, where David&#039;s comment proposes letting BooleanExpr implement MaybePrimitiveExpression. That change would fix this too. A smaller alternative is giving CaseExpr.CanEmitPrimitive the same guard IfExpr has.&lt;/p&gt;
&lt;p&gt; Is this already tracked, and should it go on CLJCLR-151 or a new ticket? Happy to write it up in JIRA if useful.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15235/clojureclr-boolean-literal-branch-returns-wrong-value-bound</guid>
<pubDate>Fri, 11 Sep 2026 17:25:20 +0000</pubDate>
</item>
<item>
<title>JVM-parity bug in how :clojure.datafy/class is set in clojureCLR</title>
<link>https://ask.clojure.org/index.php/15191/jvm-parity-bug-in-how-clojure-datafy-class-is-set-clojureclr</link>
<description>&lt;p&gt;As I was working on the &lt;code&gt;magic&lt;/code&gt; compiler (the compiler to build to il2cpp in Unity), I noticed i was not having the same behaviour for datafy than clojureCLR.&lt;/p&gt;
&lt;p&gt;In fact, we found a small JVM-parity bug in &lt;code&gt;clojure.datafy/datafy&lt;/code&gt;, in how &lt;code&gt;:clojure.datafy/class&lt;/code&gt; is set in ClojureCLR:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;;; JVM clojure (datafy.clj) : fully qualified name, e.g. my.ns.CombinationB
(vary-meta v assoc ::obj x ::class (-&amp;gt; x class .getName symbol))

;; MAGIC&#039;s port : .FullName is the CLR equivalent of .getName, so same result
(vary-meta v assoc ::obj x ::class (-&amp;gt; x class .FullName symbol))

;; ClojureCLR (Clojure.Source/clojure/datafy.clj) : .Name is only the short name,
;; e.g. CombinationB, so the namespace is lost
(vary-meta v assoc ::obj x ::class (-&amp;gt; x class .Name symbol))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This breaks code that resolves the class back from the metadata (e.g. reconstructing records from datafied data ). The fix is small change: &lt;code&gt;.Name&lt;/code&gt; → &lt;code&gt;.FullName&lt;/code&gt;.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15191/jvm-parity-bug-in-how-clojure-datafy-class-is-set-clojureclr</guid>
<pubDate>Tue, 21 Jul 2026 06:27:09 +0000</pubDate>
</item>
<item>
<title>Possible bug in conditional with NaN comparison</title>
<link>https://ask.clojure.org/index.php/15174/possible-bug-in-conditional-with-nan-comparison</link>
<description>&lt;p&gt;I encountered this possible bug while running a property-based test suite in a ClojureCLR project. Given a comparison between NaN in an if expression, it seemingly takes the wrong branch. &lt;/p&gt;
&lt;p&gt;Clojure (CLR)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;λ cljr
Clojure core loaded in 837 milliseconds.
Starting main
Clojure core loaded in 409 milliseconds.
Clojure 1.12.2
user=&amp;gt; (&amp;lt;= ##NaN ##NaN)
false
user=&amp;gt; (if (&amp;lt;= ##NaN ##NaN) true false)
true
user=&amp;gt; (let [t (&amp;lt;= ##NaN ##NaN)] (if t true false))
false

user=&amp;gt; (&amp;gt;= ##NaN ##NaN)
false
user=&amp;gt; (if (&amp;gt;= ##NaN ##NaN) true false)
true
user=&amp;gt; (let [t (&amp;gt;= ##NaN ##NaN)] (if t true false))
false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I wasn&#039;t able to replicate the issue on Clojure (JVM), C#, or F#.&lt;/p&gt;
&lt;p&gt;Clojure (JVM)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;λ clj
Clojure 1.12.0
user=&amp;gt; (&amp;lt;= ##NaN ##NaN)
false
user=&amp;gt; (if (&amp;lt;= ##NaN ##NaN) true false)
false
user=&amp;gt; (let [t (&amp;lt;= ##NaN ##NaN)] (if t true false))
false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;C#&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;using System;
					
public class Program
{
	public static void Main()
	{
		Console.WriteLine(Double.NaN &amp;lt;= Double.NaN);
		if (Double.NaN &amp;lt;= Double.NaN) {
			Console.WriteLine(true);
		} else {
			Console.WriteLine(false);
		}
		var t = Double.NaN &amp;lt;= Double.NaN;
		if (t) {
			Console.WriteLine(true);
		} else {
			Console.WriteLine(false);
		}
	}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;False&lt;br&gt;
False&lt;br&gt;
False&lt;/p&gt;
&lt;p&gt;F#&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;λ dotnet fsi

&amp;gt; nan &amp;lt;= nan;;                                                                
val it: bool = false

&amp;gt; if (nan &amp;lt;= nan) then true else false;;                          
val it: bool = false

&amp;gt; let t = nan &amp;lt;= nan;;
val t: bool = false

&amp;gt; if t then true else false;;
val it: bool = false
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/15174/possible-bug-in-conditional-with-nan-comparison</guid>
<pubDate>Sat, 11 Jul 2026 15:01:23 +0000</pubDate>
</item>
<item>
<title>Threading macro with update and when produces incorrect results</title>
<link>https://ask.clojure.org/index.php/14788/threading-macro-with-update-when-produces-incorrect-results</link>
<description>&lt;p&gt;Environment:&lt;br&gt;
- ClojureCLR version: 1.12.2&lt;br&gt;
- .NET version: 10&lt;br&gt;
- OS: MacOS 26.1&lt;/p&gt;
&lt;p&gt;Description:&lt;br&gt;
The pattern &lt;code&gt;(-&amp;gt; map (update :key #(when % (fn %))))&lt;/code&gt; &lt;br&gt;
fails in ClojureCLR but works correctly in Clojure JVM. When chaining multiple updates in a threading macro where the anonymous function contains &lt;code&gt;when&lt;/code&gt;, the result is incorrect or causes runtime errors.&lt;/p&gt;
&lt;p&gt;Expected Behavior:&lt;br&gt;
Should work identically to Clojure JVM - &lt;code&gt;update&lt;/code&gt; with a function that&lt;br&gt;
returns &lt;code&gt;nil&lt;/code&gt; should associate &lt;code&gt;nil&lt;/code&gt; to the key.&lt;br&gt;
Actual Behavior:&lt;br&gt;
[Crashes/Wrong values/500 errors in web handlers]&lt;br&gt;
Workaround:&lt;br&gt;
Use explicit conditionals instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; (let [value (when (:key map) (fn (:key map)))]
    (if value (assoc map :key value) map))&#039;
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14788/threading-macro-with-update-when-produces-incorrect-results</guid>
<pubDate>Sat, 29 Nov 2025 07:16:52 +0000</pubDate>
</item>
<item>
<title>How to use core.async from cljr command line tool?</title>
<link>https://ask.clojure.org/index.php/14766/how-to-use-core-async-from-cljr-command-line-tool</link>
<description>&lt;p&gt;At some point it would be good to facilitate use of core.async from cljr command line tool (clr.core.cli).&lt;/p&gt;
&lt;p&gt;I think what&#039;s required is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer&quot;&gt;clojure/tools.analyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/tools.analyzer.clr&quot;&gt;clojure/tools.analyzer.clr&lt;/a&gt; (depends on tools.analyzer, clr.tools.reader, clr.core.memoize -&amp;gt; clr.core.cache -&amp;gt; clr.data.priority-map)&lt;/li&gt;
&lt;li&gt;add a deps-clr.edn to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clr.core.async&quot;&gt;clojure/clr.core.async&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;also, archive &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clr.tools.analyzer&quot;&gt;clojure/clr.tools.analyzer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not urgent because it&#039;s possible to procure core.async from NuGet but it would be convenient if it could also be procured via git.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14766/how-to-use-core-async-from-cljr-command-line-tool</guid>
<pubDate>Mon, 24 Nov 2025 06:05:40 +0000</pubDate>
</item>
<item>
<title>Does cljr -Sdeps work for other people?</title>
<link>https://ask.clojure.org/index.php/14695/does-cljr-sdeps-work-for-other-people</link>
<description>&lt;p&gt;Putting the dependencies in a &lt;code&gt;deps-clr.edn&lt;/code&gt; file works.&lt;/p&gt;
&lt;p&gt;But not via &lt;code&gt;cljr -Sdeps&lt;/code&gt;. E.g.: try to launch nREPL server:&lt;br&gt;
&lt;code&gt;$ cljr -Sdeps &#039;{:deps {io.github.clojure/clr.tools.nrepl {:git/tag &quot;v0.1.2-alpha2&quot;}}}&#039; -X clojure.tools.nrepl/start-server!
Clojure core loaded in 4177 milliseconds.
Starting exec/tool
Clojure core loaded in 4207 milliseconds.
Namespace could not be loaded: clojure.tools.nrepl&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I did custom compile some things so wondering if it&#039;s just me. The README for clr.core.cli says -Sdeps is supported.&lt;/p&gt;
&lt;p&gt;I can malform the string and seems to throw no errors, I don&#039;t think it&#039;s being processed.&lt;/p&gt;
&lt;p&gt;Well I&#039;ll poke around and report back what I find meanwhile.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14695/does-cljr-sdeps-work-for-other-people</guid>
<pubDate>Mon, 01 Sep 2025 23:26:42 +0000</pubDate>
</item>
<item>
<title>Porting clojure libraries w/ java interop to clojure-clr</title>
<link>https://ask.clojure.org/index.php/14684/porting-clojure-libraries-w-java-interop-to-clojure-clr</link>
<description>&lt;p&gt;I&#039;ve been browsing around to understand the ecosystem.&lt;/p&gt;
&lt;p&gt;I see some libraries are ported to use CLR interop, like core.logic, some are part way finished, like core.async.&lt;/p&gt;
&lt;p&gt;Here is one maintainer&#039;s concerns, they would much like to point CLR users at a fork with CLR interop maintained by someone else:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/weavejester/medley/pull/96&quot;&gt;https://github.com/weavejester/medley/pull/96&lt;/a&gt;&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/weavejester/medley/pull/65&quot;&gt;https://github.com/weavejester/medley/pull/65&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For fun I examined how to use formal logic to do the code translation. Using Spec, and core.logic for code generation perhaps. I think it would require a lot of knowledge representation.&lt;/p&gt;
&lt;p&gt;It might be easier, for these non-core/crucial libraries to use LLMs to do the code translation, and direct the outputs into a set of forks. Perhaps the core libraries used as training data on what to do. This author has some great insights and details on a plausible workflow(s) including with the utility of editor integration. He has done interop translation and work with clojure:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://m.youtube.com/watch?v=oNhqqiKuUmw&quot;&gt;https://m.youtube.com/watch?v=oNhqqiKuUmw&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As it is only the interop which requires translation (subsets of clojure files), with a skilled hand there might be better results than some of what he illustrates.&lt;/p&gt;
&lt;p&gt;I looked around for a spec for the dotnet core API. I saw one they used to maintain but couldn&#039;t find a recent one. Though, all this LLM stuff is beyond me at this time. I thought to share some of my exploration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; Found the dotnet API spec/reference for netstandard 2.1.0, I think someone wrote they since moved it into dotnet/runtime but I couldn&#039;t find it there, dunno if this helps: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/dotnet/standard/blob/v2.1.0/src/netstandard/ref/System.IO.cs&quot;&gt;https://github.com/dotnet/standard/blob/v2.1.0/src/netstandard/ref/System.IO.cs&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14684/porting-clojure-libraries-w-java-interop-to-clojure-clr</guid>
<pubDate>Fri, 15 Aug 2025 01:31:53 +0000</pubDate>
</item>
<item>
<title>Does clojure-clr work on Android?</title>
<link>https://ask.clojure.org/index.php/14512/does-clojure-clr-work-on-android</link>
<description>&lt;p&gt;&lt;strong&gt;EDIT: &lt;/strong&gt; Answer is YES. Below is my long-winded exploration.&lt;/p&gt;
&lt;p&gt;I see one of the reasons for clojure-clr-next is it will work on more platforms, is Android one of those?&lt;/p&gt;
&lt;p&gt;I&#039;m using Termux to operate dotnet on Android.&lt;/p&gt;
&lt;p&gt;Both the clojure-clr global dotnet tool and locally compiled clojure-clr fail with exit code 1, no exceptions or anything. I tried dotnet-trace and it gets a partial trace, but no minidump. Puzzling as with the partial trace, the  documentation indicates an expectation of a minidump, maybe there is some unmet condition to emit the minidump I&#039;m not aware of yet (env variables for it didn&#039;t work).&lt;/p&gt;
&lt;p&gt;In the trace here is an early line followed by some of the last lines:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
&quot;system.linq!System.Linq.Enumerable.SelectManyS\ingleSelectorIterator\u003cSystem.Reflection.As\sembly,System.Type\u003e.MoveNext()&quot;&lt;/p&gt;
&lt;p&gt;[...]&lt;br&gt;
&quot;system.collections!System.Collections.Generic.\&lt;br&gt;
SortedSet\u003cSystem.Collections.Generic.KeyVa\luePair\u003cSystem.Int32,clojure.lang.CljCompi\ler.Ast.FnMethod\u003e\u003e.AddIfNotPresent(Sy\stem.Collections.Generic.KeyValuePair`2\u003cin\t,&lt;/p&gt;
&lt;p&gt;[...last line...]&lt;br&gt;
&quot;ManagedModule!System.Buffers.SharedArrayPool\u\003cSystem.Byte\u003e.Trim()&quot;&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So maybe something to do with reflection, or that SharedArrayPool?&lt;/p&gt;
&lt;p&gt;I tried inserting some logging to Clojure.Main, but nothing logged as it appears to fail before CljMain.Main() is called. Possibly fails during setting up attributes on one of the classes, in one of the Symbol.intern() or RT.var() calls or somewhere else?&lt;/p&gt;
&lt;p&gt;Couldn&#039;t run the &lt;code&gt;dotnet msbuild build.proj -t:Test -p:TestTargetFramework=net8.0&lt;/code&gt;, fails with:&lt;br&gt;
&lt;code&gt;Clojure.Main -&amp;gt; /data/data/com.termux/files/home/dev/clojure-clr/Clojure/Clojure.Main/bin/Debug/net8.0/Clojure.Main.dll
  ClojureCompileAssets = &#039;&#039;
  ClojureMainAssets = &#039;&#039;
  ClojureTestsAssets = &#039;&#039;
/data/data/com.termux/files/home/dev/clojure-clr/Clojure/build.proj(177,5): error MSB3073: The command &quot;dotnet run --project /data/data/com.termux/files/home/dev/clojure-clr/Clojure/Clojure.Main --framework net8.0 -c Debug -p:TargetOS=linux-bionic -p:TargetPlatform=arm64 -p:TargetFramework=net8.0 -p:TargetFrameworks=&#039;net8.0&#039; -- run_test.clj&quot; exited with code 1.&lt;/code&gt;&lt;br&gt;
I had to edit build.proj a bit to get custom -p:TargetFrameworks and such to pass through, but still fails with exit code 1.&lt;/p&gt;
&lt;p&gt;Well I&#039;ll continue poking around in this uncharted territory.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14512/does-clojure-clr-work-on-android</guid>
<pubDate>Sat, 19 Apr 2025 19:59:28 +0000</pubDate>
</item>
<item>
<title>CLR behavior of tools.namespace does not match the JVM implementation</title>
<link>https://ask.clojure.org/index.php/14284/clr-behavior-tools-namespace-does-not-match-implementation</link>
<description>&lt;p&gt;I noticed a few behavioral differences between the CLR and JVM implementations of &lt;code&gt;tools.namespace&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As an example, the following tests will pass in the JVM implementation and fail in the CLR implementation. In CLR, &lt;code&gt;files-2&lt;/code&gt; is empty and &lt;code&gt;::dir/time&lt;/code&gt; is an instant.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns clojure.tools.namespace.repl-test
  (:require [clojure.test :refer [deftest is]]
            [clojure.tools.namespace.dir :as dir]
            [clojure.tools.namespace.find :as find]
            [clojure.tools.namespace.repl :as repl]
            [clojure.tools.namespace.test-helpers :as help]))

(deftest t-repl-scan
  (let [dir        (help/create-temp-dir &quot;t-repl-scan&quot;)
        _main-clj  (help/create-source dir &#039;example.main :clj &#039;[example.one])
        _one-cljc  (help/create-source dir &#039;example.one :clj)
        _other-dir (help/create-temp-dir &quot;t-repl-scan-other&quot;)
        files-1    (::dir/files (repl/scan {:platform find/clj}))
        files-2    (::dir/files (repl/scan {:platform find/clj}))]
    (is (not-empty files-1))
    (is (not-empty files-2))
    (is (= files-1 files-2))))

(deftest t-repl-scan-time
  (let [scan (repl/scan {:platform find/clj})]
    (is (integer? (::dir/time scan)))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After discussing with other contributors, the question of intent came up and this test was proposed as something that correctly captures the intent of &lt;code&gt;repl/scan&lt;/code&gt;. However, if this is the intended behavior, then a new problem arises as this test fails in the JVM implementation.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(deftest t-repl-scan
  (try
    (let [dir       (help/create-temp-dir &quot;t-repl-scan&quot;)
          _main-clj (help/create-source dir &#039;example.main :clj &#039;[example.one])
          _one-cljc (help/create-source dir &#039;example.one :clj)
          other-dir (help/create-temp-dir &quot;t-repl-scan-other&quot;)
          _         (repl/set-refresh-dirs dir other-dir)
          scan1     (repl/scan {:platform find/clj})
          scan2     (repl/scan {:platform find/clj})
          files-1   (::dir/files scan1)
          files-2   (::dir/files scan2)]
      (is (= (count files-1) 2))
      (is (= (count files-2) 0)))
    (finally (repl/clear))))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A couple things I think would help here:&lt;br&gt;
 1. Flesh out the &lt;code&gt;tools.namespace&lt;/code&gt; (JVM) test suite to capture all the intended behavior.&lt;br&gt;
 2. Realign &lt;code&gt;clr.tools.namespace&lt;/code&gt; with &lt;code&gt;tools.namespace&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Point 1 will provide a good baseline for point 2, as well as any other existing/future ports of &lt;code&gt;tools.namespace&lt;/code&gt; and help prevent things from diverging in the future as changes are made.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As of writing, &lt;code&gt;repl/scan&lt;/code&gt; will throw an &lt;code&gt;InvalidCastException&lt;/code&gt; on CLR. To fix this, replace &lt;code&gt;clojure.tools.namespace.dir/modified-files&lt;/code&gt; with this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defn- modified-files [tracker files]
  (filter #(DateTime/op_LessThan ^DateTime (::time tracker System.DateTime/UnixEpoch) (.get_LastWriteTimeUtc ^FileSystemInfo %)) files))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14284/clr-behavior-tools-namespace-does-not-match-implementation</guid>
<pubDate>Thu, 05 Dec 2024 14:44:05 +0000</pubDate>
</item>
<item>
<title>Porting .NET 4.8 application using Clojure CLR to .NET 8</title>
<link>https://ask.clojure.org/index.php/14187/porting-net-4-8-application-using-clojure-clr-to-net-8</link>
<description>&lt;p&gt;I am porting a C# application (AutoCAD plugin to be exact) from .NET 4.8 to .NET 8. &lt;/p&gt;
&lt;p&gt;The code uses some Clojure CLR. &lt;br&gt;
In .NET 4.8 the clojure namespaces were compiled to assemblies (.dll files) using Clojure.Compile. &lt;br&gt;
At runtime, these namespaces were then loaded using clojure.lang.RT.load &lt;/p&gt;
&lt;p&gt;However, precompiling clojure clr code is not possible in .NET 8. (&lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.clojure.org/index.php/13866/is-still-possible-compile-cljr-files-dll-exe-dotent-and-above&quot;&gt;https://ask.clojure.org/index.php/13866/is-still-possible-compile-cljr-files-dll-exe-dotent-and-above&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;If I understood correctly, the recommended approach is to include the clojure sources with the application and then load the clojure namespaces using clojure.clr.api.Clojure class?&lt;br&gt;
I could not find any examples or documentation on how to set up my application / environment so that clojure.core/load will find my .clj files. &lt;/p&gt;
&lt;p&gt;On page&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure-clr/wiki/Using-ClojureCLR-in-a-C%23-project&quot;&gt;https://github.com/clojure/clojure-clr/wiki/Using-ClojureCLR-in-a-C#-project&lt;/a&gt;&lt;br&gt;
there is instructions on how to invoke clojure.core/load&lt;/p&gt;
&lt;p&gt;IFn load= clojure.clr.api.Clojure.var(&quot;clojure.core&quot;, &quot;load&quot;);&lt;br&gt;
load.invoke(&quot;some.thing&quot;);&lt;/p&gt;
&lt;p&gt;However, clojure.core/load is documented to use CLASSPATH to find namespaces. Does this also apply in Cojure CLR, i.e. should I define an appropriate CLASSPATH environment variable before calling clojure.core/load ?&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojuredocs.org/clojure.core/load&quot;&gt;https://clojuredocs.org/clojure.core/load&lt;/a&gt;&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14187/porting-net-4-8-application-using-clojure-clr-to-net-8</guid>
<pubDate>Sat, 12 Oct 2024 15:55:56 +0000</pubDate>
</item>
<item>
<title>Is it still possible to compile cljr files to dll/exe on dotent 6 and above?</title>
<link>https://ask.clojure.org/index.php/13866/is-still-possible-compile-cljr-files-dll-exe-dotent-and-above</link>
<description>&lt;p&gt;Is it still possible to compile cljr files to dll/exe on dotent 6 and above?&lt;/p&gt;
&lt;p&gt;I get the repl woking ,but don&#039;t know to how to make a exe out of it.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13866/is-still-possible-compile-cljr-files-dll-exe-dotent-and-above</guid>
<pubDate>Wed, 01 May 2024 05:28:54 +0000</pubDate>
</item>
<item>
<title>Newbie question about namespaces and strategy for C# -&gt; CLJ in general</title>
<link>https://ask.clojure.org/index.php/13459/newbie-question-about-namespaces-and-strategy-for-general</link>
<description>&lt;pre&gt;&lt;code&gt;    static void Main()
    {
        try
        {
            IFn load = clojure.clr.api.Clojure.var(&quot;clojure.core&quot;, &quot;load&quot;);

            // Below code line seems to expect clojure code (non-compiled) in path
            // bin\Debug\net7.0\clojure\hello.test.clj
            // 
            // OR a compiled dll: 
            //
            // from folderstructure 
            // ./clojure/hello/test.clj
            // &amp;gt; clojure.compile clojure.hello.test
            // 
            // with content in clj file like:
            //   (ns clojure.hello.test)
            //   (defn output[] &quot;ninja&quot;)
            var r = load.invoke(&quot;hello.test&quot;); 
            IFn helloFn = clojure.clr.api.Clojure.var(&quot;clojure.hello.test&quot;, &quot;output&quot;);
            var result = helloFn.invoke();
            Console.WriteLine(&quot;Calling compiled clj from C#, Got: &quot; + result);
        }
        catch (Exception ex)
        {
            Console.WriteLine($&quot;Error: {ex.Message}&quot;);
        }
    }
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/13459/newbie-question-about-namespaces-and-strategy-for-general</guid>
<pubDate>Sun, 12 Nov 2023 21:32:45 +0000</pubDate>
</item>
<item>
<title>clojure-clr nrepl - .NET Standard 2.1. does not work with .NET 7</title>
<link>https://ask.clojure.org/index.php/12954/clojure-clr-nrepl-net-standard-2-1-does-not-work-with-net-7</link>
<description>&lt;p&gt;I&#039;ve been encountering some issues when attempting to load libraries using clojure-clr in .NET 7 (core.async and clojure.tools.nrepl)&lt;/p&gt;
&lt;p&gt;With the recent inclusion of NREPL, I was keen to explore its functionality. However, I&#039;m met with an error when I try to require the namespace, stating:&lt;/p&gt;
&lt;p&gt;&quot;Could not locate clojure/tools/nrepl with extensions .cljr, .cljc, .cljr, .cljr.dll, .cljc.dll, or .clj.dll on load path.&quot;&lt;/p&gt;
&lt;p&gt;It&#039;s interesting to note the distinction between the clojure-clr nrepl library and core.async, particularly in comparison to libraries like clojure.test.generative. The latter, for example, is compiled to .NET Standard 2.1 and functions correctly.&lt;/p&gt;
&lt;p&gt;To aid in addressing this problem, I&#039;ve created a repository which reproduces the nrepl bug. You can find it here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Dangercoder/clojure-clr-bug-report-1&quot;&gt;https://github.com/Dangercoder/clojure-clr-bug-report-1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&#039;m using dotnet tooling to manage dependencies.&lt;/p&gt;
&lt;p&gt;Furthermore, I believe that resolving the issues with core.async is crucial since it would enable interoperability with &lt;a rel=&quot;nofollow&quot; href=&quot;https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task?view=net-7.0&quot;&gt;https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task?view=net-7.0&lt;/a&gt;. This feature is prevalent throughout the .NET environment.&lt;/p&gt;
&lt;p&gt;Your assistance and input are much appreciated!&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12954/clojure-clr-nrepl-net-standard-2-1-does-not-work-with-net-7</guid>
<pubDate>Mon, 22 May 2023 18:59:50 +0000</pubDate>
</item>
<item>
<title>Semantics of as-file differs from Clojure</title>
<link>https://ask.clojure.org/index.php/12580/semantics-of-as-file-differs-from-clojure</link>
<description>&lt;p&gt;The ClojureCLR version of &lt;code&gt;io/as-file&lt;/code&gt; returns a &lt;code&gt;FileInfo&lt;/code&gt; object, which can only represent a file (and not a directory as those are represented by the &lt;code&gt;DirectoryInfo&lt;/code&gt; class). JVM CLojure OTOH returns a &lt;code&gt;File&lt;/code&gt; object, which can represent both. This leads to different outcomes in evaluation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clojure&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (require &#039;[clojure.java.io :as io])
nil
user=&amp;gt; (.exists (io/as-file &quot;/&quot;))
true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;ClojureCLR&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (require &#039;[clojure.clr.io :as io])
nil
user=&amp;gt; (.Exists (io/as-file &quot;/&quot;))
false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Suggested fix would be to return a &lt;code&gt;FileSystemInfo&lt;/code&gt; object, which is the parent class of both &lt;code&gt;FileInfo&lt;/code&gt; and &lt;code&gt;DirectoryInfo&lt;/code&gt;, and as such is capable of representing both, similar to the Java &lt;code&gt;File&lt;/code&gt; class.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12580/semantics-of-as-file-differs-from-clojure</guid>
<pubDate>Mon, 23 Jan 2023 00:13:37 +0000</pubDate>
</item>
<item>
<title>Using proxy to extend MemoryStream fails on Close</title>
<link>https://ask.clojure.org/index.php/12549/using-proxy-to-extend-memorystream-fails-on-close</link>
<description>&lt;p&gt;For some unit tests, I need to be able to read the contents of a &lt;code&gt;MemoryStream&lt;/code&gt; after it has been closed. As this isn&#039;t possible, I want to create a memory stream proxy where the call to &lt;code&gt;Close&lt;/code&gt; is a no-op, allowing me to read from it even when code outside of my control has attemped closing it. This however won&#039;t work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;REPL&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(import [System.IO MemoryStream StreamWriter])
(let [stream (proxy [MemoryStream] [] (Close [] (println &quot;close!&quot;)))]
  (doto (StreamWriter. stream)
        (.Write &quot;testing&quot;)
        (.Close)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;output&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;close!
Execution error (InvalidProgramException) at System.Diagnostics.StackFrame/Write (NO_FILE:0).
Cannot create boxed ByRef-like values.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;While it&#039;s evident my proxied &lt;code&gt;Close&lt;/code&gt; method is called, an error is thrown just after.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12549/using-proxy-to-extend-memorystream-fails-on-close</guid>
<pubDate>Sun, 15 Jan 2023 00:08:50 +0000</pubDate>
</item>
<item>
<title>slurp without encoding prints erroneous warning</title>
<link>https://ask.clojure.org/index.php/12524/slurp-without-encoding-prints-erroneous-warning</link>
<description>&lt;p&gt;ClojureCLR &lt;code&gt;slurp&lt;/code&gt; erroneously prints a warning unless encoding is explicitly provided:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ touch foo

$ clojure -M -e &#039;(slurp &quot;foo&quot;)&#039;
&quot;&quot;

$ Clojure.Main -e &#039;(slurp &quot;foo&quot;)&#039;
WARNING: (slurp f enc) is deprecated, use (slurp f :encoding enc).
&quot;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The cause of this is found in the &lt;code&gt;normalize-slurp-opts&lt;/code&gt; function, which differs from the JVM version &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure-clr/blob/44aeb6f59053f3e5005fa5eb7947805f035976e0/Clojure/Clojure.Source/clojure/core.clj#L7012&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12524/slurp-without-encoding-prints-erroneous-warning</guid>
<pubDate>Fri, 06 Jan 2023 15:53:49 +0000</pubDate>
</item>
<item>
<title>Cannot install Clojure.Main 1.10.0-rc1 dotnet tool</title>
<link>https://ask.clojure.org/index.php/10427/cannot-install-clojure-main-1-10-0-rc1-dotnet-tool</link>
<description>&lt;p&gt;UPDATE 2021/4/10 -- 1.10.0-rc2 from nuget installs and runs!&lt;/p&gt;
&lt;p&gt;Pretty much just the title, I&#039;m able to install and run beta1, but rc1 is spitting out some problem about DotnetToolSettings.xml not being correct. To my eye, those files look the same in both packages, so I&#039;m not sure what to do. Output comparing both files and the install command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;john@bbox ~ (git)-[master] % cat .nuget/packages/clojure.main/1.10.0-rc1/tools/net5.0/any/DotnetToolSettings.xml
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;DotNetCliTool Version=&quot;1&quot;&amp;gt;
  &amp;lt;Commands&amp;gt;
    &amp;lt;Command Name=&quot;Clojure.Main&quot; EntryPoint=&quot;Clojure.Main.dll&quot; Runner=&quot;dotnet&quot; /&amp;gt;
  &amp;lt;/Commands&amp;gt;
&amp;lt;/DotNetCliTool&amp;gt;
john@bbox ~ (git)-[master] % cat .nuget/packages/clojure.main/1.10.0-beta1/tools/net5.0/any/DotnetToolSettings.xml
&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;DotNetCliTool Version=&quot;1&quot;&amp;gt;
  &amp;lt;Commands&amp;gt;
    &amp;lt;Command Name=&quot;Clojure.Main&quot; EntryPoint=&quot;Clojure.Main.dll&quot; Runner=&quot;dotnet&quot; /&amp;gt;
  &amp;lt;/Commands&amp;gt;
&amp;lt;/DotNetCliTool&amp;gt;
john@bbox ~ (git)-[master] % dotnet tool install --global Clojure.Main --version 1.10.0-rc1      
The settings file in the tool&#039;s NuGet package is invalid: Failed to retrieve tool configuration: Could not find a part of the path &#039;/home/john/.dotnet/tools/.store/clojure.main/1.10.0-rc1/clojure.main/1.10.0-RC1/tools/net5.0/any/DotnetToolSettings.xml&#039;.
Tool &#039;clojure.main&#039; failed to install. Contact the tool author for assistance.
1 john@bbox ~ (git)-[master] % dotnet tool install --global Clojure.Main --version 1.10.0-beta1
Tools directory &#039;/home/john/.dotnet/tools&#039; is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:

cat &amp;lt;&amp;lt; \EOF &amp;gt;&amp;gt; ~/.bash_profile
# Add .NET Core SDK tools
export PATH=&quot;$PATH:/home/john/.dotnet/tools&quot;
EOF

You can add it to the current session by running the following command:

export PATH=&quot;$PATH:/home/john/.dotnet/tools&quot;

You can invoke the tool using the following command: Clojure.Main
Tool &#039;clojure.main&#039; (version &#039;1.10.0-beta1&#039;) was successfully installed.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;version info&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;john@bbox ~ (git)-[master] % uname -a        
Linux bbox 5.10.23-0-lts #1-Alpine SMP Mon, 15 Mar 2021 06:55:22 +0000 x86_64 Linux
john@bbox ~ (git)-[master] % dotnet --version
5.0.202
john@bbox ~ (git)-[master] 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output of dotnet install is also the same for dotnet core 3.1&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/10427/cannot-install-clojure-main-1-10-0-rc1-dotnet-tool</guid>
<pubDate>Thu, 08 Apr 2021 05:42:15 +0000</pubDate>
</item>
<item>
<title>How do I tag a game object in arcadia?</title>
<link>https://ask.clojure.org/index.php/8225/how-do-i-tag-a-game-object-in-arcadia</link>
<description>&lt;p&gt;How do I tag a game object in unity via Arcadia?&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/8225/how-do-i-tag-a-game-object-in-arcadia</guid>
<pubDate>Sat, 27 Jul 2019 21:22:47 +0000</pubDate>
</item>
<item>
<title>Update README to point to bug reporting to clojure.atlassian.net/projects/CLJCLR</title>
<link>https://ask.clojure.org/index.php/4845/update-readme-reporting-clojure-atlassian-projects-cljclr</link>
<description></description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4845/update-readme-reporting-clojure-atlassian-projects-cljclr</guid>
<pubDate>Wed, 22 May 2019 20:43:33 +0000</pubDate>
</item>
<item>
<title>Add gitter.im and slack links to README</title>
<link>https://ask.clojure.org/index.php/4844/add-gitter-im-and-slack-links-to-readme</link>
<description></description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4844/add-gitter-im-and-slack-links-to-readme</guid>
<pubDate>Mon, 18 Mar 2019 21:49:18 +0000</pubDate>
</item>
<item>
<title>clojure/test-clojure/reducers seems to take a very long time to run</title>
<link>https://ask.clojure.org/index.php/4857/clojure-test-clojure-reducers-seems-take-very-long-time-run</link>
<description></description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4857/clojure-test-clojure-reducers-seems-take-very-long-time-run</guid>
<pubDate>Sat, 02 Dec 2017 16:30:30 +0000</pubDate>
</item>
<item>
<title>Upgrading to .NET Core 2.0</title>
<link>https://ask.clojure.org/index.php/4856/upgrading-to-net-core-2-0</link>
<description>&lt;p&gt;Hello, I&#039;ve been skimming through the clojure-clr code and I was wondering if it&#039;s possible to upgrade targeting to .NET Core 2.0.&lt;br&gt;
I&#039;ve opened this issue with two questions in mind:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it possible?&lt;/li&gt;
&lt;li&gt;Is it worth it ?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I want to hear your thoughts on this.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4856/upgrading-to-net-core-2-0</guid>
<pubDate>Mon, 06 Nov 2017 08:20:06 +0000</pubDate>
</item>
<item>
<title>ClojureClr assembly loading from referenced dll</title>
<link>https://ask.clojure.org/index.php/4855/clojureclr-assembly-loading-from-referenced-dll</link>
<description>&lt;p&gt;I&#039;ve created a repository demonstrating the bug (see commit messsages for details)&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/mdrobulis/ClojureClr-Dll-bug&quot;&gt;https://github.com/mdrobulis/ClojureClr-Dll-bug&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;FWI&lt;br&gt;
Repo Project files expect to find clojure.core.server.dll in C:\ClojureClr\ dir (downloaded from  &lt;a rel=&quot;nofollow&quot; href=&quot;https://sourceforge.net/projects/clojureclr/files/&quot;&gt;https://sourceforge.net/projects/clojureclr/files/&lt;/a&gt; version 1.8.0 prod)&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4855/clojureclr-assembly-loading-from-referenced-dll</guid>
<pubDate>Tue, 28 Feb 2017 08:49:29 +0000</pubDate>
</item>
<item>
<title>Compute RT.DEFAULT_IMPORTS at startup</title>
<link>https://ask.clojure.org/index.php/4847/compute-rt-defaultimports-at-startup</link>
<description>&lt;p&gt;The set of public class names in System will vary across systems: 3.5 vs 4.x, CLR vs Mono.  Should determine the names to import at startup.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4847/compute-rt-defaultimports-at-startup</guid>
<pubDate>Sat, 03 Sep 2016 14:11:22 +0000</pubDate>
</item>
<item>
<title>Problems building on Linux</title>
<link>https://ask.clojure.org/index.php/4854/problems-building-on-linux</link>
<description>&lt;p&gt;I was trying to build ClojureCLR on Arch Linux but I was getting (link: &lt;a rel=&quot;nofollow&quot; href=&quot;http://sprunge.us/MVUX&quot;&gt;http://sprunge.us/MVUX&lt;/a&gt; text: this error) with both MonoDevelop and xbuild (following the directions (link: &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/clojure/clojure-clr/wiki/Developing-ClojureCLR#building&quot;&gt;https://github.com/clojure/clojure-clr/wiki/Developing-ClojureCLR#building&lt;/a&gt; text: here)).&lt;/p&gt;
&lt;p&gt;The attached patch fixes the problem and it works out of the box with MonoDevelop, but it requires an extra step to download the dependencies via NuGet when using xbuild:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;From the repository&#039;s root&lt;/h2&gt;
&lt;p&gt;nuget restore Clojure/ClojureCLR.sln&lt;br&gt;
xbuild Clojure/build.proj /target:Dist /p:Configuration=&quot;Release 4.0&quot; /p:Platform=&quot;Any CPU&quot; /p:Runtime=&quot;Mono&quot;&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I didn&#039;t have a chance to test it on Windows but I think it should work with a recent (&amp;gt;2.7) version of NuGet.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4854/problems-building-on-linux</guid>
<pubDate>Fri, 16 Oct 2015 14:54:26 +0000</pubDate>
</item>
<item>
<title>AST nodes need to record the context in which it was parsed (RHC).</title>
<link>https://ask.clojure.org/index.php/4848/ast-nodes-need-to-record-the-context-in-which-it-was-parsed-rhc</link>
<description></description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4848/ast-nodes-need-to-record-the-context-in-which-it-was-parsed-rhc</guid>
<pubDate>Sat, 22 Aug 2015 14:26:37 +0000</pubDate>
</item>
<item>
<title>Regularize handling of clojure.compile.x environment variables</title>
<link>https://ask.clojure.org/index.php/4860/regularize-handling-clojure-compile-environment-variables</link>
<description>&lt;p&gt;A long time ago we switched to CLOJURE_COMPILE_X, due to a request for POSIX conformance.&lt;br&gt;
Not clear that we have had discipline subsequently.&lt;br&gt;
Solution:  Allow either CLOJURE_COMPILE_X_Y or clojure.compile.x-y, internalize to compiler option x-y to match ClojureJVM.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4860/regularize-handling-clojure-compile-environment-variables</guid>
<pubDate>Mon, 17 Aug 2015 05:50:21 +0000</pubDate>
</item>
<item>
<title>Make more fields public in AST nodes</title>
<link>https://ask.clojure.org/index.php/4852/make-more-fields-public-in-ast-nodes</link>
<description>&lt;p&gt;Enhance writing outside code to manipulate AST trees.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4852/make-more-fields-public-in-ast-nodes</guid>
<pubDate>Sat, 11 Jul 2015 17:53:18 +0000</pubDate>
</item>
<item>
<title>Cannot call new/hidden interface method</title>
<link>https://ask.clojure.org/index.php/4853/cannot-call-new-hidden-interface-method</link>
<description>&lt;p&gt;In gvec, there is place where we try to call (.count ^IPersistentVector v).&lt;br&gt;
This fails.  the method count has the &#039;new&#039; modifier in IPersistentVector.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4853/cannot-call-new-hidden-interface-method</guid>
<pubDate>Mon, 25 May 2015 07:30:56 +0000</pubDate>
</item>
<item>
<title>Error when starting Clojure.Main.exe</title>
<link>https://ask.clojure.org/index.php/4851/error-when-starting-clojure-main-exe</link>
<description>&lt;p&gt;I received the following error when trying to start ClojureCLR through Mono.&lt;/p&gt;
&lt;p&gt;Release 4.0 general$ mono Clojure.Main.exe &lt;/p&gt;
&lt;p&gt;Unhandled Exception:&lt;br&gt;
System.TypeInitializationException: An exception was thrown by the type initializer for Clojure.CljMain ---&amp;gt; System.TypeInitializationException: An exception was thrown by the type initializer for clojure.lang.RT ---&amp;gt; System.IO.FileNotFoundException: Could not locate clojure.core.clj.dll or clojure/core.clj on load path.&lt;br&gt;
  at clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT.load (System.String relativePath) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT.DoInit () (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT..cctor () (link: 0x00000) in :0 &lt;br&gt;
  --- End of inner exception stack trace ---&lt;br&gt;
  at Clojure.CljMain..cctor () (link: 0x00000) in :0 &lt;br&gt;
  --- End of inner exception stack trace ---&lt;br&gt;
(link: ERROR) FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for Clojure.CljMain ---&amp;gt; System.TypeInitializationException: An exception was thrown by the type initializer for clojure.lang.RT ---&amp;gt; System.IO.FileNotFoundException: Could not locate clojure.core.clj.dll or clojure/core.clj on load path.&lt;br&gt;
  at clojure.lang.RT.load (System.String relativePath, Boolean failIfNotFound) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT.load (System.String relativePath) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT.DoInit () (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.RT..cctor () (link: 0x00000) in :0 &lt;br&gt;
  --- End of inner exception stack trace ---&lt;br&gt;
  at Clojure.CljMain..cctor () (link: 0x00000) in :0 &lt;br&gt;
  --- End of inner exception stack trace ---&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4851/error-when-starting-clojure-main-exe</guid>
<pubDate>Sun, 26 Oct 2014 17:02:27 +0000</pubDate>
</item>
<item>
<title>Use Type.AssemblyQualifiedName in ObjExpr.EmitValue when generating code for types</title>
<link>https://ask.clojure.org/index.php/4859/assemblyqualifiedname-objexpr-emitvalue-generating-types</link>
<description>&lt;p&gt;ilg.EmitString(((Type)value).AssemblyQualifiedName);  // &amp;lt;- instead of FullName&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                ilg.EmitCall(Compiler.Method_RT_classForName);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Using AssemblyQualifiedName instead of FullName should make the RT.classForName call succeed more quickly.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4859/assemblyqualifiedname-objexpr-emitvalue-generating-types</guid>
<pubDate>Thu, 02 Oct 2014 05:15:46 +0000</pubDate>
</item>
<item>
<title>spit does not truncate, leaves tail of original file if output is shorter length.</title>
<link>https://ask.clojure.org/index.php/4858/spit-does-truncate-leaves-tail-original-output-shorter-length</link>
<description>&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;(spit &quot;c:/tmp/spit.txt&quot;   &quot;012345&quot;)&lt;br&gt;
(spit &quot;c:/tmp/spit.txt&quot;   &quot;BB&quot;)&lt;/p&gt;
&lt;p&gt;Results in a file containing:  BB345.&lt;/p&gt;
&lt;p&gt;Reported via email by cees van Kemenade.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4858/spit-does-truncate-leaves-tail-original-output-shorter-length</guid>
<pubDate>Tue, 30 Sep 2014 02:59:17 +0000</pubDate>
</item>
<item>
<title>REPL input broken</title>
<link>https://ask.clojure.org/index.php/4850/repl-input-broken</link>
<description>&lt;p&gt;REPL doesn&#039;t handle backspace character correctly, even backing up over the &quot;user=&amp;gt;&quot; prompt, yet apparently not being captured at all during evaluation.  Also, this is what happens when I type &quot;&lt;strong&gt;clojure &quot; &amp;lt;----space, instead of &quot;&lt;/strong&gt;clojure-&quot; &amp;lt;----dash, while trying to evaluate &quot;&lt;strong&gt;clojure-version&lt;/strong&gt;&quot;:&lt;/p&gt;
&lt;p&gt;$ mono Clojure.Main.exe&lt;br&gt;
Clojure 1.5.0&lt;br&gt;
user=&amp;gt; &lt;strong&gt;clojure CompilerException System.InvalidOperationException: Unable to resolve symbol: &lt;/strong&gt;clojure in this context&lt;br&gt;
  at clojure.lang.Compiler.ResolveIn (clojure.lang.Namespace n, clojure.lang.Symbol symbol, Boolean allowPrivate) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.Compiler.Resolve (clojure.lang.Symbol symbol) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.Compiler.AnalyzeSymbol (clojure.lang.Symbol symbol) (link: 0x00000) in :0 &lt;br&gt;
  at clojure.lang.Compiler.Analyze (clojure.lang.CljCompiler.Ast.ParserContext pcontext, System.Object form, System.String name) (link: 0x00000) in :0 , compiling: (NO_SOURCE_PATH:0:0) &lt;/p&gt;
&lt;p&gt;...and further input is ignored, requiring ^C to exit.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4850/repl-input-broken</guid>
<pubDate>Sun, 03 Aug 2014 19:13:16 +0000</pubDate>
</item>
<item>
<title>RT.load does not correctly map namespace to source file or dll name</title>
<link>https://ask.clojure.org/index.php/4849/rt-load-does-not-correctly-map-namespace-source-file-dll-name</link>
<description>&lt;p&gt;When doing (from C#)&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RT.load( &quot;my.util&quot;, true );&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and having directory containing my\util.clj on CLOJURE_LOAD_PATH I get&lt;/p&gt;
&lt;p&gt;&lt;code&gt;System.IO.FileNotFoundException: Could not locate my.util.clj.dll or my.util.clj on load path.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I believe the latter is wrong - it should be looking for my\util.clj on load path?&lt;/p&gt;
&lt;p&gt;Also, there is a problem with compiled assemblies whose namespace contains -&#039;s. For example, if I have compiled namespace myns.foo-bar (in file myns\foo_bar.clj) it produces myns.foo_bar.clj.dll. If I try to load it like so:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RT.load( &quot;myns.foo-bar&quot;, true );&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;System.IO.FileNotFoundException: Could not locate myns.foo-bar.clj.dll or myns.foo-bar.clj on load path.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I think RT.load should &quot;know&quot; that compiling a namespace with - character in it is mapped to _ on the corresponding dll or source file name.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4849/rt-load-does-not-correctly-map-namespace-source-file-dll-name</guid>
<pubDate>Mon, 30 Jun 2014 10:51:40 +0000</pubDate>
</item>
<item>
<title>Clojure.Compile.exe create single dll for all compiled .clj files</title>
<link>https://ask.clojure.org/index.php/4846/clojure-compile-exe-create-single-dll-for-all-compiled-files</link>
<description>&lt;p&gt;I&#039;ve created a patch for ClojureCLR that allows the Clojure.Compile.exe to build a single .dll or .exe when given a list of .clj files. This is basically the same concept as the ILMerge, but it gives the benefit to the programmer with a project containing many .clj files, rather than only to clojure.dll itself.&lt;/p&gt;
&lt;p&gt;The merged/separate option can be specified at the commandline, so users can choose the previous method if they prefer.&lt;/p&gt;
&lt;p&gt;I didn&#039;t remove ILMerge from the ClojureCLR build process, but it should theoretically be easy to do if desired.&lt;/p&gt;
&lt;p&gt;ILMerge is working, but its license doesn&#039;t allow redistribution &amp;amp; would require each programmer to learn to use the tool (unless its built into nLeiningen &amp;amp; vsClojure). It seems better if Clojure.Compile.exe doesn&#039;t make tons of dlls in the first place.&lt;/p&gt;
&lt;p&gt;The basic usage is:&lt;/p&gt;
&lt;p&gt;Clojure.Compile.exe -include test.clj -include test2.clj -outputAssemblyName test.dll&lt;br&gt;
--or--&lt;br&gt;
Clojure.Compile.exe -i test.clj -i test2.clj -o test.dll&lt;/p&gt;
&lt;p&gt;If you leave off the -o parameter, it functions the same as previously.&lt;/p&gt;
</description>
<category>ClojureCLR</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/4846/clojure-compile-exe-create-single-dll-for-all-compiled-files</guid>
<pubDate>Fri, 02 Aug 2013 16:29:17 +0000</pubDate>
</item>
</channel>
</rss>