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.
2019-06-14T13:31:29.019500Z

How can I run clj with -Sdeps in git bash powershell -command clj -Sdeps "{:deps {viebel/klipse-repl {:mvn/version \"0.2.3\"}}}" -m klipse-repl.main => Unknown option: "-i"

borkdude 2019-06-14T13:54:06.019800Z

good question

lread 2019-06-14T16:11:09.021200Z

Hmmm… let’s see in PowerShell, the following works:

clj -Sdeps '{:deps {viebel/klipse-repl {:mvn/version ""0.2.3""}}}' -m klipse-repl.main
I expect this is not the only way to get this working from git bash… but…
powershell -command 'clj -Sdeps "{:deps {viebel/klipse-repl {:mvn/version """"0.2.3""""}}}" -m klipse-repl.main'
@minhnhat10bk

borkdude 2019-06-14T16:11:49.021800Z

I tried the above from cmd.exe and that didn’t seem to work (or maybe I did something wonky)

lread 2019-06-14T16:12:19.022400Z

well cmd.exe is probably different than git bash.

borkdude 2019-06-14T16:12:54.023Z

in a next version of Windows 10 they will have some for of unified shell for cmd.exe, powershell and git bash?

borkdude 2019-06-14T16:13:06.023200Z

or so I read somewhere

borkdude 2019-06-14T16:15:17.023800Z

it’s just a GUI thing so it seems

lread 2019-06-14T16:18:54.024800Z

I’m no Windows guy anymore, but I recently learned that PowerShell is cross-platform now. For what that’s worth.

borkdude 2019-06-14T16:19:26.025300Z

I might become a Windows guy again at some point, considering the Macbook Pro I want right now is 4200+ dollars

borkdude 2019-06-14T16:19:52.025500Z

or might switch to linux

borkdude 2019-06-14T16:20:39.025900Z

but since Windows is going to support a linux shell, it might be a viable future alternative again

lread 2019-06-14T16:24:39.027100Z

Ok, I jabbed away at a cmd.exe version and found this works:

powershell -command clj -Sdeps '{:deps {viebel/klipse-repl {:mvn/version """"""0.2.3""""""}}}' -m klipse-repl.main
That’s a lotta double quote escaping!

lread 2019-06-14T16:25:37.027800Z

I have a friend who runs a Hackintosh. He seems to be always fiddling and tweaking though.

borkdude 2019-06-14T16:26:25.029Z

yeah, I don’t like the tweaking, that’s why I’m a little bit wary of the combination linux and me… I always tweak until I’m either very tired or break the system 😛

lread 2019-06-14T16:26:48.029300Z

I can’t say that I understand the escape rules. Perhaps it gets confusing because we are dealing with powershell escape rules and whatever shell you are using escape rules.

lread 2019-06-14T16:27:15.030300Z

I ran linux for a while. A bit tweakier than Mac, but I liked it.

borkdude 2019-06-14T16:27:26.030500Z

you’re back on Mac now I presume?

lread 2019-06-14T16:27:30.030700Z

yes

borkdude 2019-06-14T16:27:44.031Z

maybe I just gotta pay Apple tax and get on with my life 😉

lread 2019-06-14T16:28:59.032Z

maybe you’ll get some funding from Clojurists Together to afford this lavishness.

borkdude 2019-06-14T16:29:56.032600Z

haha, I can afford it, but it just seems a bit much for a laptop

lread 2019-06-14T16:30:46.033300Z

Oh MacBook Pro… I read Mac Pro.

borkdude 2019-06-14T16:31:05.033500Z

neh, I’m a laptop dude

lread 2019-06-14T16:31:57.033700Z

currently iMac for me.

borkdude 2019-06-14T16:33:24.033900Z

This is the one I would buy next: https://www.dropbox.com/s/f5j42bgje2twnzl/Screenshot%202019-06-14%2018.33.07.png?dl=0 It seems it’s cheaper in dollars than euros

lread 2019-06-14T16:34:33.034200Z

nice! I’m sure you will find a way to rationalize the purchase! :simple_smile:

borkdude 2019-06-14T16:34:44.034400Z

haha… 🙂

seancorfield 2019-06-14T18:13:38.034900Z

I’ve been an Apple guy since the early 90's but I’m switching to Windows.

seancorfield 2019-06-14T18:14:16.035700Z

I already switched from a MacBook to a Dell Windows 8 machine for casual use several years ago (and it’s now running Windows 10 Insider builds).

seancorfield 2019-06-14T18:15:03.036600Z

My desktop is a 27" iMac but it runs Windows 10 (Insider builds again) via Parallels and I do most day-to-day stuff in Windows — and only run *nix script stuff on the Mac via Terminal.

seancorfield 2019-06-14T18:15:23.037100Z

But I’ve recently been doing more and more with WSL/Ubuntu (bash) and Powershell.

seancorfield 2019-06-14T18:16:52.038700Z

