Re: WSL for linux on Windows?

2024-01-30 Thread Robert Strickland
I also run Linux natively on my personal desktop and laptop. I typically 
refrain from doing any development
 on Windows systems and will go out of my way to find any method to circumvent 
it. I typically find that the 
Windows Terminal is sufficient enough for the development tasks I've need to 
complete. Though, it did take 
some adjusting to get used to the different CLI environment (setting 
environment variables, different CLI 
program arguments / options, etc...).

I've worked on getting WSL set up on my personal desktop and attempted to do 
some C/C++ development 
but generally end up just shutting down my PC and booting into Debian. This is 
mostly due to the many 
"if-Windows-then" scenarios and the lack of complete control over the 
environment. I think we may all be 
familiar with the random occasion of attempting to delete a directory in 
Windows, only to be denied access 
even though there's only one user.

In fact, I recently had to debug some issues on the Omega Edit codebase that 
were affecting the data editor 
capabilities within the Daffodil VSCode Extension. I was attempting to work 
within the WSL environment and 
was having a rough time because of the constant issues. 

First, there was an issue with trying to run a build.sh file and having bash 
syntax errors on the first line of the 
script. After spending some time trying to figure out why I found out that it 
was due to the \r\n newline and 
had to run `sed 's/\r$//' > build.sh` to resolve this.

Second, I could never seem to get CMake to resolve the correct generator 
(Ninja) that I had installed on the 
WSL environment. I even tried installing CMake and Ninja on the Windows side of 
things and was still unable 
to resolve the issue. I ended up having to build using the CMake Windows 
default SDK.

I haven't touched WSL since...

I long for the day that companies hand out development Linux laptops. 
Developing on a Linux VM on 
Windows is often times just clunky and slow. I don't even want to think about 
having to develop anything on 
VMs that are accessed through the web browser... How could anyone get any work 
done with there is a 
constant 1-2 second graphical delay?

TLDR; I found that it's too much of a setup / maintenance hassle to match the 
development efficacy of 
running a native Linux system. 

On 2024/01/30 19:22:14 Mike Beckerle wrote:
> Is anyone doing development using WSL or WSL2 linux support?
> 
> If so what is your experience with it? positive, negative, does it work
> reliably?
> 
> I have been having lots of freeze-ups using VMWare Workstation running
> Ubuntu guest on windows host, and I'm starting to get pessimistic about
> VMWare Workstation long term.
> 
> I'd run Linux natively, but my employer requires that we use managed
> laptops, but we can use Virtual Machines on them for development.
> 
> Mike Beckerle
> Apache Daffodil PMC | daffodil.apache.org
> OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
> Owl Cyber Defense | www.owlcyberdefense.com
> 


RE: WSL for linux on Windows?

2024-01-30 Thread Nicholas Lewis
We kind of do something along those lines with some added layers.

I have VirtualBox installed on a windows laptop. I then have an Ubuntu WSL 2 
that I run through Terminal/bash. I then have a tool called Vagrant installed 
on Windows and WSL where I can spin up and destroy various dev environments 
through the VagrantFile, some additional provisioning through Ansible to have 
basics like java, npm, etc already installed, and then using the VirtualBox 
WSL2 plugin
https://developer.hashicorp.com/vagrant
https://developer.hashicorp.com/vagrant/docs/other/wsl
https://github.com/Karandash8/virtualbox_WSL2

Your box can be anything, used to use Centos6/7, but now use Rocky9. I then ssh 
into them using vagrant ssh and complete anything I need to do as you would any 
other VM.  I just clone repos down and can build right from there on my 
provisioned box. If my dev environment ever acts up, I just destroy it and spin 
up a new one. Some people store their repos just in the home directory which is 
lost on destroy, but others will use /vagrant directory which is a shared 
folder between it and the host so they can use an IDE and still build through 
the box and have it backed up somewhere. You can use the Windows Remote 
Development extension pack to allow you to have some GUI apps to develop from 
the vagrant box or WSL just typing `code .` for example here is how you would 
use vscode. You can also use VcXsrv Windows X as an alternative. There are 
other apps available now as well.

https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode
https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack

It's a bit of setup and moving parts, but once its setup, its fairly efficient 
and easy to get into and start working. This is also just one aspect of each of 
these tools and there's plenty to expand upon and fine tune to your own needs 
and customizations.

I think the need for vagrant may or may not still be there as WSL improves with 
remote development, but it's nice to be able to quickly destroy and spin back 
to a known state and not fight with your WSL instance. I have not  looked into 
these, but there is something similar you can do now with dev docker containers 
that looks really cool.
https://code.visualstudio.com/docs/devcontainers/containers
https://code.visualstudio.com/docs/remote/wsl#_advanced-opening-a-wsl-2-folder-in-a-container

Another way would be through a Linux VDI through something like VMware 
Horizons, so that may be something you'd want to bring up with your IT 
department as an option, but there is cost and you may also get the added need 
of a VPN when remote.

-Original Message-
From: Mike Beckerle 
Sent: Tuesday, January 30, 2024 2:22 PM
To: dev@daffodil.apache.org
Subject: WSL for linux on Windows?

Is anyone doing development using WSL or WSL2 linux support?

If so what is your experience with it? positive, negative, does it work 
reliably?

I have been having lots of freeze-ups using VMWare Workstation running Ubuntu 
guest on windows host, and I'm starting to get pessimistic about VMWare 
Workstation long term.

I'd run Linux natively, but my employer requires that we use managed laptops, 
but we can use Virtual Machines on them for development.

Mike Beckerle
Apache Daffodil PMC | daffodil.apache.org OGF DFDL Workgroup Co-Chair | 
http://www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
Owl Cyber Defense | http://www.owlcyberdefense.com/


WSL for linux on Windows?

2024-01-30 Thread Mike Beckerle
Is anyone doing development using WSL or WSL2 linux support?

If so what is your experience with it? positive, negative, does it work
reliably?

I have been having lots of freeze-ups using VMWare Workstation running
Ubuntu guest on windows host, and I'm starting to get pessimistic about
VMWare Workstation long term.

I'd run Linux natively, but my employer requires that we use managed
laptops, but we can use Virtual Machines on them for development.

Mike Beckerle
Apache Daffodil PMC | daffodil.apache.org
OGF DFDL Workgroup Co-Chair | www.ogf.org/ogf/doku.php/standards/dfdl/dfdl
Owl Cyber Defense | www.owlcyberdefense.com