3 ms·
To be honest this isn't the sort of introduction I want to a new shell. What I want to see is 1. How it differs from existing shells I'm familiar with, and 2.
by repsilat 14y ago
To be honest this isn't the sort of introduction I want to a new shell. What I want to see is
1. How it differs from existing shells I'm familiar with, and
2. How those differences solve problems with existing shells.
This article says that the shell uses lists rather than strings for some things. Great, does that mean this shell deals with spaces and newlines in filenames better than bash?
This article shows off the new language by pointing out how exotic it is, how different the shell is to everything you know and hold dear. Maybe it should be embarrassing to admit this, but that's a little scary. I'm reading because it's interesting, but this isn't an article that will people to go out and use it to solve their problems.
And at the end of the day, that's what a shell is for - they're the way you interact with your computer. They can be clever if cleverness is appropriate, but first and foremost they should enable us to use our tools effectively and if possible intuitively.
- 1337p337 14y agoI'm planning a couple of more articles on this topic, so your point is of interest to me. Since it's all content I have absorbed by using the shell, some things that seem obvious to me might have slipped through the cracks when I wrote the post. It seems from your comment like #1 was answered (how it differs from existing shells). The problems with existing shells (byzantine quoting rules, general opacity in terms of being able to use them from the outside, and crufty, non-uniform syntax, lack of simple FD manipulation, lack of modern facilities like blocks, scoping, etc.) were sort of taken as a given, and the examples should have shown how they are obviated. What is it you'd like to see explained?
- repsilat 14y agoLooking more closely I think I was less turned away by the content (which is there) than the progression of the tutorial. I started out scared by the "no conditionals, no loop constructs, no functions, no aliases" - What I really needed was something confidence-building, like ; for i in `{ns} {echo $i | sed 's/.* //'} | sort | uniq It looks familiar, and you can mostly puzzle it out without having to know a lot. More to the point, it looks like something you'd do every day. It's also a nice introduction to the `for` construct and it introduces a quoting syntax. "Just enough rope to hang yourself." No doubt we wouldn't guess that those braces are for lambdas, but that's easy enough to correct. Perhaps my complaint says more about me than you - I'm more than happy to `load std` before I even know what a module is, because all I really want to do is process some text. Similarly, I can appreciate conceptual cleanness in a language, but in a shell especially it's an ancillary benefit. The short digression on escaping and quoting (`fourspaces` and all that) at the end of the "Fetching Web Pages" is lovely. Really, that's exactly what I was after - "This is Bash and it's annoying, this is Inferno and it just works right." It's succinct and it clearly shows that Inferno does better than the alternative (and when you're convincing someone to use your shell the argument is as much about Bourne and Bash as it is about your option.)
- rogpeppe 14y ago"This article says that the shell uses lists rather than strings for some things. Great, does that mean this shell deals with spaces and newlines in filenames better than bash?" absolutely. that was rc's main innovation IMO.