Showing posts from 2008

a ergonomic keybinding for emacs

This page is for discussions and comment for the page

The Jargon “Lisp1” vs “Lisp2”

Perm url with updates: You should Not Use The Jargon Lisp1 and Lisp2Xah Lee, 2008-01-10[The following is originally posted as a reply in comp.lang.lisp about “Lisp-1” vs “Lisp-2”.]Someone ( wrote:Having read Touretzky's introduction and the first half of Paul Graham's On Lisp, I'm wondering what the advantages of a Lisp-2 are over a Lisp-1It seems to me that a Lisp-2's ability to use a single symbol to represent both a function and a value is a minor advantage, although I'm sure some regard it as a disadvantage. On the other hand, a Lisp-2 requires the clunky, IMHO, #' operator and cannot have a elegant, universal DEFINE like Scheme's.Yet I've heard that a Lisp-1's macros are necessarily less powerful than those of a Lisp-2. Is that true? Are there some other big advantages of a Lisp-2 that I'm missing?Please try to avoid the jargons lisp1 and lisp2.Recently i have just wrote a lo…

Jargons And High Level Languages

Perm url with updates: And High Level LanguagesXah Lee, 2008-01-09[This essay is originally posted to comp.lang.lisp in discussion of a ideal high level language.]Adding to Ray Dillinger and Joh Harrop's post about a ideal functional lang system, my wishes are:The language will be absolutely high-level, meaning in particular:• The language's documentation, will not need to have mentioning any of the following words: pointer, reference, memory allocation, stacks, hash, cons cells, linked list, circular list.• The language will not have concept of binary bits, bit operator, bytes, etc. (see the optimization section below) (However, the language can (and should) support computing with arbitrary number basis, and when the basis is 2, the compiler should of course automatically map it to bits on a chip as its method to achieve speed)• The language's computational model should be simple, high-level, mathematics based as…

Is Lisp's Objects Concept Necessary?

Perm url with updates: Lisp's Objects Concept Necessary?Xah Lee, 2008-01-22[The following are edited version of posts originally to comp.lang.lisp.]I've been programing Mathematica since 1993, worked as intern at Wolfram Research Inc in 1995. And since have been coding Mathematica daily up to 1998, and on and off since then.I started to learn emacs in around 1997, and use it daily, about 8 hours a day, ever since and still today.I started to learn lisp in about 1997. Mostly, i readed word-for-word, 3 chapters of the book Structure And Interpretation Of Computer Programs by Harold Abelson et al. (there are a total of 5 chapters) And, i have readed maybe half of the Scheme lisp's lang spec “Revised(4) Report on the Algorithmic Language Scheme”. These are all during 1997-1998. However, at the time i've never really wrote any programs in lisp other than toy factorial function.In 2005, i started to casually learn emacs lisp. Beca…

Iraq War Deserters

Am reading: AWOL↗, a military jargon meaning Absent Without (Official) Leave, more or less a euphemism for “deserters”. Then, Wikipedia has this passage about the number of US deserters in Iraq War:

«According to the Pentagon, more than 5500 military personnel deserted in 2003–2004, following the Iraq invasion and occupation. [2]. The number had reached about 8000 by the first quarter of 2006. [3] Another report stated that since 2000, about 40,000 troops from all branches of the military have deserted, also according to the Pentagon. More than half of these served in the US Army [4]. Almost all of these soldiers deserted within the USA. There has only been one reported case of a desertion in Iraq. The Army, Navy and Air Force reported 7,978 desertions in 2001, compared with 3,456 in 2005. The Marine Corps showed 1,603 Marines in desertion status in 2001. That had declined by 148 in 2005. [5]»

modernization of emacs lisp

Perm url:

Modernization of Emacs Lisp

Xah Lee, 2008-01

Over the past decade, before i really got my hands down with Emacs lisp in the last couple of years, i have heard many times of wishes and projects that want to replace elisp with Common Lisp or Scheme lisp. At those times with my ignorance of deep elisp, i wished alone the same line, blithely hoping that one day we'll have a emacs with a better lisp (without me needing to put anything in). (this is the “i want to believe” syndrome typical with Free Software Foundation and OpenSource youngsters) However, in the past 2 years i studied elisp, and chanced to actually spend maybe 30 minutes about this issue of modernizing elisp and looked at some websites about such projects that use Scheme lisp or Common Lisp. I think now that these efforts are not as important as they seem.

Benefits With A New Lisp In Emacs

To create a emacs with Common Lisp or Scheme Lisp as extension language, is n…

Emacs lisp Lesson: Hash Table

Emacs lisp Lesson: Hash Table

Xah Lee, 2008-01

This page shows you how to use hash table in emacs lisp. If you don't know elisp, first take a gander at Emacs Lisp Basics.

(for HTML version with colors and links, see:

What Are Hash Tables

Often, you need to have a list with elements being key-value pairs. For example, the key may be a person's name, and the value can be their age. Or, in a more complex case, the key can be the person's ID number, and the value can be a data of name, age, sex, phone number, address, etc. You might have thousands of such entries, and you want to be able to know that, given a ID, find out whether it exists in your data. You also want to be able to add or delete, modify entries in the data.

From a interface point of view, such a keyed list looks like this: “((key1 value1) (key2 value2) (key3 value3) ...)”. If you want to know a particular key exist, you can wri…