Fork me on GitHub

Hey, I am working with Clojure on Windows. I have questions about keep been updated when you work over windows since this information is not that popular over the intranet (opposite to use Clojure on mac or linux). I understand the Leiningen is a tool for manage clojure projects. My questions are: 1) How do you keep working with Clojure CLI's newest version? 2) Is it possible to upgrade Clojure using lein or is there other way to upgrade Clojure without it? According to the clj on Windows wiki, inorder to work on the newset Clojure on Windoews version, you need to download the latest version of the installer and then run it. So another question I have about this, is there somthing like brew or chocolaty (not any more.. ) for Windows users that you could use inorder to upgrade your Clojure CLI without installing everything from scratch everytime and just the downalled the needed packges and afterwards will run it? I would love to get some clarifications regarding this issue or reference to relevant information as it is not that popular and it will put me in order in my head regarding this.


I'm not promoting this much, but if you like this way of working you should check this "project" of mine

👍 2

Some advise, for a good reasons, that if you have an option to use WSL2 go with it. It definitely overcomes certain issues. Running Clojure on native Windows requires a bit of bravery 🙂

bravetrue 2

I love WSL2!


@ariel there is #scoop channel if you have more specific questions about this piece of tech.

👍 2

@ariel if anything is difficult around the powershell stuff, note that babashka also has a clojure runner, you can invoke it like:

bb clojure ... args ...
It's a drop-in alternative for the official clojure CLI.

👍 2

thank you both @ales.najmann and @borkdude. I would check out and read about scoop

💯 2
❤️ 2

@ariel I see it was mentioned in the thread but I'll give it a "+1": when I'm on Windows, I use WSL2/Ubuntu for all my Clojure development, with VS Code running on Windows and the Remote-WSL2 extension. That gives you the "best of both worlds": a familiar, Windows-based UI for your editor, and a full Linux command-line for the Clojure CLI and everything else. A lot of Clojure projects assume macOS/Linux and if there's anything beyond bare minimum lein or clojure CLI stuff, they often don't support Windows. You'll also run into quoting issues on Powershell because most projects (and all of the official Clojure docs, I believe) provide quoting examples for macOS/Linux and, unfortunately, Powershell needs different quoting in some situations.


Another tip: in WSL2, if you type code . in the shell, then VSCode pops open with the current directory in WSL2, not a Windows directory and it behaves pretty much as if you're in linux itself


EDIT: code ., not open .


But this assumes you're using VSCode which is of course not a given


@seancorfield thank you for the information. Continued question if the topic of working on Windows is already under discussion. Clojure is works on JVM, and if I use it on WSL2 it can already start to get heavy on my computer (2 vm working for that). If I am working on a project that docker is needed or other virtual environment - can I not get into a state of overload on the Windows computer just for the purpose of trying to avoid working directly on Windows? if so - the sloution might be just to dual boot the computer for a linux and just work on a unix computer?


@ariel if you're saying WSL, do you mean WSL2? wsl2 is superior


it should perform a lot better I think. also just run docker in wsl2 at the same time


@borkdude yes WSL2. I just read your previous msg, so although you are a Windows user all your environment and you work you you do on a linux machine? I know this solution is relatively new (wsl version 2 is relatively new), but if it solves problems for Windows users - why sould we keep working in a Windows environment directly and not move everything to WSL to use the power of unix ?


@ariel if you're not forced to use windows and you don't like windows, by all means, use linux directly. I don't develop in Windows myself as my primary dev environment, but I run it on a more powerful PC for more demanding tasks and I use wsl2 there. One benefit I get is that my video card etc "just work" and I can test features on Windows for my OSS projects there as well.


my primary dev env is still a macbook pro laptop


When I'm running my "work stack" on my laptop, I'm running Docker with MySQL 5.7 (Percona), Redis 4.0, Elastic Search (two instances!), plus WSL2 running a REPL and sometimes running a test suite, plus VS Code and a few other apps on Windows -- and it's pretty decent performance -- but this is a fairly new Microsoft Surface Laptop 3 with 16GB RAM and a 4-core i7 @ 1.3GHz (8 logical processors and generally an effective speed of 3.4GHz).