This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-22
Channels
- # announcements (17)
- # beginners (11)
- # biff (5)
- # calva (22)
- # cider (30)
- # clj-kondo (33)
- # clj-on-windows (20)
- # clojure (59)
- # clojure-dev (25)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-sweden (5)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # cursive (4)
- # datahike (5)
- # datalevin (7)
- # datomic (11)
- # emacs (8)
- # events (1)
- # gratitude (1)
- # hoplon (5)
- # hyperfiddle (1)
- # lsp (59)
- # matrix (11)
- # polylith (14)
- # portal (3)
- # practicalli (1)
- # rdf (2)
- # reitit (9)
- # releases (3)
- # rum (5)
- # yamlscript (6)
Is the best way to run clj on windows at the moment to use wsl?
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.
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)
@U05KWT468F8 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...
That's great to hear Sean! That raises chances my teammates actually will try out clojure from 0.1% to 1% :)
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...
Do you use Calva then?
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.
There was this video series showmeyourrepl, would be really cool to see you hosted there 🙂
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...).
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.
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.
WSL2 supports X11 apps natively these days -- is there a reason you still use X410?
Ya, WSL2 shows the Linux chrome. Whereas X410 uses the Windows chrome. So the app looks native to windows.
Ah, okay. I've kinda gotten used to using Firefox and Google looking Linux-y which I start from WSL2.
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.
Does copy/pasting between windows and the Linux apps work well? I can't remember if that was supported with wsl 2 GUI mode ?
Ubuntu, yes. I'd have to double check the copy/paste. I can't remember one way or the other...