clr

borkdude 2023-03-03T14:01:06.802049Z

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?

bobcalco 2023-03-09T13:46:54.105139Z

@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.

πŸ˜† 1
πŸͺŸ 1
borkdude 2023-03-09T13:48:53.095739Z

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

bobcalco 2023-03-09T13:50:38.464159Z

@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. :)

souenzzo 2023-03-09T13:51:21.145619Z

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

borkdude 2023-03-09T13:52:29.034519Z

dotnetska

bobcalco 2023-03-09T13:52:33.525269Z

@souenzzo I call my Clojure command line interface cljr but I can rename it dd if that helps. πŸ™‚

Anders Eknert 2023-03-09T13:53:40.992299Z

dd is already a program shipped with pretty much any unix… πŸ˜…

bobcalco 2023-03-09T13:54:03.503919Z

OK, I'll stick to cljr then. πŸ™‚

πŸ‘ 1
borkdude 2023-03-03T14:02:01.435389Z

I've tried:

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

borkdude 2023-03-03T14:02:21.213579Z

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:

borkdude 2023-03-03T14:08:42.222879Z

Maybe ClojureCLR doesn't work for version 7?

borkdude 2023-03-03T14:11:11.039609Z

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 Eknert 2023-03-03T14:32:15.170629Z

πŸŽ‰

Anders Eknert 2023-03-03T14:33:36.546899Z

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

dmiller 2023-03-03T15:46:28.254189Z

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?)

borkdude 2023-03-03T15:47:28.936159Z

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

dmiller 2023-03-03T15:48:46.272059Z

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 Eknert 2023-03-03T15:49:53.669389Z

I am taking notes @dmiller! βœ…

Anders Eknert 2023-03-03T15:51:58.779749Z

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

borkdude 2023-03-03T15:52:03.540239Z

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

dmiller 2023-03-03T16:00:21.965729Z

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

dmiller 2023-03-03T16:06:12.550239Z

@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?

borkdude 2023-03-03T16:07:06.145629Z

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

borkdude 2023-03-03T16:07:17.987419Z

Feel free to copy all the code you need

dmiller 2023-03-03T16:07:38.492289Z

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

borkdude 2023-03-03T16:08:09.182399Z

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

πŸ”₯ 1
borkdude 2023-03-03T16:08:32.835699Z

If you have questions about the nREPL implementation, fire away

dmiller 2023-03-03T16:09:08.419439Z

That would be cool. I won't hesitate to ask. I know where to find you. πŸ™‚

πŸ‘ 1
souenzzo 2023-03-07T09:46:20.634929Z

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

dmiller 2023-03-07T17:09:40.995139Z

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?

borkdude 2023-03-07T17:15:05.920499Z

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