|
Monday, October 2. 2006
In ye olden days at the MIT Artificial Intelligence laboratory,
there was a text editor known as TECO. This text editor was one of
the new-fangled visual editors, a concept that can be
difficult to understand for many people, as the idea of a non-visual
editor is rather alien to most users of modern computational
machinery. In all simplicity, a visual editor is one that displays
the text being edited - compare to older line, or stream, based
editors (DOS/Windows users can type EDLIN at a command
prompt to relive the joy, while those of you that have seen the
light can use ed or ex). Naturally, TECO's obvious
superiority compared to the other text editors of the day resulted
in it being massively popular among the hackers at MIT. These
hackers, all being highly skilled programmers, engaged in the now
cherished tradition of heavily customizing ones tools. This resulted
in multiple incompatible macro packages for TECO that all added some
new functionality to the editor, but unfortunately, these macro
packages were rarely compatible with one another. Two MIT hackers,
Richard Stallman and Guy Steele, decided to solve this problem by
creating a super-package of all the functionality provided by the
various macro packages - and thus was the original EMACS
born. This is why Emacs is an acronym for Editor MACroS. Eventually,
implementations of the Emacs principles and features appeared on
other systems, for example in Multics Emacs (one of the first
emacsen to use a Lisp dialect - MacLisp, to be precise) and Gosling
Emacs, the first Emacs to run on Unix. In the eighties, Richard
Stallman also started working on GNU Emacs, which was forked to
produce XEmacs and so forth, but this part of the Emacs tale is
boring - everybody already knows it. So instead, I'll go back to
1976 and talk about EINE, the original Emacs for the MIT Lisp
Machine, and possibly the first Emacs to be heavily integrated with
its run-time environment. EINE eventually begat ZWEI ("ZWEI Was Eine
Initially"), the second editor for the Lisp Machine, and when the
commercialization of the machines started, ZWEI was used as the
editor component to build the final version of Emacs for the Lisp
Machines, Zmacs (which was,
apparently, really
cool). The use of Lisp for the implementation of the editor gave
the MIT hackers incredible flexibility and power compared to the
previous TECO and assembly-based implementations, and started the
now de-facto tradition of using Lisp to write and extend emacsen.
I find it pretty interesting to look into the history and philosophy
that was behind these early Emacsen - and sometimes I am saddened
that they died out while GNU Emacs became a success, because they
had some good ideas here and there. Fortunately, it is actually
possible to get hold of
the source
code for the MIT CADR Lisp Machine! In
the extract/nzwei is what I assume to be the actual ZWEI
editor. The code is written in an old dialect of Lisp (MacLisp I
think), but it's still not hard to read if you know Common Lisp, and
it's pretty interesting to see the techniques they used back
then. My favorite pieces of code is the various editor commands, and
it's especially interesting to compare them to how they are
implemented in other, more modern emacsen.
This is a blog, therefore, I must post something narcissistic in
every entry. I am going to write a bit about how the Lisp Machine
Emacs tradition is being carried (or dragged) on by modern hackers,
an effort I am somehow associated with. After
the demise of the
Lisp Machines, emacsen fully written in Lisp started to die out
- the editors of the commercial Common Lisp implementations
and Hemlock were
all that was left. People switched to GNU Emacs or XEmacs, editors
that were often "good enough", yet lacked some of the flexibility,
elegance and features of, say, Zmacs. Years later, however
the McCLIM
developers read
the holy
scripture and it was revealed to them that McCLIM was required
to implement an Emacs-style text
editor. Tim Moore,
one of the faithful, implemented what is known as Goatee ("Goatee
Owes All To Emacs, Evidently"), an Emacs-style text editor component
that was used to implement input-editing and text editor fields for
McCLIM. However, not all was well - while Goatee did what it was
designed for, it did not do much else than this - it was not suited
for use as a complete editor, it did not have tight integration with
the underlying Lisp system, it provided little in the way of
powerful editing tools, its internals were not quite as powerful as
they could be, and it did not do syntax-highlighting or many of the
other features that are taken for granted these
days. Thus, Climacs was
created - originally as a project meant to replace the internals of
Goatee and Hemlock with more modern code, eventually as a complete
implementation of an Emacs-style text editor. And I hope we'll soon
come full circle - I'm currently working on (and succeeding at)
getting a Climacs-based editing component (named "Drei" in the Lisp
Machine tradition) to replace Goatee for all purposes in
McCLIM. Once this is done, all McCLIM-based applications will be
able to transparently leverage an extremely powerful text editor for
all their editing needs, and the user will be able to easily define
new editing commands that can be used in all CLIM applications. It's
the logical inverse of the GNU Emacs philosophy - instead of putting
everything in Emacs, we're putting Emacs in everything. Hopefully,
it'll work.
Saturday, May 27. 2006
These days, patriotism is having a considerable effect on the world
- especially the USA is having a resurgence of grassroots
patriotism. Patriotism is a direct result of the nationalistic
doctrines of the 19th and 20th centuries - the doctrines that taught
us that we should be unconditionally proud of our contries, consider
our own culture and nationality to be superior that of others, and
that we should try to convert others to other superior cultural
values. Patriotism mostly deals with the two former principles,
though the third often follows as a logical imperative.
Patriots are appaled that any of their fellow citizens will not
unconditionally support the government or its actions, and they are
enraged that any citizen of the state would dare to question or
criticize it. This line of thought has lead to great wars (well, at
least the Great War), and is perhaps the most dreadful
worldview to come out of the nationalistic waves of the previous
centuries (possibly excluding stalinism and nazism). It incites
conflict between nations and causes stagnation, as there can be no
improvement, when there is no criticism.
Why should I unconditionally support my country and its actions? Why
should I never question the authority or wisdom of my "leaders"
(elected or not)? Why should I be proud of being born in Denmark, no
matter the actions of the country? The answer - I shouldn't. I don't
feel any particular allegiance to the nation that I live in. If I am
prepared to defend it, then it it because I defend the principles on
which the nation is built, not because I feel I have an intrinsic
duty to fight/die/bleed for my country. Because I don't. I don't owe
my country anything just because I was born here, nor do I want to
unconditionally defend anything. As a principle, I am not willing to
defend any country, though I am perfectly willing to defend
certain philosophical principles, the defence of which may at times
intersect with the protection of a nation.
Note that I do not despise Denmark - I like the country in which I
live, quite a lot actually, but not out of obligation. I admire
Denmark for its reasonably fair laws and the spirit of the
population, not because it was here I was born (incidentally, in
some ways, I admire Sweden quite a bit more).
Monday, March 6. 2006
As of this day, my weblog
is available in English as well as Danish. I receive a large number
of hits from, I assume, non-Danish-speaking people, so I figured I
might as well let them in on the amazingly funny and incredibly
insightful posts my weblog is, naturally, dominated by. Also, I am
finding myself spending an increasing amount of time communicating
via written English; a situation for which I do not consider my
current language skills sufficient. Therefore my English posts may
be considered a linguistic exercise as well.
I suppose an introduction is in order: my name is Troels Henriksen,
I am, at the time of this writing, a Danish 18 year old amateur
programmer, a senior at a Danish gymnasium (roughly equivalent to a
US high school) and supporter of the philosophy
of free
software. My favorite programming language
is Common Lisp,
but I am also interested in Haskell, C++
and Brainfuck.
I am interested in the potential of computer systems, namely their
potential to augment human capability, an interest that mirrors my
preference for applications with high potential efficiency, instead
of those that are merely easy to learn. I am also interested in the
theory of computation, because I feel that a solid understanding of
the fundamentals of solving problems through programs is a necessity
for proper programming. Mostly, however, I spend my time hacking on
various Lisp stuff in order to make using my machine more convenient
for me. These activities tend to focus on
McCLIM, CLIM-desktop
and Climacs.
I have no idea how frequently I will update this weblog with English
entries - my posting frequency seems to have stabilised around once
every three days, but I do not yet know how the English section will
fit in. Thus, the best way to find out when I post new stuff, is to
use
my RSS
feed.
|