18 ms·
Ask HN: How important is Posix?
Today I found myself reading through accounts of the Microsoft keynote from CES, and while I'll admit they have some interesting ideas, I still found myself thoroughly unimpressed.
Now, I've worked with people who did or do work for Microsoft. A few (Open Source, interestingly enough) projects I've worked with have involved engineers at Microsoft. My general impression of the talent in Redmond is rather good, and yet I'm still completely turned off from Windows.
What it comes down to, for me, is the lack of out-of-the-box POSIX compliance as a first-class feature. The fact that I can't sit down at a machine running Windows, open a terminal, "cd /etc", "ls -F", "less <your_favorite_config_file>", and instantly know something about how the machine is configured bothers me.
Am I abnormal? I feel like Windows 8 could promise Unicorns and Rainbows; if it isn't POSIX compliant, I'm not interested...
- th0ma5 18y agoi thought windows' command.com was posix (some version) compliant? posix != unix compatible, per se, i don't think
- DarkShikari 18y agoTo quote a fellow developer on this topic: <pengvado> that brings back the memory: <pengvado> windows is posix compliant <pengvado> every single posix function returns ENOTIMPLEMENTED, which is one complying implementation :)
- ivey 18y agohttp://en.wikipedia.org/wiki/POSIX#POSIX_for_Windows http://en.wikipedia.org/wiki/POSIX#POSIX_for_Windows Short answer is no, it isn't.
- bayareaguy 18y agoI think it only matters for developers who work with mainstream open source. That's me most of the time and my switch from a dual-boot windows/linux configuration to an OSX laptop several years ago has saved me many hours (although I still have to work around odd OSX weirdness here or there but that is pretty easy to work out). I'm not likely to do Windows-only stuff anytime soon so I don't expect I'll be paying Microsoft anything until their POSIX support is superior to what OSX offers. However if you're not a developer or if you and your customers mainly work with Microsoft-only proprietary stuff then POSIX won't really matter.
- deleted 18y ago[deleted]
- arockwell 18y agoI think this has less to do with lack of POSIX compliance and more to do with how unfriendly windows is to hacking in general. The command line is completely crippled. If the command line had a similar feature set to Linux I don't think POSIX complaince would matter much. So between a crappy command line and the registry, hacking windows never seems worth the trouble.
- nradov 18y agoCan you clarify what features Windows PowerShell http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx http://www.microsoft.com/windowsserver2003/technologies/mana... is missing compared to the shells typically used with Linux?
- kleevr 18y agoI'm not a shell expert, but I wanted something unix like when work dictated that I would be on XP, so I downloaded Windows PS. Maybe I have an old machine, but it was sluggish, it didn't seem to share the same system environment variables to the point of annoyance.
- kleevr 18y ago...speaking of slow... I just found out why my shell was so slow: http://blogs.msdn.com/powershell/archive/2007/11/08/update-gac-ps1.aspx# http://blogs.msdn.com/powershell/archive/2007/11/08/update-g...
- arockwell 18y agoSorry I honestly can't, I've never heard of PowerShell, nor have I ever used win 2003 server. However, the most obvious feature its missing is I can't run it on xp or vista. Why do I need to run a server to have a decent shell? I find having a nice shell handy for various day to day development tasks. edit: whoops, turns out I'm totally wrong, thanks nfg.
- nfg 18y ago
- ken 18y agoNot very. Most Linux distros aren't POSIX (but oddballs like A/UX, Minix, and VxWorks are). The /etc tree isn't in POSIX, nor is less(1). POSIX doesn't even say that useful config data must be stored in text files. It sounds like what you really mean is that you want Windows to be more like the other Unix-like systems you use. There's no standard for that.
- eru 18y agoThere are standards. There just not called POSIX. For example the filesystem hierarchy standard.
- makecheck 18y agoWhich by the way, is fully-documented here: http://www.pathname.com/fhs/ http://www.pathname.com/fhs/
- jballanc 18y agoYeah, my example wasn't the greatest. I'd have said SUSv03, but I didn't think as many people would be familiar. Also, my desire for POSIX extends beyond command line to basic programming APIs. The deficiency of Windows just seems most readily apparent on the command line.
- tptacek 18y agoEveryone I know that does dev work on Win32 just installs cygwin and runs an xterm. It works fine. Personally, despite being a Unix user since 386bsd, I think the Registry is a major win over the sprawl of incompatible picky config files in /etc, /var, /usr/share, and /usr/local. I also think SVCHOST.EXE is a win over inetd.conf and inittab.
- thwarted 18y agoThis is an interesting perspective considering the trend these days for creating DSLs. That's really all those different and incompatible config file formats are. Everything old is new again.
- tptacek 18y agoThe fact that Unix configuration files often resemble crappy programming languages is exactly the problem. Most configuration can and should be declarative.
- thwarted 18y agoCan you give an example? Things like the ISC dhcpd.conf are declarative, and the advantage that it "looks" like a programming language is that it's easy to read and see/form dependencies for complex setups--it's not just a big list of key/value pairs. That makes sense for a tool with a lot of capabilities. A quick glance at /etc doesn't reveal anything other than structured declarative files, key/value pairs, or delimited. There's a been a trend to use XML recently, which I find to be overly verbose for a configuration file, but even the XML-esque format that Apache uses is pretty much just a big list of key/value pairs.
- hapless 18y agoWindows has had a first party UNIX solution for a very long time: Microsoft SFU/SUA. It's bundled with Windows 2003R2. On all earlier versions, you have to go download SFU 3.5 separately. http://technet.microsoft.com/en-us/library/cc779522.aspx http://technet.microsoft.com/en-us/library/cc779522.aspx It incurs no additional license cost. It's POSIX conformant. It comes with both GCC and an MSVC wrapper for use with traditional UNIX build tools. In my experience, it's considerably faster than cygwin, but software compatibility isn't as good.
- iofthestorm 18y agoWow, I was looking for this recently but didn't remember what it was called. For me, Windows is good overall, and I'm a gamer, and I started on DOS so I'm pretty command-line happy, but after using Linux/UNIX for personal use and school I vastly prefer the nix command line tools. I have Cygwin installed and use that somewhat often, and I also have msys so I can use some nix commands in the regular Windows prompt. What does SFU/SUA do that Cygwin/msys don't? Speed is always nice but what do you mean by software compatibility?
- hapless 18y agoUNIX software is not perfectly portable. Portable software is less likely to run on niche systems. The fewer users that a particular platform has, the less likely it is that portability issues particular to that platform have been discovered and fixed. It has been my experience that one is more likely to find portability bugs in software when one tries to build it on Interix/SFU/SUA than when one attempts to build on Cygwin. There are only two reasons to use SUA: - Interix/SFU/SUA has the advantage that much of its system calls are implemented in a kernel driver, just like native system calls. Cygwin hits a userspace emulation layer for many calls, and that incurs a performance cost. - Cygwin is third party. Interix/SFU/SUA comes from Microsoft. - Interix/SFU/SUA includes some fairly useful NIS/NFS integration stuff. It's not great, but it's better than nothing. Whether you choose SFU or Cygwin, UNIX software ported to a compatibility layer is generally more pleasant than native hosted software. ActivePerl and native Apache are just a pain in the ass compared to Cygwin/SFU's implementations.