clr

dangercoder 2023-05-23T17:10:17.266319Z

This is a shell script that installs .NET 7 and clojure-clr on Ubuntu, just wanted to share it, someone might find it useful. https://gist.github.com/Dangercoder/abfb81bb90f4c83ca79e920a0bf67c8a

🙏 1
🙏🏻 1
🙌 2
🙌🏻 1
dangercoder 2023-05-23T19:09:37.948519Z

How can I translate this into clojure-clr interop: Action<Task<String>>? I'm trying to generate a delegate. (gen-delegate |System.Action1[System.Threading.Tasks.Task`1[System.String]]|[the-string])`

dangercoder 2023-05-23T20:29:57.450169Z

(-> (Task/Run 
        (sys-func [System.String] [] 
                  "Hello, continuation"))
      (.ContinueWith 
      (sys-action [|System.Threading.Tasks.Task`1[System.String]|] [^Task task]
                (println (.Result task)))
       (->cancellation-token)))
  
Made it work in a different way. Nice

👍 1
dmiller 2023-05-23T21:01:59.705939Z

As I mentioned to you privately, generic type references need some serious work. You provide a case in point.

dangercoder 2023-05-23T21:08:06.328709Z

I think a workaround for now is to just use C# where it's needed and write wrapper code to make it more cljr friendly.