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?
@borkdude 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.
@bobcalco Cool :) I think it would be a cross-platform thing though, not Windoze-specific, babashka also already runs on Windoze
@borkdude 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. :)
run dd on linux/mac and have access to an interactive clr runtime will be awesome to learn about clr
dotnetska
@souenzzo I call my Clojure command line interface cljr but I can rename it dd if that helps. π
dd is already a program shipped with pretty much any unixβ¦ π
OK, I'll stick to cljr then. π
I've tried:
brew install --cask dotnet-sdk
and then:
dotnet tool install --global Clojure.Mainbut 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:
Maybe ClojureCLR doesn't work for version 7?
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=>π
Iβm running with dotnet 7β¦ Iβm on Clojure 1.12.0-alpha3 thoughβ¦ not sure if that makes the difference
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. (@anders982: You're taking notes?)
What's the story with libraries in the ClojureCLR ecosystem? I bet you can't use deps.edn etc right?
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.
I am taking notes @dmiller! β
Yeah dependency management is really the big blocker right now, IMHO. ClojureCLR itself works great.
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.ThreadLocalGeneric 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@borkdude While I have your attention: I've been working on porting nrepl/nrepl and it's been a real slog. @bozhidar 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?
@dmiller I don't mind at all. The SCI context is just an implementation detail
Feel free to copy all the code you need
Thanks. Much appreciated. I'll let you know how it goes.
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 #babashka for the .NET platform
If you have questions about the nREPL implementation, fire away
That would be cool. I won't hesitate to ask. I know where to find you. π
> 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.
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?
Well, if I would write a library for Clojure CLR I'd surely wanna know how to use my own ;)