Apple leveraged a form of BSD -nix to get developer mindshare. Now Microsoft is leveraging FOSS Linux to leapfrog Apple. It is a smart move. While OS X isn't bad for -nix-like development, it still involves jumping through hoops and compromises. (Homebrew/Macports)
* https://news.ycombinator.com/item?id=11391961
* https://blogs.windows.com/buildingapps/2016/03/30/run-bash-o...
I strongly suspect that you will never see systemd working on the Windows NT kernel. Getting systemd to work doesn't just involve supporting the Linux kernel system calls, but also involves getting what those system calls do to work as well. It's all very well supporting open(2), but if one cannot open (say) /proc/self/mountinfo or all of the stuff under /sys or many other things (some listed at http://0pointer.de/blog/projects/the-biggest-myths.html), then systemd might load but it won't run and work.
The same goes for upstart. For example: upstart uses pseudo-terminals for logging. The Windows NT Linux subsystem, according to the Microsoft demo video, doesn't implement pseudo-terminals and returns ENOENT when a program attempts to obtain one.
* http://upstart.ubuntu.com/cookbook/#console
* https://news.ycombinator.com/item?id=11415843
Then there's the fact that the Windows NT Linux subsystem doesn't run Linux programs as the first process in the entire system. That honour goes, of course, to Windows NT's own Session Manager. Both systemd and upstart have "Am I process #1?" checks, and operate in a non-system mode if they aren't process #1.
Which brings us on to the fact that Windows NT already has a mechanism for launching daemons. It already has a Service Control Manager that supervises daemons and that talks LPC to control utilities. It already has a Session Manager that handles initialization, shutdown, and sessions. Ironically, it has had some of the things that are "new" in systemd for roughly a quarter of a century. (But some of those "new" things aren't even new in the Linux and Unix worlds, really.)
It's worth observing that the approach taken by the old Windows NT POSIX subsystem (the Interix-derived SFU/SFUA one) is to run daemons under Windows NT's own Service Control Manager. There is a small shim (psxrun.exe) for ensuring that the Service Manager could run and control the POSIX program, doco on what environment a POSIX program should expect when run under the Service Manager, and an Interix version of the service(1) command that understands Windows NT service management and how to speak to it.
* https://technet.microsoft.com/en-us/library/bb463219.aspx#EH...
* http://systemmanager.ru/svcsunix.en/extfile/portapps/service...
It would be interesting to see how some of the daemontools family of service management toolsets -- such as nosh, runit, perp, daemontools-encore, and s6 -- fared on the Windows NT Linux subsystem. I suspect that one would trip over unexpected holes in the Windows NT Linux subsystem (like setuidgid not working because the underlying system calls return EPERM, perhaps). But I also suspect for several reasons that quite a lot would work. The daemontools family uses FIFOs and ordinary files as the control/status API; is composable and loosely coupled and so doesn't lock everything in to Linux-specific stuff (like specific files in /proc, /dev, or /sys) even if one tool in a toolset might need such stuff and permits that one tool to be replaced or otherwise worked around; and can do service management without demanding to be process #1.
So one could spin up svscan, or service-manager, or perpd, or runsvdir; stub out or comment out invocations of setuidgid or runuid with a dummy program if the Windows NT Linux subsystem didn't support that; similarly stub out or comment out invocations of jexec (for nosh service bundles that use BSD jails) and whatever of ionice, chrt, and numactl (for nosh service bundles that use those) don't work; and probably get quite far.
But the big deal would be spinning service management up outwith a Windows NT login session, so that daemons are actually daemonized. The old Windows NT POSIX subsystem actually has an init process (and an inetd) that can spin up other stuff. I strongly doubt, given the very clearly stated aims, that the new Windows NT Linux subsystem has (or will have) anything similar.
This might be the thing that saves Windows as a dev machine for me. I'm a heavy cmd/powershell user but I'd migrate to bash in an instant.
Having had OS X, Windows, and various Linux distributions as my primary operating systems I would consider having an Arch Linux VM kicking around if you want all the packages in the world, maintained fairly well.
(My own answer is that cheap VPSes are 150ms away from me, and with Virtualbox I had a few problems, always related to Windows file permissions yada yada yada...)
Nothing beats running and developing on localhost.
I know of no language runtime and ecosystem that has better cross-platform support than Node (hm ok maybe Java also). I develop solely on Windows (I just like it better) and virtually all of NPM just works on my box. Even stuff people never tested elsewhere than on their Macs, it just works. Express, webpack, mocha, phantomjs, it's really quite impressive if you ask me.
For devs that do heavy Linux work (but have stuck with a Mac OS for GUI/app reasons), is it time to move (back) to Windows? If so, what would be a good laptop to get at the moment?
I'm personally using a Dell XPS 13 (2014), soldered in RAM, but I did buy an ultraportable and 8GB is more than sufficient to do my all my personal work on. Work supplied me with a Lenovo W540 that is substantially more flexible, but it weighs as much as a couple bricks and I usually just leave it at home on the dock.
And it's pretty damn light for a 15" laptop. Easily one-handable (I think it's like 2 pounds IIRC).
And what's great is that you can crack it open and replace stuff - I swapped out the hard drive and replaced a malfunctioning battery myself with just a torx screw driver (super tiny torx, but still, no glue or special tools or anything).
It was pretty expensive - like $1900 IIRC. You're paying for the high res screen, better build quality, and thinness/lightness. But it's still like $500+ less than an equivalent macbook.
Why not just use Linux? It has a GUI. It has apps. It does everything a modern desktop or laptop needs to do. It really is great.
I would LOVE to ditch OS X and run Linux on it, only problem is NO DISTRO supports latest hardware. There are always things that don't work and it gets tiring.
I tried to run Ubuntu on my old Dell Laptop... there would always be some issues related to graphics card, wifi or some shit, overheating, battery drain... or something not working. At the end, had to go for Windows with Ubuntu on vagrant boxes and Desktop Ubuntu in Virtualbox.
Then on my new Macbook Pro, I wanted to run Ubuntu 14.04... but of course, so many things don't work... like right clicking on the touch pad, WiFi or such simplest of features you'd expect to be supported in such widely available and pretty standard hardware... but NOPE. So, it's vagrant and Virtualbox running mostly Ubuntu on OS X again. I am actually considering installing Windows and running Linux on a VM inside it.
Not long ago Microsoft schemed to stomp out Linux and now they've had a change of heart? Fuck Microsoft! To this day even they engage in anti-competitive bundling with OEMs, not to mention their seedy history in relation to open source.
I'm surprised to hear someone preferring macbooks cooling though, my macbook always gets so hot relative to other laptops
If I were buying a Windows machine, the only one I would consider is the Microsoft Surface Book.
Although, in my opinion, I wouldn't trust any laptop hardware company out there enough to use the system that came pre-installed with it, but that's for another discussion.
There was also the Lenovo Solution Center problem. And the Lenovo BIOS shenanigans (or was it the Lenovo Service Engine?).
There have just been too many lapses in judgement at Lenovo. Either their competence is slipping or their ethics are. Either way, I'm done with them for now.
What? The M3800 had terrible battery life under Windows and it was even worse under Linux.
Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well. I also dabbed in gaming. In the end I went back to my work=Mac game=Windows duopoly.
A GNU userland. A plethora of tiling window managers. A selection of clean terminals. Every single thing Debian's or Arch's repos offer which one must turn to brew for.
And of course there's freedom too, which is nice.
> Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well.
I've got multiple monitors running on Linux, over HDMI, at home & at work, at differing resolutions & orientations. I use arandr-configured xrandr scripts which set my desired orientation with a quick keystroke in my window manager. What more does one need?
Freedom, a full GNU userland, proper package management of the entire system, plethora of CLI programs which can fulfil your every need and only really work on GNU/Linux, configurable, etc.
> Every year I try a switch to Linux desktop. This year I made it as far as trying to get multiple monitors working well. I also dabbed in gaming. In the end I went back to my work=Mac game=Windows duopoly.
I use multiple monitors every day for my work under OpenSUSE and Arch. They both worked with either minimal (Arch) or no (SUSE) configuration. I use DisplayPort which works pretty well.
Better Desktop environment Better Package Management More Up to date packages
Some of my knowledge of OS X is likely outdated I haven't used it since 2011
I started using Linux when I was at University late 90's early 00's (Mandrake was my first distro). I switched to OS X around 2005 and used it as my primary operating system for about 5 years.
I used OS X because I'd purchased a MacBook Pro (mostly for the hardware) I still think Macbooks are the nicest laptops I've used to this day I went through 3 iterations of Macbooks before I stopped using OS X. I used OS X because it was good enough but I never fell in love with it.
I absolutely hated the desktop environment, silly things like no ability to customise anything, lack of workspaces, having to hit command q to kill application (because the 'x' button wouldn't close them properly) stuff like that. Workspaces came in a later OS X update which addressed some of my gripes.
It was never easy to install third party packages and libraries in OS X. I think this has improved now, when I used OS X it it was a mess (especially compared to the ease of something like apt). The native system packages were always really ancient - old version of GCC, old version of emacs, python etc. Trying to install newer version of these 'default' packages was not straightforward at all I remember having huge issues getting python 3 working.
Nowadays I run Fedora very happy with it. Not compelled at all to switch back. Linux support for modern laptops is a lot better than it was when I first started using Macs.
My current job is in an 'enterprisey' environment I'm forced to use a locked down version of windows here. Almost anything would be better.
The whole python ecosystem is also better on Linux overall.
Anything strictly desktop-oriented is better on OSX of course.
I use Mac OS X and this is what I miss about Linux:
- Clean package/software management and updates.
- Basic customizability without having to install 3rd party binaries from untrusted sources
- Multiple filesystem support (NTFS write not supported out of the box... needing 3rd party software... ext support has to be compiled, breaks with updates... generally PITA)
- Easy installation of software/libraries from source (generally PITA to set up toolchain to compile general cross platform open source software)
- Proper desktop environment (the one that OS X has is shit compared to Gnome)
- Proper file manager (the one that OS X has is shit compared to Nautilus)
- Up to date and standard command-line tools (The ones in OS X are old... for example check the version of unzip... they can't unpack zip files created by new zip tool)
- Better command line system wide file search (I love mlocate, the one in OS X is shit)
- Ability to run docker natively
(unless I am missing something)
But it would make sense that certain things should be doable on literally any computer. grep, find, vi, edit, etc... etc... I cant come up with a complete list - but it would be great to start that direction.
"The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems." (https://en.wikipedia.org/wiki/POSIX)
Also, why gnu and not bsd? OS X's find, grep, sed, and so on work fine for me and are not gnu.
The author points to using grep and Xargs and some other tools to quickly update a package. That's the key here. These bash/Linux utilities are productivy boosters for all the Linux and Mac/bsd people out there. I can't imagine living without them and they're necessary for any system I develop on (which is currently a Mac).