clj-on-windows

borkdude 2021-12-22T15:24:48.022400Z

@seancorfield as you are using WSL2 as your primary dev env (for me its on a machine I use for heavy duty tasks and Windows testing), I wondered about your memory setting for WSL2. If you don't limit memory for WSL2, eventually it can eat up your whole RAM and starve Windows. So I've set the limit to 112GB (of a total of 128GB) for WSL2. But if you would have a laptop with only 16GB, I wonder how much you would have to give to Windows for it to still function properly. E.g. a divide of 8 / 8 only leaves 8GB for WSL2 which is a bit on the low side for what I typically do.

seancorfield 2021-12-22T16:43:07.023800Z

@borkdude I haven't changed the defaults (and I have 16GB on the laptop). I run Docker with Percona, Redis, and two Elastic Search instances and a bunch of Clojure stuff and VS Code. No problems so far.

borkdude 2021-12-22T16:44:06.024100Z

How long do you typically run WSL without restarting?

borkdude 2021-12-22T16:47:55.024300Z

thanks

seancorfield 2021-12-22T20:59:59.025500Z

@borkdude Sorry, on vacation so I've been away from my house for half the day... I leave WSL running "all the time", unless it wants to reboot for a Windows update.

seancorfield 2021-12-22T21:00:33.026100Z

It says it's been up for 5 days right now.

borkdude 2021-12-22T21:00:38.026300Z

Ah I see. It's good to hear you didn't have problems yet, some people do, as WSL, once it claims memory, never releases it.

naomarik 2021-12-27T10:25:03.082500Z

once every a month i sometimes run this to reclaim memory: ➜ ~ cat freemem.sh #!/bin/bash # PATH="/bin:/usr/bin:/sbin:${PATH}" # REGEX="^SReclaimable" # MEMINFO="/proc/meminfo" # THRESHOLDKB="50000" # IFS=' # ' # LINE=($(egrep $REGEX $MEMINFO)) # for i in ${LINE[@]}; do # NUMPRE=$(echo $i | tr -s ' ') # NUM=$(echo $NUMPRE | cut -d ' ' -f2) # if [ $NUM -gt $THRESHOLDKB ]; then # sync && sysctl -w vm.drop_caches=3 # fi # done echo "sync && echo 3 > /proc/sys/vm/drop_caches" | sudo sh

borkdude 2021-12-27T10:26:08.082700Z

is this also for WSL2?

naomarik 2021-12-27T10:27:17.083100Z

yeah

👍 1
naomarik 2021-12-27T10:27:58.083600Z

my uptime 10 days (my son hit the restart button my PC cause it's a flashy LED) but i pretty much never restart

naomarik 2021-12-27T10:28:11.084Z

and memory nowhere near being consumed yet

borkdude 2021-12-27T10:28:35.084400Z

awesome

borkdude 2021-12-22T21:01:19.026700Z

Have a nice vacation :)

seancorfield 2021-12-22T21:01:28.026900Z

My biggest memory user is Mailbird 🙂 then WSL.

seancorfield 2021-12-22T21:01:41.027200Z

Oh, it's only a vacation from work, not from OSS 🙂

borkdude 2021-12-22T21:02:03.027500Z

sounds like my vacations ;)

borkdude 2021-12-22T21:04:07.028300Z

I was amazed today that I could just run emacs.exe under cmd.exe and pwsh.exe and it all just worked. Even clojure-lsp auto-installed itself and all. https://twitter.com/borkdude/status/1473599014859902990

borkdude 2021-12-22T21:04:51.029Z

I mean, in the terminal, not gui

seancorfield 2021-12-22T21:05:13.029500Z

Yeah, the integration is amazing really. My only gripe is that WSLg doesn't support "snap" for windows yet, but the team told me "it's coming!"...

borkdude 2021-12-22T21:05:32.029800Z

The above doesn't use WSL btw, it's Windows emacs.exe

borkdude 2021-12-22T21:06:04.030500Z

but I start pwsh.exe or cmd.exe through an ssh connection to WSL to test Windows stuff, although I can run it directly via a Remote Desktop as well

