clr

bobcalco 2023-01-19T20:43:53.815909Z

Given .NET remains kind of fragmented in terms of runtimes, and allowing that there are three "major" such fragments - .NET Core, .NET Framework, and Mono - I'm starting to think *.cljr files should support their own reader conditionals - e.g., #?(:core ... :net ... :mono). I'll adorn my hockey gear and expect incoming projectiles from @dmiller now... lol.

dangercoder 2023-01-19T20:48:48.603259Z

Looks like the .NET folks are actively labbing with AssemblyBuilder.Save(), .NET 8 maybe? 🤞 https://github.com/dotnet/runtimelab/tree/feature/assembly-builder-save

dmiller 2023-01-19T20:54:01.981639Z

No projectiles. I've conceded already. Re AssemblyBuilder.Save() Wow. Fingers crossed indeed. But I'll still need to support Core3.1 and .Net 6/7 for a long while. Unless we can get everyone to upgrade.

dangercoder 2023-01-19T20:59:36.599729Z

If AssemblyBuilder.Save() get's re-introduced would it be possible to still support Core3.1 and 6/7 without compilation but anyone who uses .Net 8 and onwards can compile standalone dll's?

dmiller 2023-01-19T21:00:33.790059Z

I would think so. Framework 4.8 also would continue as is.

👍 1
bobcalco 2023-01-19T21:58:56.726429Z

"No projectiles. I've conceded already." <-- So, alpha4? 🤣 (Just kidding!)

bobcalco 2023-01-19T22:00:26.608869Z

It does require some thought about scope and what symbols we use. @alexmiller raises some good points to consider along these lines.

dmiller 2023-01-19T22:42:32.147889Z

At least one Miller is still on game.

dmiller 2023-01-21T23:43:55.048439Z

scratch 3.1 then. i dropped .net 5 out of the most recent build, at least.

2023-01-20T16:49:14.117449Z

Though Core3.1 has reached end-of-life https://github.com/dotnet/core/blob/main/releases.md

elena.poot 2023-01-19T21:03:41.841019Z

Maybe use namespaced keywords for the cljr-specific reader conditionals. I saw that somewhere. babashka, maybe?

👀 1
Alex Miller (Clojure team) 2023-01-19T21:08:03.029859Z

just as another data point, CLJS has had the same debate for years re conditional for browser vs node. they've resisted the urge so far, trying to avoid too much fragmentation. I don't have any data with which to make a decision, but I would consider it carefully

👍 3
👍🏻 1
Alex Miller (Clojure team) 2023-01-19T21:09:00.966689Z

I would also request that you not take such generic words in the keyspace, given that this crosses all clojure dialects

bobcalco 2023-01-19T21:29:11.779529Z

I agree the keywords should not be too general, but I envision these conditionals only having meaning in *.cljr files. If that mitigates the concern at all. It's just a reality that the .NET APIs are inconsistent across the divergent runtimes. Although they are trying to converge them into core eventually, their unification won't be reality for some time yet (if ever).

Alex Miller (Clojure team) 2023-01-19T21:31:03.478089Z

that does help that they are limited in scope

Alex Miller (Clojure team) 2023-01-19T21:09:22.717949Z

so at the least, using namespaces would be a good idea probably

bobcalco 2023-01-19T21:31:00.342639Z

I'm actively looking into this but this is also not without its trade-offs depending how tooling would support it.

elena.poot 2023-01-19T21:10:30.570819Z

OK, I guess not babashka, but I saw it somewhere. But I think :cljr/mono, for instance, would be intuitive and also answer Alex's (perfectly reasonable) request above.

borkdude 2023-01-19T21:10:53.478299Z

@terry.poot you might have seen it with shadow-cljs perhaps

elena.poot 2023-01-19T21:12:12.026869Z

I don't know, I've been reading so much stuff trying to get rolling on clojure-clr development and figuring out project setups and everything, I truly can't recall where, or what the namespace was, but I noticed it because it was novel and at the same time made a lot of sense when I did.

djblue 2023-01-19T21:44:56.564629Z

I've used :org.babashka/nbb as a key in a reader conditional before, maybe it was that one.

borkdude 2023-01-19T21:45:26.007019Z

That's in #nbb yes

borkdude 2023-01-19T21:46:13.253439Z

It just uses a fully qualified keyword since this is recommended for new clojure implementations to not cause collisions with others

👍 5
👍🏻 1