Gow – The lightweight alternative to Cygwin
github.com
github.com
MSYS/mingw-get are active projects that provide a good base to build upon. Why not helping improve it? Unix tools on Windows is niche enough so that choice only leads to fragmentation, not competition.
It's unix emulator layer, and as such tries it's best to emulate fork() - which the other alternatives does not even think to put in.
VM is not a real alternative, as there is actually more work to be done to plumb source A with tools B from the VM.
I don't use cygwin from bash, but rather start it directly from the FAR manager (console based Norton Commander/Midnight Commander application for Windows). It's very useful, as a lot of commands just work.
Then there are others, which are some kind of symlink (one of the downsides of cygwin for me), but that's understandable. Symlinks as they are on linux are just starting to appear on Windows Vista and 7 (and I'm not even sure how compatible they are).
So for such cases, sh -c would work. For example checking out latest SDL using cygwin, but from the command-prompt:
c:\p\sdl> sh -c "hg pull -u"
And then other stuff works even better:
c:\p\libzmq> git pull -u c:\p\libzmq> sh -c "gitk --all"
http://neosmart.net/blog/2006/vista-symlinks-revisited/
And an open source (MIT) binary-compatible implementation of ln for Windows Vista+ using native WIN32 APIs:
http://neosmart.net/blog/2011/open-source-100-compatible-ln-...
disclosure: my site
I used to use it. I liked the fact that it used the host compiler instead of gcc, plus I preferred the non-GNU tools.
Now I'm using Inferno, it works much better. It's not Unix, it's Plan9, but I view that as a plus. Of course cygwin can install all kinds of Unixy tools, like gcc, openssh, xterm and whatnot. Inferno doesn't come with anything, but I don't need anything except the basic Plan9 tools.
[1] http://www2.research.att.com/~gsf/download/uwin/uwin.html
(By the way, Inferno's implementation reminds me of Niklaus Wirth's Oberon, which could also run as either an application or as an operating system.)
For me, it's the best environment because I can have Acme (the editor), Plan9 name spaces and the Plan9 tools which I am most familiar with on any operating system I use. You can use either full Inferno [1] or Acme SAC [2]. Hosted Inferno runs in a window, which feels awkward to me, so I use Acme SAC which is a native host window and I run the shell inside Acme. Acme is the only graphical Inferno program I care about anyway.
The major difference between MinGW and Cygwin is MinGW tries to use native Microsoft libs by dummy wrapping them (like, MS's libc is often compatible with POSIX standard stuff, the POSIX version merely starts with _ frequently, MinGW uses this fact).
Most stuff that won't compile "natively" on Windows through Visual C's compiler, those projects use MinGW, I never hear of anyone using Cygwin especially because of the requirement of shipping the Cygwin runtime dll (of which MinGW has none).
Even Strawberry Perl, the Perl distro for Windows, uses MinGW to compile XS perl modules from CPAN.
I have used MinGW and it is extremly slow, I need to always remind myself to use dir instead of ls, otherwise it's a few seconds' wait.
However, I do not think Gow is able to compile. (I did not really look into the documentation as github is blocked in my office.)
Another difference is MinGW appears to provide more up-to-date binary. e.g. bash in MinGW is 3.1 and in Gow is 2.03. And vim in Gow is 6.3 only.
william@aldebaran ~ $ ed
bash: ed: command not foundPostscript - ex is the version of ed rolled up in vim, which extends the command set of ed. vi, by contrast, handles colon commands by invoking ed externally.
Actually vi and ex came about at the same time. You can see the POSIX standard mentions [1] ex and vi (not vim) together, and you can also refer to [2], under the "First appeared" column.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex...
A package manager really sounds like the sort of project where the incompatibilities between *nix and Windows are large enough that writing a new one would make more sense. I think there are even existing projects like that for Windows; I remember seeing one on HN a while back, but can't recall the name.
Instead of reinventing its own selfupdate functionality, Homebrew just uses git. Updating Homebrew is really just fast forwarding a git repository. Finally, the maintainers explicitly do not duplicate the libraries/tools that ship with OS X.
This is a big step up on OS X from Macports, which installs itself in /opt/local and rebuilds everything possible. Homebrew is instantly understandable. Packages are files, you just match them by name. apt is admittedly more complex, but at least you get something for that complexity.
[1] really what's slow is building from source. Homebrew itself is very fast.
In fact, MacPorts actually supports generating Debian packages and an apt repository straight from its port files.
As for Windows, Cygwin already provides binaries. An apt repository of them would be great. I'm not convinced porting homebrew or MacPorts makes sense, however -- they're both fairly Mac-focused.
It is easier for the Macports team to make sense of bug reports with a sandbox, however, which is, I assume, why they do it. It is explicitly the reason they forbid installing to /usr/local.
I do not like to criticise open-source projects, but the (reasonably polite) hostility that stating this simple fact has attracted does make me think that the supporters of Macports have stopped seeing things from the user's point of view.
If you want a packaging system whose job is to protect you from the risk of certain rare but possibly messy mishaps, then Macports might well be what you want. I recommend being less risk averse, and use a mixture of Homebrew and installing to /usr/local. It will cost some research and reinstall time now and then, but it will result in a system that is easier to get an overview on.
The talk I have seen of "destroying" one's system installing via Homebrew is pure FUD, and I do not know what lies behind it.
(Honestly: what does Homebrew make simpler than MacPorts anyway? Near as I can tell, the only reason people seem to like it is that it doesn't take as long to compile software, which argues more strongly to me that we need binary distributions that can download pre-compiled copies than that we should attempt to use the libraries to save installation time.)
1. No alternative copies of Python, Perl, Ruby, zlib, etc...
2. Everything installs to where it is supposed to, i.e., under /usr/local/
After installing via Homebrew, things do not look drastically different to having compiled them by hand.
Fink does install precompiled binaries: http://www.finkproject.org/
If you think there is no complexity issue with sandboxes, try using both Macports and Fink side-by-side.
And if I need a newer version of Python, coupled with a dependency tree of third-party modules?
I don't see why this matters, other than some pedantic sense of cleanliness ("NO DUPLICATES!" ... even though they're not, in reality, duplicates).
2. Everything installs to where it is supposed to, i.e., under /usr/local/
You can configure MacPorts to do this, but the reason it's not the default was to leave /usr/local for the user's own manually installed software. I don't think this really matters either way.
After installing via Homebrew, things do not look drastically different to having compiled them by hand.
I don't know what this means or why it matters.
But when I think "Unix-like core plus package management on Windows"... well, Cygwin is already there.
"apt-cyg is a command-line installer for Cygwin which cooperates with Cygwin Setup and uses the same repository. The syntax is similar to apt-get. Usage examples:"
"apt-cyg install <package names>" to install packages
"apt-cyg remove <package names>" to remove packages
"apt-cyg update" to update setup.ini
"apt-cyg show" to show installed packages
"apt-cyg find <pattern(s)>" to find packages matching patterns
"apt-cyg describe <pattern(s)>" to describe packages matching patterns
"apt-cyg packageof <commands or files>" to locate parent packagesCygwin isn't a collection of binaries; that's a distribution. But the idea is to emulate UNIX, including fork(), etc., allowing you to easily recompile for Windows.
While it is built with cygwin, I believe it's statically linked to get rid of the dependency hell. You don't have to take into consideration that it is a cygwin binary.
I do, however, still think it's possible to statically link OpenSSH with Cygwin, in which case it would become the answer to the original question.
1) if you want to program in "gnu", run unx, and if you want Windows as your host OS, run virtualization; (yes, you need 8G, yes, you should have an SSD, if you don't, buy a new laptop for $700 and run linux native)
2) if you want a better command line, There's lighter weight ways like http://unxutils.sourceforge.net/ http://gnuwin32.sourceforge.net/packages/coreutils.htm ... and a set of binaries I found 5 years ago that seem to have vanished, works OK for me.
Cygwin in combination with MinGW and the Windows native version of GVim lets me have almost exactly the same environment as I do on Linux and Mac OS X.
I agree, though, it's still better to have Cygwin, because you can alt-tab and such.
I guess it might be a good idea to first check the disk using Windows after something like a power loss while the NTFS partition is mounted. But apparently NTFS-3G (one of the NTFS drivers) can also use the journal to recover the filesystem after a power loss.
e.g., you might want to have a mostly unix-style build process that uses VC++ as the C compiler, and run it all inside Visual Studio using a makefile project.
(Yes, I know I should get a new job...)
I like the idea of Gow. Anyone know if you can achieve middle mouse button pasting as when you have X11 under cygwin?
I need a terminal from which I can operate on my Windows file system, but running an entire virtual machine is enormous performance-impacting overkill.
I use Cygwin to get approximately the same terminal environment in Windows as I do in Solaris, Linux and Mac. I have a suite of scripts to massage platform differences (e.g. Cygwin getclip / putclip vs xclip vs pbcopy / pbpaste, or cygstart vs open vs gnome-open / xdg-open / etc.). It means that in the terminal environment, I'm equally at home no matter what the OS.
I run Cygwin in rxvt. Using a better terminal than a Windows command window is a must; until I started using rxvt, I didn't even live in bash. Rxvt / bash combo uses considerably less memory, less startup time and less disk space - my dual-boot macbook air has Cygwin installed in the Windows 7 partition.
I kid, I kid...
In my last job, I used colinux with Windows 7 and it was a match made in heaven. But when I moved, I had to choose the next best thing, which is Mac OS X, because of lack of support for 64-bit windows.