[H-GEN] Simple Linux editors

Ben Fowler fowlerb at optushome.com.au
Mon Apr 8 12:02:10 EDT 2002


On Tue, 2002-04-09 at 00:28, Greg Black wrote:

> Not by anybody who was paying attention.  I did not suggest that
> people should use ed to write their thesis (although many people
> have done that quite successfully and happily).  I was talking
> about a specific situation, which I spelt out in some detail.

I quite happily used Emacs to write my thesis, and it did the job quite
nicely.  Emac has a killer BibTeX mode too.

Realistically though (*puts on Devil's Advocate hat*), I think anyone in
this day and age of 1.5 gigabyte IDEs [1] voluntarily using ed(1) for
any sort of interactive editing task should be certified insane.  

> I certainly don't use ed for everything.  At least 99% of the
> material I write is written with Emacs, as is this message.  But
> I use ed nearly every day, from choice.

Good for you.

I had a sniff around my own system, paying particular attention to
editors suitable for disaster recovery.  Let's compare the dynamically
linked ed(1) and elvis-tiny, a cut-down version of vi.  As you can see,
this version of vi links against one extra library. ae(1) is no worse
than ed(1)

[root at reptile] fowlerb# ldd `which elvis-tiny`
        libncurses.so.5 => /lib/libncurses.so.5 (0x40020000)
        libc.so.6 => /lib/libc.so.6 (0x4005e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root at reptile] fowlerb# ldd `which ed`
        libc.so.6 => /lib/libc.so.6 (0x40020000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root at reptile] fowlerb# ldd `which aee`
        libc.so.6 => /lib/libc.so.6 (0x40020000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[root at reptile] fowlerb#

Ok, let's consider the hypothetical and unlikely scenario where there is
absolutely no way known I can get a dynamically-linked executable to run
off my hard drive during a disaster.  We're forced to use a
statically-linked editor off a recovery disk.

[fowlerb at reptile] elvis-tiny-1.4.orig$ ls -la elvis
-rwxr-xr-x    1 fowlerb  fowlerb    537611 Apr  9 01:38 elvis
[fowlerb at reptile] elvis-tiny-1.4.orig$ ldd ./elvis
        not a dynamic executable
[fowlerb at reptile] elvis-tiny-1.4.orig$

Elvis has left the building.  What about ae(1) and ed(1)?

[root at reptile] fowlerb# ls -la `which aee`
-rwxr-xr-x    1 root     root       159644 Sep 29  2001 /usr/bin/aee
[root at reptile] fowlerb# ls -la `which ed`
-rwxr-xr-x    1 root     root        43292 Nov 27  2000 /bin/ed
[root at reptile] fowlerb#

As expected, ed wins.  But even ae, a perfectly usable screen-mode
editor weighs in at a hefty 160k.  By using ae, I sacrifice a whopping
116k of disk space, and get a screen-mode editor which enables me to
work faster.  It sounds like a pretty fair swap to me.  When you
consider "ease of use" and intuitiveness, I'd argue strongly that a
screen-mode editor beats a command-mode editor hands-down.  Period.

> | it is quicker for me to ftp a config file from the Linux box to a Windows
> | box, edit the file using a Windows editor, then ftp the file back again.

Than, say, EDLIN's long lost cousin?  I'd say so.

> A little bit of practice and you'd be set for life.  If that's
> too big an investment of time, then it would probably be better
> to stick to the methods you have already discovered.

All things considered, I think that other than for sheer geek novelty
value (not that there's anything wrong with that), there is not a major
or compelling case for having to take the time and trouble to learn a
command-mode editor when a usable screen-mode editor will suffice. 
Maybe back in the days of Xenix, IBM-XT grade hardware and dinky
non-relational databases, yes, but in this day and age, no.

-warmest regards,

Ben.

[1]  Microsoft Visual Studio .NET.  And you thought that Emacs was
bloated...


-- 
Ben Fowler, email: <ben.fowler at humbug.org.au> pgp/gpg key id: FFDE6AF7
               vanity web page: <http://azure.humbug.org.au/~zuul/>
                            "You gotta burn to shine."  -- zenalot

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: This is a digitally signed message part
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20020409/01108a5a/attachment.sig>


More information about the General mailing list