I use Atom/Chlorine as my Clojure editor and that understands how to translate load-file paths if it detects that your editor is running on Windows but your REPL is running on WSL (so <drive>:\path\to\the\file.clj becomes /mnt/<drive>/path/to/the/file.clj automatically).

seancorfield 2019-06-14T18:17:23.039200Z

So Atom/Chlorine works with both clj on Powershell and clj on bash on Windows 🙂

seancorfield 2019-06-14T18:19:11.040500Z

(back when I started with Apple, it was System 6, so I bought Tenon Intersystems’ “Mach Ten” which was a parasitic/hosted BSD 4.3 Unix, based on the Mach 2 kernel — so I’ve always had a Mac that can run *nix stuff 🙂 )

seancorfield 2019-06-14T18:19:43.041100Z

Windows has only become viable for me with WSL since so much of our work stack assumes *nix.

seancorfield 2019-06-14T18:20:29.041200Z

Microsoft’s Surface Book 2 is what makes me drool these days — it’s 2019 and Apple still won’t do a touch screen laptop! Argh!

borkdude 2019-06-14T18:32:58.041400Z

I want 32GB mem

borkdude 2019-06-14T18:33:15.041600Z

but there are much cheaper laptops with 32GB on which I could run Windows

borkdude 2019-06-14T18:33:40.042100Z

@seancorfield thanks for sharing, although you haven’t shared the ‘why’

seancorfield 2019-06-14T18:38:13.042500Z

Ah… I think Apple has somewhat lost its way as far as developers are concerned.

seancorfield 2019-06-14T18:39:10.043600Z

Microsoft has done a huge amount of open source work lately and is very aggressively pushing to draw in developers with tooling and embracing Linux.

seancorfield 2019-06-14T18:39:49.044300Z

I also love, love, love having a touch screen, even when I’m developing, so it’s just frustrates the heck out of me that Apple still will not embrace that.

seancorfield 2019-06-14T18:40:06.044700Z

Plus, there’s also the “Apple tax” on new devices.

seancorfield 2019-06-14T18:41:59.046700Z

Like I say, I’ve been doing development on Macs for about 27 years now. I’ve used every version of Windows since 3.11… but I only started to like Windows with 8, and it still wasn’t viable for development, for me, until 10 got WSL (and early Insider builds of it couldn’t even run a JVM!).

seancorfield 2019-06-14T18:44:48.049200Z

I’ve had three iPhones, over the years, but I mostly run a Microsoft suite on the current one (Edge, Cortana, Outlook, Todo). My wife just replaced her 5S with an XS ($1,200! 🤯 ) but I’ll probably replace my 5S eventually with an Android, maybe a OnePlus 7… and MS has great integration with Android (hand off of tasks, messaging in Windows, etc) which Apple seems to make very difficult 😞

seancorfield 2019-06-14T18:45:36.050200Z

So… I’m just about done with Apple… Never thought I’d see the day where I’d prefer Windows over macOS, and Microsoft apps over Apple apps… 😲

seancorfield 2019-06-14T18:49:14.050300Z

Yeah, I think I want 32G in my next dev machine. I’ve lived with 16G for a long time and I want MOAR!

borkdude 2019-06-14T18:50:22.050800Z

yeah, I’m just a little bit before the tipping point, but I can see it happening

seancorfield 2019-06-14T18:51:46.051200Z

Def. something to consider before you drop $4k on a new machine 🙂

borkdude 2019-06-14T18:52:21.051500Z

I’ll wait at least until September (I think)

seancorfield 2019-06-14T18:56:37.052500Z

If work would spring for it, I’d get a Surface Studio 2 in a heart beat 🙂 to replace my iMac. But it’s more likely I’d get a reasonably high end Dell touch screen desktop.

seancorfield 2019-06-14T18:57:13.053200Z

If money was no object for me, personally, I’d probably get a loaded Surface Book 2 for on-the-go use.

borkdude 2019-06-14T18:59:03.053400Z

only 16GB

borkdude 2019-06-14T18:59:26.053700Z

but it’s a cool machine

seancorfield 2019-06-14T19:02:43.055700Z

Yeah, the 16G limit is… disappointing… My current Dell laptop is only 8G (and 128G SSD). Cost $1,500 back in the day. $999 would get me a similar spec brand new Surface Pro 6 + Type Cover right now. So tempting as a fun, portable, casual device — that I could run Clojure on and do some dev work 🙂 (My Dell is a convertible tablet/laptop).

borkdude 2019-06-14T20:17:55.056Z

@seancorfield how’s the Docker support on Windows?

seancorfield 2019-06-14T20:23:38.057100Z

Haven't tried it myself on Pro but read a friend's blog who switched from Linux to Windows talks a lot about Docker/Kubernetes... and he seems happy...

seancorfield 2019-06-14T20:24:38.057400Z

https://marcesher.com/2018/01/02/going-back-to-windows-windows-windows/ -- read it and see how you feel

borkdude 2019-06-14T20:51:44.057800Z

thanks!