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.
PaulGureghian 2019-06-26T00:00:19.186800Z

I don't know. just gonna try lein.

seancorfield 2019-06-26T00:01:08.187300Z

Ah, yeah "This cmdlet was introduced in PowerShell 3.0." -- I bet you have Powershell 2.x on Windows 7?

PaulGureghian 2019-06-26T00:02:09.187600Z

Let me check ..

PaulGureghian 2019-06-26T00:03:13.187900Z

Not sure how to check the version

seancorfield 2019-06-26T00:03:51.188200Z

Try $PSVersionTable

seancorfield 2019-06-26T00:04:08.188400Z

PS C:\Users\sean> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.18912.1001
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.18912.1001
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

PaulGureghian 2019-06-26T00:05:28.188600Z

2.0

PaulGureghian 2019-06-26T00:06:20.189400Z

So, that means the script won't work no matter what ?

seancorfield 2019-06-26T00:06:45.190200Z

Right. You need a more up-to-date version of Powershell.

PaulGureghian 2019-06-26T00:06:50.190300Z

Either upgrade PS or change the script

seancorfield 2019-06-26T00:07:42.191200Z

A quick Bing search suggests that you can do the equivalent of Invoke-WebRequest in PS2 but it relies on stuff in .NET and it's pretty nasty, from the looks of it.

PaulGureghian 2019-06-26T00:08:26.192300Z

Nasty as in 'forget it' ?

seancorfield 2019-06-26T00:08:52.192900Z

The reality of Clojure development is that nearly everyone uses Mac and Linux so Windows support in the tooling has always lagged behind. Leiningen took ages to get Windows support. Same for Boot. Same for clj (and we're only in alpha right now).

seancorfield 2019-06-26T00:09:17.193500Z

The answer to that depends on how comfortable you are with PS programming I think...

PaulGureghian 2019-06-26T00:09:46.194200Z

Well, if I cant upgrade my PS, just gonna try lein

PaulGureghian 2019-06-26T00:10:13.194800Z

Do you know off hand if PS can be upgraded ?

seancorfield 2019-06-26T00:11:15.195700Z

(that's old -- maybe you can install even newer versions now?)

PaulGureghian 2019-06-26T00:12:30.196200Z

Which one should I do : the script or lein ?

seancorfield 2019-06-26T00:15:41.197Z

Like I said, if you feel comfortable enough working with PS to try the upgrade etc, go ahead. I don't know what your background is on Windows.

seancorfield 2019-06-26T00:16:23.197600Z

If you just want to learn Clojure at this point, use lein.bat and follow the tutorials that use Leiningen.

seancorfield 2019-06-26T00:17:18.198700Z

At one point, I managed to get Leiningen working on Windows XP without too much pain, so lein.bat should be less work for you to get to actually trying Clojure out.

seancorfield 2019-06-26T00:18:26.200Z

(I'm on Windows 10 now, so I use the PS clojure installer, as well as using the Linux clojure installer on WSL/Ubuntu -- and the brew install clojure approach on macOS)

PaulGureghian 2019-06-26T00:19:04.200600Z

You have all the bases covered.

PaulGureghian 2019-06-26T00:19:45.201100Z

Gonna try to conquer both the upgrade and lein. thanks

1✔️