5 ms·
> "Them using awful aliases like wget and curl didn't help. Seriously, what were they thinking? Seriously they were thinking "if people open our new shell, typ
by jodrellblank 4y ago
> "Them using awful aliases like wget and curl didn't help. Seriously, what were they thinking?
Seriously they were thinking "if people open our new shell, type a command they expect to work and get an error, they will quit it and never come back. Let's make some aliases for common commands to give people a helping hand so that `cd` and `dir` and `type` and `move` and so on from command prompt, and `echo` and `ls` and `cat` and `md` and `ps` and `mv` and so on from Unix shell, all do something useful. If people have to start right in with PowerShell specific `gci` (get-childitem) and `sl` (set-location) and `mi` (move-item) that will be too unfriendly and too steep learning curve.
It was a great idea; if you're a Linux user you're well aware that the same command can behave differently on different systems (see: grep, egrep, fgrep, POSIX standards vs GNU utilities) and both aware and comfortable with customising your environment with startup scripts (removing aliases if you don't want them). On the other hand if they didn't do that, they were going to get grief from the Windows side (breaking backwards compatibility) and from the Linux side ('all shells must be POSIX'). Damned if they do, damned if they don't. At the time (~2006) PowerShell was Windows only and CURL was not a common Windows tool.
- YeGoblynQueenne 4y agoBesides, it's just faster to write "ls" than "Get-ChildItem". Linux command names come from a time when pressing keys on a keyboard was very expensive [1], so they're very economical. Nowadays we can type keyboard keys as long and as fast as we want and shell command names just get longer and longer. ________________ [1] In the 1960's it cost 10 XP to press one key. 15 for the Return key.
- kevviiinn 4y agoWhat is XP in this context?
- YeGoblynQueenne 4y agoWindows Experience Points? Sorry, it's all tongue-in-cheek.
- jodrellblank 4y agoPowerShell has its own alias, "gci" for get-childitem and just "childitem" would automagically work. > "shell command names just get longer and longer." This is another rarely mentioned problem with CLIs; computers get bigger, software gets more complex, people want it to do more, and that means any command needs more context disambiguation and more typing to narrow down the more degrees of freedom. GUIs and TUIs can bring up related things to try and help you out. btw. what is the benefit of Louise learning the Ackermann function with successor arithmetics? Ok the successor notation is structurally simple enough to 'learn' ... what does 'learning it' mean and how is that practical or useful?
- YeGoblynQueenne 4y agoOooh, I remember now. You are talking about that discussion we had a while ago. OK. Yeah, so,"learning" in that context means you're given a bunch of atoms as examples and you learn a logic programs that entails those atoms. "Atoms" here in the logical sense, of atomic formulae (not in the Prolog sense, where "atoms" are constants). Ultimately, a sound and complete inductive algorithm like the one in Louise, is capable of learning any program, given one or more example atoms it entails, but in practice some programs are harder to learn than others. This is more so if a program must essentially be executed before it can be learned. Which, for the Ackermann fucntion, is a bit of a problem, given it's very expensive. So "learning" can't be done in a PAC-Learning sense, of learning from randomly chosen examples, because then you end up with combinatorial explosion and fast. So this "learning" I show in the Ackermann example is more like teaching: I chose, manually, an example that I know is informative and that the learner can use to learn. Btw, I like necromancing old converstations too :D
- YeGoblynQueenne 4y ago>> PowerShell has its own alias, "gci" for get-childitem and just "childitem" would automagically work. Yeah, I totally keep forgetting those and just use the unix-like aliases. >> btw. what is the benefit of Louise learning the Ackermann function with successor arithmetics? Ok the successor notation is structurally simple enough to 'learn' ... what does 'learning it' mean and how is that practical or useful? Holy unexpected question, Batman! :D The point is that it much simplifies notation, which in turn simplifies the background knowledge. The alternative is to give is/2 as background knowledge, but then you also need to somehow specify all the arithmetic functions it can use, so it doesn't make for a simple example anymore (although I don't think the data/examples/ackermann.pl example is simple, given the flattening; I really need to sit my bum down and write a flattening/unflattening program transformation). An alternative, while still keeping things simple, is the way it's done in the data/examples/even_odd.pl example, where I just hard-code the prev/1 predicate. But if you do it that way, you then need to extend prev/1 after learning, or the whole learned program, along with the background knowledge, is incomplete (it works only for the numbers in the interval [1,4]). Generally, those data/examples/ files are meant to be simple examples and I tried to simplify the notation. One could certainly do a better job than what I've done, I think. But they're not supposed to be very useful, they're demonstrations. I might have some time this month and the next to improve as much as I can in the documentation and the examples. But real-world applications will have to wait. I might have something in the works. Wish me luck :)
- pxc 4y ago> Seriously they were thinking "if people open our new shell, type a command they expect to work and get an error, they will quit it and never come back. Let's make some aliases for common commands to give people a helping hand so that `cd` and `dir` and `type` and `move` and so on from command prompt, and `echo` and `ls` and `cat` and `md` and `ps` and `mv` and so on from Unix shell, all do something useful. If people have to start right in with PowerShell specific `gci` (get-childitem) and `sl` (set-location) and `mi` (move-item) that will be too unfriendly and too steep learning curve. There are lots of problems with this, not the least of which is that these aliases prevent you from using ports of those actual commands in your PowerShell session, even if you have them installed. And they are absolutely worlds apart from the commands they alias— pretty much totally incompatible. The differences between those PowerShell commands and their GNU equivalents isn't at all in the same ballpark as the differences between GNU coreutils and their counterparts on FreeBSD. > customising your environment with startup scripts (removing aliases if you don't want them) Doing this in a concise way is annoying as hell. And you can't even do it with a uniform interface, because some of those things are aliases and some of them are built-in functions, and those have to be disabled via different APIs. To avoid totally ruining your shell startup time, you also have to precompute a generated list of external programs to unfuck instead of just piping PowerShell commands to each other in your profile because PowerShell is insanely, insanely slow— especially on a Windows machine where half a dozen grubby little agents want to get their fingers into the filesystem's filters... which is how you're going to be using the damn thing. I would way rather have a steeper learning curve then have all my muscle memory screwed over with no easy, performant way to toggle the disagreeable behavior. I'm fine typing `gci` instead of `ls` most of the time. When I type `ls`, it's because I want the damn `ls` I went out of my way to install! > At the time (~2006) PowerShell was Windows only and CURL was not a common Windows tool. Even among developers and sysadmins, Windows users hardly use the CLI. The difference in CLI usage at Microsoft shops vs. everywhere else is might and day. Let the Windows CLI users damn you, all six of them. And of course there's already a sane solution to this, by the way: a command-not-found handler. All PowerShell has to do is tell you when you run `grep` and it's not present that there's this really neat tool built into PowerShell called 'Select-String'. And if you do have `grep` installed, it can stay out of your damn way. As an aside: most of these issues have nothing to do with being POSIX. Most of those aliases are for external programs that have nothing to do with the compliance of the shell with POSIX. And lots of times, deliberately non-POSIX shells get them right where PowerShell doesn't. FTR, I actually like PowerShell. I think it has made a huge contribution to the future of the command line, scripting, and shells in general. I'd much rather write a PowerShell script than a bash script, for anything important and non-interactive. But the things people will say in defense of PowerShell's very bad aspects drive me up a wall.