News for hackers. Stuff that matters.
Re:Windows Code Samples by 20161112 on Sunday January 15, 2017 @09:10AM (#13404027)
For development, is WSL good enough to replace dual-boot?
Re:Windows Code Samples by kirillkh on Sunday January 15, 2017 @09:36AM (#13404134)
Depends on your use case/tools/habits. WSL gives you the advantage of being able to access the same files with native Windows tools and from the GNU[1] command line. If you plan on using the X GUI tools, it will be much less useful to you.

[1] I can't bring myself to use the term 'Linux' here, because, ironically, Linux is the primary missing part in this Ubuntu distribution. It should really be called WSG or WSU.

Re:Windows Code Samples by danieldk on Sunday January 15, 2017 @09:46AM (#13404177)
If you plan on using the Linux GUI tools, it will be much less useful to you.

If you install an X server, such as VcXsrv and set the DISPLAY variable (typically export DISPLAY=:0 will suffice), you can just run X11 apps. For instance, here's a screenshot of a Prolog/Tk application running on WSL:

https://danieldk.eu/Posts/2017-01-10-Alpino-Windows/alpino-w...

I have installed Windows on a workstation just to try WSL out and it's quite impressive. Many regular applications just work. I could build Ubuntu packages and upload them to my PPA (I just had to use fakeroot-tcp to replace fakeroot).

Of course, there are also things that don't work for obvious reasons. E.g. because they require facilities deep in the kernel (performance counters/perf) or because they require kernel modules and hardware access (running CUDA programs).

Re:Windows Code Samples by 20161112 on Sunday January 15, 2017 @10:07AM (#13404277)
So if I want to use my GPU for machine learning applications, I would have to run my programs under Windows rather than from inside the WSL?
Re:Windows Code Samples by danieldk on Sunday January 15, 2017 @10:32AM (#13404421)
Indeed. There is a 'uservoice' about this issue:

https://wpdev.uservoice.com/forums/266908-command-prompt-con...

Re:Windows Code Samples by pjc50 on Sunday January 15, 2017 @04:09PM (#13406414)
> access the same files with native Windows tools

Er, about that: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-n...

DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc.

Edit: downvoting accurate information that was previously posted on HN? Really?

Re:Windows Code Samples by detaro on Sunday January 15, 2017 @04:13PM (#13406431)
You can access your entire Windows filesystem freely from Linux, so that's not really an issue. Just keep your data in /mnt, or link it from there to other places.
Re:Windows Code Samples by swiley on Sunday January 15, 2017 @09:44AM (#13404174)
All of my friends on windows say X is just as easy to set up as on cygwin
Re:Windows Code Samples by kirillkh on Sunday January 15, 2017 @10:30AM (#13404410)
I never said X GUI apps could not be used, just that the more Windows tools you use, the more you gain more from WSL.
Re:Windows Code Samples by dustincoates on Sunday January 15, 2017 @09:16AM (#13404050)
I've been using it for a couple months now for web development. There are still some quirks and bugs but I haven't had to move to dual-boot. I'm on the edge of doing so (see aforementioned quirks and bugs), but I've been rather happy with it so far.
Re:Windows Code Samples by mrweasel on Sunday January 15, 2017 @09:24AM (#13404084)
For many people I think it's still the wrong way around. It's not the first solution to running Linux applications on Windows. The first I saw involved X-Win32 and a Linux server in the basement. It's just that most of these solutions get it wrong. It's not that people want Windows, and a little Unix. People want Unix/Linux, and a little Windows.
Re:Windows Code Samples by danieldk on Sunday January 15, 2017 @09:54AM (#13404215)
I think there is a large group of people that needs or want to develop on Linux (POSIX API, open source tools). But have difficulty getting their hardware running on Linux, need applications that are not available on Linux (Microsoft Office, Adobe suite), or simply want to run games as well without dual booting.

I think this is a masterstroke by Microsoft, since it will give Windows the best of both worlds. Something that only OS X had so far.

Of course, it's not for everyone. People might be morally opposed to proprietary software or want UNIX all the way down.

Re:Windows Code Samples by CJefferson on Sunday January 15, 2017 @10:16AM (#13404323)
I've been using this, and find it works well enough for me.

I like a Linux/GNU terminal, but I prefer windows GUI to X, I find all laptops I have owned work better under windows than linux, I prefer outlook to mutt/thunderbird, and many of my games only run on windows. (Obviously, other people's opinion can be different!)

Re:Windows Code Samples by jibsen on Monday January 16, 2017 @12:39PM (#13411486)
I don't have WSL available, but I would love some numbers for tasks like cloning a large repository with git and running cmake. These things tend to be slow on Windows due to fork, see for instance this comparison for Windows vs. Linux in a VM:

https://gist.github.com/jibsen/7ebeddde3bc2bfd421b96ae53a824...

Re:Windows Code Samples by dethswatch on Sunday January 15, 2017 @11:41AM (#13404774)
why wouldn't you just use a vm rather than dual boot, these days?
Re:Windows Code Samples by bostand on Sunday January 15, 2017 @06:48PM (#13407220)
It is significantly better than cygwin, but of course it doesn't beat real Linux.
Re:Windows Code Samples by supernovae on Sunday January 15, 2017 @06:58PM (#13407282)
Yes, If you're comfy in Ubuntu land then the everything just works..
Re:Windows Code Samples by sz4kerto on Sunday January 15, 2017 @11:04AM (#13404555)
For me not, because of the lack of Docker.
Re:Windows Code Samples by dfcowell on Sunday January 15, 2017 @06:31PM (#13407119)
I've configured the Docker client in WSL to talk to the Docker for Windows daemon. It's good enough for 90% of use cases.
Re:Windows Code Samples by csixty4 on Sunday January 15, 2017 @06:49PM (#13407230)
Was that hard? I hate bouncing between bash and PowerShell.
Re:Windows Code Samples by dfcowell on Monday January 16, 2017 @09:11AM (#13410033)
Literally one line in my .bashrc setting the DOCKER_HOST env var.
Re:Windows Code Samples by csixty4 on Wednesday January 18, 2017 @11:42AM (#13427707)
Nice!