ugh.book

(singke) #1
The UNIX-HATERS History xxv

Logged into a Sun for the last few days, my Meta-Point reflex has
continued unabated, but it is completely frustrated. The program that
I am working on has about 80 files. If I want to edit the code of a
function Foo, I have to switch to a shell window and grep for named
Foo in various files. Then I have to type in the name of the appropri-
ate file. Then I have to correct my spelling error. Finally I have to
search inside the file. What used to take five seconds now takes a
minute or two. (But what’s an order of magnitude between friends?)
By this time, I really want to see the Sun at its best, so I’m tempted to
boot it a couple of times.


There’s a wonderful Unix command called “strip,” with which you
force programs to remove all their debugging information. Unix pro-
grams (such as the Sun window system) are stripped as a matter of
course, because all the debugging information takes up disk space
and slows down the booting process. This means you can’t use the
debugger on them. But that’s no loss; have you seen the Unix debug-
ger? Really.


Did you know that all the standard Sun window applications
(“tools”) are really one massive 3/4 megabyte binary? This allows
the tools to share code (there’s a lot of code in there). Lisp Machines
share code this way, too. Isn’t it nice that our workstations protect
our memory investments by sharing code.


None of the standard Sun window applications (“tools”) support
Emacs. Unix applications cannot be patched either; you must have
the source so you can patch THAT, and then regenerate the applica-
tion from the source.


But I sure wanted my Sun’s mouse to talk to Emacs. So I got a cou-
ple hundred lines of code (from GNU source) to compile, and link
with the very same code that is shared by all the standard Sun win-
dow applications (“tools”). Presto! Emacs gets mice! Just like the
LispM; I remember similar hacks to the LispM terminal program to
make it work with Emacs. It took about 20 lines of Lisp code. (It also
took less work than those aforementioned couple hundred lines of
code, but what’s an order of magnitude between friends?)


Ok, so I run my Emacs-with-mice program, happily mousing away.
Pretty soon Emacs starts to say things like “Memory exhausted” and
“Segmentation violation, core dumped.” The little Unix console is
consoling itself with messages like “clntudp_create: out of memory.”
Free download pdf