birmingham.io

Windows 10 & WSL, Windows Subsystem for Linux

I haven’t chosen to put any Windows since 97 on my on hardware and I haven’t worked with Windows for at least 6 years. Mrs. Woo has a laptop that ran Win 7, so when Windows 10 came out I registered it for the free upgrade and ‘reserved my copy’. But: Mrs. Woo worked for a council and wanted compatibility with her work machine. When they finally got around to moving to Win 10, Microsoft had reneged on their promise.

When support elapsed, I found that there is a loophole: https://www.theverge.com/2020/1/14/21065140/how-to-upgrade-microsoft-windows-7-10-free-os
Note that although this is a bootable image, you don’t boot it. You let Windows mount it then run the Setup program. You can 1) blast the old system away 2) keep your user data but lose applications and their data or 3) try to keep everything. 3 failed for me but 2 worked and I’ve been able to re-install ‘Office Home and Student 2010’.

I asked on Brumtech Slack if anyone had used WSL. No replies. Is it possible that we’ve all divided into Microsoft, Google or Linux tribes? I’ve spent a couple of years adjusting to the idea that Clojure runs on the JVM so the OS doesn’t matter.

I made a new Raspbian Pi SD-card and was struck by the minimal set of icons on the task(?) bar: a terminal, a file manager and a browser. I’d probably add an editor. I spend most of my time in a REPL in emacs. If that’s all I need, could Win 10 now be the OS that doesn’t matter?

I bunged WSL on. I did it this way but discovered later that there are others https://docs.microsoft.com/en-us/windows/wsl/install-win10. I chose the latest Ubuntu in the Microsoft Store: 18.04 LTS. Windows now has an ‘ubuntu’ command which opens a terminal running bash, or I can execute any Linux CLI application in a window. You have ‘apt’ for installing other programs. I like it. vi and python3 are already installed. I think emacs-nox might be next. Why isn’t it called emacs-nw, the same as “emacs -nw”? “Unix is as user-friendly as a cornered rat”.

I’m going to use this for a while before trying WSL2. Some people are playing with https://sourceforge.net/projects/vcxsrv/, to get Linux X apps to display in a Windows X display server. This is a game I played long ago to get the KDE’s Umbrello UML editor onto PC desktops.

From clojureverse, in a thread titled ‘Beginer-friendly environments’ but this is really about VScode rather than Clojure.

“Just did quick test of VSCode+Calva+WSL support. I’m impressed how great it works, especially when using WSL.”

“I’ve even assumed that it was not possible to use WSL from VSCode. It’s very important since R (with plenty locally compiled packages) and nRepl are on Linux (WSL) which is target environment for clojisr library. With Calva it’s possible to seamlessly join these two worlds.”

It works as remote development on WSL, on the same machine:

https://calva.readthedocs.io/en/latest/remote-development.html and following the link https://code.visualstudio.com/blogs/2019/05/02/remote-development

Windows needs the Remote Extension Development Pack.

This blog post on WSL 2 is interesting too https://code.visualstudio.com/blogs/2019/09/03/wsl2

A possible down-side of Clojure on WSL is that activity on https://github.com/clojure/clojure-clr/ seems to have stopped.

Proudly sponsored by Bytemark