Humor: Cargo Cult Programming

John Abreau jabr at abreau.net
Thu Nov 14 18:06:29 EST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

mike ledoux <mwl+gnhlug at alumni.unh.edu> writes:

> For years I did things like this and would've killed for 28.8K dialup,
> let alone 56K.  The performance isn't so bad as you seem to think.
> Actually, it should be even better nowadays, as ssh does compression.

I'm on a 56K dialup now, and it's not all that much better. I still get 
frequent lags of anywhere from a few seconds to occasionally a minute or
two where the connection simply sits there frozen.

> > How does one actually invoke this?
> 
> In emacs?  I have no idea.  I gave the commandline I use for vi, but it
> doesn't do any tunneling of file i/o.

It doesn't have to. The file i/o occurs only when the file is read or 
written, and the editing is done locally without having to pass the 
keystrokes over to the remote machine. Thus the interactive performance 
of the editor is much better.

> FWIW, I sincerely doubt that is what emacs is doing either; I strongly
> suspect it transfers the entire file to the local system to open, and
> back to the remote to save changes. 

Well, yeah, that's how a text editor works; it loads a file into memory, 
you do your editing on the copy that's in memory, and then it writes 
the modified copy from memory back out to a file. 

As for invoking it, it turns out to be fairly straightforward. I had to 
download ange-ftp-over-ssh.tar.gz, move the nftp.pl script into 
my PATH, and add a line to my .emacs:

    (setq ange-ftp-ftp-program-name "nftp.pl")

Oh, and I also had to create ~/.nftprc:

    $aliases{asgard}="asgard:22";

After doing that, and having ssh-agent running so I can connect to 
asgard without a password, I just tell emacs to open a file of the form

    /asgard:.bashrc

and it edits /home/jabr/.bashrc on the remote machine "asgard".
Emacs still prompts for my ssh password before looking for the file, but 
I can just hit return without specifying a password, and it works. 
I'll have to figure out how to change that so it doesn't prompt for 
the password.


- --
John Abreau / Executive Director, Boston Linux & Unix
ICQ 28611923 / AIM abreauj / JABBER jabr at jabber.org / YAHOO abreauj
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001

iQCVAwUBPdQsdFV9A5rVx7XZAQKOqgP8Dkbgbw05IUkEkCyaLI9tQJotDqLCxcJD
fB56EPaj4VjlbvG7IGw7b0QagqEKor3D4s9TvhG7Qy/Uv6sGPVS0HbvgaHLuNwRh
8l/23J+Jy+x6e3yWl3f9o1EJwmLUt58/rEl1uAdK58GHInf4bH5dhStAk5ZGf5BR
mzzTq5P/jzw=
=Uxfp
-----END PGP SIGNATURE-----




More information about the gnhlug-discuss mailing list