Live data from Hacker News

Gow – The lightweight alternative to Cygwin

github.com

31–40 of 95 posts

Re: Gow – The lightweight alternative to Cygwin

#32
Cygwin is not perfect, but he's the thing that I prefer over other options.

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"

Re: Gow – The lightweight alternative to Cygwin

#34
post #5

What is the use case for Cygwin in the days of virtualbox/vmware?

I work with a hosting provider and Cygwin is used all the time to provide SFTP access on Windows boxes. Haven't looked at sshwindows though.

WinSCP works very well for sFTP. http://winscp.net/eng/index.php

Re: Gow – The lightweight alternative to Cygwin

#35

How does this compare to the MinGW/MSYS ( http://mingw.org ) project?

I was about to ask the same question. MinGW is already the lightweight alternative to Cygwin, and has largely taken over for the task of compiling unixy things on Windows.

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.

Re: Gow – The lightweight alternative to Cygwin

#36
post #5

What is the use case for Cygwin in the days of virtualbox/vmware?

Being able to use a real shell with all the tools I'm used to when developing on Windows. 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.

You could mount the Windows filesystem from the Linux VM, and use the shell tools that way.

I agree, though, it's still better to have Cygwin, because you can alt-tab and such.

Re: Gow – The lightweight alternative to Cygwin

#37
post #5

What is the use case for Cygwin in the days of virtualbox/vmware?

Using Unix utilities (including Unix paths and forking semantics) on your Windows system. I regularly use Unix utilities to e.g. manage Windows processes; frequently, when a game crashes and leaves me with a blank screen, I can blindly alt-tab to a terminal and 'killall foogame', or if it's worse, ssh in.

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.

Re: Gow – The lightweight alternative to Cygwin

#38
post #17

Earlier quoted context omitted.

Or an SSH client which can be called by the gow shell?

In reply to both yourself and guan, the answer is openssh: http://sshwindows.sourceforge.net/ 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.

Cygwin sshd is not statically linked.

Re: Gow – The lightweight alternative to Cygwin

#39
The real point:

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.

Re: Gow – The lightweight alternative to Cygwin

#40
post #38

Earlier quoted context omitted.

In reply to both yourself and guan, the answer is openssh: http://sshwindows.sourceforge.net/ 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.

Cygwin sshd is not statically linked.

I can no longer edit my answer, but I just downloaded it and extracted the setup archive - you're right. OpenSSH for Windows is not statically linked to cygwin.

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.

Post reply on HN