Fork me on GitHub
#clr
<
2023-05-23
>
dangercoder17:05:17

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

🙌 4
🙏 2
2
2
dangercoder19:05:37

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])`

dangercoder20:05:57

(-> (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

👍 2
dmiller21:05:59

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

dangercoder21:05:06

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.