clr 2026-09-03

clr.core.async version 1.9.865 is released. This catches up with the same-numbered version of core.async. I have include the flow code in this release. (It seems have been moved into another branch of the repo over in core.async .) I have not ported the flow monitor -- the number of libraries it depends upon is way past my capacity to port at this time. My thanks to @fogus and @jarrodctaylor for giving me access to some of their test code to help improve my confidence in the flow port.

io.github.clojure/clr.core.async {:git/tag "v1.9.865" :git/sha "2dee16c"}

🎉 1
Alex Miller (Clojure team) 2026-09-03T18:44:13.703729Z

yes, flow is still in alpha and has not yet been released as part of core.async

I figured that was the case, but decided to get out there. And I wan't feeling the vibes on starting separate development branches. (That kind of threw me for a loop both in core.async and in clojure itself.). If you prefer I pull it out and relegate it to a feature branch, just say the word.

Alex Miller (Clojure team) 2026-09-03T18:54:50.766679Z

it's fine, just be aware there could be breaking api changes before it becomes "real"

👍 1

I am experiencing some pain using ClojureCLR to call a .Net assembly, in particular a method that has some out var parameters. My understanding from reading the entry on qualified parameters is that I can only use (by-ref) with a local var (in a let ) and also in the top-level interop call. I've tackled the fun times for type hinting [#^Zoo.Porcupine myvar nil] and [myvar (Zoo.Porcupine. )] . When the interop hits problems, the exception doesn't bubble up in a way that communicates the issue, so I've learned to work my way up to the stack trace and find the useful exception messages. I've encountered • Expected StrongBox'1, got Porcupine • Expected StrongBox'1, got DynamicNil This last one was interesting. Is there a nice way to create the place-holder var, or even StrongBox? Maybe I should just new a StrongBox. I don't know anything about it, but I can learn. I'll be doing a lot of this interop with this library. It's nice having a repl when I can get the repl to work but some libraries have API's that are more challenging to work with.

I'm happy to take a look. This is a nuget package I can access? reference to class.method would help. What you've inferred from the documentation seems correct, but it can be tricky.

I will probably put together a set of examples that are shareable. I did try the beta and it does bubble up the problem; that part is much improved.

I'm curious what the beta gave you that the previous release did not.

the exception that made it towards the repl was an error about an object not being set...essentially a NullReference error, down in LazySeq somewhere. If I can repro everything, which I think would be valuable, I'll do it.

👍 1

If you even gave me a method signature or two to work against, I could try to isolate.

👍 1

When I faced something similar I found I could construct a StrongBox and pass it in. That was the easiest path forward in my case.

``
`Clojure 1.12.6-beta1`
`user=> (def q (new |System.Collections.Generic.Queue`1[System.Object]|))`
`#'user/q`
`user=> (.Enqueue q :foo)`
`nil`
`user=> (let [ret (new |System.Runtime.CompilerServices.StrongBox`1[System.Object]|)]`
  `(.TryDequeue q ret)`
  `(.Value ret))`
`:foo`
`user=>`

``

@jamesdavidson Thanks for that hint. It has been a long time since I dug into the guts of by-ref. The StrongBox<> hack was the approach take by IronPython/Ruby/etc. I'll add that to the wiki as a last-ditch workaround.