Fork me on GitHub
#clr
<
2023-03-03
>
borkdude14:03:06

I want to install dotnet on macos to run Clojure.Main - any hints how to start, without creating a lot of installation garbage on my system?

borkdude14:03:01

I've tried:

brew install --cask dotnet-sdk
and then:
dotnet tool install --global Clojure.Main

borkdude14:03:21

but when run it, I get:

$ Clojure.Main
You must install or update .NET to run this application.

App: /Users/borkdude/.dotnet/tools/Clojure.Main
Architecture: arm64
Framework: '', version '6.0.0' (arm64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
  7.0.3 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:


To install missing framework, download:

borkdude14:03:42

Maybe ClojureCLR doesn't work for version 7?

borkdude14:03:11

yes, this was it:

brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk6-0-400
$ Clojure.Main
Clojure 1.11.0
user=>

Anders Eknert14:03:36

I’m running with dotnet 7… I’m on Clojure 1.12.0-alpha3 though… not sure if that makes the difference

dmiller15:03:28

ClojureCLR 1.11.0 does not have .NET 7 support. It came out just a bit too early for that. ClojureCLR 1.12.0 will support .NET 7 -- the alphas already do. Other than that, looks pretty painless. (@U03AU2X8TD5: You're taking notes?)

borkdude15:03:28

What's the story with libraries in the ClojureCLR ecosystem? I bet you can't use deps.edn etc right?

dmiller15:03:46

Not yet. Someone is working on a project to do that. And another project may be starting up soon. We'll see where they all converge. I'm hoping not too far in the future.

Anders Eknert15:03:53

I am taking notes @U45FQSBF1!

Anders Eknert15:03:58

Yeah dependency management is really the big blocker right now, IMHO. ClojureCLR itself works great.

borkdude15:03:03

Any ideas why this isn't returning anything?

user=> System.Threading.ThreadLocal
Syntax error (TypeNotFoundException) compiling at (REPL:0:0).
Unable to find type: System.Threading.ThreadLocal

dmiller16:03:21

Generic type. Always a problem. The official name of the type System.Threading.ThreadLocal1` You have to use |-quoting to specify the name.

user=> |System.Threading.ThreadLocal`1|
System.Threading.ThreadLocal`1
Something I hope to have a better solution eventually. (I didn't solve it already because I didn't want to just make something up without some user feedback. Which requires discussions with actual users. There are two implications of that last sentence that haven't been easy to fill -- finding users and talking to them. That is improving.0 For now, the best documentation is in the wiki: https://github.com/clojure/clojure-clr/wiki Specifically: https://github.com/clojure/clojure-clr/wiki/Specifying-types and https://github.com/clojure/clojure-clr/wiki/Calling-generic-methods

dmiller16:03:12

@U04V15CAJ While I have your attention: I've been working on porting nrepl/nrepl and it's been a real slog. @U051BLM8F suggested https://github.com/babashka/babashka.nrepl as a possible alternative for porting. Though I'm sure the license permits it, I always like to ask: would you mind? And: Any hints on problems I might run into? I note that a sci context is required. How tightly is that woven into the implementation?

borkdude16:03:06

@U45FQSBF1 I don't mind at all. The SCI context is just an implementation detail

borkdude16:03:17

Feel free to copy all the code you need

dmiller16:03:38

Thanks. Much appreciated. I'll let you know how it goes.

borkdude16:03:09

I asked about the ThreadLocal because I might be interested in porting SCI to the CLR since .NET now also supports AOT compiled binaries and this may be interesting to create something like #CLX41ASCS for the .NET platform

🔥 2
borkdude16:03:32

If you have questions about the nREPL implementation, fire away

dmiller16:03:08

That would be cool. I won't hesitate to ask. I know where to find you. 🙂

👍 2
souenzzo09:03:20

> What's the story with libraries in the ClojureCLR ecosystem? I know this: https://github.com/nasser/nostrand but not sure if ppl actually use it.

dmiller17:03:40

Nostrand does characterize itself as "very early, pre-alpha". Not sure of its status beyond that. I suggestion contacting the owner. There are a substantial number of libraries available. You can go to http://github.com/clojure, got the repositories tab, and type 'clr' in the search box. Other than clr.nrepl, all the others are usable and in use. Anything specific you are looking for?

borkdude17:03:05

Well, if I would write a library for Clojure CLR I'd surely wanna know how to use my own ;)

bobcalco13:03:54

@U04V15CAJ please call babashka for .net/windoze "dedoshka", as in deDOShka. LOL. FYI, I'm the one working on deps.edn support on the CLR; hope to have news on this front soon.

😆 2
🪟 2
borkdude13:03:53

@U2M7EC8KU Cool :) I think it would be a cross-platform thing though, not Windoze-specific, babashka also already runs on Windoze

bobcalco13:03:38

@U04V15CAJ Yes - I use it now daily. Anything but DOS or PowerShell. LOL. Although I must say just having Clojure on .NET means I don't have to use PowerShell. :)

souenzzo13:03:21

run dd on linux/mac and have access to an interactive clr runtime will be awesome to learn about clr

bobcalco13:03:33

@U2J4FRT2T I call my Clojure command line interface cljr but I can rename it dd if that helps. 🙂

Anders Eknert13:03:40

dd is already a program shipped with pretty much any unix… 😅

bobcalco13:03:03

OK, I'll stick to cljr then. 🙂

👍 2