clj-on-windows

Felix Dorner 2024-05-22T07:21:30.644589Z

Is the best way to run clj on windows at the moment to use wsl?

thheller 2024-05-22T07:26:01.036589Z

I use it in WSL and regular Windows Powershell. Works fine in both for simple commands. If you need escaping (e.g. EDN data) then powershell is a bit of nightmare.

borkdude 2024-05-22T07:48:33.404439Z

depends what you want, wsl isn't windows, it's linux on windows. if you really want windows, this is the recommended approach: https://github.com/casselc/clj-msi (which wraps deps.clj)

👍 1
💯 1
seancorfield 2024-05-22T16:47:10.505149Z

@felix.dorner I do all my development with VS Code on Windows and all my Clojure stuff on WSL (Ubuntu) since we deploy to Linux servers and this keeps our dev/test/CI/QA/prod infrastructure very similar. I find it's a really good experience since VS Code natively understands the "remote" aspect of processes and files all living on the WSL VM...

Felix Dorner 2024-05-22T16:51:52.232939Z

That's great to hear Sean! That raises chances my teammates actually will try out clojure from 0.1% to 1% :)

seancorfield 2024-05-22T17:08:10.225229Z

Happy to answer any Qs you (or your teammates) might have about it... feel free to DM if you have Qs you don't want to ask in public...

Felix Dorner 2024-05-22T17:09:01.299249Z

Do you use Calva then?

seancorfield 2024-05-22T17:10:29.785429Z

Yes, VS Code + Calva (+ Joyride and Portal). Everything else runs on WSL. All the files are on WSL. Docker too -- for MySQL (Percona), Elastic Search, and Redis.

👍 1
Felix Dorner 2024-05-22T17:12:50.674109Z

There was this video series showmeyourrepl, would be really cool to see you hosted there 🙂

seancorfield 2024-05-22T17:25:32.916929Z

I've done a few videos of my REPL-driven approach, but I change my setup quite a bit over time and I don't think I've done a video of my current setup with dual Portal windows and the new Calva output terminal... but video isn't a medium I like much (since I'm an old fart and I've been doing this stuff for over forty years now...).

Felix Dorner 2024-05-26T07:51:27.397389Z

Yup

🙏 1
2024-05-29T00:32:28.975379Z

I run Emacs and Clojure both on openSuse tumbleweed running inside WSL 2. And then I have X410, a windows X server, so I can open Linux Emacs and it feels like it's a native windows app. Works pretty well. It's not perfect, once in a while X410 crashes. But normally it's after multiple days of it running without issues. The new terminal in windows that you can get from the windows store is really good as well, so command line for Linux through wsl 2 works great. I did need to figure out a few quirks, I think I've got a few wsl specifics configs in Emacs, or how to get the windows browser to navigate to a wsl running server. How to create a Windows shortcut to start Linux Emacs, etc. But it still works way way better than hush trying to do pure windows based development, which sucks even if you use C# lol.

2024-05-29T00:34:02.699869Z

If you want to go pure windows though, a deps.clj option is the way to go. With it, clojure really works without issues on windows. It's just that, then you're on windows, so command line will not be good. Also Emacs on windows isn't very good. And I like using Emacs.

seancorfield 2024-05-29T00:43:49.311699Z

WSL2 supports X11 apps natively these days -- is there a reason you still use X410?

2024-05-29T00:46:27.407729Z

Ya, WSL2 shows the Linux chrome. Whereas X410 uses the Windows chrome. So the app looks native to windows.

seancorfield 2024-05-29T00:49:19.642209Z

Ah, okay. I've kinda gotten used to using Firefox and Google looking Linux-y which I start from WSL2.

2024-05-29T00:53:09.772139Z

I think of you use Ubuntu, it's not as bad, because the Ubuntu chrome is pretty nice. But on openSuse tumbleweed I got some basic old school gnome theme and it's really ugly haha. I probably could figure out how to change the theme on it, but X410 was already working well for me.

2024-05-29T00:57:22.497759Z

Does copy/pasting between windows and the Linux apps work well? I can't remember if that was supported with wsl 2 GUI mode ?

🙌 1
seancorfield 2024-05-29T01:37:19.547509Z

Ubuntu, yes. I'd have to double check the copy/paste. I can't remember one way or the other...

jf 2024-05-26T00:10:02.324369Z

@felix.dorner is this https://www.youtube.com/@smyr-clj ?