Emacs Hyper and Super Keys

Perm url with updates: http://xahlee.org/emacs/emacs_hyper_super_keys.html

Emacs Hyper and Super Keys

Xah Lee, 2005, ..., 2010-07-31

This page shows you how to define super and hyper keys in emacs. If you are not familiar with the basics of defining keys in emacs, see: How to Define Keyboard Shortcuts in Emacs.

Emacs supports extra modifier keys called Super and Hyper. You can map PC keyboard's Win key or the Menu key to them, or Apple keyboard's Option key.

For those curious, the Super and Hyper are actual keys on lisp machine keyboards. Lisp machine keyboards are popular around late 1980s and is used to develop emacs. For photos of lisp machine keyboards, see: Keyboard Hardware's Influence on Keyboard Shortcut Design.

Setting up Super and Hyper

Microsoft Windows

; setting the PC keyboard's various keys to
; Super or Hyper, for emacs running on Windows.
(setq w32-pass-lwindow-to-system nil 
      w32-pass-rwindow-to-system nil 
      w32-pass-apps-to-system nil 
      w32-lwindow-modifier 'super ;; Left Windows key 
      w32-rwindow-modifier 'super ;; Right Windows key 
      w32-apps-modifier 'hyper) ;; Menu key

Note: in Microsoft Windows, several keybindings with the Windows key is bound at a low level, and applications do not see them. For example, “Win+r” is for launching apps by name. (See: Microsoft Windows Keyboard Shortcuts.) There's no way around that unless you use other tools such as AutoHotkey. Even so, it may not be possible to disable “Win+l” (lock window) and “Win+u” (easy access).

(info "(emacs) Windows Keyboard")

Mac OS X

; setting Hyper and Super keys for the Mac keyboard, for emacs running in OS X
(setq mac-option-modifier 'hyper) ; sets the Option key as Hyper
(setq mac-option-modifier 'super) ; sets the Option key as Super
(setq mac-command-modifier 'meta) ; sets the Command key as Meta
(setq mac-control-modifier 'meta) ; sets the Control key as Meta

(info "(emacs) Mac Input")

Defining Shortcuts for Hyper and Super

The syntax for defining keys with the Super or Hyper modifier keys is the same as Meta and Control. Use “H” for Hyper, “s” for Super. Example:

(global-set-key (kbd "H-b") 'backward-word) ; H is for hyper
(global-set-key (kbd "s-b") 'backward-word) ; lower case “s” is for super

(global-set-key (kbd "M-H-b") 'backward-word) ; Meta+Hyper+b
(global-set-key (kbd "M-s-b") 'backward-word) ; Meta+Super+b

For more examples, see: How to Define Keyboard Shortcuts in Emacs.

Key Ghosting

Be aware that keyboard won't be able to detect certain combination of keys. This is called keyboard ghosting.

For example, suppose you have the Menu key set as Hyper, and you have “Hyper+Shift+q” as a shortcut to some command. However, Microsoft Natural Ergonomic 4000 keyboard simply does not register that combination when right shift is used. But left shift works.

For detail, see: Keyboard Ghosting; How Many Keys Your Keyboard Can Take?.

CSS Example: How to use “:before” and “:after” pseudo-elements

Perm url with updates: http://xahlee.org/js/css_before_after.html

CSS Example: How to use “:before” and “:after” pseudo-elements

Xah Lee, 2009-01, 2010-08-07

This page shows you how use css to add text into your html pages, using the “:before” and “:after” pseudo-elements.

You can use CSS to automatically insert text or images into your html page at certain tags. For example, in the following:

How to do this?

This way.

The “Q:” and “A:” are actually not in html. They are added using CSS. If you turn off CSS in your browser, they'll disappear.

To add text before or after a tag, use this:

p.x3465:before {content:"Q: ";font-size:x-large;font-family:serif}

and the html would look like this:

<p class="x3465">How to do this?</p>

Star Spangled Magazine Covers

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/lanci/mag.html

Star Spangled Magazine Covers (page 1)

Xah Lee, 2004-06, 2010-08-07

Every so often you'll find the stars'n'stripes theme in various forms in American magazines: music mags, women's mags, photo mags, fashion mags, and political mags. Americans love it. In these mags, there are also abnormal frequency of the word America or American: American Fashion, Sex in America, America's sweetheart; while hardly ever other country or continent's name. For the average American, America = the world, and that's how Americans like it, and the capitalistic consummeristic America sells by it.

Does other country's magazines frequently cite their own country this or that? I think it's uniquely US phenomenon. Possibly UK in some degree too.

Paper magazine cover

〈Paper〉 magazine, showing a pretty girl (Ivana Miličević?) clad in red-white striped sundress with a button-pin of peace-sign on flag. (notable is her runway chest. US magazines usually sport chesty women.)

rolling stone 2001

2001-09-11 issue of Rolling Stone, showing a US flag brooch. Brooch is just called pin in US, and is a American thing.

vogue 200109 britney

Brat Britney Spears on Vogue.

See also: Baby One More Time.

Lisa Marie gear

Actress Lisa Marie (b1968) on Gear.


Jaime Bergman (b1975), Playboy's Playmate, January 1999, on the cover of Gear magazine, semi-baring her breast in a tattered shirt of US Flag imprint.

sara jessica parker tv-guide

Sex in the City queen Sarah Jessica Parker (b1965).

smack down 200507

Fitness model Torrie Wilson (b1975) on a wrestling magazine. “Made in America!” Her beautiful bare butt makes friend with a US flag. Note that care has been taken so that she doesn't actually sit on it.

Christian war monger George W Bush versus presidential candidate John Kerry on Time magazine, 2004-10-18, cover illustration by Daniel Adel.

jessica simpson GQ 200507

Pop songstress Jessica Simpson (b1980) on GQ magazine, 2005-07. Note the tag line: GOD, THIS IS A GREAT COUNTRY and “Jessica Simpson and 75 Other Reasons To Love America”.

Bruce springsteen rolling stone

Bruce Springsteen on Rolling Stone. The date of this cover may be one of 1985-10-10, 1986-02-27, 1987-02-26. See also Born in the USA lyrics.

hu magazine issue2002-07-00

Hustler magazine cover, 2002-07.

See also: Hustler's Flag Porn.

It is my guess that every American pop magazine has a flag-adorned cover once or more. The ones shown in this page are just the tip of a iceberg. If you spotted one, please let me know!

Goto Page: 1, 2


CST L-Trac best trackball?

Discovered possibly the best trackball today. CST L-Trac trackball. Large ball, 5 buttons, scroll-wheel, but at $110. First available at Amazon on 2009-09. So i think it is pretty new. For more detail, see: Trackball Mouse Reviews.


Bascics of Chinese Punctuation

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/bangu/chinese_punctuation.html

Intro to Chinese Punctuation with Computer Language Syntax Perspectives

Xah Lee, 2010-08-05

This page is a tutorial and commentary of Chinese punctuation. The symbols used and their purpose. Comparison to English punctuations, and as they are practiced in China, Hong Kong, Taiwan, and the minor differences in their usage. The commentary takes the perspective of notation grammar in computer language.

This page is mostly for English speakers. I assume that you are well acquainted with English punctuation.

Note that punctuation usage is not a precision science. For example, US and UK have slightly different habits, and even in US, different style guides differ in their opinion in minor details.

Chinese punctuation usage is very similar to western language punctuations, except that a few symbols are not used, and with few additional symbols.

Shared English and Chinese Punctuation Symbols

The following symbols are used in both English and Chinese, with the same meaning:

  • (.) Period.
  • (,) Comma.
  • (:) Colon.
  • (;) Semicolon
  • (?) Question mark
  • (!) exclaimation mark
  • (“”) quotation mark (double).
  • (‘’) quotation mark (single).
  • (-) hyphen.
  • (—) dash (em-dash).
  • ( ) brackets (round). (Parenthes).
  • [ ] brackets (square).
  • { } brackets (curly braces).

Chinese Punctuation Symbols Not in English

The following are punctuation symbols used in Chinese but not seen in western langs:

SymbolChinese NameLiteral TranslationEnglish NameUnicode name
句號sentence markChinese periodIDEOGRAPHIC FULL STOP
頓號pause markenumeration commaIDEOGRAPHIC COMMA
〈〉書名號 (單)book title mark (single)angle bracket (single)LEFT/RIGHT ANGLE BRACKET
《》書名號 (雙)book title mark (double)angle bracket (double)LEFT/RIGHT DOUBLE ANGLE BRACKET
「」單引號single quotation marksingle quotation markLEFT/RIGHT CORNER BRACKET
『』雙引號double quotation markdouble quotation markLEFT/RIGHT WHITE CORNER BRACKET
〔〕六角括號six angles brackettortoise shell bracketLEFT/RIGHT TORTOISE SHELL BRACKET
【】黑方頭括號black square bracketblack lenticular bracketLEFT/RIGHT BLACK LENTICULAR BRACKET
〖〗白方頭括號white square bracketwhite lenticular bracketLEFT/RIGHT WHITE LENTICULAR BRACKET


Chinese Period 。

The Chinese period (。) symbol, has the same semantics as English period, but full width. (meaning, it occupies the same square as a chinese character. Most letters of western alphabets are so-called half-width, because in general they are half the width of a chinese char.)

In unicode, almost all western lang punctuation symbols also have a asian variant that's full width. Here are some examples commonly used in chinese writing:


Note that chinese can be written both vertically and horizontally. Vertical is traditional, but due to western lang's influence, horizontal left to right is the common practice today in all chinese speaking regions (except Taiwan newspapers). Horizontal practice is started by China. Quote from Wikipedia:

People's Republic of China decided to use horizontal writing. All newspapers in China changed from vertical to horizontal alignment on January 1, 1956.

The problem with vertical writing is that it's hard to intermix with western languages (names, phrases, quotes), scientific formula, and hard to use in software because the first 30 or so years of software are developed using english for english users (in US).

With the adoption of horizontal writing, the western style glyphes (half-with) for period, comma, colon, question mark, etc are sometimes seen, especially in online chat or personal blog. Though, they are considered incorrect and eyesore.

Enumeration Comma 、

The symbol (、), in chinese is called 頓號. Literally it means “pause symbol”. Proper english name for it is Enumeration comma. The unicode name for the char is “IDEOGRAPHIC COMMA”.

In chinese, when you have a sequence of things, such as, peach, banana, cherry, you don't use comma to separate them, you use this enumeration comma. So, you'd write: “Just look in my bag, i have: peach、banana、cherry.”.

Quotation Signs 「」『』


Quotation signs are pretty much used the same way in most languages, euro or asian. They are a pair of matching glyphs. The 2 glyphs for left and right are usually symmetrically opposite in their appearance. For example, French uses «LEFT/RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK» and also ‹SINGLE LEFT-POINTING ANGLE QUOTATION MARK›.

(Some euro countries, e.g. Finnish and Swedish, use the same symbol for both left and right. Like ”this” or »this». Quite idiotic. See: The Moronicities of Typography.)

Also, usually there's a double and single version. For example, in US, if you have a quote within a quote, the outer is double, the inner is single. More level of nesting alternate the double and single.

Whether non-nested quotation should use the double or single version differ by region. e.g. US uses “double” as primary, while UK uses ‘single’ as primary

In China, the western style “matching curly quote” is often used. In fact, they are the government's official quotation symbols, both “double” and ‘single’. Double as primary and single as secondary, same as US.

The traditional chinese quotation symbol is 「single corner bracket」 and 『double corner bracket』. They are used in China too, but more so in Taiwan and Hong Kong.

The following are the vertical versions:


Title Brackets 〈〉《》

One intereting symbol used in chinese is the 《angle bracket》 and 〈single〉 version. These are used for book titles. The double version is primary. The single version is often used for chapter names, or titles of film, song, show, etc.

Note that, a well-established alternative practice is to use wavy underline for book titles. But that's going out of fashion in digital age because it's not as easy to produce on computer as compared to simply typing 2 matching chars. (Also interesting to note, that CSS so far does not support wavy underline.)

Note that in western langs, the convention for book title is to slant the print (aka “italics”) and without any delimiter. This is idiotic.

The following are the vertical versions:


Other Brackets 【】〖〗〔〕⦗⦘ 〘〙

Now, there's also these brackets, roughly in order of frequency of occurrence: 【BLACK LENTICULAR BRACKET】,〖WHITE LENTICULAR BRACKET〗, 〔TORTOISE SHELL BRACKET〕. They are frequently seen, especially from older books. These are the traditional brackets for chinese. The meaning and usage varies. They are analogous to western's (paren), [square], {curly}. The western style brackets are commonly seen in chinese today too, though the chinese lenticular bracket is still common.

The following are more variation of brackets, but rarely seen:



To see common punctuation practices in China, you can go to chinese site such as baidu.com or qq.com. For Taiwan, visit “Yahoo! Taiwan” at tw.yahoo.com.

Was this page useful? If so, please do donate $3, thank you donors!


How to Create and Update a Sitewide Logo (Favicon)

Perm url with updates: http://xahlee.org/js/web_favicon.html

How to Create and Update a Sitewide Logo (Favicon)

Xah Lee, 2010-08-04

This page tells you how to create a favicon for your site, and how to make your readers see a new logo if you updated it.

Favicon is a tiny icon associated with a website. The icon will show up in the browser's tab, or url field, or in bookmark.

Creating a Favicon

To create it, just create a 16×16 or 32×32 image file. The file can be png, jpg, gif, or Microsoft's “.ico” format.

Then, in your html pages, add one of the following line to the header:

<link rel="icon" type="image/png" href="xahlee_logo.png">
<link rel="icon" type="image/gif" href="xahlee_logo.gif">
<link rel="icon" type="image/vnd.microsoft.icon" href="xahlee_logo.ico">

Each of your html page can have a different favicon. So, you could use a icon for each page, or each project, or each server. However, favicon is usually used for branding purposes across your whole domain name.

How to Create “ICO” Format File?

You can create the ico file by first creating a png or gif version using your favorite image editor. Then, when saving, save it to the ico file.

You can also use ImageMagick to convert it. (See: ImageMagick Tutorial.)

Domain-wide Favicon Without “Link” Tag

You can also create a favicon without having a “link” tag on each of your html page. Here's how:

  • Create your icon file in Microsoft's icon file format the ICO file format. The image file must have this exact name: “favicon.ico”.
  • Place the “favicon.ico” in the web server document root dir.

When modern browsers visit your site for the first time, it'll automatically try to fetch the “favicon.ico” file at root dir. If found, it'll then use this file as your site's icon file.

Problems with Updating Icon File

Note that this method is widely supported by all modern browsers, but exact behavior is difficult to predict. For example, it is not clear when a browser will try to fetch the file. This creates a problem when you update your icon file, because there's no way to know when your new logo will be seen by your readers.

How to Update Your Favicon

If you have updated your favicon, the best way to make sure that your readers see the new logo is to put a “link” tag in your pages, as described above. At least, you should put one in your domain's home page.

If you simply place a “favicon.ico” at root dir and without any “link” tag to it, it is nearly impossible to know if your readers will see your new logo. Because, different browser have different behavior on when to fetch the “favicon” file, and usually not documented.

Byte Magazine Cover on LISP, A Space Odyssey, Nietzsche

Perm url with updates: http://xahlee.org/funny/byte_mag_lisp.html

Byte Magazine Cover on LISP, A Space Odyssey, Nietzsche

Xah Lee, 2010-08-04

byte mag cover 1979-08 LISP

Byte magazine cover, 1979-08. source Kazimir Majorinc (used with permission)

What is the overall meaning of this drawing? The first time i saw this, i thought of one thing, but next day, looking at this pict again, i got a opposite impression. (scroll down to see my impressions)

At first i thought it's a tombstone. The apparant message being: lisp is dead. Quite funny how the inscriptions are all lisp code with caar and caddr, and the tomestone in some alien planet background with astronauts looking at it. But “lisp is dead” proclaimed in 1979?? The next day, i realized that the tombstone i see is the giant mysterious monolith, a theme borrowed from the movie “2001: A Space Odyssey”. (I saw the film twice in the past, and love it.)

On reading Wikipedia about 2001: A Space Odyssey, quote:

The film has a memorable soundtrack—the result of the association that Kubrick made between the spinning motion of the satellites and the dancers of waltzes, which led him to use the The Blue Danube waltz by Johann Strauss II,[2] and the famous symphonic poem Also sprach Zarathustra by Richard Strauss, to portray the philosophical evolution of Man theorized in Nietzsche's homonymous work.[3][4]

Thus Spoke Zarathustra, Richard Strauss, Nietzsche

Thus Spoke Zarathustra the Music

I'm familiar with The Blue Danube waltz, but which is the “Also sprach Zarathustra”? Ah, that's the film's opening theme song, sometimes known as the “sunrise”.

Thus Spoke Zarathustra the Philosophy

But more interesting is the mentioning of nihilist philosopher Nietzsche. Reading on Wikipedia: Thus Spoke Zarathustra, i found several interesting things. Quote:

Thus Spoke Zarathustra: A Book for All and None (German: Also sprach Zarathustra: Ein Buch für Alle und Keinen) is a philosophical novel by German philosopher Friedrich Nietzsche, composed in four parts between 1883 and 1885. Much of the work deals with ideas such as the "eternal recurrence of the same", the parable on the "death of God", and the "prophecy" of the Overman, which were first introduced in The Gay Science.[1]

Described by Nietzsche himself as "the deepest ever written," the book is a dense and esoteric treatise on philosophy and morality, featuring as protagonist a fictionalized prophet descending from his recluse to mankind, Zarathustra. A central irony of the text is that Nietzsche mimics the style of the Bible in order to present ideas which fundamentally oppose Christian and Jewish morality and tradition.

You know how today with New Atheism movement, there's the catchy phrase “death of God”. That phrase is actually popularized by Nietzsche's book. Quote from Wikipedia's “god is dead” article:

"God is dead" never meant that Nietzsche believed in an actual God who first existed and then died in a literal sense. It may be more appropriate to consider the statement as Nietzsche's way of saying that the conventional "God" of 19th century middle class Christianity is no longer a viable or believable source of any received wisdom. Nietzsche recognizes the crisis which the death of God represents for existing moral considerations, because "When one gives up the Christian faith, one pulls the right to Christian morality out from under one's feet. This morality is by no means self-evident... By breaking one main concept out of Christianity, the faith in God, one breaks the whole: nothing necessary remains in one's hands."[1] This is why in "The Madman", a work which primarily addresses atheists, the problem is to retain any system of values in the absence of a divine order.

Strauss's music is inspired by Nietzsche's philosophical work of the same name. The work's main character is named Zarathustra, which is actually borrowed from a “ancient Iranian prophet and philosopher Zoroaster”. I'll have to read about Zoroaster some other time.

The Giant Monolith

That eerie giant black monolith featured in A Space Odyssey, always seems a bit strange to me in the film. I realized that is also inspired from Nietzsche's work. Quote:

Thus Spoke Zarathustra was conceived while Nietzsche was writing The Gay Science; he made a small note, reading "6,000 feet beyond man and time," as evidence of this.[2] More specifically, this note related to the concept of the Eternal Recurrence, which is, by Nietzsche's admission, the central idea of Zarathustra; this idea occurred to him by a "pyramidal block of stone" on the shores of Lake Silvaplana in the Upper Engadine, a high alpine region whose valley floor is at 6,000 ft.

It's quite interesting that a mag cover lead to so many deep and old discoveries. I learned in my experience in particular of readings in the past 7 years, that a person can know so little of our society, surroundings. I felt, for a healthy society today, each person should have equivalent of 3 university degrees, 2 in humanities. (See: Futuristic Calamity. (i've been spending some 40 hours per week reading in the past 7 years. And i probably spend equal amount of time studying before that, so that's 14 years of full time study. (not counting reading or studies on materials below highschool level in my younger years) A university degree full time is 4 years. So, if my readings quality as higher education study, 14 years would be 3.5 university degrees. Though, i felt i knew little. ) )

In 2007, i was slaving in Second Life's sex world all day, which led to the Gorean role playing communities, which led me to read about John Norman's novel “Chronicles of Gor”, which led me to Nietzsche's concept of Master-slave morality. That's the first time, i got some basic concept of who Nietzsche is and his philosophies. (See: Goreans in Second Life.)

Note that Byte (magazine) was a very successful magazine. It was sold in 1998 and the new owner shut it down for business reasons. Tom R Halfhill, BYTE Magazine's senior editor, wrote about the incidence. Tom's Unofficial BYTE FAQ: The Death of BYTE Magazine (?-2007), by Tom R Halfhill, at halfhill.com.


Kazimir Majorinc is so kind to supply the following info from the Byte mag:

About the Cover

This month, Ken Lodding has created a fantasy on far-out application with a Lisp theme. The surface of some asteroid has been discovered. A monolith engraved with the S-expression form of a Lisp program is gazed upon by some astronauts. We presume some archeology of this monolith will have to be done to uncover the balance of the program. We leave it to readers familiar with LISP to identify the textbook from which these S-expression fragment were taken, and the purpose of the program.


pithy quote isnt substance; Erik Naggum

Perm url with updates: http://xahlee.org/UnixResource_dir/writ/why_no_lisp_jobs.html

Erik Naggum and Why There Isn't An Ocean of “Lisp Jobs”

Xah Lee, 2010-08-03

Discovered a blog article, that summarizes some of Erik's ideas in 28 quotes. The quote headings are:

  • On the Free Software movement
  • On how C “feels fast”
  • On “Worse is Better” (aka the New Jersey Approach)
  • A reply to any programmer who sticks to C because of “speed”
  • On the value of reading Open Source code
  • On markets and “giving people what they want”
  • On the decline of professional equipment for programming
  • On the wastefulness of language proliferation
  • On the “Imponator”
  • On the deficiencies of HTML
  • On the decline of programming as a serious professional field
  • On the lack of ads for “Lisp jobs”
  • On the “Y2K Problem”
  • On why there isn’t an ocean of “Lisp jobs”
  • On parentheses-phobia
  • What killed micropayments
  • On “CD-R brains”
  • On programmers with the “poor farmer” mentality”
  • On market fragmentation
  • On how sharing source may discourage design flexibility
  • On the idiotic fallacy that “a good programmer shouldn’t care about language choice”
  • On conformism
  • On “manual-inches”
  • Reply to someone who complained about the cost of ANSI Standard documents
  • On how certain languages discourage conscientious programming
  • On labor unions
  • On how the corporate dead can prey on the living

The Wisdom of Erik Naggum (2010), by Stanislav Datskovskiy. At Source.

Erik's writings are often too much abuse and rambling, but Stanislav's selective quotes presents his ideas very well. Though, i must say most of Erik's writings stand as wisdom or pithy quotes only. They lacks academic depth. For broad scholars, i'd say most of Erik's ideas are common sense. What lacks that would make much of his ideas more useful is in-depth analysis or further research.

For example, in «On why there isn’t an ocean of “Lisp jobs”», Erik compared to the fact that there's not much job listing for neurosurgeons. Yeah, it makes you see a point. But that's about it. if you delve into this, either there's no depth to it, or, would lead to many years of research on multiple facets. For example, first of all, intelligent person really won't be asking a dumb question as “why there's no lisp jobs” as the way Erik answered it. Now, if you ask the question why there's not much job listing for neurosurgeons... the answer is quite complex. First of all, actually i'm sure there are a lot job listings for neurosurgeons. You just need to look into the right community or place. So the question is more about why there's no job listings for neurosurgeons in a general job board. Of course, that became a dumb question. So, at this point, to make something out of Erik's writing, it might be about research on the history job listings, survey of job boards, report on the categorization of job and careers of past 200 years, documenting the types of job boards there are. Statistical info on lisp jobs in general programing job boards thru the years, comparison of programing language mention frequency in job boards thru recent years... Erik's writings usually doesn't contain any substance of this sort.

In fact, some of Erik's ideas, being so short as they are, borders on being incorrect. So, why there's no ocean of lisp jobs? Of course, the answer is because lisp language is dead, and is not used much in the industry. At the height of lisp days in the 1980s, i'm sure there's lots lisp jobs. The meat behind the question “why there's no lisp jobs” is really from the implied premises that lisp is a powerful quality language. So, the question is a disguised form of “why a powerful language isn't used in the industry?”. In this question, the first thing to ascertain is whether lisp is such a great language at all. This question immediately present a problem for scholarly discussion. It's too broad and meaningless. Even if you agree to some degree that lisp is “just great”, there are so many factors that shapes society. e.g. timing, marketing, political stability, economic situation... nothing to do with the quality of the language itself. Concerning the language, there are also factors not related to computer-science, e.g. maybe lisp syntax with its nested parens ultimately is un-friendly or costy for average programers to get accustomed to? So, you see, when looked in depth, “wisdom” type of writings is good just to make a point. Academically, they fall apart into mundane facts or irrelevance.

The blog author Stanislav actually linked me in his block roll. Thanks!

Hyper+Shift+q is ghosted key

Perm url with updates: http://xahlee.org/comp/blog.html


Discovered a dead key. In emacs, i have the Menu key set as Hyper, and i have “Hyper+Shift+q” as a shortcut to some command. However, Microsoft ergonomic 4000 keyboard simply does not register that combination when right shift is used. But left shift works. See also: Keyboard Ghosting; How Many Keys Your Keyboard Can Take?.

HP-28S Advanced Scientific Calculator

Perm url with updates: http://xahlee.org/prog/hp28s/hp28s.html

HP-28S Advanced Scientific Calculator

Xah Lee, 2006-07

My First Program and the 8-Queens Puzzle

In about 1991, i bought the HP-28s calculator for something like $250. It was introduced in 1988 and is the first calculator that is capable of symbolic computation. For example, you can use it to solve a quadratic equation symbolically. And, it is also one of the first graphing calculator, if not the very first. This is a RPN calculator, and is also a programable calculator.

HP-28S photo

The HP-28s calculator. (image source: The Museum of HP Calculators by David G Hicks.)

It is actualy the HP-28s that i did my first programing. I never took any programing course, but am a avid learner of math and computer stuff. I read the manuals from cover to cover.

My first program is a program to solve the Eight queens puzzle. It was a puzzle posted to CompuServe's math forum. At the time, i'm also a crazy fan of recreational math. I took it upon myself to solve this by programing my super calculator to automatically generate the solution.

The 8-queens puzzle is typically solved by a back-tracking algorithm. This is what i did, even though at the time i know nothing about computer science or programing. (see: Xah Lee's Computing Experience Bio) Also, a couple years later i realized, that there is a bug in my program. That is, my program misses some solutions.

Here's my code for the 8-queens puzzle:

HP-28S manual cover

HP-28S Advanced Scientific Calculator Owner's Manual (1988). amazon

Music Chord Program

Around 1991, i'm taking music classes. One of the things in music theory and training, is to understand the various chords, and being able to identify by ear. The HP-28s is capable of playing simple beeps of various frequencies. Thus, i actually wrote a relatively large program that plays musical chords and scales.

What follows below is a introduction from the documentation i wrote:

These programs can spell and play any triad or seventh chords. You type-in a chord and have the calculator to play it by pressing PLAY1, PLAY2, PLAY3 or spelled out by pressing SPELL. By pressing CHORD, HP-28 will generate a triad or 7th chord randomly. For example, you key in "A M " and press PLAY1, HP-28 will play a A major triad.

(Enharmonic chords with roots on E#, B#, Fb, Cb are not generated by CHORD but can be arguments of SPELL or PLAY. Enharmonic chords using double sharp or double flat as roots are not generated nor recognized. These programs can be used on HP-28s (and probably would work in HP-48s, HP-48sx, HP-48G, and HP-48GX models).

Chords to be PLAYed or SPELLed must be typed in as a string format: "Note" + "AccidentalSign" + "Quality". For example, A sharp major 7th is entered as "A#M7". A major triad is entered as "A M ".

Here is a table showing all the chords starting with roots of A, Ab, and A#. Chords starting with other keys are similarly entered.


"M" = Major
"m" = minor
"+" = augumented
"h" = half-diminished.
"∞" = dimished
    Spaces in the string can be left out.

This system of programs also allows you to key in the duration of each note to be played, in increment of 1/100th seconds. You can also change the ratio between adjacent notes to get 24 note per octave micro turning or other strange effects. To do so, simply change the value stored in DUR or R. For more information, see the variable diagrams in Section 3 of this book. This system will be expanded in later version. The following functions are good candidates for expansion: play chord progressions, play scales, identify chords, invert/retrograde/augument/diminition of melodies, metronome, tuning machine. Readers are welcome to send in their .expansion programs.

You can download the full documentation and program here: HP-28S_music_chords.doc.zip . The file is a Microsoft Word document, which you can open with the free OpenOffice.org software.

Misc Programs

I've wrote a bunch of other simple programs that helps me study math in college. Here they are, in image format from screenshot of Microsoft Word doc around 2000.

Mulan Ballad

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/pd.html


Got a email today from a author asking permission to quote a commentary i made on a poem.

The poem is: 木蘭辭 (Mulan Ballad). (yes, Disney made a animation out of it) He is writing a book about the poem. (in Spanish for Spanish communities) The requested quote is:

Basically, the entire Mulan fable stems from this ballad. Note the ridiculousness of it. How can a girl, in military for 12 years, and fellow soldiers do not realize that she is a female? If so, she must be very unusual and manly. In modern times, she'd be a butcher dyke, or medically and psychologically certified transsexual.

Am delighted.

Note that this article is also cited in a book: Linguaggio e genere: grammatica e usi (2006), By Silvia Luraghi, Anna Olita. (ISBN 8843039261, 9788843039265) . The title in English is: “Language and gender: grammar and usage”.

Facebook: Every Link is Tracked

Perm url with updates: http://xahlee.org/js/facebook_ethics.html


Addendum. News:

100 million Facebook pages leaked on torrent site at thinq.co.uk.

Every Link is Tracked


Fuck Facebook. Every link on Facebook is tracked. So, when you click, it goes to Facebook itself, then redirect you. And with cookies, of course they know everything you clicked, and who clicked what url of every url on Facebook.

I noticed this practically... long story long: i use multiple browsers at the same time, one with cookies on sites i have a account, and another browser for general browsing purposes. I use Google Chrome as my cookied browser, and Firefox as generic. So, when i want to see url on Facebook, i right click to copy the link, then with keyboard macros i've setup i press a button and the url is opened in Firefox.

However, with fucking Facebook links, i don't get the destination url but a Facebook page warning me about the danger. Here's a example:

facebook url tracking warn

The page that results from a url displayed on Facebook, by right click to copy the url then paste in a another browser.

Here's the text:

Be careful

For the safety and privacy of your Facebook account, remember to never
enter your password unless you're on the real Facebook web site. Also
be sure to only download software from sites you trust.

To work around this, i have to actually copy the url text as shown on the page by dragging to select the text. This is a more manually labor intensive maneuver and error prone. In some cases the url isn't displayed. In general, just didn't have good experience when i want to see links linked from Facebook.

You might think i'm too idiosyncratic in my computer use, or too weird in my complaints, or that i could simply stop using Facebook... i have lots to say about this but you are right. Though, one wonders why Facebook does such a link redirect anyway? First of all, tracking links can be done transparently with javascript, so a hard-coded redirect that goes back to Facebook server is technologically lame. But business wise, of course Facebook does it to gather info to sell. Now, the commercial aspect of this itself i don't oppose, after all, you are not forced at gun point to use Facebook. But having done research on Facebook history (see http://xahlee.org/js/Facebook_ethics.html ) the Facebook is really a scumbag. I think the whole Facebook ways must be the direction of that college boy fuckface Mark Zuckerberg.

So why don't i stop using it? No, i will keep using it. That's what i do. I use you, and abuse you, in proportion to how i see you in my eyes. haha. Put in a positive light, this is called, say, raising awareness, public education, non-violent civil disobedience or unconformalism.


logo design and gallery of software industry

Perm url with updates: http://xahlee.org/logo_design/index.html

Logo Design and Software Industry

The following is a index of essays related to logo graphics design, and galleries. In particular, logos in the software industry.

The Purpose of Logos and Principles of Logo Design

Chthonic Syndicate military in Casuals (Second Life; video)

Perm url with updates: http://xahlee.org/sl/blog.html

Second Life military group Chthonic Syndicate's memebers in casuals, at the new sim Hydros. 2010 Aug. Mayra is the admiral. Arvid is the vice admiral. Want hot chicks? join CS.

See also: Second Life Military Videos, Furry Soldiers (images).