seancorfield 2021-12-22T21:06:15.030700Z

Ah, gotcha...

borkdude 2021-12-22T21:06:58.031200Z

but I agree, the integration is awesome... if someone gave me a powerful laptop, I might be temped to switch over ;)

borkdude 2021-12-22T21:07:38.031700Z

Docker performance is better on Windows + WSL too compared to Apple (I'm still not on M1)

seancorfield 2021-12-22T21:13:34.034900Z

I'm on my last Mac -- a 2012 iMac (27") -- and it's HD is getting flaky (so much so that O/S upgrades refuse to run so I'm still on 10.12). I've had Macs since '92 because I preferred Mac OS over Windows (but I've used every Windows since 3.11). Until Windows 8. I've been on Insider builds of Windows for six or seven years now on my laptops and my current one is a Surface Laptop 3 and I love it. With WSL, I really enjoy working on Windows and overall prefer Windows 11 (and 10) to macOS. So when this desktop dies, I'll get a Windows machine to replace it.

borkdude 2021-12-22T21:33:10.035600Z

I recently upgraded to Windows 11, it was smooth, everything still worked

Richie 2022-02-07T14:05:33.824229Z

I was using gui emacs through wslg and everything worked great when it worked. I had issues with the clipboard so I wasn't able to continue using it though. I never figured out what caused it so I didn't know how to avoid it. The clipboard would just stop copying into or out of wslg. Have you had that issue? Do you know if it's resolved?

borkdude 2022-02-07T14:11:47.426859Z

@rgkirch Don't know, perhaps @bozhidar has some idea since he's using emacs + wslg too

Richie 2022-02-07T15:04:32.311929Z

Thanks.

Richie 2022-02-07T15:08:49.652079Z

I meant to include the https://github.com/microsoft/wslg/issues/15 somewhere for reference. Sorry for necro spam.

naomarik 2021-12-27T10:27:00.082900Z

i haven't been paying too much attention to windows 11, but saw one video awhile back. apparently you can run gui stuff without an xserver running (or it comes with its own not sure), so you can use emacs within WSL2 or any linux application and it will work with audio.

borkdude 2021-12-27T10:27:24.083300Z

yes, I know, it's called wslg

naomarik 2021-12-27T10:31:04.086100Z

how's your experience with it? is it good?

naomarik 2021-12-27T10:31:27.086300Z

i've been using X410 which is a purchased app, worked a lot better than free solutions for me

borkdude 2021-12-27T10:32:01.086500Z

I use wsl2 on a PC that I only access remotely, so I don't use sound, but the wslg works well. I compiled emacs with gtk support and the resolution is good as well. But I primarily access this machine in Terminal or via ssh

borkdude 2021-12-27T10:32:10.086700Z

I've been using X410 before that, now I uninstalled it

bozhidar 2022-02-08T09:20:30.644109Z

I see you've found the relevant ticket, I guess this will be addressed a some point. I wrote a short article about this https://emacsredux.com/blog/2022/01/04/dealing-with-clipboard-issues-on-windows-11-wslg/

Richie 2022-02-08T15:18:34.036589Z

Thank you! I have not seen this.

seancorfield 2021-12-22T21:33:52.036200Z

I'm on build 22523 right now. Voice Access just got rolled out and it's very impressive.

seancorfield 2021-12-22T21:36:06.037100Z

My WSLg version is 1.0.29 right now. Not sure what's the released version? cat /mnt/wslg/versions.txt will tell you.

borkdude 2021-12-22T21:37:17.037500Z

I'll have a look, powering on my PC

borkdude 2021-12-22T21:37:51.037800Z

$ cat /mnt/wslg/versions.txt
WSLg ( x86_64 ): 1.0.26+Branch.main.Sha.26ce2c09b86442f3c7f4f6462f770ed2afa76a25
Mariner: VERSION="1.0.20210224"
FreeRDP: b05321cd4e6a862aef76163a69db4e1910245736
weston: 46756d0e77e5c01b5995fbbee6f3ab0db9b30612
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

seancorfield 2021-12-22T21:39:04.038700Z

Same version of Mariner, FreeRDP, and pulseaudio. My weston is b49e194... Interesting.

seancorfield 2021-12-22T21:39:30.039300Z

I'm glad MS is doing a lot more stuff for developers these days. And a lot of OSS stuff too.

borkdude 2021-12-22T21:41:14.040400Z

Indeed. I have a beast of a machine here with a 3950x 16 core Ryzen processor and 128GB of memory. I installed Tailscale on it, and when I have it powered on, I can connect to it from anywhere on the world via RDP

borkdude 2021-12-22T21:42:09.041600Z

and of course via ssh/WSL2, but I have to be logged in for that first. Sometimes this machine reboots itself and for the life of me I haven't figured out how I can disable that, but when it does, I can connect via Tailscale and start stuff up again

seancorfield 2021-12-22T21:42:15.041700Z

I still like having a portable dev setup that I can use when I'm offline 🙂

borkdude 2021-12-22T21:42:57.042200Z

I like portability too, I have two Macbooks for that. I use this machine for heavy duty work and Windows testing

borkdude 2021-12-22T21:44:09.042700Z

For some things I need "real" linux, macOS doesn't qualify there, and I can use that machine for those things too

borkdude 2021-12-22T21:46:24.043600Z

I expected that I would switch over to the PC, but I've never actually had a keyboard connected to it for more than an hour, I do everything from my laptop since it's just more convenient to be able to sit in different places

borkdude 2021-12-22T21:50:18.044300Z

Do you perhaps have any recommendations for (local) backup software? Time Machine has failed on me and I migrated to Acronis True Image, but they have moved to a subscription model now

borkdude 2021-12-22T21:51:00.044600Z

On the plus side, Acronis works under Windows too

seancorfield 2021-12-22T22:19:46.045700Z

Between OneDrive and GitHub, I stopped using actual backup software. I have so little stuff actually on a local drive that isn't also "somewhere else".

seancorfield 2021-12-22T22:20:52.047300Z

(we have an Office 365 Home subscription so we have 1TB on OneDrive included -- plus all my photos and music are up on Google/YouTube now... that's how I migrated away from stuff on the Mac)

borkdude 2021-12-22T22:21:12.047600Z

Makes sense. I use Dropbox. I've been migrating out of the Apple Photo stuff to raw folders to become less reliant on that ecosystem.

seancorfield 2021-12-22T22:21:35.048Z

DropBox is expensive for anything beyond the basic service.

borkdude 2021-12-22T22:22:44.048500Z

I use Dropbox to share my stuff with my accountant, I pay 10 euros a month, but yeah, I could move to something else probably

borkdude 2021-12-22T22:23:33.048900Z

I have 2TB storage there. I'm only at 8.5%

seancorfield 2021-12-22T22:24:18.049700Z

I have a basic DropBox account for my ebooks since Manning and PragProg have integrations with it. I have ~100 tech books in PDF form there.

borkdude 2021-12-22T22:24:48.049900Z

I use that too yes

borkdude 2021-12-22T22:26:28.050600Z

So Microsoft Office 365 is 99 EUR/dollar a year for 6 persons in total? Or per person?

seancorfield 2021-12-22T22:27:22.051100Z

For five or six licenses, installations, yeah. I don't remember the details.

borkdude 2021-12-22T22:28:02.052Z

that's a pretty good deal it seems

seancorfield 2021-12-22T22:28:35.052800Z

We have Office on three machines here, plus two phones and an iPad I think. Maybe two iPads. The device licenses are free, so we're only using three actual licenses. And I get Skype credit too. 60 minutes a month I think?

borkdude 2021-12-22T22:29:16.053Z

Makes sense.

borkdude 2021-12-22T22:30:35.054Z

I've never used OneDrive. Does it work similarly to Dropbox, as in, I could use this to share a (mutable) folder with my accountant?

seancorfield 2021-12-22T22:31:44.054600Z

Yeah, you can have shared folders, public folders, shared files, full read/write control.

borkdude 2021-12-22T22:40:04.055100Z

Thanks, just installed it. I'll play around and perhaps migrate, thanks!

👍🏻 1