Earlier quoted context omitted.
Windows has had a proper shell for a while now, in the form of PowerShell. It's quite different from the standard Unix shell, and I'm nowhere near as productive in it as I am in Bash, but that's more a function of lack of familiarity than any weaknesses of the shell. In fact, I'd say that it's actually much nicer than unix-y shells for a wide variety of tasks. All I really find missing these days is good line-editing…
> All I really find missing these days is good line-editing Probably familiar enough for bash people: https://github.com/lzybkr/PSReadLine > and a half-decent terminal emulator in which to run the shell. Not a terminal emulator (although I think it can do Terminal escape sequences if needed): https://github.com/Maximus5/ConEmu
Foreign Linux: Run Linux binaries on Windows without drivers or modification
131–140 of 149 posts
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#132Earlier quoted context omitted.
What do you use for grep? I tried using Powershell and did a few things with it, but while it is a great shell, the lack of good tools like grep prevented me from being really productive.
I've ended up with Select-String "pattern" -Path file.txt | ForEach-Object { Write-Output $_.Line } | Out-File t.txt Slightly Heath Robinson, but by default PS will truncate lines to terminal width, even when writing to a file, which is a disaster for any kind of subsequent machine processing.
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#133Earlier quoted context omitted.
> All I really find missing these days is good line-editing Probably familiar enough for bash people: https://github.com/lzybkr/PSReadLine > and a half-decent terminal emulator in which to run the shell. Not a terminal emulator (although I think it can do Terminal escape sequences if needed): https://github.com/Maximus5/ConEmu
It's still not a terminal emulator, but you can use Clink [1] to get readline in cmd. Works great with ConEmu or as part of cmder, as others have mentioned. [1]: http://mridgers.github.io/clink/
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#134Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#135Earlier quoted context omitted.
For me, Cygwin makes Windows bearable. It's still Windows, but, at least, it has a proper shell, interpreters, compilers, compressors (no need for WinZip or WinRAR - think about it!) and so on. For the same reason you need MacPorts or Brew on a Mac, you need Cygwin on Windows. Unless you are happy to spend your day in Visual Studio, in which case Cygwin will not be that useful.
cygwin is fine, but if you want to spend most of your time in bash or using software designed for Unix you probably shouldn't be using Windows in the first place.
At least for my stuff that will run in Linux (node/iojs and golang) targeting docker containers, it works well.
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#136Earlier quoted context omitted.
For me, Cygwin makes Windows bearable. It's still Windows, but, at least, it has a proper shell, interpreters, compilers, compressors (no need for WinZip or WinRAR - think about it!) and so on. For the same reason you need MacPorts or Brew on a Mac, you need Cygwin on Windows. Unless you are happy to spend your day in Visual Studio, in which case Cygwin will not be that useful.
Windows has had a proper shell for a while now, in the form of PowerShell. It's quite different from the standard Unix shell, and I'm nowhere near as productive in it as I am in Bash, but that's more a function of lack of familiarity than any weaknesses of the shell. In fact, I'd say that it's actually much nicer than unix-y shells for a wide variety of tasks. All I really find missing these days is good line-editing…
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#137Earlier quoted context omitted.
I was wondering the same thing. The features page claims "copy on write fork implementation" but that is not universally true. A cursory look at the code suggests that every allocation is a Win32 file mapping object (aka NT section) underneath, which the fork worker (mm_fork) remaps into the forked process. This means the memory is shared between two processes, and not in a CoW fashion. A write to the memory region f…
From little I've read on cygwin mailing list (btw, cool folks over there) - it seems the problem is not very easy. If I'm not mistaken the Windows Kernel actually does support fork()-ing, but the win32k system somehow "forbids" it (lots of grains of salt). After all for a long time there was a commercial UNIX compatible offering on Windows that probably used fork() all over and must've worked (also it supported case-…
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#138Earlier quoted context omitted.
From little I've read on cygwin mailing list (btw, cool folks over there) - it seems the problem is not very easy. If I'm not mistaken the Windows Kernel actually does support fork()-ing, but the win32k system somehow "forbids" it (lots of grains of salt). After all for a long time there was a commercial UNIX compatible offering on Windows that probably used fork() all over and must've worked (also it supported case-…
Using fork to get a "snapshot" of memory seems... like a roundabout way of doing things. The underlying memory mapping mechanism should expose a simple way of just doing it directly. (I still don't understand the point of fork, especially when most of the time exec is just gonna overwrite things anyways. And the impact fork has is to massively increase potentially used memory, leading to the dumb memory overcommit se…
From redis's page: http://redis.io/topics/persistence
"RDB needs to fork() often in order to persist on disk using a child process. Fork() can be time consuming if the dataset is big, and may result in Redis to stop serving clients for some millisecond or even for one second if the dataset is very big and the CPU performance not great. AOF also needs to fork() but you can tune how often you want to rewrite your logs without any trade-off on durability"
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#139Earlier quoted context omitted.
But if you can run this, you can run VirtualBox, which is a much safer alternative (and simpler, if a live ISO meets your needs).
Unfortunately, a vm solution won't work with certain vpns, such as Cisco's. I know firsthand as I've tried it.
Re: Foreign Linux: Run Linux binaries on Windows without drivers or modification
#140If this can bring me a working * nix shell under Windows, I'd be extremely happy. Windows is great for everything except I have never learned PS as well as I know the * nix shells -- with this, I could enjoy the hardware and proper multi-monitor support, speed and stability (seriously) of Windows and use the * nix command line.
To be honest, and I say this with a massive cringe, after 20 years of Unix I'm more productive with PS in a couple of months! It's quite refreshingly easy to use and I genuinely had no idea how much time I was wasting on parsing streams. Now I feel horrible for revealing my dirty secret :(
At a wild guess I'd say that's why you're "more productive with PS in a couple of months".