Friday, February 29, 2008

Viewpoints on operating systems

Viewpoints on operating systems. Pretty funny post. Has good points too.

9 comments:

Anonymous said...

vi is still the best text editor ever made. You can laugh all you want, but it doesn't change the fact. If you can't use vi, you shouldn't be touching a computer.

Anonymous said...

Get a brain... vi was lousy when I 1st used it 25 years ago, and it hasn't aged a day. Not even an editor, just a front-end to something even worse... yuck.

Anonymous said...

anon said: "vi is still the best text editor ever made"

I would go even further and say that vi is among the 10 greatest computer programs ever invented.

Turing machine is #1.
Forth by Chuck Moore is #2.
Unix kernel is #3.
grep (and regex in general) is #4.
Bourne shell is #5.

vi must be #6. It is pure genius. A true masterpiece. Bill Joy is my hero.

anon said: "... and it hasn't aged a day."

Exactly.

Alex said...

When I was introduced to VI it was a line editor. We also had access to EMACS. I took to using EMACS. I'd spent a couple of years on PRIMOS before I got to UNIX and it seemed that vi was a step back. Sure it is powerful, being able to as for 27 "*" characters, or cut the next 15 characters. Thing is I am not good a spacial estimation, and 12 character look like 15 to me.

I found block editors more to my liking. After using Emacs, vedemacs, brief, vi, then the built in editors for RiscOS, Think C's canned editor, Borlands IDE et al I was introduced to CodeWright. That became my editor of choice. If I'd encountered SmartEdit a bit sooner it may have wow'd me as much as CodeWright.

I know use Codewarrior IDE. It's tight integration with the compilers, simulators, ICE, debugger and UNIS's Processor expert has made it a natural choice, but CodeWright still lets me get in and easily edit hex files and has built in recursive folder grepping tools. It everything under one roof.

I'd probably still use CodeWright, but the Freescale/Metrowerks make it hard to use a UDE to drive the debug environment, a step back from the Mentor Graphics tool chain.

So vi is powerful for someone who thinks different to me. Since I can still spot a race condition in crossing clock domains, and I can follow the analogue anomalies of high speed serial I believe the comment If you can't use vi, you shouldn't be touching a computer. to be a bit strong.

Beside, with that kind of thinking you are saying most people shouldn't use an ATM, PDA or cell phone.

Bert said...

The original post is very refreshing, and makes its point quite remarkably even while focusing only on very minor points. Excellent writing.

As for vi, well, it is still the editor of choice... if you're using a TTY. Alex is absolutely right, the world has evolved since those days, and if such a museum piece does it all for you, then perhaps it is you who should give up computers...

Alex said...

VIM

I forgot to mention VIM.

This is a block editor, not a line editor, it gives all the vi command line stuff the anachronists love, and the gui the rest of us cope with.

One thing, I used to use the Brief inteface in CodeWarrior, but switched to CUA, the cut and paste commands found in Office and other common applications. I even had to change one command, a line delete which had the same sequence as most other applications save. I kept wiping out lines of code...

Anyway, with a VT100 (who uses older TTY's?) you can use a window editor too, that's what we did under Primos. The only time I used vi is when I rsh'd into an account that didn't have emacs.

Bert said...

"who uses older TTY's?"

I mentioned TTYs because that's where ed & vi were born, and the one turf where they were unbeatable. TTYs died with the 70's and, if it hadn't been that nothing is ever discarded in unix, so would have those two.

Anonymous said...

vi does not work on a TTY. It needs cursor addressing. If you start vi on a TTY, it resorts to its "ex mode", which is an ed-like line editor (essentially BSD version of ed).

vi is short for "visual editor". It was written to take advantage of CRT terminals such as VT52 and VT100 and their 24x80 cursor addressing.

Ex-mode was retained for backward compatibility and to serve as vi's command line for typing regular expressions, setting options, etc.

vi is the only text editor that makes touch type editing possible (not that I can do that). It is also generally considered the fastest text editor.

Probably the single most brilliant invention in vi is the "." command: hitting the dot key immediately repeats the last operation, no matter what it was. There are, of course, countless other brilliant ideas, such as:

- making h,j,k,l be cursor addressing keys
- the ability to at any point hit ":" and type in a regular expression
- "ZZ" for save-and-exit
- single key movement by words, sentences, paragraphs
- vi macros
- etc. etc

Not to mention that vi responds lightning speed to everything you do.

Vi somehow managed to hit exactly the sweet spot where minimalism meets functionality. This is the reason for its huge success.

I would switch in an instant if someone were to create a better editor. But knowing how difficult it is to design good software, and seeing the pathetic attempts at text editors during the last 20 years, I'm not expecting that to happen any time soon.

Graham Giles said...

I'm a VIM user too and I think it offers the best of both worlds; once you've spent a couple of hours learning the basics of how it works, it's both fast and powerful.

And if you've got GVim istalled, you can install a program called Cream for extra functionality and user friendliness.