Cette page est aussi disponible en franglais ;-): Français:DrewAdamsFrançais
See EmacsHistory for info on the various Emacs incarnations mentioned here, and [1] for the Emacs family tree.
EMACS exists because I felt free to make individually useful small improvements on a path whose end was not in sight. – RMS, EMACS: The Extensible, Customizable Display Editor, http://www.gnu.org/software/emacs/emacs-paper.html |
That’s not a bad summary of what free/open software development is all about, IMO:
The fact that useful software changes can be individually useful and small, without being part of an overall predefined design, is maybe not an explicit tenet of the philosophy of free software development, but it is in fact a precondition and a consequence of such development. The idea that individually useful changes are likely to lead to something that is useful in the aggregate is important – and not obvious, in terms of modularity and group design & development.
This free/open software development model (combine individually useful changes, without necessarily adhering to a predefined design) reminds me of the Unix philosophy (vs what came before it) of producing small, modular programs that can easily be combined to produce more powerful functionality (vs monolithic, swiss-army-knife, do-all systems/functions). Here’s the question:
The same question, applied to functional programming:
IOW, it’s about modularity, and modularity is all about glue: the ability to combine pieces.
For a fabulous essay on the modularity and “glue” of functional programming, see John Hughes’s classic, Why Functional Programming Matters: http://www.cs.kent.ac.uk/people/staff/dat/miranda/whyfp90.pdf or http://www.cse.chalmers.se/~rjmh/Papers/whyfp.html From the Introduction (emphasis added):
An analogy is then drawn with the “no GOTO
!” arguments in favor of structured programming – and the conclusion is that it is its modularity, not its lack of GOTO
, that gives structured programming its advantage. The rest of the paper explores the modularity advantages provided by higher-order functions and lazy evaluation.
I heartily recommend this 40-year old paper. I guarantee that it is an eye-opener, no matter how familiar you are with functional programming and programming-language design.
Here, BTW, is what John himself says about this paper:
This paper shows how two key features of functional languages—higher-order functions (which take other functions as arguments) and lazy evaluation (which defers computations until their results are really needed)—combine to let programmers break algorithms into small, flexible, reusable parts. It argues that functional languages support the development of reusable software much better than conventional languages, in other words.
At the time I wrote it, researchers were more likely to emphasize mathematical reasoning and the absence of side-effects—but it’s difficult to sell a programming paradigm on the things it lacks! The perspective in my paper has influenced many researchers since, and can perhaps be said to lie partly behind a focus in recent years on “domain specific embedded languages”. These are flexible libraries of functions that permit programmers to solve problems of a certain class just by combining library functions, in effect working in a special purpose programming language for that particular kind of task.
I wrote the paper in 1984 as a post-doc, but misjudged its significance completely. I thought it would be unpublishable, because it contained no difficult research results, just a manifesto and some nice programming examples. So I circulated it privately to friends, who passed it on to others, and soon I found it turning up in the most unexpected places. Finally, after five years, I was invited to submit it to the Computer Journal. —http://www.cse.chalmers.se/~rjmh/citations/my_most_influential_papers.htm
Coming back to free/open software development – By analogy, what is the “glue” that makes this kind of development work? What makes it possible to glue many small, individually useful software changes together and still get something worthwhile accomplished? How does this work, even in the absence (some might argue especially in the absence) of a predefined design? That’s a question for reflection. Some may hark back to Adam Smith for an answer; others, to Mikhail Bakunin; still others, to Karl Marx. I’d say that the question is open, but these are at least part of the “glue” answer:
… though sometimes I think Emacs uses me. In fact, Emacs and I have used each other since the mid 1980s.
First, I used Gosling Emacs (we just called it Emacs), with Mock Lisp. Mock Lisp was fun – er, a mess. No real lists at all. No real arguments to functions – just error-prone global-variable pseudo-arguments. In fact, about the only thing it had in common with Lisp was the parentheses. Fun, though.
But Gosling Emacs was Emacs, in any case: an extendable text editor that you could do what you want with. It impressed me quite a lot, after years (don’t ask!) programming with other editors of various sorts (I said, don’t ask!). I was impressed with its programmability – on the fly, no less (interpreted language). I was particularly impressed with TAGS – hit a key on a name in a program somewhere and shazzam!…takes you to the defining source code. Magic. Cool. Handy.
The other remarkable thing I noticed about Emacs was that it was self documenting. Long before objects began orienting themselves with an eye to fashion, Emacs objects spoke to you about themselves. And, though Emacs’s hyperlinked Info manuals might seem, well, ordinary now, next to the Web, at that time there was no Web, and online hyperlinked documentation didn’t even exist – except for Emacs Info. Cool it was.
Anyway… From Gosling Emacs we moved to GNU Emacs, with EmacsLisp, when it came along. We also used Zmacs, on Symbolics Lisp machines. I programmed mostly in Lisp then anyway (Franz and Common), so these Emacs versions were great to have.
Over the years, I’ve customized the hell out of Emacs. At first it was just new commands, functions, and key bindings, but when Epoch (French Wikipedia page) came out (with proportional fonts, colored faces, frames, images, menus, and such) there was suddenly a lot more you could do to make Emacs (Epoch) fit your individual needs or dreams. The combination of these new, powerful features with the somewhat limited out-of-the-box user interface positively ignited user customization, and I was no exception.
The downside of doing a lot of customization is having to redo it when a new Emacs version comes out and lots of basic stuff has changed so that things are incompatible. I’ve been there & done that way too many times. The last couple of major releases, I’ve ended up abandoning useful stuff I wrote just because I didn’t have the time to upgrade it. That’s OK; some of it deserved to be left behind.
And Emacs has improved greatly over the years. I still use Emacs 20, as well as later versions through the latest development builds. When feasible and not too much trouble, I try to make my EmacsLisp code compatible across versions.
This page describes my EmacsLisp libraries: DrewsElispLibraries.
NOTE: You can be pretty sure that my libraries are untampered with, because their wiki pages are locked except to EmacsWiki administrators.
‘apropos’
and more for Unicode characters‘mouse-2’
; other mouse enhancementsIcicles – Explore, explore, explore…
OneOnOneEmacs – Frames, yes! Emacs windows, no! Try it. Pages linked from OneOnOneEmacs:
*grep*
, *Occur*
, *Messages*
etc.) are in frames with a different style.*Help*
and *Completions*
buffers. Redirection of frame focus from *Completions*
to the minibuffer frame.‘delete-window’
, ‘kill-buffer’
, and ‘mouse-tear-off-window’
redefined to behave better with frames.‘mouse-3’
), sorting, filtering, highlighting, time-last-accessed column,…‘kill-buffer’
that also deletes windows on bufferring.el
. Circular lists etc.Here are some screenshots of my Emacs.
*Buffer List*
and *grep*
shown here) have a different frame background from normal frames (Dired shown here)*Help*
and *Completions*
.‘ediff-buffers’
after tiling the frames horizontally‘mouse-3’
popup menu and highlighting (marks, columns, full-line mouse-over). More screenshots of Buffer Menu: Shrink-Wrapping Frames.‘*Occur*’
buffer, and a visited occurrence in a target buffer, showing highlighting: match-string, visited-line number, full-line mouse-over (underline)‘*grep*’
buffer: features similar to ‘*Occur*’
buffer‘highlight-regexp’