This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Say I'm on Windows, and would rather run bash (via WSL2) than PowerShell. In this scenario, Clojure is a much more manual process. (Yes, I can and have run apt install clojure
which installs 1.10)
Where do I find the appropriate scripts to run clj
please? I can try to get onto other systems to look at what they're doing, but it will take a while to get onto those, so I'm hoping I can ask here.
I'm setup to run clojure
and get to 1.11.1, but options like -X or -T are not available. From memory those are processed in a shell script... except I don't know where to find it. (I can't compare to the Powershell setup, because that's all .exe files)
I tend to use these instructions and manually upgrade clj whenever there's a new release. https://clojure.org/guides/install_clojure
What you get when you use apt-get on debian based stuff is impossibly old. I hate it, but I know some people use homebrew(on Linux vms, but I assume it would work under wsl) to keep an update version of clj installed
If you search in #C6QH853H8 for homebrew you can find chatter about homebrew and homebrew on Linux, particularly I think @U0CMVHBL2 has found it to be convenient
I guess I'm just trying to work with the system that I have installed and working, but which doesn't come with a clj script
I just went to the next room, booted up my work computer, (a mac... with an excessively long login process), and found the script there
If you just need the bash scripts without an installer or anything, they are here: https://github.com/clojure/brew-install/tree/1.11.1/src/main/resources/clojure/install
Note those scripts have variable replacements in the build so you can’t just take those raw scripts from the repo
The installer is mostly just download and untar a tar, then move files to places
sorry... with homebrew, et al, there are lots of ways to install. I'm not really aware of the "raw" approach
All of the installers are some flavor of that
Homebrew is just a ruby script that puts things in brew places
Whatever you’re doing seems harder than running the install script, not sure I understand
well, apt installed a whole lotta stuff, and I didn't want to mess with any of it. Unfortunately, it doesn't have anything from tools.deps, but I had reasoned that this would be reasonably easy to add
Still not sure why not just run the Linux installer
well, I didn't want to install yet another package manager (brew, in this case), but OK
Under https://clojure.org/guides/install_clojure#_linux_instructions , the first 3 lines describes Brew install. Then the rest of that section describes the Linux install script. No package manager involved.
Read my comment again. The Brew installation and the Linux Install Script installation are 2 completely different methods of installing.
... That section of the docs could probably benefit from some kind of visual separator to make that more clear.
OK, been through it more carefully. I see now. But I just spend the last 18 minutes installing brew, so I guess I can just use that now 🙂
I'm newish to using Linux as my dev OS. I do use brew to install some clojure things, but limit it to that. I started installing other things via brew and, well, I had dupe apt and brew installed things and that caused confusion.
I highly recommend using https://asdf-vm.com. It is used to manage almost everything which I need to upgrade or switch versions based on directory I’m in.
honorable mention of Nix and Guix which let you create isolated environments and install globally
The https://packages.ubuntu.com/jammy/clojure only has two dependencies, openjdk and rlwrap (reccommended), so removing the clojure package should have very little effect on packages installed. The openjdk package has many package dependencies, but removing clojure package would not remove openjdk package. https://clojure.org/guides/install_clojure#_linux_instructions is the simplest approach to installing Clojure CLI on linux (no additional package manager required)
curl -O
chmod +x linux-install-1.11.1.1208.sh
sudo ./linux-install-1.11.1.1208.sh
I dont see rlwrap as an essential package to have. It does provide a basic REPL history, although if you need that then consider using https://github.com/bhauman/rebel-readlineThe clj
script is a wrapper around the clojure
executable binary, using rlwrap to provide command history in the basic terminal REPL (and clj
fails if rlwrap is not installed).
I used to use clj
when running a terminal REPL ui, although find rebel readline provides a far richer UI than rlwrap. https://github.com/practicalli/clojure-deps-edn/blob/live/deps.edn#L213-L221`:repel/rebel`https://github.com/practicalli/clojure-deps-edn/blob/live/deps.edn#L213-L221 which also starts an nREPL service and is called with clojure
, so rlwrap and clj
are not applicable to my specific workflow)
I run things like clj -X:test
all the time. Plus, I will frequently start a repl from the command line, either for Clojure or for ClojureScript (and occasionally for ClojureCLR)
@U051N6TTC you should join the #C060SFCPR channel if you haven't already
A good way to start would be writing a ClojureCLR wrapper library for a C# library
I don't like C# much at all, but I don't mind F#
I have avoided F# mostly because I keep hearing that to use it well you really want to know C#. Which makes sense. I’m better at Clojure because I know Java.
As someone who knows neither, I couldn't tell you. But I've heard F# is largely based on OCaml. I would think knowing how .NET works is more important than how C# works, per-say.
Why not just use leiningen? I have that on my Windows box, WSL1 and WSL2 distros and my Linux box.