This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-01
Channels
- # announcements (1)
- # babashka (18)
- # babashka-sci-dev (10)
- # beginners (17)
- # clj-on-windows (21)
- # clj-yaml (4)
- # cljs-dev (33)
- # cljsrn (2)
- # clojure (51)
- # clojure-austin (3)
- # clojure-doc (22)
- # clojure-europe (17)
- # clojure-greece (4)
- # clojure-norway (6)
- # clr (4)
- # conjure (7)
- # datalog (14)
- # emacs (11)
- # hyperfiddle (121)
- # introduce-yourself (1)
- # kaocha (1)
- # malli (8)
- # practicalli (1)
- # releases (1)
- # shadow-cljs (26)
- # squint (2)
Hi all! I just found this channel from the https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows page linked to from http://clojure.org. I'm happy to find it! As some of you know, I'm researching barriers to getting started with Clojure. Several of the folks I've interviewed so far mentioned that running Clojure on Windows was an obstacle for them. Personally, I use a VM on Windows, so I figured it was time I tried out Windows support myself! As I run into things, I'll mention them here, if that's OK.
@U064X3EF3 First issue I found is that the "clj on Windows" page has a link to the "TDEPS jira", but it's broken.
@U5FV4MJHG Note that there is a powershell installer for clojure, but this approach has a few downsides. E.g. it's hard to shell out to "clojure"
from Clojure/Java without invoking powershell as well, it only works from the powershell shell basically, unless you define some wrapper .bat file.
There is an alternative installer called clj-msi which wraps deps.clj, a native binary, which is a port of the clojure bash/powershell script to clojure itself and compiled as a single binary (among other targets, but this is what clj-msi uses).
https://github.com/casselc/clj-msi
https://github.com/borkdude/deps.clj
Another way to get deps.clj installed as clj / clojure on Windows is via #C01JDDEBRU1 clojure: there it's called clj-deps.
https://github.com/littleli/scoop-clojure
You can find conversations about clj-msi in the history of this channel
@U04V15CAJ Fantastic info! Thank you!
@U5FV4MJHG In case you need it, the JIRA TDEPS link should be https://clojure.atlassian.net/browse/TDEPS
@U04V70XH6 Thanks!
Is it possible for me to submit a PR for that wiki page? I would be happy to fix all the links, but I'm not sure if that's the right process or how to do it for a GitHub wiki.
There's no PR process for it. Alex would have to give you direct edit permissions (he had to restrict all the wikis due to spammers). I was a bit surprised I didn't have edit permissions -- I went straight to it to fix it but...
I would rather spend the time rerouting the official instructions to the msi etc
No rush or pressure from me. Sorry there isn't an easy way for me to take it off your plate!
Because it's unofficial, it's burried at the very bottom in alternatives, but where it says: > There is also a Clojure based launcher compiled with GraalVM as a native executable which works with cmd.exe as well as powershell -- see https://github.com/borkdude/deps.clj to get started with it, or just run the following from PowerShell: PowerShell -Command "iwr -useb https://raw.githubusercontent.com/borkdude/deps.clj/master/install.ps1 | iex" and you're ready to type deps at cmd.exe or the powershell prompt to use it. Remark how it's called deps and not clj or clojure, that means it is safe to try this one out on top of the default PowerShell based clj on windows command. > That's the best way in my experience to get a smooth Clojure on windows. Otherwise, WSL2 is the best way, but it's more involved.
But the reason WSL2 is best, is because even if you get Clojure working, everything else will be a struggle as well, tooling, IDEs, even Java
@U0K064KQV the problem with wsl2 argument is following: user wanted banana, and we delivered babana, and gorilla... and the whole jungle.
Ya, but that's just the development reality of Windows. Microsoft even knows it, so invested in bringing the whole jungle to it.
You can try just getting the banana, above works well using deps.clj. but you'll probably want a few more things, like git, emacs, a better shell, etc. Those things will each be another headache to get working correctly on Windows.
git and emacs work just fine for me on windows, even clojure-lsp worked out of the box to my surprise
Prior to WSL2, I would always use Git Bash. That worked well for me, but I haven’t tried it recently.
@U0K064KQV it looks the same from the opposite direction though. Windows devs scratch their forefaces when they have to deal with bash on unices. It's just a matter of perspective and experience.
You mean, trying to build a Windows WPF app on a Mac or Linux computer? Cause I'm not talking about the differences in workflows, like PowerShell vs SH abd windows tools vs Unix tools, or registry based config vs file, etc. I mean specifically to Clojure development, a lot of things are never tested on Windows, or don't spend as much time, and make Unix like assumptions. Maybe something shells to curl for example, or is literally implemented as a sh script, etc. Or it assumed a Unix directly structure, or environment variables, etc.