clr

2024-12-02T21:38:02.225619Z

Hi, I decided to do AoC in ClojureCLR, so I might be posting a few questions these days :) I won't be focusing on how to solve the problems but instead I want to understand a bit more the dev workflows and the tooling available. Hopefully after this exercise I can contribute back with some docs/blog post and engage a bit more with this community. I have very little experience with clojure, the only code I wrote is last year AoC first 3 days :) and some book exercises sporadically, but I've been reading about it a lot for a while. Nonetheless, I have more experience with C#, that's where my interest in ClojureCLR comes from. So far I managed (on Windows) to setup a project and run a hello world with cljr And to start I have these questions: 1) Is it possible to build a self-contained executable, ie an exe? Or produce an artifact for dotnet to consume it, I read some docs for the clj that mentions generating a uberjar and wonder if there is an equivalent for CLR 2) Is it possible to configure VSCode+Calva to work with ClojureCLR?

jamesd3142 2024-12-03T00:21:44.661849Z

1) Definitely possible with a little C# stub program and the 'Single-file deployment' tools (the dotnet publish --self-contained stuff) but I'm not sure if there is an integrated solution for cljr yet. 2) Minimal setup would be to create a directory with deps-clr.edn as follows:

{:paths ["src/cljr"]
 :deps  {io.github.clojure/clr.tools.nrepl {:git/tag "v0.1.2-alpha2" :git/sha "a58009f"}}}
Then from the command prompt:
$ cljr
Starting main
Clojure 1.12.0-alpha9
user=> (require '[clojure.tools.nrepl :as nrepl])
nil
user=> (nrepl/start-server!)
Started nREPL server at 127.0.0.1:1667
{:socket #object[TcpListener 0x13b4744 "System.Net.Sockets.TcpListener"], :future #object[Future 0x3158169 {:status :pending, :val nil}]}
user=>
Then point Calva at localhost:1667. If you do a search in this channel for "calva" you should find more information and also links to starter projects.

2024-12-03T12:07:41.732719Z

Great! Thanks for the pointers I will try them out and post how they went