clj-on-windows

For those interested in making clj on Windows https://dev.clojure.org/jira/browse/TDEPS-67. Also see https://github.com/littleli/scoop-clojure.
Kira McLean 2020-05-23T14:41:39.023100Z

Hi there, I’m wondering if anyone can shed some light on the current best way to develop with clojure on windows. I’m introducing a friend to it, if all goes well it would make sense to set up linux or something but that’s overkill for just trying it out. I see a lot about WSL, but it’s unclear to me how that works with an IDE. Is anyone developing with clojure painlessly on windows? What is your current setup?

thheller 2020-05-23T15:51:09.024400Z

Windows has been my main env for 2 years now. Works great, would recommend. I use Cursive as my editor. WSL for all the linuxy stuff, will get a lot better with next windows update (due next week)

thheller 2020-05-23T15:52:36.025100Z

Windows Terminal is also quite good nowadays

seancorfield 2020-05-23T16:13:46.027800Z

@kiraemclean When I'm developing on Windows, I take a two-pronged approach: I use Powershell for things that need a UI (such as Cognitect's REBL) and I use WSL with Ubuntu for all my general "Linux-y" stuff. I use Atom on Windows as my editor, with the excellent Chlorine plugin. For Powershell, I use Scoop to install the Clojure CLI and other tools, per https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows#questions For WSL, the regular Clojure CLI installer for Linux works although I have brew for Linux installed and use that (which means it is easier to keep the CLI tools up to date).

seancorfield 2020-05-23T16:15:49.030100Z

Note that Chlorine is smart enough to figure out whether the REPL is running on Windows or Linux (via WSL) and automatically maps <drive>:\path\to\code.clj file paths to /mnt/<drive>path/to/code.clj when issuing a "load file" command, so that it transparently works with either a REPL started from Powershell (no translation needed) or WSL (which has the C: drive mounted as /mnt/c).

seancorfield 2020-05-23T16:17:21.031500Z

If you just want to get someone up and running on Windows in Powershell (without bothering with WSL), I'd recommend Scoop. It knows how to install several Clojure utilities as well as Java, so it's the easiest way to get a new Windows machine up and running.

seancorfield 2020-05-23T16:19:31.032800Z

And, yes, a +1 on the new Windows Terminal that supports a tabbed interface with multiple shells (I typically run one or two Ubuntu tabs and at least one Powershell tab). I use the preview builds from https://github.com/microsoft/terminal/releases but I believe it's also available from the Store app as well now?

thheller 2020-05-23T17:17:58.033Z

yeah, I installed it from the app store

Kira McLean 2020-05-23T17:44:55.033400Z

This is great, very helpful. Thanks everyone!

borkdude 2020-05-23T18:07:24.034100Z

@kiraemclean There is also an unofficial clojure port called deps.exe which works in cmd.exe, if you need that. It's available through the clojure scoop.

👍 2
borkdude 2020-05-23T18:08:17.034300Z

The link to the Clojure scoop: https://github.com/littleli/scoop-clojure

littleli 2020-05-23T22:52:04.039Z

FYI microsoft terminal is available for installation from scoop too. And I personally use rebel-readline to overcome absence of rlwrap on Windows. Situation is a bit different when WSL is available, I would prefer WSL if it's an option.