Fork me on GitHub
#clj-on-windows
<
2022-12-23
>
Serafeim Papastefanos18:12:28

Borkdude the Reddit questions are cool but is there an actual tutorial/ guide for getting started in Windows? Even if there is, is it linked from the clojure homepage ?

seancorfield00:12:21

Not linked/reachable from http://clojure.org tho', right?

borkdude10:12:50

@UBLU3FQRZ Perhaps you can also mention the Calva getting started and Clojure getting started guides in that Getting started document.

littleli11:12:33

@U04V15CAJ I'll find a way to squeeze it in. Good idea.

Serafeim Papastefanos06:12:38

Ok you probably won't believe it but I had actually written such a guide https://www.spapas.net/2022/04/14/clojure-windows/ some months ago and completely forgotten about it. :face_with_spiral_eyes:

Serafeim Papastefanos06:12:17

Sean the windows section you mention starts with "Currently, clj on Windows is in an alpha state.". This notice is there for years!

seancorfield06:12:57

And the PowerShell script is probably going to be retired

Serafeim Papastefanos06:12:40

Also the fact that it's only about powershell is not very friendly to people that use cmd

seancorfield06:12:08

There's talk of an MSI installer now

Serafeim Papastefanos06:12:49

Installer would be cool but maybe allow an extra option of getting the binaries in a zip?

seancorfield06:12:12

What binaries?

Serafeim Papastefanos06:12:44

These that would be installed by the msi installer :)

seancorfield06:12:11

There are no binaries in the Clojure CLI

seancorfield06:12:52

It's a couple of JAR files and some scripts

Serafeim Papastefanos06:12:32

Ok ok I mean these files

Serafeim Papastefanos06:12:30

Put them in a zip so people can download them and extract them wherever they want

seancorfield06:12:35

That doesn't seem like a very intuitive approach for windows folks

Serafeim Papastefanos06:12:53

Well this is what I prefer (I'm a Windows folk)

seancorfield06:12:00

And there's still the issue of what those scripts are for windows. Hence talk of an MSI installer

seancorfield06:12:51

All my machines are windows. I don't want a zip of files

seancorfield06:12:11

I tried the MSI installer. It works

Serafeim Papastefanos07:12:42

I am not fond of installers because i don't know what they do. A zip will put files only where I'll extract it and won't mess with my path or env vars or registry

seancorfield07:12:31

This is part of the problem: ask a dozen windows users what they want and you get two dozen different responses:grin:

💯 1
seancorfield07:12:42

I think wsl2 is the best solution. Then you can follow all the books and tutorials which assume Linux/macOS

💯 2
Serafeim Papastefanos07:12:19

Wsl2 is good but I'd only use it as a last resort because it doesn't fit my workflow.

seancorfield07:12:12

Well no one is going to create a zip you can use on windows

Serafeim Papastefanos07:12:12

That seems to actually use the deps.clj

seancorfield07:12:44

Yup. That may be the way to go on windows

borkdude08:12:41

If you want a manual zip approach just download the deps.clj zip binary, unzip it and then copy this binary to clj.exe and clojure.exe. This is effectively what happens inside the clj-msi installer. Scoop install clj-deps does the same thing

👍 1
didibus05:01:27

On windows (without going WSL2), deps.clj is what I always recommend

didibus05:01:49

I agree, MSI yuck! What is this, 1998 and I'm installing Java? Next thing you know there's an adware in the MSI 😛... though I don't mind the option the adware joke is a jab at the Java installer that installed Ask Toolbar What would the MSI solve anyways? How does it get around the finicky powershell script and having to maintain an sh and a powershell script?

Installs  as clojure.exe and clj.exe
Installs latest version of ClojureTools jar
Sets PATH and sets DEPS_CLJ_TOOLS_DIR appropriately
Supports per-user or per-machine installation
Supports setting alternate installation location during install
Displays a warning if the ClojureTools PowerShell module is detected.
Oh, an MSI that installs deps.clj, ok I'm more into that 😛

borkdude08:01:42

You can now also use scoop to install deps.clj as clj.exe with the clojure bucket:

scoop bucket add scoop-clojure 
scoop install clj-deps

2
didibus19:01:31

Great, well it's awesome that there are all these possibilities now, that's the best of all worlds. Looks like Clojure on Windows is getting better each day.

❤️ 2