by cturner · 11y ago · 0 comments
That has completely changed in the last eighteen months. Each time I think "wouldn't it be cool if" I'm finding a few weeks later that someone at Microsoft is well ahead of me. How much easier it will be to ship my sucky roguelikes to Windows users in this new world!
Hmm. They can now have a path to obsolete cmd. As long as they ship a decent ssh client with the system, users will become accustomed to ssh-ing to their own box instead of using cmd.
Wishlist: tmux, emacs, vi, netcat, shell option for vi-mode, rc-file with preferences, ncurses library, something simpler than curses, zip and unzip. 256 colour is fine, although 24-bit would be impressive. /proc would be cool, but also a big ask I assume. They already have a strong compiler. Make it really easy to find the hex fingerprint required to log on to the sshd-server. Something like inetd could be useful, too.
No thankyou. I can certainly understand including SSH support, but I don't want what is pretty much the only remaining viable non-Unix platform to start bundling horribly dated and clunky Unix-like commands and bloated GNU tools.
As a die hard Unix guy and ex Slashdot-esque zealot (colloquially a bit of a twat). Yet I'm knocking out PowerShell all the time now and dread having to log into the pile of CentOS kit I have lying around. It is arcane. Even after 15 years I spend most of my time in the manpages or working out another damn config format.
Literally did a two liner to scrape a web page, parse it and call a REST endpoint with the parsed data as JSON in PowerShell. I cant even use python now. I've been broken.
It makes me cringe saying all this as well kind of like a racist making amends with his past.
The only thing I still hate is windows update.
I understand that lots of people are familiar with Unix-like tools and their many idiosyncrasies and like to be able to transfer that knowledge across platforms. But that doesn't mean there isn't merit to a platform not conforming to that and trying to improve on it.
Don't know if it's any good --- never tried it; it says it's about half complete, but I don't know if it's a useful half.
After looking at the docs, you could do a lot of what Powershell does with Unix shells; you'd need a different set of conventions, where instead of using unformatted text as an intermediate format you used a streamable table format with support for metadata. Then you could have commands like 'where', which would be awesome.
$ xps | xwhere user -eq dg | xsort -desc rss | xtop 10 | xecho "rss=@.rss cmdline=@.command"
...or something. sh syntax is a bit lacking; PowerShell's got lots of useful builtins, including having native support for the format so it knows how to present it to the user. An sh version would conversion routines back and forth from text.
The tricky part would be bootstrapping; getting enough functionality quickly enough that enough people would start using it to make it sustainable.
I'd still rather use this than faff around with awk, though. I've done way too much of that. And if I never have to parse the output of ls -l using cut again, I will be a happy person.
There are at least two parties working on it who have interest in certain features to be working: It's the NuGet shell within MonoDevelop, so custom PowerShell hosts need to work as well as a bunch of things needed by NuGet. Then one of the more prolific developers actually gets paid to work on Pash to support features related to PowerShell add-ins and a few others. (My own efforts so far were mostly bits and pieces, missing cmdlets (there are still a lot of those), test cases, and weird parser behaviour, mostly due to my history of golfing in PowerShell – golfed code makes for some fun tests of edge cases.)
The whole point of the GNU system was working around the usual "I can see it here, need this bit, and want to put it there". If you need to do something really specific a lot, you write a tool which does that.
But I've never tried it; just came across it recently as a homebrew update.
Try stat instead, e.g.
$ stat -c 'NAME: %n; OWNER: %U, SIZE: %s' *
also supports --printf (see man stat). find "$@" -printf "%TY %Tm %Td %TT %1y %4m %3n %4U:%-3G %8s %p\t%l\n"
and flavor the output elements and format to suit. (this sorts by date well,
but would do less well on file or symlink names with embedded newlines - swap
\0 for \n to wrestle with those.)This sounds cool. Can you recommend terse resources for getting to know PowerShell? Is MSDN the best place to look for docs or are there better places to go?
Scrape a page:
$flight = " LH3396"
$url = "http://bing.com?q=flight status for $flight"
$result = Invoke-WebRequest $url
$elements = $result.AllElements | Where Class -eq "ans" | Select -First 1 -ExpandProperty innerText
Hit a REST endpoint: $body = @{
Name = "So long and thanks for all the fish"
}
Invoke-RestMethod -Method Post -Uri "$resource\new" -Body (ConvertTo-Json $body) -Header @{"X-ApiKey"=$apiKey}
Sources:[1] http://stackoverflow.com/questions/9053573/powershell-html-p...
[2] http://www.lavinski.me/calling-a-rest-json-api-with-powershe...
http://social.technet.microsoft.com/wiki/contents/articles/1...
Ah also POSIX compliance could simplify the life of those who develop on Windows. I tryed to develop on Windows for many years, I tryed hard but you are always missing some feature that on Unix is basic.
I tend to use PowerShell ISE that is built into windows rather than cmd, which you're right, sucks.
all those "2 liners" don't mean much if you have to reboot your box every 2 days to apply more emergency 0-day security patches.
Can you post this 2 liner? Sounds interesting.
Update-Help
This will download all the help.Then you can type "Get-Help About_" and hit tab to see the master topic lists.
If you were coming from the Unix/BSD world, I could understand this, but how is using a GUI for everything considered elegant, while GNU tools are considered "bloated?" Doesn't the GUI necessarily "bloat" the program more than a few extra command-line options would?
Windows could do a lot better than curses by providing easy means to pop MFC dialogs from the shell to prompt the user.
Zip and unzip are already available, in https://pscx.codeplex.com/
> Who uses vi-mode in the shell?
There's at least a dozen of us. It's my wishlist :) > Windows could do a lot better than curses by
> providing easy means to pop MFC dialogs from
> the shell to prompt the user.
When you work in an environment with a lot of hosts, Windows is a laborious partner. You need to open remote desktops and click windows to push the OS around. With unix you often have processes that start out being manual, and which gradually get sewn up into automation.With deliberate effort, you can build automation to Windows platforms. But in unix, one guy with a clue can create vast value working with the defaults. Even on an ancient Solaris box with no compiler or extra tools installed. If you're desperate you'll be able to find a shell that can open a socket server or staple some awk together to get a result.
Windows powershell is a vision of what a shell can be that has grown up separate to the unix world. In a fair world it would be considered heavy-lifting-equipment, like bash or emacs lisp. It would be thriving. But it has lived in a straight-jacket because until now Microsoft has forced operators to to interact with it via the windows GUI.
MFC popups would undermine the benefits of SSH. If you're worried about your shell hanging at a background window event, you'll avoid using it in anger.
Same issue with editors. Existing editors require the GUI layer. A strength of ssh is how well it suits you when you want to dive on to a host and make a fast change.
This was common on the Amiga. E.g. tab completion in the shell can bring up a pre-filtered file requester.
Why do you think that is? As in, why is everyone else on unix (like toolchains)? Why do you think pretty much the entire tech-stack of mobile and web companies has moved to Linux or BSD as the default choice.
The reason is clear. The unix "small tools connected by text based pipes" philosophy has won. Whether disaffected powershell users find it clunky or not is not the point. Unix tools are the lingua-franca of developers everywhere.
There are many reasons for this but the most important is that the commandline toolset for managing a machine from a remote terminal has always been the most important UI for unix over the last forty years. You can call it "dated". The industry calls it "the standard".
The irony here is that Microsoft itself has come to the realization that they have to follow where the developer ecosystem is inexorably marching en mass. There will of course be a certain percent of holdouts clinging to their powershells. But now they'll be fighting against not only the linux'er and BSD'rs. But Microsoft management itself.
Baby steps! SSH is a transport protocol, not a shell. If you SSH to your own box, you're just going to get PowerShell.
One of the big missing features in Windows is lack of SSH transport. Sure, its terminal emulator is adequate at best, but it does have one. The major news here is that it will finally be possible to remote into a Windows host the same way we remote to everything else.
Will happily run a cmd window, or other command you supply (e.g. I run a cygwin zsh)
That hasn't been my experience. Microsoft has always been supportive of my compiler company, even providing Microsoft tools to be bundled with it. In fact, a huge reason MSDOS was so enormously successful was the ease with which anyone could (and did) write and ship software for it. Microsoft was well aware of this and supported it.
I'm not sure I understand what you mean here ...
My OS X desktop/laptop (for instance) have ssh on them, but I almost never ssh to them ... I just open up a local terminal window.
Genuinely curious as to why one would ssh to their windows system rather than just run cmd.exe ...
Not all of us who manage (partial) Windows environments run Windows or care to click around a whole bunch of times if we can just use the terminal we've already got open & focused.
<http://www.reddit.com/r/sysadmin/comments/38ba26/professiona...
I ran cygwin-with-ssh heavily for a while in 2003. It was a hell of a thing to get it going. Then I had trouble getting it to work on a new computer and gave up. Shouldn't be surprised that it got good again.
Wait, isn't that nearly everything you ever install on Windows? Not complicated per se, but everything is third party and not signed by people maintaining Windows (as with most GNU/Linux distributions).
mobaxterm - http://mobaxterm.mobatek.net/
First, let's have a copy tool with delta-sync support. I can't believe I have to use a cygwin-based rsync to quickly update my backups throughout the day (currently: shut down Virtualbox dev VM, rsync changes, start VM).
I understand the MS way to do it is DSFR, but for a single developer workstation that's overkill.
I am a linux guy who did his intern in Microsoft. That was the first time I appreciated Powershell and from then I am in love with it. Its object oriented nature makes thing easy, fluid, understandable. I can never run linux command line with Google but with Powershell, its possible with the way it manages help pages.
Interix release 6.1 is available for Windows Server 2008 R2 and Windows 7 for the Enterprise and Ultimate editions.
Which never rang really true, but NT had promise.
I'd say Microsoft has been been more pro-developer than most and I'm super glad that I chose to live primarily in their ecosystem because they make my life easy compared to the mess I have to put up with in Unix-land.
There are two worlds in desktop software development – the "open-source-unix-y" world, and the "Microsoft" world. The former has typically meant having a broad range of excellent tooling; it's certainly been a bit messy, but that's mostly because of the ease with which things have been able to change and develop. Even development in the Apple sphere has always involved the same basic tools.
On the other hand, development using the Microsoft platform has traditionally been an entirely different process and toolset. It's cleaner, in the sense that there's less diversity and a greater focus on compatibility (to some extent). But the tradeoff there is that it's often been slow to keep up with developments in the rest of the industry, and did not allow users access to open, standard tooling that other developers had.
That is changing now, and we'll start to see the best of the traditionally locked-away Microsoft platform make its way into open-source platforms, and vice versa. That's not a bad thing, but I think it's pretty foolish to consider their past stance as 'developer-friendly', especially considering the number of frameworks and toolkits they've pushed and abandoned over the past decade. Hopefully, that is changing.
Not at all - go ask any devops/IT group running in small, medium and large businesses to replace their Microsoft tools with a competitor's (if you can find one) or FOSS tools and they'll laugh in your face because of how easy Microsoft makes things for them.
> But the tradeoff there is that it's often been slow to keep up with developments in the rest of the industry...
Considering that Microsoft kicked off Web 2.0 with the invention of XMLHTTPRequest and the iframe, I'd have to disagree.
Your whole argument is closed == bad and that's simply not true.
IT is a bit of an outlier. But I must admit, I've never encountered any self-described 'DevOps' who uses anything but Unix. Different spheres, perhaps.
Considering that Microsoft kicked off Web 2.0 with the invention of XMLHTTPRequest and the iframe, I'd have to disagree.
That's a bit shallow – every technology company has developed some tools and techniques that were ahead of the curve. It doesn't mean that their entire platform is.
Your whole argument is closed == bad and that's simply not true.
No, my argument is that closed has a very large downside, and that if you don't bear that in mind it's going to harm you later.