My question(s):
Is there a simple example for how to go about calling a clojure function from C# code like above?
Any documentation for how to think in regards to namespaces and folder structure in general when trying to interop to clojure from C#?
My main goal right now is to have fun and finally get something running with the nREPL + CIDER.
I was trying to load (using load.invoke) clojure.tools.nrepl, but getting confused about where to put dll and how to re-name it?!
// with following code
IFn load = clojure.clr.api.Clojure.var("clojure.core", "load");
var r = load.invoke("tools.nrepl");
I output the RT.cs static FileInfo FindFile(string path, string filename)
probePath property and found out:
... being absolute path to my framework folder (net7.0)
...\net7.0\clojure\tools.nrepl.cljr
...\net7.0\bin\clojure\tools.nrepl.cljr
...\net7.0\clojure\tools.nrepl.cljr
...\net7.0\clojure\tools.nrepl.cljc
...\net7.0\bin\clojure\tools.nrepl.cljc
...\net7.0\clojure\tools.nrepl.cljc
...\net7.0\clojure\tools.nrepl.clj
...\net7.0\bin\clojure\tools.nrepl.clj
...\net7.0\clojure\tools.nrepl.clj
...\net7.0\clojure.tools.nrepl.cljr.dll
...\net7.0\bin\clojure.tools.nrepl.cljr.dll
...\net7.0\clojure.tools.nrepl.cljr.dll
...\net7.0\clojure.tools.nrepl.cljc.dll
...\net7.0\bin\clojure.tools.nrepl.cljc.dll
...\net7.0\clojure.tools.nrepl.cljc.dll
...\net7.0\clojure.tools.nrepl.clj.dll
...\net7.0\bin\clojure.tools.nrepl.clj.dll
...\net7.0\clojure.tools.nrepl.clj.dll
Error: Could not locate clojure/tools.nrepl with extensions .cljr, .cljc, .clj, .cljr.dll, .cljc.dll, or .clj.dll on load path.
None of these matches the nuget supplied clojure.tools.nrepl.dll
Action: rename
clojure.tools.nrepl.dll -> clojure.tools.nrepl.clj.dll
Then dll is picked up, but fails to load
clojure.lang.Compiler.AssemblyInitializationException: 'Cannot find initializer
for clojure.tools.nrepl, Version=0.1.0.0, Culture=neutral,
PublicKeyToken=null.clojure/tools.nrepl'