Curl author asks Microsoft to remove 'curl' and 'wget' aliases from PowerShell
github.com
github.com
They even admitted it them self that it was stupid and needs to be fixed though so just wait I guess?
edit: As a separate note I really would like to have versions of curl and wget that actually have all the params working but return the correct PowerShell objects (so the web request result thingie) instead of a String object. Or maybe have it do that with a flag or something.
Really? I thought that windows versions (native versions, not even cygwin) of wget and curl existed for more than a decade. I am not very good at googling old stuff, but I remember using curl natively in 2004 or so.
PowerShell first appeared 9 years ago.
Edit: curl has been on windows for at least 14 years according to this: https://curl.haxx.se/mail/archive-2002-06/0114.html
Edit 2: 17 years: http://ftp.sunet.se/mirror/archive/ftp.sunet.se/pub/www/util...
It's all in how you approach things.
Windows?
Office?
SQL Server?
Seems to me, that Microsoft now releases "everything" as open source only by the most ridiculously limited definition of "everything".
I think trademarks are good; and when compatible alternatives exist, of say, a product named 'Foo™', they should be able to market themselves as 'Foo™ compatible' (and obviously not as 'Foo™').
Don't people have better things to do than bitch about an alias??
Perhaps MS had goals on their inception to make the commandlets behave more like the true applications then changed directions.
Now that's a cordial and produtive tone.
Isn't that a trademark violation when a Big Corp is doing it officially in their software?
wget: https://www.gnu.org/prep/standards/html_node/Trademarks.html
wget is a GNU project (now at least, originally?). They seem to (makes sense) have a thing against acknowledging trademarks period. So I'm not sure it'd make sense for them to even try to enforce a trademark should someone make a product named (or alias their product to the name) wget.
Trademarks aren't a universal thing, not every country or culture will have an equivalent concept, legal or otherwise. And if products aren't trademarked then claiming trademark abuse is inaccurate.
I think taking the alias out is actually disappointing and a very slight change for the worse on Windows.
Then a bunch of jerks pile on about how it was a bad decision and all the Microsoft developers should feel bad.
The whole PR went from something pretty awesome to a great example of why we can't have nice things.
+1
;)
Groupthink: You mean a community that downvotes a comment about X suddenly has a positive notion about X because the votes are hidden?
An example to others: I see this as a good thing - it lets an outsider get a good feel for what community members like. A number is much easier to parse than thousands of comments.
"Shitting on others" is a very melodramatic way of "people saying they don't like a comment with numbers".
Personally I like the inflections and emoji brings, plus it makes statements that might otherwise be taken as hostile either as well intentioned or just good old fashioned ribbing.
It shouldn't be. Fuck emoji.
If Microsoft removed them, installing an update to PS could literally break existing scripts. Sure, you can trivially fix it by re-creating the aliases, but only after you realise that an Update broke it.
One thing I find interesting is Frank's claim that "You have then ignored bug reports about this for years." It seems like users have a better chance of getting problems addressed on Github than the previous feedback mechanism.
Edit: after reading Daniel's blog post, which laurent123456 mentioned in another comment, this has indeed been a longstanding nuisance for curl users.
Maybe, but I see that more as just that the "new MS" is trying to become more open and integrated with the OS community. The change being in the company culture and approach rather than the reporting platform. Ignoring long-standing bugs on many products was just the modus operandi for the old MS.
Now if only UWP will either open itself or die, I'll finally say that old MS is gone for good.
https://www.eff.org/deeplinks/2016/08/windows-10-microsoft-b...
http://www.zdnet.com/article/310-microsoft-patents-used-in-a...
http://techrights.org/2015/10/01/microsoft-loves-linux-brain...
They indeed changed. Back in those days they weren't violating their customers' privacy.
OTOH, you're seriously linking techrights? They're like the Free Software version of Fox News for tech.
By the way, the thread to discuss about Windows 10's privacy issues is here: https://news.ycombinator.com/item?id=12305598
Probably: https://xkcd.com/1170/
Your tech rights articles points out IV, but fails to mention they raised money from Google. They also like to equate Linux, Android, and ChromeOS. That article is just poor. Microsoft has done, and continues to do some shitty things. Windows 10 update and privacy is a debacle. But their releases from a tech standpoint are a welcome change.
It seems that the users of faux-curl-on-powershell are now getting more consideration than the users of real curl under Windows a year or three ago, when Windows 8 or 10 made this change.
It's maybe a good sign. Opening the source and putting it on github means that curl and wget devs and users now feel empowered to ask Microsoft to change stuff in a way that they didn't before.
And here we are with initial OSS release of PS for *nixes. It's broken from the (valid) POV of its target audience and authors want to fix in an orderly fashion. But that's not enough. People at MS are "stupid or malicious", as some commenters put it, and it should be changed ASAP the way community wants, or else.
Or else what? How many of the people arguing for immediate change are an actual and/or potential consumers of PS? How many of people thinking it's a simple change (just do it) have actually maintained large piece of software deployed by thousands of users? I bet that with the exception of Daniel who opened the bug - none.
I don't envy folks maintaining PS. I used to share an apartment with dude who can't get over the US v MS to this day and anything even tangentially related to MS (or Gates) is definitely, without any doubt evil, devious and is some sort of extortion or at the very least embrace extend extinguish strategy. No matter that US v MS was 15 years ago when he was 10. This attitude is pervasive and turbo-counterproductive in cases like this one.
US v MS is an ongoing thing. It's never been over... So MS is releasing OSS stuff, but making it hard to run Linux alongside their OS on the same hardware. It's like a guy giving you a hug while stabbing you in the back.
This isn't some obscure situation tucked into the back corners of some IRC chat. Open sourcing and reaching out to the community is, apparently, the companies direction going forward.
As such, they could/should prioritize these situations as a way of showing real commitment.
Dragging their heels is going to make it feel like nothing but marketing bullshit.
It might also signal to MS rank and file to cut their territorial bullshit (which MS has a storied history of).
Satya could get this fixed today if he said "This is the future. Get it done."
Or, as Bezos would say, "?"
I think the takeaway from this is they should fix things like this before they decide to open source.
I don't think the venom here is justified at all, but I also don't think it would be justified if it was one malicious person who did it.
But the problem and the poor decision needs a ruthless critique, the reasons it ended up this way are a side problem that most people shouldn't care about.
Being pedantic, but that's what a bureaucracy is. https://en.wikipedia.org/wiki/Bureaucracy
I'm sorry for being pedantic....
So why does "bureaucracy" have such a negative connotation? Like a lot of powerful tools, it is very easy to abuse. Unless you are very careful in design, you are likely to create a amplification attack of work. Most managers aren't careful, so few people have a positive experience.
The PS team seems like it's doing its best, but you lose some degree of presumption of goodwill when you work for a criminal entity.
Ultimately, I don't think either side is right, but I also don't think either side is wrong.
MS made a choice not to cultivate goodwill in the OS community for years, and they profited from it. It's reasonable for that community to make them earn it back, and this is what it looks like (unfortunately for the individuals on the PS group).
As an aside, what was their punishment?
Google: https://www.theguardian.com/technology/2010/feb/24/google-vi...
Uber.. hasn't been quiet in the courts.
I don't think the existence of other companies with (mabye even bigger) PR problems has any bearing. So what? You want to be equally critical of Uber? Ok. Let's make them prove their goodwill too.
Furthermore, Microsoft is unique in this regard, because at the time of their conviction, they were fighting the browser wars with two open communities: FF and chrome.
Right. I would think the _author_ of curl should probably have a bit of a say if someone adds a curl command to shell but it doesn't work like curl.
He's going to be the one receive angry tweets and in issues in gh.
> Or else what?
People will see how ridiculous this practice of adding aliases-but-no-aliases to existing tools is, and perhaps decide not to use PS for *nixes. Is that bad? Good? I don't know. I am guessing humanity will still go on.
> No matter that US v MS was 15 years ago when he was 10. This attitude is pervasive and turbo-counterproductive in cases like this one.
Yet decisions made at that point still have repercussions. Ship a stupid API -- reap pain for years to come. Don't think that's major news here.
This is not the first time. Microsoft did stuff like this before. Any web developers remember IE8 and its incompatibilities with everything else out there. WebRTC was discussing and working an API and Microsoft shows up at the last minute, and said "Yeah, we got a new completely different proposal". It's shit like that. Some people are more upset about stuff like than others.
If Linux tools used Microsoft utility names, someone would've been sued.
Microsoft used wget and curl `aliases` (while native versions were there) and not only the didn't get sued, they are causing problems for original authors.
Of course no hate for the engineers doing this. They are just doing their job and this is a tough compatibility issue they are facing now.
In a universe where Wine exists, you think someone would be sued if they released an app with a default alias mapping dir to ls?
curl and wget could be considered trademarks.
Satya was super clear on this point - he told us to get out of our offices and go talk to customers and find out what they needed to be successful. "Don't worry about the money - if you are making customers successful, we have smart people that can figure out how to make money".
To the all the engineers in our company - that was music to our ears!
I understand your skepticism but there is a new Microsoft at work here.
Jeffrey Snover [MSFT]
That's nice to hear from satya btw.
It was just the sentiment of now "feeling bad for MS" is also a bridge too far.
That said, a healthy, fit, "new" MS would be healthy for the whole ecosystem.
People make mistakes and it's been agreed that introducing these aliases years ago was a mistake, albeit I think back then an understandable mistakes, given the idea to bring a shell to windows that has the power of a traditional unix shell.
Now people are loudly complaining, laughing, etc but without any constructive feedback that takes the backwards compatibility needs of a tool that is literally shipped to hundreds of million of people into account and stomping RFC approaches that are pretty similar to those in other projects (see PHP RFCs, Python PIPs, etc).
Since when did people became so hostile towards open source projects that try to do the right thing?
"We can't make this change without an RFC. Oh, by the way, the community cannot create an RFC."
If I was actually interested in using powershell on Linux I too would be a little upset they Microsoft is so unwilling to work with the community.
> We can't make this change without an RFC. Oh, by the way, the community cannot create an RFC, WE INTEND TO OPEN THIS UP.
After months of varaible-expansion-frustration I have alnded on the form "& foo.exe par1 par2", spelling out the .exe and avoiding the alias.
[1](https://web.archive.org/web/20110726162028/http://huddledmas...)
Microsoft needs to be patient and understanding of this mistrust, given the weight of history behind them.
>jpsnover commented ... @bagder You bring up a great point. We added a number of aliases for Unix commands but if someone has installed those commands on WIndows, those aliases screw them up. ... We need to fix this.
> Snover is a Technical Fellow at Microsoft & the inventor of Windows PowerShell ...
The thread goes on at length about bureaucratic requirements for the change. I guess this is what happens when you hold a bazaar inside the cathedral.
I installed PS on my ubuntu last night, it works but I don't really see the point in using it on anything but windows. Last thing I need is worry whether my scripts will run on my custom shell script as if running ubuntu didn't come with its own issues to worry about already.
cd is a shell builtin on every single *nix shell, not an independent tool. Every shell has its own cd implementation.
Now what do I say? "Impossible without awful hackery"?
And zsh: http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Command...
Powershell doesn't really have "builtins" per-se, every cmdlet is executed in the process of the shell itself but they're all contained within loadable modules (though 2-3 modules are loaded with the shell startup by default), Invoke-WebRequest is contained within Microsoft.PowerShell.Utility for example.
Note that some of these are part of the POSIX standard, so there's not a huge amount of variance allowed between shells which are being compliant. Obviously, PowerShell doesn't adhere to this.
[1] https://www.gnu.org/software/bash/manual/html_node/Bourne-Sh...
[2]: https://www.gnu.org/software/bash/manual/html_node/Bash-Buil...
>To be honest, I don't see how this dscussion about how many people might depend on these aliases is relevant. The story as I see it is that a few years ago you decided to usurp the names of some well known tools, in the full knowledge that doing so would break those tools. You have then ignored bug reports about this for years. You really can't deny that you knew a long time ago that what you did amounted to hostile behaviour towards other people.
It's not a question of who was right or who to blame. It's a question of how to make the changes because there _are_ users that depend on those aliases.
"download" aka "dl" instead of curl/wget?
"list" instead of ls/dir?
Would also make them easier googleable
In fact, being able to do `ls` rather than `dir` on PowerShell was one big reason I gave it a chance. My other Windows shell experiences have been supremely intolerable because of that.
With curl and wget, Microsoft admits they were overeager.
$ curl http://example.com/foo
Fetching http://example.com/foo by emulating curl
This command is an alias for "...".
If you've installed a real curl command, disable this by typing...
so that you could still use muscle memory to type the commands you know, could see what the actual underlying command is so you could adapt to it, and would know how to use the Real Thing if you have it.The number of bugs about this indicates that people are still being surprised.
That way PS would be far more discoverable to a UNIX person and would save time searching "$command in powershell".
> If removing these aliases (retroactively, if you want to clean up your act you have to remove this from all versions in which this was ever released) breaks things for some people, then you can go and send people out to help them fix their issues. You knew it was a hostile action, you broke things, you fix them.
retroactively remove things from old versions? This is crazy
I don't like the characterization of the RFC process as a bureaucracy. RFC processes are more open than a pure "bazaar". In the lack of any formal, open process to make project changes, there ends up being a hidden informal "be friends with this person to get your patch merged" process, which is far less transparent.
PowerShell is now installed on many hundreds of millions of machines.
With great success comes great responsibility.
We can and will change things but we have to do so in a thoughtful manner.
Jeffrey Snover [MSFT]
Anyone who's used PowerShell knows that a lot of commands work differently, even `ls` and `rm`. They have different options, different text format (colors!), different output and different ways to interact with other commands. That's the very definition of PowerShell: structured interchange between commands with real objects instead of fragile strings.
wget and curl are no different. They have the names of well known UNIX commands but within PowerShell, they have their own syntax and behavior. It's not unexpected and anyone who uses bash and PowerShell regularly (I kinda do) is used to the differences between these two shells.
It...sorta worked for HTML? Over the long run, old pages could be phased out and now we have a pretty nice situation with HTML5.
lzybkr wrote "We are rejecting this PR as it introduces "Unacceptable Changes", see our breaking change contract."
It is not, "let's investigate it where what the problem is and get back to you some feedback.".
Jeffrey Snover [MSFT]
All open source projects (on github and everywhere else) that require a contributor agreement do the same thing (e.g. Android). They usually have bots that auto close pull requests when the person hasn't signed the agreement first.
It's an unfortunate but necessary requirement for some projects. There's no malice, just bureaucracy.
Jeffrey Snover [MSFT]
You don't think any of the particularly spazzy responders on that github thread are really Microsoft customers, do you?
Consider that PS also aliases DOS commands such as DIR but is not compatible with the COMMAND.COM commands.
How have those communities dealt with the problem? Or is this a totally off base comparison?
As long as the OSX version of sed conforms to the standard there is no problem if it is incompatible in some areas with the GNU version used on Linux.
... then you have not read enough of Usenet, WWW discussion fora, mailing lists, and others. (-:
Also, the version of sed on OSX is around 11 years old, which helps contribute to its differences.
For stuff like this "weak" aliases which point you to the right command if it can't find an executable for it would have been a way better design. "No command with that name, you are likely looking for Invoke-WebRequest". Only slightly more work in interactive use, and safe in other cases.
Yes, it does confuse me that plain `ls` in PowerShell is more like `ls -l` on Unix, and this confusion sometimes causes me to type `ll` (my normal Unix alias for `ls -l`). But still, I prefer `ls` over `dir` in PowerShell.
So I guess I'm saying that I'm fine with some of the aliases. (But `curl` and `wget` should be removed, yes.)
That is the only explanation I can see for why the would pick those commands.
The alis just needs to be removed. They should replace it with a manpage that suggests cmdlets for popular UNIX commands if those commands aren't found (e.g. if curl returns "not found" it tacks on, "You could try XYZ cmdlet instead").
Specifically, for non PS users reading, Invoke-WebRequest returns n object with the page content parsed and a live DOM to work with, as well as the request headers and the raw data. It's very convenient.
Including curl.exe would not do that.
However, having those aliases (not even limited to curl/wget or all the Unix-like aliases like ls, cp, rm, ...) is a risk since they shadow native programs that might exist. It's not as bad with dir, copy, del, since those are cmd-built-ins and thus cannot be called from anything that isn't cmd, but where already shadows where.exe.
So in general, since command resolution order places aliases before native programs, any default alias can break stuff on any machine. Which places this in pretty iffy territory. They cannot remove aliases without breaking existing scripts. This is still Microsoft we're talking about here. They don't just go around breaking stuff left and right. And they actually could never have safely introduced default aliases without a chance of breaking things.
I went in a different direction to JP Software's (then) 4OS2, which took the tack of adding futher built-in commands. JP Software's (current) Take Command is interesting to consider in light of this discussion. It has its own built-in versions of bzip2, gzip, jabber, rexec, rshell, sendmail, tail, tar, zip, 7zip, and others.
* https://jpsoft.com/help/index.htm?bzip2.htm
* https://jpsoft.com/help/index.htm?gzip.htm
* https://jpsoft.com/help/index.htm?jabber.htm
* https://jpsoft.com/help/index.htm?jar.htm
* https://jpsoft.com/help/index.htm?rexec.htm
* https://jpsoft.com/help/index.htm?rshell.htm
* https://jpsoft.com/help/index.htm?tail.htm
* https://jpsoft.com/help/index.htm?tar.htm
Powershell does come with Windows. If you don't know Powershell, having wget aliased to Invoke-WebRequest is hugely convenient, because it's the quickest way of getting stuff done; assuming your Linux knowledge is somewhat, sorta valid is a lot easier than reading a bunch of documentation or googling to see what the actual name of the command is (even though Powershell has pretty discoverable commands.)
...
// Porting note: #if !UNIX is used to disable alises for cmdlets which conflict with Linux / OS X
#if !UNIX
// ac is a native command on OS X
new SessionStateAliasEntry("ac",
"Add-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
... new SessionStateAliasEntry("cpp",
"Copy-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
new SessionStateAliasEntry("diff",
"Compare-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
...This is an unavoidable problem with what PowerShell is trying to do. It doesn't make PS bad, but it causes problems.
b) Other shell utilities aren't magically compatible with each other, they have to be "specifically designed" to output representations of information in compatible text forms. Which is an ad-hoc thing, hence the existance of parameters like -0 makes the output null terminated instead of newline terminated, for compatibility with tools x,y,z.
(This is also completely ignoring the fact that you can still call any executable; you'll just receive a bunch of strings back. The only failing here is that PowerShell doesn't have the developed string-manipulation tools like sed, awk, etc. because working with text is typically unnecessary.)
However, your original argument was more along the lines of PowerShell being a walled-garden of cmdlets. Which is patently wrong -- it works with any .NET code. It also works with the standardized structured text formats of CSV, JSON, and XML.
It does not currently have tools to work with the two-dimensional text structures typically found on *nix machines, because until this week it was not even available in those environments. We might very well see creation of tools to ease this process.
What kind of tools does it not have? It has all the .Net style string methods (split, trim, and so on), all the .Net regex methods, built in arrays and hashtables, looping over lines of text shortcuts.
It's pretty trivial to do small scale ad-hoc text parsing, cut lines by a character, take element 4, cast to 'datetime' and add +4 days to it, handwave a counter into existance and +1 it, match a regex and do some replacement or group some fields.
It doesn't go as far as sed "in-place text replace" or awk records, but saying it "doesn't have developed string-manipulation like sed" is like saying that of Python. And if you were writing Python you wouldn't need to call out to awk because you'd just use Python string processing and basic data structures for what you were doing, right?
BEGIN{$FS=':'}
$6~/^\/home.*/{print}The problem is at the interface between these two modes of operation (and it'd be just as bad with a third mode, e.g. S-expressions or something else).
Honestly, it'd probably better for PowerShell to only deal with PowerShell commands, and Unix commands to only deal with Unix commands, with a well-defined interface between these two very different ecosystems.
>Honestly, it'd probably better for PowerShell to only deal with PowerShell commands, and Unix commands to only deal with Unix commands, with a well-defined interface between these two very different ecosystems.
Well, yeah, but that would make PowerShell even less useful on UNIX than it already is.
What makes you think PowerShell can't handle streams of text? You'll get an array of System.String objects, one for each line, to do with as you please.
> PowerShell objects are PowerShell specific.
PowerShell objects are .NET objects living in the .NET runtime, and can be passed to any other .NET code. Yes, some object types live in the PowerShell namespace, because they expose PowerShell-specific functionality. But, for instance, `ls` returns System.IO.DirectoryInfo and System.IO.FileInfo objects, which is exactly what you would use in C# or VB.NET or managed C++ or F# to represent the same information.
I work on linux or mac os and a couple months ago I was trying to show an intern on windows how to use curl to make HTTP requests from the command line. Having no PS experience, I opened up PS and tried curl, saw that it was a known command but couldn't get it to work as expected since it didn't behave like curl usually does.
Was very confusing. This should definitely get fixed.
This wouldn't necessarily open up a trademark-troll sinkhole, because the creators of widely used software could, in their licenses, grant the use of the name to implementers of their packages.
The best way to claim trademark rights is to register the trademarks. But that's not necessary.
(Unrelated: Jeff Snover isn't a creepy guy; he's just trying to do the right thing.)
Powershell fans get so excited about how their rich CLR object pipeline is so much better than a textual representation that they forget that their shell is basically an unusable theoretical exercise and still blown out of the water by "the real thing".
The fact that the designers of this platform would over-extend and try to clone "Unix utilities" (which have had windows ports for multiple decades) but completely oversimplify the purpose of these tools and fail to replicate them accurately - it's no shock to me at all.
Somebody decided to add some aliases for convenience. It turns out to have unforeseen consequences. It'll get fixed using a formal process intended to ensure that more unforeseen consequences don't follow from a breaking change.
This sort of thing happens all the time in this industry. Its not a conspiracy.
You can be an entirely good person and do "embrace, extend". You're probably not the one making the decisions to extinguish.
It is harm from a historically bad actor.
So it's not accepted with enthusiastic gratitude.
And there's no reason why it should be.
For these situations, making a change that breaks people's code, you have a run-time compatibility mechanism. A command line switch or environment variable can tell the language implementation "please behave like version N".
Then all changes since N which are backwards incompatible are suppressed. For instance, troublesome commands that were removed make a re-appearance.
You can then boldly fix something that is obviously wrong, while still giving any negatively affected users a way to fight any fires.
It's not a perfect solution but it placates most of the concern of the form "this is a good all-round fix, but it will break things for some unknown numbers of users".
(Users who have to be absolutely sure that their code will work the same way regardless of language interpreter and run-time updates simply have to package their work together with a specific version of those components, and have their code refer to them instead of the standard installation.)
I imagine they don't know about the technique.
Engineers who know about rejected alternatives tend to mention them, to avoid the embarrassment of someone else doing it for them.
Compatibility switches hinging on different versions for different features in the code are basically unrelated.
Sometimes multiple switches affect the same area of the code. This is fairly linear. E.g. if the same logic is affected by two version checks, basically the behavior is split three ways: the ancient behavior before those two versions, the behavior starting with the older of the two versions up to before the later one, and then the new behavior starting with the later version. The code variants do not grow exponentially in N (the number of places in the implementation where a version check is made).
That could happen if you introduced individual Boolean controls for individual behaviors rather than a linear scale on version: the same area of code being "hit" by three run-time flags for altering behavior could have 8 possible behavioral combinations and up to as many blocks of code to implement them.
I don't see how it avoids making design decisions. If you have a plan for somehow mitigating the impact of backward-incompatible changes so that users can get through them, you have more freedom to uproot bad design and replace it with good design.
That's not a fix. If you tell people running existing code that they need to pass a new parameter to maintain the existing behavior, you've broken them. This is no better than just telling them to update their scripts to call "Invoke-WebRequest" instead of "curl". For the record, powershell already supports this. You can request a specific version of powershell. Most of the time people don't use this functionality, though.
> It's not a perfect solution but it placates most of the concern of the form "this is a good all-round fix, but it will break things for some unknown numbers of users".
It's actually not a good all-around fix. It might be the best fix for this situation, but breaking an unknown number of users' scripts of unknown importance is still a pretty bad fix. Some guy's payroll processing will break because of this. Some startup's web scraping logic will break. Lots of stuff will break if they fix this.
> Users who have to be absolutely sure that their code will work the same way regardless of language interpreter and run-time updates simply have to package their work together with a specific version of those components, and have their code refer to them instead of the standard installation.
So basically no expectation of backwards compatibility? That's why Chrome ships with its own copy of Windows, right?
So, make it an old parameter by having this from the beginning in your language.
Once the parameter is several years old, it's no longer a new parameter.
Users can use it proactively, before something breaks. It can be a recommended practice for deploying code.
> This is no better than just telling them to update their scripts to call "Invoke-WebRequest" instead of "curl".
It is substantially better than asking people to change source code.
Users can still change their scripts to call Invoke-WebRequests (and should!); just in the short term, they just adjust some version mechanism.
> That's why Chrome ships with its own copy of Windows, right?
Windows has versioning mechanisms in some of its API's, by which it can tell that a program is calling it that was compiled for an old version.
Speaking of browsers, web pages declare what version of HTML they are in with <!DOCTYPE ...>. If your page begins with <html>, you can't expect it to render the same way everywhere.
Deploying applications in containers with copies of operating systems is not unheard of these days.
> So basically no expectation of backwards compatibility?
Backward compatibility is the normal modus operandi. This type of mechanism is just for "oh shit" situations: there is no way we can fix this thing while remaining backward compatible. Any newly introduced use of the version emulation is treated with great regret.
It's already part of PowerShell. You can request a specific version when you run PowerShell.
https://msdn.microsoft.com/en-us/powershell/scripting/core-p...
> Users can use it proactively, before something breaks. It can be a recommended practice for deploying code.
I'm sure it is recommended practice. That's irrelevant if people aren't following that best practice. And they generally aren't, because it adds friction to development.
The "go back in time and do it right from the beginning" fix isn't feasible due to the lack of reliable time machines.
> It is substantially better than asking people to change source code.
It's really not. If the workaround avoided compilation, this would be lower cost. But the cost to make a small change to a script and the cost to change the way the script is invoked are pretty much the same.
> Windows has versioning mechanisms in some of its API's, by which it can tell that a program is calling it that was compiled for an old version.
No. Windows is just super-serious about backwards compatibility. Some APIs are versioned. Most are not. Microsoft just bends over backwards to keep stuff running (to the point of emulating bugs that programs relied on).
> Speaking of browsers, web pages declare what version of HTML they are in with <!DOCTYPE ...>. If your page begins with <html>, you can't expect it to render the same way everywhere.
Also no. HTML5 did away with the versioned doctype crap because it wasn't actually useful. It's just "<!DOCTYPE html>" now, because that's what you need to get browsers to render your site in a standards-compliant way.
> Backward compatibility is the normal modus operandi. This type of mechanism is just for "oh shit" situations: there is no way we can fix this thing while remaining backward compatible. Any newly introduced use of the version emulation is treated with great regret.
This type of mechanism 1) already exists for powershell, and 2) doesn't really help much here. I'm sure if they take this breaking change, they'll advise impacted people to use this workaround if they cannot for some reason fix their scripts. But this is not a "fix".
Disclosure: MSFT employee, but not on PowerShell or Windows
Of course the fix for any behavioral regression is to make it go away without the user having to do anything (other than apply the fix).
The versioning request mechanism has to be supported via an environment variable also, because if a user has a tree of scripts calling each other, it may not be feasible to insert this extra argument into all those calls.
> But the cost to make a small change to a script and the cost to change the way the script is invoked are pretty much the same.
That is true, but the cost to make hundreds of changes to a script versus one command line parameter isn't the same. A change which breaks backward compatibility could affect some programs in many places.
There is also the cost of finding that there is a problem, and what that problem is: where is it breaking and what changes need to be made. All while ensuring that those changes work for the older versions of the interpreter too, not just in the upgraded environment.
Say I have some big, 10000 line script. I update to a new interpreter, and the script doesn't work. First thing I will try is the compat option to emulate the previous version. If it works, then there is my workaround; for the time being, I don't have to care why, or whether forty places in the script are affected or only three. The thing has a way of continuing to work (for a good, long time) so I have plenty of time to investigate it. I can treat it as a low-priority issue and give it as a background task to a co-op student instead of as an urgent blocking issue.
> HTML5 did away with the versioned doctype crap because it wasn't actually useful. It's just "<!DOCTYPE html>" now,
I.e. HTML5 just shortened the spelling of the utterance that you need to indicate that "this page is HTML5". If your page is HTML4, you need the older, more verbose utterance.
You called it a solution. You called it a way to address the issue. Nitpicking use of the specific word "fix" is pointless, when you were clearly proposing this as a fix.
> That is true, but the cost to make hundreds of changes to a script versus one command line parameter isn't the same. A change which breaks backward compatibility could affect some programs in many places.
You're right. The cost to hack it with a specific version is higher. You either have to set a system-wide environment variable (which someone will forget about and ship a break because locally they were using a newer version) or you have to inject it at each point a relevant script could run. Or you could do a find/replace for the problematic alias and be done.
> There is also the cost of finding that there is a problem, and what that problem is: where is it breaking and what changes need to be made. All while ensuring that those changes work for the older versions of the interpreter too, not just in the upgraded environment.
It's literally a grep/findstr. I don't know why you're acting like it's hard to find uses of the tokens "curl" and "wget" in ps1 files.
> Say I have some big, 10000 line script. I update to a new interpreter, and the script doesn't work. First thing I will try is the compat option to emulate the previous version. If it works, then there is my workaround; for the time being, I don't have to care why, or whether forty places in the script are affected or only three. The thing has a way of continuing to work (for a good, long time) so I have plenty of time to investigate it. I can treat it as a low-priority issue and give it as a background task to a co-op student instead of as an urgent blocking issue.
What are you talking about? The whole reason to maintain backwards compatibility is so you don't end up in this situation. You can use the version switch if you need to, but in general if you need to in production it means someone screwed up.
In the scenario you described, there's a 95% change you'll never take the version switch off once it's in place (because it's "low priority"), so you'll have this hanging over your head until something breaks and it becomes critical to upgrade, at which point you'll be frantically trying to fix the problem and cursing Microsoft for not maintaining backwards compatibility.
> I.e. HTML5 just shortened the spelling of the utterance that you need to indicate that "this page is HTML5". If your page is HTML4, you need the older, more verbose utterance.
Not exactly. If you slap the "HTML5 doctype" on an HTML4 page, it's expected to work. Because again, that abbreviated doctype is all you actually need to get a browser to use standards-compliant mode. But also, this is the doctype going forward. So far as I understand, there is no plan for HTML6/7/whatever to change this. Because backwards compatibility is greatly preferred over trying to force a specific version.
> The whole reason to maintain backwards compatibility is so you don't end up in this situation.
That's the ideal, which ignores the negative aspects of absolute backward compatibility. Very good backward compatibility most of the time is all round better than perfect, absolute backward compatibility.
If you want perfect backward compatibility and an excellent design everywhere, then you have to make only perfect design decisions in everything right from the start.
Dennis Ritchie regretted not fixing the precedence of the & operator in C. It's strangely low because at one time there had been no logical && operator and & was used in its place. He wanted to fix it, but, alas, the story goes, they already had several hundred kilobytes of C code written across three machine installations. The result: a piece of technical debt spread to immeasurable numbers of lines of C written since, world over.
> I don't know why you're acting like it's hard to find uses of the tokens "curl" and "wget" in ps1 files.
Simply because I'm thinking of the whole class of possible backward-incompatible changes in a language or library, not all of which can be necessarily found this way. For the ones which can be found by looking for specific identifiers, you need reliable release notes to tell you what they are.
Alternatively you can use a fully qualified path (c:/utils/curl.exe).
Technologically it is trivial to bypass the alias. But that doesn't mean the curl/wget people don't have a legit point about trademark usage and or incompatible args between the cmdlet (actually Invoke-WebRequest) and original UNIX utilities.
"The output of curl.exe (and every other exe or other command external to PowerShell) is System.String.
"So changing curl to run curl.exe instead ofInvoke-WebRequest` would break this script because the output type would change."
A B C
to: A B D C
Or some other such thing. Your string processing code (perl, sed, sort, uniq, etc.) expects certain things that have now changed because <reasons> (which may be totally reasonable or unreasonable).This sort of thing is part of why open sourcing stuff that was developed closed and commercial isn't just a matter of tossing it up on GitHub and dropping a note here.
What is the filename of the profile jpsnover is referring to with the work around of adding:
Remove-Item Alias:Curl
Remove-Item Alias:WGetThe profile is here (at least in Windows 10, it might be in a different location in other versions): C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Get-ChildItem Alias:
For the profile path, it's stored under the variable `$profile`.[0]: https://github.com/PowerShell/PowerShell/pull/1901#issuecomm...
Reminds me of a demotivational poster we have at the office:
https://www.google.ro/search?q=demotivational+poster+consist...
It reads: "Consistency: Only a virtue if you're not a screwup".
With commands like ls, I'd prefer to have my muscle memory get me the first-class Powershell experience (which means a structured list of files, not a string containing ls's output) instead of attempting to act exactly like ls acts in bash. If I didn't want to use Powershell's features (which /bin/ls does not support) I wouldn't use Powershell.
Its not an open source organization. If it was, they would have the discussion there rather than just closing it and talking about an RFC.
I think they should add an install option rather than nust defaulting to those aliases.
MS does need to continue making money. No matter how much people pretend otherwise, that means they have a conflict of interest with open source and Linux. And the web platform (still). And with so many billions at stake, yes their actions reflect this conflict.
Many long years of name calling and Embrace and Extend (which this particular issue feels a lot like) are going to take some time, patience, and long suffering on their part to counteract.
I just replied to another comment where I wanted to say that I don't mind that the PowerShell version is different because `ls` is a built-in. But then I discovered it's not. So I just used `cd` in that comment...
Jeffrey Snover [MSFT]
To recap:
1. Embrace: Development of software substantially compatible with a competing product, or implementing a public standard.
2. Extend: Addition and promotion of features not supported by the competing product or part of the standard, creating interoperability problems for customers who try to use the 'simple' standard.
3. Extinguish: When extensions become a de facto standard because of their dominant market share, they marginalize competitors that do not or cannot support the new extensions.
My guess is that they wanted to keep onboarding easier for Linux types (Embrace) by creating an implementation they thought would handle the typical use case (like ls and the like) using a wrapper for their Invoke-WebRequest.
Unfortunately, they've now created a problem in that they need to modify things to prevent users of real curl from getting hosed but at the same time not breaking the Invoke-WebRequest wrapper.
But the goal of something like this may be no more nefarious than, say, Xamarin or similar where the goal is for reuse across systems.
Maybe. I haven't got a clue. The point is simply that Hanlon's razor is a poor defense to the accusation that this is EEE.
Do we think Invoke-WebRequest is going to somehow become the new standard for curl functionality? Do we think Microsoft has any intention of that coming to fruition?
I imagine if they wanted curl for the sake of curl, they'd have included it (with attribution in some text file), and then parsed the results back into the object format preferred by PowerShell. Instead, it seems more like a stopgap to prevent people from having to totally rewrite their shell scripts to work in Windows as there was enough moaning over PowerShell at launch as yet another shell. Being completely incompatible with users potentially existing scripts? That'd be a big negative and honestly, a move the old Microsoft would've done without a doubt.
Personally, I'd prefer (and maybe it is this way, I don't use PowerShell) that if there is some type of text editor w/ Intellisense that if it saw a curl request it would give an error/warning (warning at the very least if you're going to do the alias thing) telling the user to read the Invoke-WebRequest API (and if it is something that they're currently mapping, offer replacing the curl statement with the IWR equivalent).
Seems the curl author's issue is primarily in that the alias created a situation where he receives false issue tickets (and don't get me wrong, that is terrible) due to the user thinking they're using curl when, in fact, they're not. And honestly, I could completely see where the user would be confused.
So back to the initial question, I don't see malice here. If they rewrote to include every piece of curl functionality and then went above that, then yeah, I'm with you. I do, however, see where someone screwed up royally (both in the initial shortsighted action and also in the headache it now creates for the PowerShell team in addressing w/o breaking for current users who knowingly/unknowingly are using the alias). I think that counts as stupidity.
Forever?
http://www.theverge.com/2015/4/29/8515771/microsofts-edge-br...
If it weren't, Firefox wouldn't realistically be able to deprecate XUL addons, because there would be no alternative for many of them.
https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...
Plus, step 3 literally makes no sense because these aliases only exist on the Windows implementation and everyone agrees they are substandard to the standard implementations.
But that won't prevent people from calling out EEE whenever Microsoft is involved.
But in the era of Linux, Google, and iOS, I don't think they have enough leverage to successfully implement the Extend. So they can forget the Extinguish.
That leaves only Embrace, which might work out best for all involved, a scenario wherein MS becomes a good neighbor in a diverse computing ecosystem.
In this case, nobody is going to keep using PowerShell on Linux or Mac if MS implements or promotes incompatible features. There is an exit available, where there wasn't on PCs in the 90s. I can go back to my plain old unix shell scripts, which have worked well for 30+ years.
To keep this project going, they are going to have to play nice and make sure it works well with everything. Or just abandon it. But they aren't going to be able to Extinguish anything, not in this day and age.
Bye ls, rm, cp, etc
And already pushed off the frontpage, yet stories with 16 votes are now on the frontpage.
Is this voting brigading / shilling or just normal behaviour of groups trying to suppress dissenting voices?
Also, is this part of why semi-noobs think that HN is turning into reddit?
Neither. (If anything, perhaps the assumption of malice on the part of people who disagrees with you is what smells like Reddit)
The dynamic is something like this: The comment gets up-votes because nothing is easier than hating on Microsoft, and down-votes because it isn't actually insightful at all. You can squint at any action by any company in just the right way and make it look like it's part of "Embrace, Extend, Extinguish". The comment essentially boils down to "Microsoft has done bad things in the past, so they're probably still doing them" with precious little in the way of actual analysis.
First for your general question:
I think that people get tired of seeing the Embrace, Extend, Extinguish come up in every single thread about Microsoft.
It's a simple argument that seems to be overused and an easy grab for votes, or to bash Microsoft. If someone brings something new to the conversation by calling Embrace, Extend, Extinguish then I'm game for listening, but most the time it's just. Microsoft is a wolf in sheeps clothing look look they are Embracing. OH NOOOOOO. Open source? They can ALWAYS change their licenses? Runs on Linux? What are they going to do start offering free Windows 10 upgrades on Linux? Extinguish Extinguish!
Microsoft is a huge company, some departments suck and are run by unethical dicks (looking at you Windows 10). Their developer tools have taken some huge steps lately and have had huge success. Visual Studio Code is used by a lot of people who don't like or dislike Windows, some don't even use windows. I'm just kind of done with this argument.
Some comments on the OP:
This particular "Embrace, Extend, Extinguish" argument does bring something newish to the table calling this particular action one of the steps as foretold by our CS prophets on high. The OP gives a new spin and is on topic and shouldn't (imo) be down voted because it brings out healthy conversation (which is the point of reading comments on HN vs Reddit). If this were Reddit it would have been punnier.
Their minions write a lot of blub comments so that the comment count is higher than the voting count of a story which equals to flagging a news!!
Another very visible behaviour is that they very quickly push positive news out as soon as there is a negative news.
If you track HN stories about Microsoft with a third party HN tracking service, you clearly see evidence that unfavourable HN stories about MS vanish very quickly by flagging or overflowing the story with a lot of blurb comments to hide them. And on the same day another often minor but positive news surface and sits on HN frontpage for several hours - and of course flagging all comments that even try to hint the privacy issues with Win10 or anything remotely normal comment that isn't overly hyping their software/service.
I have created such a view and see correlation with stories from MS. But not from Google, Apple or Amazon, nor any other company.
The usual tactics one can see is that a negative story about MS is getting flooded (after x min after they started to react) with many comments. As soon as the story has more comments than upvotes the HN sorting algorithms acts like the story was flagged and puts it of the HN frontpage to page 100+, and put a few flags to the mix and the story vanish pretty quickly. One can also see that MS seem to have a backlog of prepared positive stories. As everytime a negative story hits HN, the negative story is threaded as mentioned plus a new positive story is submitted and upvoted as replacement.
Edit: everyone else can do this too, and can watch these behaviours.
I come to HN to read news and the comments. So I sincerly don't understand why a story with eg 400 upvotes and 500 comments is hidden from me, but being the number one story on HN of that day. I suggest to change the threshold on HN so that either a comment count higher than upvote count don't alter the story position at all or change the threshold to make the site experience more transparent and fair.
Although I suppose that PowerShell could fall under "parody."
EDIT: this was sarcasm.
Still not a cool move.
If the Microsoft versions of curl and wget were compatible with the original utilities, there would not be any problem.
There is no trademark on 'curl' or 'wget', so there is not legal status to force anyone to remove features based on these names.
What did Microsoft do? Well, apparently they created aliases that mimicked some subset of the curl/wget behavior for PowerShell. This might allow simple *nix shell scripts to work with little or no porting to PowerShell.
The names of the executables are not protected by copyright. Although -- who knows, if APIs can be considered protected by copyright maybe the names of the binaries themselves are a shell-style API. It seems like a case you'd be unlikely to win. :/
This is not true:
No copyright notice == Public Domain.
Everything You make gets Your copyright by default. This means the default is: nobody can use what You make.
You can put other copyright terms on your works by adding a copyright notice.
You can put something in the Public Domain by adding a notice to your work.
Things can also become Public Domain automatically after a certain amount of time. But that time has been extended several times in the US to something unreasonable: like 75 years after the death of the author. You can thank Disney/Mickey Mouse for that.
All of this probably does not apply to shell aliases anyway...
[1] https://curl.haxx.se/docs/copyright.html [2] http://git.savannah.gnu.org/cgit/wget.git/tree/README
What level of name protection applies to command-line tools? For example, can the GNU project replace existing Unix tools with their own implementations which have the same executable name?
Copyright infringement would be if Microsoft had used GPL'd code (for example) in violation of its license. I don't think there's any suggestion that's the case here.
Your contention that there is a "real thing" would have tremendously negative impacts for the Linux/BSD community. Your typical Linux/BSD contains many utilities that share names and functionality with closed-source System-V utilities but are not in fact the "real thing" (in their case, for licensing purposes). Is everyone supposed to go back and purge those just because they aren't perfectly equivalent in options and functionality to the original System-V, lest someone like the SCO group go after them legally?
I don't think there's any doubt that PowerShell provides a bad clone of wget and curl, as there are many complaints about it. And as a matter of user-friendliness there should be a way to easily access the real executable if desired (I can't comment either way on if there is, I don't know PowerShell). However, I see Microsoft as just as within their rights to provide a "wget" alias as a Linux distribution is to provide a "ps" utility to their users.
It certainly feels like there's some kind of a difference between the two, but I can't put my finger on exactly what puts one into either category. IMO it may simply be a matter of willingness to sue/defend your trademark. AT&T didn't defend their trademark and now it's genericized.
To throw extra fuel onto the fire, let's add Oracle v Google into this discussion. To me, the coreutils are almost like the API of a programming language - you string together application calls just like function calls, to produce a useful application. Oracle v Google established that the API itself is not copyrightable. Should an attempt to defend based on trademark of the function names have succeeded? If not, what differentiates the "ls" utility from Excel?
Of course, along with all those users who Microsoft treats as ignorant, again for lack of a better word, there are some very sharp people who use Windows -- who will perhaps take offense at any criticism of Microsoft -- no offence intended! (I am just not smart enough to feel confident with Windows myself -- too complicated.)
What is amusing to me about this incident is that I imagine Microsoft would argue that "Monad/Powershell" is aimed at its so-called "power users". Apparently these "power users" would not notice or would need something like this?
Intentionally or not, Microsoft is targeting beginners, not "power users" -- tactics like this leverage the popularity of the curl and wget programs and at the same time prevent beginners from learning how to use those programs, not to mention the long history behind them.
Disclaimer: I prefer nc, socat and tnftp myself; I have no bias in favor of curl or wget.
They're simply there help people who might know bits of bash.
Sorry for nitpicking... people describing everything related to the UNIX command line as "bash" is a pet peeve of mine.
My impression is that these aliases were added so people wouldn't need to install cURL and wget on multiple machines.
> What is amusing to me about this incident is that I imagine Microsoft would argue that "Monad/Powershell" is aimed at its so-called "power users". Apparently these "power users" would not notice or would need something like this?
PowerShell was initially aimed at providing sysadmins a better tool for scripting tasks within Windows. They added aliases to help reduce the mental shift when changing technologies.
> Even if this can be explained away as a purely innocent "mistake", it still says something about the level of attention to detail.
At the time, it was intentional. The reality is when PowerShell was designed, there were no plans to free it and put it online, it was a pure Windows tool. The decision to add aliases made sense.
Why should anyone have to make a "mental shift"? The answer is not because UNIX is incompatible with other systems. The answer is more likely because Microsoft Windows is a proprietary commercial product; its sales and marketing staff have traditonally sought to discredit UNIX. Having followed Windows from 3.11 onwards I would argue that it is "different" and incompatible by design. The "mental shift" is intentional and strategic, but not at all necessary.
Why were there no plans to make PowerShell free and open source and publicly available initially? That's a rhetorical question of sorts.
UNIX as the OS that generally "runs the internet" has become better known and more popular in recent years as a result of several factors. That's why MS has to make the moves they're making. keywords: "has to"
Are you intentionally trying to be difficult? The answer is of course not, considering there is the New-CmdLet alias. These aliases exist purely as convenience factor.
> Why should anyone have to make that "mental shift"? The answer is not because UNIX is incompatible with other systems. The answer is because Microsoft Windows is a proprietary commercial product and its sales and marketing staff have always sought to discredit UNIX. Having followed Windows from its inception I would argue that it is "different" by design. The "mental shift" is intentional, but not at all necessary.
You followed Window's inception, and this is the best argument you can come up with? A not to subtle attempt to discredit the company? Your answer ignores the fact that Windows was built on top of a DOS derivative and the scripting language for Windows for many years was batch. It was different because it wasn't based on UNIX at the time because Linux was still in development.
>Why were there no plans to make it free and open source and publicly available initially? That's a rhetorical question of sorts.
I'd imagine because it was aimed at people who were managing Windows servers. Considering Linux has a robust set of tools to do that, there would have been no reason to do that.
>As I see it, UNIX as the OS that generally "runs the internet" has become better known and more popular in recent years as a result of several factors. That's why MS has to make the moves they're making. keywords: "has to"
I don't think anyone on this thread would deny that. The question is how is that remotely relevant? Companies have to change strategies in order to respond to the markets they operate in. Companies survive on profits and revenue. It makes sense their actions would be guided by those. Why is this a difficult concept for people to understand?
But using an alias for a program that may be called by a script is not going to address that.
A user can just as easily call curl.exe using BAT, WSH, etc., or PS.
As for DOS, keep in mind MS did not even write the software that became MS-DOS; they bought it.
Many believe it was a copy of the work of Gary Kildall whose CP/M was undisputedly more original and superior in quality to anything else for the "PC".
Using their usual tactics (remember "vaporware"?), MS extinguished Kildall's DR-DOS, and put his company out of business.
Later they paid a $150 million settlement for this move.
What is difficult to understand is why MS cannot make money without copying and interfering with other companies.
What's wrong with their "original" work? Can't they sell that?
Will they use the same tactics against open source projects that write software for UNIX? Maybe that is what concerns people here.
Also difficult to understand why they must force users to "upgrade" and OS that already works? Profits and revenues. Right. Rah rah Redmond.
If this behavior is what they must do in order to derive "profits and revenues" then why would you be confounded by people who would question it?
I'm all for winning in business, profits and revenues, but truthfully I am here because I like using, reading and trying to write software that is better than average.
Microsoft offers nothing in this regard.
Now I know Invoke-WebRequest exists and I like it, so now I have two different tools to accomplish similar things.
And don't get me wrong, I actually agree that this use of the aliases is wrong and should be changed. We now have two options here, wait for MS to do it or fork the project. After all, it's open source.
18/08/2016 https://news.ycombinator.com/item?id=12305598 With Windows 10, Microsoft Disregards User Choice and Privacy (eff.org)
A day later they announce Power Shell is open source.
I remember a few months ago they blasted HN's frontpage with news after a few discussions about telemetry and EEE (first wave of Windows 10/UWP showing its true colors).
I don't care enough to do a reddit-esque investigation on HN stories. I just find it funny, that's all.