News for hackers. Stuff that matters.
Re:Bash and Windows Subsystem for Linux Demo [video] by OhSoHumble on Tuesday February 21, 2017 @10:19AM (#13696099)
The biggest problem I have with the WSL is that it is intrinsically tied to stable Windows releases; there is no way to get incremental updates for Bash on Windows unless you subscribe to the Windows Insider program, which is a way of running prerelease versions of Windows.

So in order to get Linux features like inotify working you have to sacrifice the stability of your operating system.

This looks like it'll be true till the end of time. Does your dev work depend on bug fixes or certain syscall implementations? Well, either run an OS that may or may not work at any given time or wait several months for the next release.

A couple weeks back I tried to give WSL a try but everything was broken. Inotify prevents hot reloading, which really makes my life just dandy, so I tried to transition to the insider program in order to get my fix. To my chagrin, this caused Node to up and break on me. Like, full stop doesn't work anymore.

I ended up going back to Linux. I really hope that developing on Windows becomes something other than 'awful' - for me at least - but I don't think it's quite there yet.

Re:Bash and Windows Subsystem for Linux Demo [video] by bitcrazed on Tuesday February 21, 2017 @01:01PM (#13697715)
@OhSoHumble: We totally hear you. We'd love to ship WSL builds uncoupled from the rest of the OS, but at the moment, we're developing WSL at a breakneck pace alongside several other critical kernel feature changes which all have to ship in lock-step.

A good example of this is the work we've been doing with the networking team to add additional network socket mode support to the NT kernel's networking stack so that we can create the correct socket semantics that Linux apps expect. We're also working with the NTFS team, process & scheduling team, management infrastructure, etc.

Re:Bash and Windows Subsystem for Linux Demo [video] by OhSoHumble on Tuesday February 21, 2017 @01:35PM (#13698094)
That's good to know. Maybe I'll try to use Windows as a development platform when it has another major release. I'm really impressed that WSL exists at all. I didn't think Microsoft had it in them to allow such a project to flourish.

At the end of the day, however, I really hate writing code on Windows. I don't write much Java or C#, instead sticking to Elixir, Ruby, Python, Node, and Golang. Every time I try to use Windows I just get super frustrated. I remember showing up to a Code for San Francisco meeting with a Windows laptop and being the only person there without a Mac. I mean, go check out node-gyp's 500 comment 'windows users arent happy' issue to see how deep the rabbit hole goes.

WSL makes an impact on a lot of the issues that frustrate me. Knowing I have a tool chain that can actually compile C extensions matters. I'll never, ever bet my career on Windows but I might one day use it as hobbyist development platform.

While I have you here, will the Windows console ever 'get better?' Rendering console text on Windows is... pretty awful, I'm not going to lie. Going from Linux to Windows is fairly painful; when I `cat` a large file in Windows it then takes seven years for all the text to render. Day to day usage just feels sluggish and awkward in comparison to a Linux terminal. Even if WSL was a flawless piece of engineering, the 'terminal experience' on Windows could do with some TLC. Are there any internal plans to make improvements?

Re:Bash and Windows Subsystem for Linux Demo [video] by zadjii on Tuesday February 21, 2017 @02:05PM (#13698497)
As far as the console "getting better" - it's getting better with every release. This last release we focused on enabling full 256color/24 bit color support, and enabling VT mouse mode, to better support terminal applications. Not only that, but we've also been working constantly on performance enhancements under the hood. IIRC, before AU, we would try to repaint the frame every character, now they're aggregated to 60 FPS. It's getting better, not terribly quickly, but we're getting there :)
Re:Bash and Windows Subsystem for Linux Demo [video] by Archenoth on Wednesday February 22, 2017 @01:21PM (#13707725)
> A good example of this is the work we've been doing with the networking team to add additional network socket mode support to the NT kernel's networking stack so that we can create the correct socket semantics that Linux apps expect.

Ooh! That's nice.

I was slightly disappointed I couldn't SSH tunnel or do too much with network tools when I gave it a try not long ago. I am definitely looking forward to that.

Re:Bash and Windows Subsystem for Linux Demo [video] by CJefferson on Tuesday February 21, 2017 @10:41AM (#13696271)
I think you are being too harsh -- this is an in-development feature. Once it gets stable things should "just work", and you'll get an update in a few months, like most pieces of software. At the moment you wouldn't want to rely on the beta version for anything important -- some betas are fairly broken (as you would expect with betas).

It is unfortunate that Microsoft couldn't figure out how to write this in a less kernel-attached way, but this is adding some powerful new functionality at many levels of the kernel, that will hopefully provide long-term benefits.

Re:Bash and Windows Subsystem for Linux Demo [video] by OhSoHumble on Tuesday February 21, 2017 @10:51AM (#13696336)
You could very well be right. I really don't want to take away from the fantastic work that the WSL team has done.

However, as a developer, I want a development environment that is stable and easy to setup. Windows has always been a huge mess to develop on and is the red headed step child as far as support for every open source project out there and the WSL implementation solves 90% of associated problems.

That being said... both MacOS and Linux are easier to code on. From compiling C extensions to file path parsing, UNIX-based operating systems have just turned out to be better development platforms. From my perspective, at least.

To emphasize, I have less of a problem with the work-in-progress nature of the project as I do with the release cycle. If the operating system stands in the way of getting work done, then the end user shouldn't have to face the dichotomy of whether or not to sacrifice core system stability in order to achieve his or her goals.

Re:Bash and Windows Subsystem for Linux Demo [video] by bitcrazed on Tuesday February 21, 2017 @01:08PM (#13697785)
@OhSoHumble: Second Point:

"A couple weeks back I tried to give WSL a try but everything was broken"

Did you run an Insider build? 14986 completed a batch of inotify related syscall improvements since we first added inotify support in 14328 (Details here: https://msdn.microsoft.com/commandline/wsl/release_notes)

Re:Bash and Windows Subsystem for Linux Demo [video] by OhSoHumble on Tuesday February 21, 2017 @01:22PM (#13697946)
My main project is a Rails/Ember.js application to help people find affordable housing in the bay area.

My problem was that the CLI built to help glue the two together didn't work on Windows so I tried it out in the WSL. Because of missing inotify support, hot reloading was broken. I found that I really missed that functionality so I moved to the fast ring of insider builds. After an update, node was completely broken. I didn't know how to switch to the slow ring to get a build that may have worked so I switched to developing to the Arch install I have on another drive.

Re:Bash and Windows Subsystem for Linux Demo [video] by bitcrazed on Tuesday February 21, 2017 @09:43PM (#13702497)
What OS build & Linux version are you running? Type `ver` at the Cmd prompt, and `lsb_release -a` at the Bash prompt.

What do you mean when you say your node is "broken"?

And I don't follow re. your Arch install on another drive?

Re:Bash and Windows Subsystem for Linux Demo [video] by tornadoboy55 on Tuesday February 21, 2017 @10:35AM (#13696213)
Output from `bash --version` on macOS:

`GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16) Copyright (C) 2007 Free Software Foundation, Inc.`

that's a 10yr old bash and there's barely any shell magic that you can do on Linux that won't work on macOS. And since by far most devs use macOS, most binaries support at least the macOS version of bash. All in all, no need to worry :p

Re:Bash and Windows Subsystem for Linux Demo [video] by kupiakos on Tuesday February 21, 2017 @12:22PM (#13697335)
> by far most devs use macOS

I'm not sure about this - that seems too extreme of a statement. If there is any winner, it's going to be Windows. IMO, Linux and macOS will be within 5 percentage points of each other. From what I've seen at university, it's something like 60% Windows, ~20% macOS, ~20% Linux (usually Ubuntu). Much more Linux/Mac in the "hackier" courses, usually with a slight majority to Macs.

Where can reliable statistics be found on this? HN isn't exactly indicative of developers in general.

Re:Bash and Windows Subsystem for Linux Demo [video] by tornadoboy55 on Tuesday February 21, 2017 @01:21PM (#13697939)
http://eclecticist.co.uk/notes/appledesign/images/image12.jp...

That's all I need to say about that.

As for the reasons.. Devs want a POSIX (macOS, Linux or BSD) system because many of the utilities used are written for that, and much of the infrastructure you will be working with in the future will also be POSIX. Of all the POSIXes, macOS is by far the most capable and stable laptop OS. Macbooks are still unrivaled, with only the Dell XPS range coming somewhat close.

They are also the only company with both a solid phone and computer product, meaning you get lots of ecosystem goodies (verify iCloud logins with a push notification on your iPhone, Wi-Fi passwords entered on your MacBook instantly work on your phone, 'instant hotspot', AirPods intelligent multi-pairing, etc)

And that may seem like I'm drinking the Apple kool-aid, but I'm not. The audio quality on the AirPods is terrible. In fact, Apple has never produced anything but mediocre audio gear. The $200 price bump on the MBP 2016 is unjustified. Removing the headphone jack on the iPhone is utterly insane, even if they did use USB-C (maybe in 10 years when all audio-out ports on everything everywhere also uses USB-C it would have made sense). macOS stripping out all GPL tools because they don't want to use GPLv3 stuff, etc. etc. etc.

Re:Bash and Windows Subsystem for Linux Demo [video] by piaste on Tuesday February 21, 2017 @04:08PM (#13700007)
That's an anecdotal photo and an off-the-cuff rationale.

Here's data:

https://stackoverflow.com/research/developer-survey-2016#tec...

~50% Windows, 26% OSX, 22% Linux, for the average "developer-who-fills-a-survey-on-stackoverflow".

And I doubt anybody will argue that the masses of developers who don't frequent StackOverflow are less likely to run Windows.

Re:Bash and Windows Subsystem for Linux Demo [video] by beal on Tuesday February 21, 2017 @03:57PM (#13699875)
Not sure a self selected group of college aged kids really counts as an effective sample to qualify that 'by far most devs use macOS'
Re:Bash and Windows Subsystem for Linux Demo [video] by osd on Tuesday February 21, 2017 @04:26PM (#13700175)
http://macdailynews.com/2007/10/02/lecture_hall_photo_shows_...

That's apparently the school of journalism...

Re:Bash and Windows Subsystem for Linux Demo [video] by pshposh on Tuesday February 21, 2017 @09:07PM (#13702276)
Wow that site really doesn't like adblockers
Re:Bash and Windows Subsystem for Linux Demo [video] by derefr on Tuesday February 21, 2017 @12:44PM (#13697581)
My impression is that most devs who write POSIX software these days use macOS (with possibly Linux running in a VM.) AFAIK, that's more to do with preferring Apple hardware, and then Linux not having 100% support for said hardware (e.g. touchpad multitouch / "force touch".)

Devs who write native apps for an OS (e.g. DirectX games for Windows) will of course use that OS.

Re:Bash and Windows Subsystem for Linux Demo [video] by kupiakos on Tuesday February 21, 2017 @12:53PM (#13697656)
See, that's not really what I see in my experience. About half of my friends that hack around use macOS, another half use Linux, and then a couple use Windows.

In general, I see Linux native used as often as Mac native, and Linux VMs used on Windows all the time. POSIX has little to do with it.

Re:Bash and Windows Subsystem for Linux Demo [video] by RussianCow on Tuesday February 21, 2017 @03:01PM (#13699299)
I've interviewed at a couple local companies with 50+ devs each (mostly web dev positions), and almost everyone uses a Mac. This is anecdote of course, but I very rarely see devs using Linux professionally (natively, not in a VM).

That said, it depends on the kind of work; obviously, .NET developers almost exclusively use Windows, and I've noticed that sysadmins and system engineers are a little more likely to use Linux.

Re:Bash and Windows Subsystem for Linux Demo [video] by throwaway2048 on Tuesday February 21, 2017 @10:40AM (#13696264)
its more about supported syscalls and buggy behaviour in their linux kernel emulation than specific versions of specific tools.
Re:Bash and Windows Subsystem for Linux Demo [video] by xrisk on Tuesday February 21, 2017 @10:39AM (#13696247)
You can get a newer bash, so that comparison is particularly moot.
Re:Bash and Windows Subsystem for Linux Demo [video] by tornadoboy55 on Tuesday February 21, 2017 @10:45AM (#13696299)
My point is you don't need to, even running a shell that's 10 years old :)
Re:Bash and Windows Subsystem for Linux Demo [video] by finchisko on Tuesday February 21, 2017 @12:41PM (#13697557)
Output from macOS Sierra: GNU bash, version 4.4.0(1)-release (x86_64-apple-darwin16.0.0).
Re:Bash and Windows Subsystem for Linux Demo [video] by tornadoboy55 on Tuesday February 21, 2017 @01:51PM (#13698274)
That's your Homebrew bash..
Re:Bash and Windows Subsystem for Linux Demo [video] by oblio on Tuesday February 21, 2017 @10:25AM (#13696143)
Does anyone know the roadmap for WSL? My guess is that WSL itself is still unstable right now and later on it won't really need a lot of updates.

On top of it, the Ubuntu userland should be freely upgradable - I think.

Re:Bash and Windows Subsystem for Linux Demo [video] by WorldMaker on Tuesday February 21, 2017 @11:01AM (#13696430)
Yes, the Ubuntu userland is upgradable using exactly the tools you would expect. (The system even includes a Scheduled Task that does security updates every week.)
Re:Bash and Windows Subsystem for Linux Demo [video] by nailer on Tuesday February 21, 2017 @10:34AM (#13696205)
> My guess is that WSL itself is still unstable right now

Correct, it's currently a 'technology preview'.

Re:Bash and Windows Subsystem for Linux Demo [video] by bitcrazed on Tuesday February 21, 2017 @01:13PM (#13697848)
Actually, it's currently a 'beta' feature while we continue to expand the breadth and depth of WSL's syscall implementation & supporting tools.

That said, WSL is now far, FAR more compatible with the majority of mainstream dev tools than it was in Anniversary Update or early Insider builds.

Don't take my word for it - I am biased ;) - but if you've not taken a look at WSL in 2017, you might be surprised by how much now works very well :)

Re:Bash and Windows Subsystem for Linux Demo [video] by kirkdouglas on Tuesday February 21, 2017 @10:21AM (#13696107)
IIRC WSL is still in beta.