Live data from Hacker News

Miguel de Icaza: Learning Unix

tirania.org

101–110 of 128 posts

Re: Miguel de Icaza: Learning Unix

#101
post #96

Earlier quoted context omitted.

Not really. VIM has vi as subset, and plain vanilla vi is still quite powerful text editor. It doesn't have a lot of bells and whistles, and I would not choose to use it as the primary editor for all tasks, but if I'm on a system where I have to edit something using plain vi, I won't have a hard time doing it and doing it fast.

You really don't find yourself trying to use vim extensions when you use vanilla vi?

No, because I know I'm using plain vi :D. I spent a good deal of my life working with plain vi, and the company I work for makes a port of POSIX APIs, UNIX shells and all typical command line utilities for Windows, which includes vanilla vi. So I'm used to it.

I use VIM with only a few extensions (taglist, command-t and snipMate). I also use ctags and cscope, but support for those is built into vim. I really try not to get too dependent on extensions. They are more like convenience rather than something you don't know how to do without. Command+T for example is useful, but you still should know how to get to your files from the command line.

Re: Miguel de Icaza: Learning Unix

#102
post #8

I would like to add the Advanced Bash-Scripting Guide ( http://tldp.org/LDP/abs/html/ ) as an incredible resource. It's obviously geared towards scripting but most of what it teaches is extremely useful for working in an interactive shell as well. I had been using linux and bash for years before I read it and I still picked up quite a bit when I finally got around to working through it.

"Nobody really knows what the Bourne shell's grammar is. Even examination of the source code is little help." — Tom Duff

For anyone interested in an overview of the Bourne-Again Shell's source code, look at http://news.ycombinator.com/item?id=2969751

Re: Miguel de Icaza: Learning Unix

#103

Earlier quoted context omitted.

"Ed is the standard text editor."

Real programmers use a magnetized needle and a steady hand.

Real programmers use a hand drill.

I knew a guy who actually did this - he worked for a company that maintained process control systems for "serious" customers (steel mills, nuclear power stations). One steel plant had some ancient mainframe controlling things and it originally booted from paper tape that had long since worn out in the eons since it was installed and been replaced with a sturdy leather belt.

He had to patch the boot code - so hence had to resort to a handdrill to drill some new holes in the leather belt.

Re: Miguel de Icaza: Learning Unix

#104

Without starting a religious war, it's essential to learn the basics of vi for it is ubiquitous on all UNIX variants. Even if you use emacs, it's essential knowledge.

Why? vi and its derivates has their own (weird) usage-convention which you will find in no other software anywhere on the planet. Learning them gives you very few transferable skills. Any "Unixy" thing you have around these days will have more resources than most computes did in the mid 90s, and the need for a "lightweight" editor like vi is much, much smaller now than it was back then. Even my Buffalo router has nan…

I think the main reason is when you're stuck on an unfamiliar system and emacs/[your favorite editor] is not available, vi is always there.

Re: Miguel de Icaza: Learning Unix

#105

Earlier quoted context omitted.

"Why? vi and its derivates has their own (weird) usage-convention which you will find in no other software anywhere on the planet. Learning them gives you very few transferable skills." Arrgghhh! man readline, and search (/) for inputrc. ANY app that uses readline can be set to use vi OR emacs keystrokes and history, by setting an entry in .inputrc. If you use either editor regularly this will set your command line s…

And even more, there is rlwrap (i.e. readline wrap) command line utility that wrangles the badly behaved tools and allows you to use VI editing mode with almost anything (like cat command etc).

Well that's pretty cool.

Re: Miguel de Icaza: Learning Unix

#106
post #49
post #26

Earlier quoted context omitted.

You'd be surprised how many senior-level people are hunt and peck typers. I've met several software engineers with 10+ years of experience who don't type with all 10 fingers (assuming they have that many).

Yes. Actually, I don't understand why people emphasize on touch typing here. Engineering is not a data entry job.

This is not about typing faster. This is about lightening cognitive load. For instance, I don't use my vision to type. Rather, I think "stretch my right ring finger to get the [O]" (except I don't actually verbalize it, it became automatic now).

That mean my vision is free to concentrate at the screen. That means that my short-term memory don't have to memorize what I am currently seeing at the screen. This means I have more precious short-term memory to do whatever important task I am doing, like, programming.

Subjectively, touch typing is surprisingly comfortable. So even if I'm completely wrong about the above, I still feel better, and that alone is worth the investment.

Re: Miguel de Icaza: Learning Unix

#107

Earlier quoted context omitted.

"Why? vi and its derivates has their own (weird) usage-convention which you will find in no other software anywhere on the planet. Learning them gives you very few transferable skills." Arrgghhh! man readline, and search (/) for inputrc. ANY app that uses readline can be set to use vi OR emacs keystrokes and history, by setting an entry in .inputrc. If you use either editor regularly this will set your command line s…

While I'm still not going to bother with vi, I do have to admit this is probably just another one of those not-widely-known things about "Unix" which deserves some attention. God knows I didn't know about it. Other cute things I have discovered lately: You can actually click in ncurses dialogs running in your terminal, even over SSH, if you run a proper terminal. Coming from a PuTTYish background, that is definitely…

And, if you've set -o vi in bash (etc?), when you're editing a command line and need more than just the limited set of vi commands that make sense on a command line, do this:

esc v

esc gets you out of input mode, and v takes the current command line that you're editing and opens a full vi/vim session initialized with the command line. After you're done editing it, :wq quits vi and executes the command. If you change your mind, delete everything in the buffer and then :wq

This is handy if you're editing a biggish command, particularly one from recent history like a loop or anything with a block.

Re: Miguel de Icaza: Learning Unix

#108

Without starting a religious war, it's essential to learn the basics of vi for it is ubiquitous on all UNIX variants. Even if you use emacs, it's essential knowledge.

Indeed. As part of my PhD duties, I've been the lab tutor for the first serious UNIX/systems programming course for the last three years, and I always teach vi: ESC : q! Because you never know when some commandline tool is going to drop you into vi (I teach them about the EDITOR variable, but sometimes you ssh somewhere and, you know...), and you need to know how to get out. True story: the number one cause of issues…

Its worse getting dropped into $USER_FRIENDLY_EDITOR_OF_THE_MOMENT. It's cool that the sys admin or the distro developer loves to use pico, nano, joe whatever, but I just want to make my change and move on.

Re: Miguel de Icaza: Learning Unix

#109

Without starting a religious war, it's essential to learn the basics of vi for it is ubiquitous on all UNIX variants. Even if you use emacs, it's essential knowledge.

Indeed. As part of my PhD duties, I've been the lab tutor for the first serious UNIX/systems programming course for the last three years, and I always teach vi: ESC : q! Because you never know when some commandline tool is going to drop you into vi (I teach them about the EDITOR variable, but sometimes you ssh somewhere and, you know...), and you need to know how to get out. True story: the number one cause of issues…

I suggest using hg or git, neither of which have a lock.

Re: Miguel de Icaza: Learning Unix

#110

Earlier quoted context omitted.

Real programmers use a magnetized needle and a steady hand.

Real programmers use a hand drill. I knew a guy who actually did this - he worked for a company that maintained process control systems for "serious" customers (steel mills, nuclear power stations). One steel plant had some ancient mainframe controlling things and it originally booted from paper tape that had long since worn out in the eons since it was installed and been replaced with a sturdy leather belt. He had t…

That would be an amazingly awesome writeup.
Post reply on HN