2010-04-17

emacs: calculating dates, find holidays

Little tips about calculating dates.

I needed to find the date of 2010-04-17 minus 200 days. How do you do it in emacs?

Start calendar mode by tying “Alt+x cale Enter”. In calendar mode, the left arrow moves you back. But it also takes a universal argument of n to go back n days. So, type “C-u 200 ←” will put you 200 days back.

When your cursor is in the calender pane, there are these new menus: Scroll, Goto, Holidays, Diary, Sun/Moon. Check them out! I've been using emacs for 12 years, but never realized this!

PS thanks to people on comp.emacs, in particular Jason Rumney.

The Moronicities of Typography

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

The Moronicities of Typography

Xah Lee, 2007-10, 2010-08-13

This article discusses some issues in typography, especially those related to the dash and quotation marks

I've had some interest in typography since early 1990s of the Mac's Desktop publishing era. Basically, i avidly read books about fontography in libraries or Mac magazines such as Mac User or Mac World, and played with fonts and math typesetting in software such as Microsoft World and Mathematica, including reading Knuth's book on typography and using his TeX system, reading about font technology such as TrueType . So, i am generally acquainted with the concepts and issues of typography, though never worked in any professional area related to it.

I'll have to say, the entire typographical efforts and establishment is rather largely a waste of time, similar in the sense that some “artistic” circles chalks up photography as high art, or that grammarians and pedants have voluminous and vociferous writing style guides and guilds.

Some of the most fartful things the typography-sensitive crowd discuss or distinguish are: hyphen, en-dash, em-dash, ligature, kerning, font “design”.

In general, the function of typography is mainly about issues in printing with respect to the facilitation of reading. So, the major issues involved are: line length, line spacing, serif and sans serif fonts, margin, font sizes, and these pretty much are about it. But since how things are rendered on paper does create differences in the sense of esthetics, sometimes rather pronounced difference, thus typography does indeed have some esthetical elements. However, this is blown out of proportion to stupendous profundity.

Hyphen and Dashes

Look at these guilded morons go:

Traditionally an em dash—like so—or spaced em dash — like so — has been used for a dash in running text. The Elements of Typographic Style recommends the more concise spaced en dash – like so – and argues that the length and visual magnitude of an em dash "belongs to the padded and corseted aesthetic of Victorian typography". The spaced en dash is also the house style for certain major publishers (Penguin, Cambridge University Press, and Routledge among them). However, some longstanding typographical guides such as The Chicago Manual of Style still recommend unspaced em dashes for this purpose. The Oxford Guide to Style (2002, section 5.10.10) acknowledges that ...

The above is from Wikipedia Dash.

Here's my own rule regarding the use of dash: There are 2 kinds: the short dash and the long dash. For the short one, press the “-” key on your keyboard. For the long one — as a punctuation mark for embedded thought — press it twice. That's it. Simple and functional. (personally, in my writings published on my site, i replace the double dash by a em-dash “—” only because it is prettier, but don't consider it important)

The character “-” you type on your keyboard is the ASCII 45. The character is named “hyphen” in the ASCII standard, but is “hyphen-minus” in Unicode. (because Unicode has now proper code points for hyphen, figure-dash, en-dash, em-dash, (math) minus, and quite a few others)

As to the typographer's senses and sensibilities about how figure-dash should be used for numbers and en-dash is used for ranges and em-dash is for punctuation and hyphen is for word-breaking ... etc, i regard them pretty much all as trifles produced by morons who's brain is inadequate to sense or tackle the depth of logic and mathematics of languages and structures but fell into a niche of diddling and went on to procure their efforts to heighten themselfs among human animals.

Hypen and Narrow Columns

As for hyphen, as in “breaking a word for words near the margin”, my general advice is to abolish such practice. But what to do in a narrow column of text? My general advice is to abolish the practice of layout using very narrow columns. A related concept here is typographical Justification. My general advice here is to abolish the practice of justification entirely. (leave it jagged at one end; actually as esthetically superior. (and factually functionally superior with regards to reading-facilitation))

The typographic conventions of ligatures (as in adjoining certain letter combinations such as “fi”) should also be abolished.

Quotation Marks

Related here is the quotation mark. If you read Wikipedia Quotation mark, non-English usage, you'll see that there are huge variations. Here's some sample characters used for quotations and their Unicode names.

left/right-pointing double angle quotation:«» single left/right-pointing angle quotation:‹› left/right double quotation mark:“” left/right single quotation mark:‘’ left/right white lenticular bracket:〖〗 left/right black lenticular bracket:【】 left/right corner bracket:「」 left/right white corner bracket:『』 left/right angle bracket:〈〉 left/right double angle bracket:《》 double high-reversed-9 quotation mark: double low-9 quotation mark: single low-9 quotation mark:

Here's a list of conventions of using the double curly quotes:

  • „…“ German, Bulgarian, Croatian, Czech, Estonian, Icelandic, Lithuanian, Romanian, Serbian, Slovak, Slovene, Sorbian...
  • “…” English, American, Irish ...
  • „…” Dutch, Polish, Hungarian, ...
  • ”…” Swedish, Finnish ...

Ain't it bizarre?

For some languages, such as Chinese, it is rational how it developed into using symbols that are different from European languages's curly quotation marks (e.g. 『』「」《》〈〉【】〖〗〔〕). However, among european langs, there are extreme diversity in using the curly quotation marks. Even the American and English reverse the purpose of the single and double quotes. Some lang reverses the semantics of the left/right pair, some lang positions the mark at the bottom instead of top, same lang places them in opposite corners (as opposed to both on top), some lang uses the same symbol to enclose the quoted text.

One thing interesting about the curly double quotation mark pair is that the two symbols are not bilateral symmetric, but is rotational symmetric. That is, if you rotate the left one 180 degrees, you get the right one. Most other matching pairs chars “([{«〖《” are bilaterally symmetric (i.e. there is a horizontal line of mirror reflection). The fact that the curly quotes are rotational symmetry only, must have contributed significantly the weird diversity in their role as the choice in the opening/closing mark and whether to position them level or facing corners. (Note that the Chinese brackets 「」『』 also lack a bilateral symmetry, however, their box-corner shape intuitively and uniquely define their placements.)

Combinatorial Possibilities

This glyph (unicode 8220) points upper-right. This glyph can be mirrored in a vertical line or horizontal line to create the matching variation, a total of 4 possibilities (think of p q b d).

Here are the different pointing curly quotes from Unicode: “ ” ‟

In Unicode, i couldn't find one that is pointing to upper-left. This is somewhat curious. I created one with image here just for the illustration: double curly quote upleft.png.

The quotation mark can be placed on the upper baseline of the text (as in English convention) or lower baseline (as in the beginning quotation mark in German convention), a total of 2 possibilities.

So, 4 choices of glyph orientation, 2 possible positions, that's 8 possibilities for the opening quote. Same for the closing quote. So, the total quotation punctuation convention using the double curly quote is 8x8=64.

It is a good thing that this hasn't been exploited.

How it should be

The function of quotation marks is to demarcate text, and as such delimiters, it should be a matching pair such as ()[]{}, and it should have no more than a bilateral symmetry to reflect the natural one-dimensional (left and right) of written text (or, up/down in Asian langs).

If we can rewrite convention or restart history, i'd say we all just use simple left/right pairs such as ()[]{}<>. Since these already have a purpose, then we could use ‹›«»〈〉《》【】〖〗. The French is actually the most sensible here, their quotation convention is with ‹›«». (though, other countries using these glyphs for quotation also revere direction or use the same glyph for both opening and ending. This is idiocy gone berserk.)

But since we cannot restart history nor do we want to break convention radically because we'd create confusion, what i do today personally of writings published on my website, is to use the most ubiquitous convention, the American convention “like this”. (I experimented in using the French convention of «double angle brackets» thru-out, but that turns out to be too in-your-face for English readers)

Straight Quotation Marks

It is unfortunate, thru the historical development of the typewriter and the computer keyboard and ASCII, that our keyboard doesn't have the proper matching curly quotes, but instead, has the straight quotes. Here's the symbols and their given Unicode name:

quotation mark (ASCII 34):" apostrophe (ASCII 39):'

This creates a problem because it forces us to use the same symbol for a purpose that naturally calls for a matching pair. Using a single symbol is harder to read. Further, it causes global damage when one is missing (e.g. caused by typo, transmission error).

It would've been better, if the typewriter was designed with a matching ‘single curly quote’. This way, the matching property is solved and double quotes can be created by typing twice.

A lot documents in the computing world sticks with a convention by using the back tick (ASCII 96) ` for left curly single quote and the ASCII 39 ' for the right single curly quote, and repeat them for the double version. So, it's like ``this'' and `this'. In particular, this style is used by the Free Software Foundation in their GNU Project.

grave accent (ASCII 96):`

Although this workaround solves a semantic problem in a technical writing context, i think it is rather unnecessary and ugly. For a workaround with the constraint of ASCII for a matching quote, i would have adopted something more symmetric such as ('this') maybe or {'this'} or -'this'-. But the problem with the GNU is that even today, in 2007, where curly quotes have been widely available in word processors for over a decade (and Unicode have been practical and widely available for at least 5 years), they are still using plain ASCII hacks. (in general, GNU and the Open Source morons have like a 5 to 10 years lag in adopting technology, for reasons that are inadvertently intentional and or simply incapable)

No Ending Quotation Marks in Long Paragraphs

There is a very stupid convention used in novel printing. In novels, often a long paragraph is entirely a character's dialog. So, logically, the whole paragraph would be enclosed in matching quotes, and if there are a series of such paragraphs, each and every should be enclosed in matching quotes. However, this is not done because it is considered repetitious. The typography convention is to not use any ending quote, if the quoted text is long. So, we'd have a series of paragraphs that all starts with a opening quote, but is never closed.

This is another moronicity of the typographers. Such irregular tampering starts to show its problems in the computing era. Generally speaking, it makes it difficult to process the text and creates ambiguities, both for human and for machine.

Curly vs Straight Apostrophe

Another moronity in our subject, is about the choice fo glyph for apostrophe as a punctuation in English writing. For example «I'd», «he's», «James'». This is a rather big subject to tackle, dragging in the bag of grammarians and stylists and their guilds and guides and rules and exceptions, but i'll just focus on the typographical aspect of whether to use the straight quote or the curly one «I’d», «he’s», «James’».

RIGHT SINGLE QUOTATION MARK (Unicode 8217): APOSTROPHE (ASCII/Unicode 39):' PRIME (Unicode 8242):

Typically, the issue is that people were using the straight version because the curly one isn't available on the keyboard. However, in my opinion, we should not use the curly version for the apostrophe. Because, the single curly quote already has a logical and conventional semantics. It is used as a matching pair for nested quotes. By using the same character for both apostrophe and closing quote, it confounds the meaning, increase the cost of computation on texts. (e.g.: «“i said: ‘he’s’.”») But also, the nature of apostrophe in no way calls for a slanted glyph.

The reason curly was the convention, is because actually we wanted a slanted apostrophe, however, the slanted version of apostrophe, the unicode char named “Prime”, is not conveniently available, while most word processors today has curly quote. We wanted a slanted one, because that's how we write it by hand. We write it by hand slanted, because that's easier, because most people are right handed, and a vertically straight one is too easy to be confused with I or 1. This is why, in print on on-screen, curly one became the convention for apostrophe.

The gist of this is that if we want to demarcate a text, the symbol used should be a matching pair, and if the semantics does not require a matching pair, we should not be using matching pair. Further, preferably, each symbol should not be used for multiple purposes.

Human Furniture

Perm url with updates: http://xahlee.org/sex/human_furniture.html

Human Furniture

Xah Lee, 2010-04-17

Some collection Human furnitures.

All the wooden furnitures you see here are build by Mario Philippona. (they are for sale at his site: sexyfurniture.nl )

breast cupboard2

More photos: Breast Cupboard.

breasts basket

Breasts basket.

ballet lamp

More photos and video: Ballet Lamp.

legs drawer legs drawer rear

Legs drawer.

legs table2

More photos: Legs Table.

torso cupboard

More photos: Torso Cupboards.

Here's my favorite:

pussy table

Pussy coffee table.

“Origin”

2010-04-16

Postures of Female and Male

Perm url with updates: http://xahlee.org/arts/postures_of_female_n_male.html

Postures of Female and Male

Xah Lee, 2010-04-16

daz3d

A online ad appearing at Source on 2010-04-16. The ad points to Source.

My point in showing this ad is that i had the idea to collect ads that shows the relationship of the sexes. Majority of ads, show attractive female (e.g. as opposed to attractive male). And, this heroic male holding a unconcious female is a common motif. They are everywhere, especially in cover arts for comics, movie posters. Or, typically the female kneels, sits, besides a outstanding hero.

It would be fruitful, to take a survey, of collecting thousands of cover artworks that primarily feature a female and a male. Then, remove the background, color, faces, hair, and body shapes, so it is simply a outline of 2 human bodies, showing their posture and relative position to each other. Then, either by human animals or computer analysis, i think one can usually easily tell which one is male and female.

The point of this study is that, it can give us some insight about the relation of male and female human animals, thru their postures and gestures when together.

Such study can easily be broadened. Instead of surving art covers, we survey all common photos taken by average people. (e.g. thru online personal photo sites such as flikr) This way, the result gives us a definitive characteristics of postures of sexes and their posture proximity relationship. And thru the postures, it has various conections to psychology of the sexes, and of course the physiology of the sexes.

More broadly, such study can be categorize by culture. For example, such survey of photos of North American people would certainly differ from Asian people, and certainly different from Middle East people.

Due to tech advances, digital cameras, and photos sites are increasing by some exponential rate, and as well as image analysis software (such as face recognition and place recognition). I'm certain, that studies similar to the above would take place in the next decade. Though, in my mind i felt that the result of this study seem obvious as to not warrant the time and effort.

xahlee.org on Hacker News, Reddit, Delicious

2010-04-16

Discovered that one of my essay appeared on Hacker News again. Here are the essays that have appeared on Hacker News:

There are about 20 or so posts mentioning my name or site. See: Google searh “site:news.ycombinator.com xah lee”.

See also: Hacker News, Xahlee.org, and What is Politics?.

XahLee.org on Reddit: http://www.reddit.com/domain/xahlee.org/

XahLee.org on Delicious: http://delicious.com/search?p=site:xahlee.org

Note: i've never submitted my site to any of these sites. For those who found my article interesting and submitted them, i appreciate it very much, even critical comments. Thank you.

Here's Reddit's dynamic widget:

2010-04-15

Second Life Keyboard Shortcuts Cheatsheet

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

Second Life Keyboard Shortcuts Cheatsheet

Xah Lee, 2010-04-15

This page lists all keyboard shortcuts for Second Life viewer 2.

Second Life keyboard-m-s

Second Life keyboard. By “Prad Prathivi @ Amodica”. Source

Common Standard Shortcuts

ShortcutMenu LocationNotes
F1Help ‣ Second Life Help
Ctrl+QMe ‣ Quit
Ctrl+PMe ‣ Preferences
Ctrl+ZBuild ‣ Edit ‣ Undo
Ctrl+YBuild ‣ Redo
Ctrl+XBuild ‣ Edit ‣ Cut
Ctrl+CBuild ‣ Edit ‣ Copy
Ctrl+VBuild ‣ Edit ‣ Paste
Ctrl+WAdvanced ‣ Shortcuts ‣ Close Window
Ctrl+Shift+WAdvanced ‣ Shortcuts ‣ Close All Windows

General

ShortcutMenu LocationNotes
DelBuild ‣ Edit ‣ Delete
EscAdvanced ‣ Shortcuts ‣ Reset View

Move, Navigation

ShortcutMenu LocationNotes
Wforward
Sbackward
ATurn Left
DTurn Right
Shift+ALeft
Shift+DRight
Page UpJump
Page DownCrouch

The arrow keys is equivalent to W A S D keys.

ShortcutMenu LocationNotes
HomeAdvanced ‣ Shortcuts ‣ FlyToggle fly.

Chat

ShortcutMenu LocationNotes
Enter~(focus to chat bar)
Ctrl+HCommunicate ‣ Nearby Chat
Ctrl+Shift+ACommunicate ‣ Nearby People
Ctrl+\Advanced ‣ Shortcuts ‣ Look at Last Chatter
Ctrl+RAdvanced ‣ Shortcuts ‣ Always Run
MAdvanced ‣ Shortcuts ‣ Mouselook

Inventory, Friends, Gestures, Search, Maps...

ShortcutMenu LocationNotes
Ctrl+IMe ‣ My Inventory (sidebar)
Ctrl+Shift+FCommunicate ‣ My Friends
Ctrl+Shift+IMe ‣ My Inventory (separate window)
Ctrl+FAdvanced ‣ Shortcuts ‣ Search
Ctrl+Shift+HWorld ‣ Teleport Home
Ctrl+Shift+MWorld ‣ Mini-Map
Ctrl+MWorld ‣ World Map
Ctrl+GMe ‣ My Gestures
ShortcutMenu LocationNotes
Alt+Shift+FAdvanced ‣ Shortcuts ‣ Joystick Flycam
Ctrl+Shift+YWorld ‣ Sun ‣ Midday
Ctrl+Shift+NWorld ‣ Sun ‣ Sunset
Ctrl+Shift+SWorld ‣ Snapshot
Ctrl+`Advanced ‣ Shortcuts ‣ Snapshot to Disk

Advanced Play, Combat

ShortcutMenu LocationNotes
Ctrl+0Advanced ‣ Shortcuts ‣ Zoom In
Ctrl+9Advanced ‣ Shortcuts ‣ Zoom Default
Ctrl+8Advanced ‣ Shortcuts ‣ Zoom Out
Ctrl+Alt+RAdvanced ‣ Rebake Textures
Ctrl+Alt+GDevelop ‣ Request Admin StatusLets you fly in no-fly zone.
Ctrl+Alt+Shift+GDevelop ‣ Leave Admin Status
ShortcutMenu LocationNotes
Ctrl+Alt+F6Advanced ‣ Rendering Features ‣ Fog
Ctrl+Alt+F9Advanced ‣ Rendering Features ‣ Flexible ObjectsIncrease FPS
Advanced ‣ Performance Tools ‣ Show Avatar Rendering Costincrease visibility of avatar in combat
Develop ‣ Rendering ‣ Animation TexturesIncrease FPS
ShortcutMenu LocationNotes
Ctrl+Alt+Shift+3Advanced ‣ Rendering Types ‣ Tree
Ctrl+Alt+Shift+7Advanced ‣ Rendering Types ‣ Water
Ctrl+Alt+Shift+9Advanced ‣ Rendering Types ‣ Volume
Ctrl+Alt+Shift+0Advanced ‣ Rendering Types ‣ Grass
Ctrl+Alt+Shift+-Advanced ‣ Rendering Types ‣ Clouds
Ctrl+Alt+Shift+=Advanced ‣ Rendering Types ‣ Particles
Ctrl+Alt+Shift+\Advanced ‣ Rendering Types ‣ Bump

Build

ShortcutMenu LocationNotes
Ctrl+ABuild ‣ Edit ‣ Select All
Ctrl+EBuild ‣ Edit ‣ Deselect
Ctrl+DBuild ‣ Edit ‣ Duplicate
BBuild ‣ Build
Ctrl+1Build ‣ Select Build Tool ‣ Focus Tool
Ctrl+2Build ‣ Select Build Tool ‣ Move Tool
Ctrl+3Build ‣ Select Build Tool ‣ Edit Tool
Ctrl+4Build ‣ Select Build Tool ‣ Create Tool
Ctrl+5Build ‣ Select Build Tool ‣ Land Tool
GBuild ‣ Options ‣ Snap to Grid
Shift+XBuild ‣ Options ‣ Snap Object XY to Grid
Shift+GBuild ‣ Options ‣ Use Selection for Grid
Ctrl+Shift+BBuild ‣ Options ‣ Grid Options
Ctrl+LBuild ‣ Link
Ctrl+Shift+LBuild ‣ Unlink
HBuild ‣ Focus on Selection
Shift+HBuild ‣ Zoom to Selection
Ctrl+.Build ‣ Select Linked Parts ‣ Select Next Part
Ctrl+,Build ‣ Select Linked Parts ‣ Select Previous Part
Ctrl+Shift+.Build ‣ Select Linked Parts ‣ Include Next Part
Ctrl+Shift+,Build ‣ Select Linked Parts ‣ Include Previous Part
Ctrl+Alt+TAdvanced ‣ Highlighting and Visibility ‣ Highlight Transparent
ShortcutMenu LocationNotes
Ctrl+U Advanced ‣ Shortcuts ‣ Image (main)

Sim Owners

ShortcutMenu LocationNotes
Ctrl+Shift+1Advanced ‣ Performance Tools ‣ Statistics Bar
Ctrl+Alt+Shift+PWorld ‣ Show ‣ Property Lines
Ctrl+Alt+Shift+NWorld ‣ Show ‣ Beacons
Alt+Shift+HAdvanced ‣ Highlighting and Visibility ‣ Show HUD Attachments

Scripter, Developer

ShortcutMenu LocationNotes
Ctrl+Shift+3Develop ‣ Consoles ‣ Texture Console
Ctrl+Shift+4Develop ‣ Consoles ‣ Debug Console
Ctrl+Shift+9Develop ‣ Consoles ‣ Fast Timers
Ctrl+Alt+Shift+1Advanced ‣ Rendering Types ‣ Simple
Ctrl+Alt+Shift+2Advanced ‣ Rendering Types ‣ Alpha
Ctrl+Alt+Shift+3Advanced ‣ Rendering Types ‣ Tree
Ctrl+Alt+Shift+4Advanced ‣ Rendering Types ‣ Character
Ctrl+Alt+Shift+5Advanced ‣ Rendering Types ‣ SurfacePatch
Ctrl+Alt+Shift+6Advanced ‣ Rendering Types ‣ Sky
Ctrl+Alt+Shift+7Advanced ‣ Rendering Types ‣ Water
Ctrl+Alt+Shift+8Advanced ‣ Rendering Types ‣ Ground
Ctrl+Alt+Shift+9Advanced ‣ Rendering Types ‣ Volume
Ctrl+Alt+Shift+0Advanced ‣ Rendering Types ‣ Grass
Ctrl+Alt+Shift+-Advanced ‣ Rendering Types ‣ Clouds
Ctrl+Alt+Shift+=Advanced ‣ Rendering Types ‣ Particles
Ctrl+Alt+Shift+\Advanced ‣ Rendering Types ‣ Bump
Ctrl+Alt+F1Advanced ‣ Rendering Features ‣ UI
Ctrl+Alt+F2Advanced ‣ Rendering Features ‣ Selected
Ctrl+Alt+F3Advanced ‣ Rendering Features ‣ Highlighted
Ctrl+Alt+F4Advanced ‣ Rendering Features ‣ Dynamic Textures
Ctrl+Alt+F5Advanced ‣ Rendering Features ‣ Foot Shadows
Ctrl+Alt+F6Advanced ‣ Rendering Features ‣ Fog
Ctrl+Alt+F8Advanced ‣ Rendering Features ‣ Test FRInfo
Ctrl+Alt+F9Advanced ‣ Rendering Features ‣ Flexible Objects
Ctrl+Alt+Shift+TDevelop ‣ Rendering ‣ Selected Texture Info
Ctrl+Shift+RDevelop ‣ Rendering ‣ Wireframe
Ctrl+Shift+ODevelop ‣ Rendering ‣ Object-Object Occlusion
Ctrl+Alt+FDevelop ‣ UI ‣ Dump Focus Holder (no shortcut)
Ctrl+Shift+PDevelop ‣ UI ‣ Print Selected Object Info
Shift+PDevelop ‣ UI ‣ Print Agent Info
Ctrl+Alt+Shift+MDevelop ‣ UI ‣ Memory Stats
Ctrl+Alt+LDevelop ‣ Network ‣ Drop a Packet
Ctrl+Alt+Shift+UDevelop ‣ Show Info ‣ Show Updates to Objects
Ctrl+Alt+VDevelop ‣ Show Admin Menu (no shortcut)
Ctrl+Alt+Shift+OAdmin ‣ Object ‣ Take Copy
Ctrl+Alt+Shift+DelAdmin ‣ Object ‣ Delete
Ctrl+Alt+Shift+LAdmin ‣ Object ‣ Lock
Ctrl+Alt+Shift+IAdmin ‣ Object ‣ Get Asset IDs
Ctrl+Alt+Shift+CAdmin ‣ Parcel ‣ Set to Linden Content
Ctrl+Alt+QAdvanced ‣ Develop Menu
Ctrl+Alt+Shift+HDevelop ‣ Consoles ‣ Badge

Difference from Viewer 1

Here are the shortcuts from Viewer 1 that's gone in Viewer 2.

ShortcutMenu LocationNotes
Ctrl+Shift+GShow Groups
Ctrl+TToggle IM window
Alt+EnterAdvanced ‣ Shortcuts ‣ Toggle Fullscreen (no shortcut)

Palpatine: The Portrait of a Perfectect Sociopath and Master Politician

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

Palpatine: The Portrait of a Perfectect Sociopath and Master Politician

Xah Lee, 2010-04-13

Few of my favorite scenes from Star Wars.

Good is a Point of View

Amazing. Palpatine, the master salesman. Watch carefully his intonations, the way he pauses his speech. And, every nuance of his facial expressions. At critical points, he turns and exams carefully his subject's reactions.

Here's the transcription:

ANAKIN: You wanted to see me, Chancellor.

PALPATINE: Yes, Anakin! Come closer. I have good news. Our Clone Intelligence Units have discovered the location of General Grievous. He is hiding in the Utapau system.

ANAKIN: At last, we'll be able to capture that monster and end this war.

PALPATINE: I would worry about the collective wisdom of the Council if they didn't select you for this assignment. You are the best choice by far ý but, they can't always be trusted to do the right thing.

ANAKIN: They try.

PALPATINE: Sit down, (to his aides) Leave us.

PALPATINE: (continuing) Anakin, you know I'm not able to rely on the Jedi Council. If they haven't included you in their plot, they soon will.

ANAKIN: I'm not sure I understand.

PALPATINE: You must sense what I have come to suspect... the Jedi Council want control of the Republic... they're planning to betray me.

ANAKIN: I don't think...

PALPATINE: Anakin, search your feelings. You know, don't you?

ANAKIN: I know they don't trust you...

PALPATINE: Or the Senate... or the Republic... or democracy for that matter.

ANAKIN: I have to admit my trust in them has been shaken.

PALPATINE: Why? They asked you to do something that made you feel dishonest, didn't they?

PALPATINE: (continuing) They asked you to spy on me, didn't they?

ANAKIN: I don't know ... I don't know what to say.

PALPATINE: Remember back to your early teachings. Anakin. “All those who gain power are afraid to lose it.” Even the Jedi.

ANAKIN: The Jedi use their power for good.

PALPATINE: Good is a point of view, Anakin. The Sith and the Jedi are similar in almost every way, including their quest for greater power.

ANAKIN: The Sith rely on their passion for their strength. They think inward, only about themselves.

PALPATINE: And the Jedi don't?

ANAKIN: The Jedi are selfless. They only care about others.

PALPATINE: Did you ever hear the tragedy of Darth Plagueis “the wise”?

ANAKIN: No.

PALPATINE: I thought not. It's not a story the Jedi would tell you. It's a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midi-chlorians to create... life. He had such a knowledge of the dark side that he could even keep the ones he cared about from dying.

ANAKIN: He could actually save people from death?

PALPATINE: The dark side of the Force is a pathway to many abilities some consider to be unnatural.

ANAKIN: What happened to him?

PALPATINE: He became so powerful... the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic, he could save others from death, but not himself.

ANAKIN: Is it possible to learn this power?

PALPATINE: Not from a Jedi.

Consider All Aspects

Listen to him talk. The wisdom, the honesty, the confidence. Such a riveting attraction.

One of the quote is worth mentioning:

If one is to understand the Great Mystery, one must study all its aspects, not just the dogmatic narrow view of the Jedi.

This reminds me, the point of view of the Church, especially of the Middle Ages.

And in real life, that dogmatic view, today, in USA, a view so powerful that anyone who says otherwise is to be condemned, is “equality”, “human rights”.

Darth Sidious the Sociopath

Darth Sidious killing Jedi.

Look at this character. A smooth operator, and master of swordplay as well. In 10 seconds, kills 3 Jedi knights. Watch this nutty fellow during the sword fight. The angry thrusts, cries, lunatic grimaces. Then, in a sudden twist, his appearance becomes of the weakling, the beggar. A supplicant for mercy and his life. Then, in the next second when he sees the opportunity, he turns into this all powerful exuberance, with over-the-top display of joy.

Recently i read about the sociopath article on Wikipedia. In short, it is said to be a “personality disorder”, characterized by a abnormal lack of empathy combined with strongly amoral conduct, masked by a ability to appear outwardly normal. Quote:

“use charisma, manipulation, intimidation, sexual intercourse and violence”[5][6][7] to control others and to satisfy their own needs. Hare states that: “Lacking in conscience and empathy, they take what they want and do as they please, violating social norms and expectations without guilt or remorse”

According to Hare, psychopaths are glib and superficially charming, and many psychopaths are excellent mimics of normal human emotion;[10] some psychopaths can blend in, undetected, in a variety of surroundings, including corporate environments.

It has been estimated by some that one percent of the general population are psychopaths[15] although other studies have reported far lower rates.

Darth Sidious vs Yoda

Darth Sidious vs Yoda

This nutcase is truely fascinating to watch.

Of the 6 star wars movies, the one acting that is most fascinating is this Palpatine, played by Ian McDiarmid (b1944)

Bush's Next Speech

“Bush's Next Speech”

So this is how liberty dies, with thunderous applause.

This is a scene from Star Wars Episode III: Revenge of the Sith (2005). At the time, i've spend perhaps 20 hours reading various reviews or commentaries, including much Wikipedia articles about Star Wars. When i watched this movie, the similarity to USA under George W Bush's lead is apparent to me, but i haven't seen similar expressions. Though, in the back of my mind, i thought it must be common. Indeed, the uploader of this video titled it “Bush's next speech”.

Quote from USA Today: Politics creates a disturbance in the Force (2005-05-17), By César G. Soriano, USA TODAY. source: USA TODAY

Since early screenings of Episode III: Revenge of the Sith began last month, film critics, commentators and Internet bloggers have been debating whether filmmaker George Lucas is comparing President Bush and the Iraq war to the Dark Side of the Force. The conservative film site Pabaah.com has called for a boycott. The topic even made NBC's Today show.

2010-04-13

Emacs Templates with YASnippet

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

Emacs Templates with YASnippet

Xah Lee, 2010-04-13

This page shows you a very useful and easy to use tool for inserting any type of templates for any programing language.

What's a Template?

A Template is a way to insert text you use often. For example, in html, you can type “div”, then press a hotkey, then it expands to:

<div id="some_id" class="some_class"></div> 

With your cursor placed in a parameter slot, and pressing Tab will move to next parameter slot.

In perl, type “for”, press a hotkey, and it becomes:

for (my $var = 0; $var < expression; $var++) {
    # body...
}

In emacs lisp, type “defun”, then it expands to:

(defun myFun ()
  "thisandthat."
  (interactive)
  (let (var1)
    (setq var1 some)
    ; body...
    )
  )

Emacs has lots of template systems. For example, there are MsfAbbrev, TemplatesMode, ElseMode, SkeletonMode, TempoMode. Their feature are quite different, their documentation quality varies, some requires you to know lisp if you want to define you own. In most cases, you need to be a emacs expert to use them. They are very confusing.

There is one that is simple to use and fairly powerful, that's YASnippet.

YASnippet

Download and Install

To download, go to: http://code.google.com/p/yasnippet/. (If you are using ErgoEmacs.org, then YASnippet is already installed.)

Download the one named like “yasnippet-0.6.1c.tar.bz2”. If you are on Windows, you can unpack it using Winzip or 7-Zip. (Don't download the “bundle” version. That version is a simplified version, and you cannot define your own template with it.)

Then, place the folder in a dir named “~/.emacs.d/plugins/”. Create them if they don't exist.

Then, add the following to your emacs init file “.emacs”:

(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-x.y.z")
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet-x.y.z/snippets")

The “x.y.z” part should match the yasnippet version number.

Restart emacs.

To test you have installed correctly, open a html file. Then, you should see a menu YASnippet. Try it.

How to Use Yasnippet?

You can insert a template by using the menu, or just type the abbreviation for the template.

emacs YASnippet menu

YASnippet's html submenu. The left side are templates, the right side are abbreviations to use.

Find Out What Templates Are Available

For example, let's say you are coding html. Go to the menu, pull “YASnippet‣html-mode”, then you'll see a submenu. There's a item named “<body>...</body>”. On the right side it shows “body =>”. That means, you can type “body”, then press Tab, then it'll expand to “<body></body>”.

The menu gives you a overview of what templates are available for that language.

Another way to know what templates are available is from the folder. For example, for html, go to the dir: “~/.emacs.d/plugins/yasnippet-0.6.1c/snippets/text-mode”. You'll see a list of file. Those file names, the first part before the dot “.”, is the abbreviation you can use.

Jumping Thru Parameter Slots

After you inserted a template, you can press Tab key to go thru the different parameter slots.

Define Your Own Template

It is very easy to define your own template. You don't need to know elisp. See: How To Define Templates In YASnippet.

2010-04-12

Paul Graham's Infatuation with the Concept of Hacker

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

Paul Graham's Infatuation with the Concept of Hacker

Xah Lee, 2010-04-10

It's been brewing in my mind for a while to write a criticism on Paul Graham's Arc Lisp and his essay about ideal language.

Of the various essays of his i read in the past years about Arc or designing of a lang, his essential idea lies on the concept of “hacker”. He keeps saying, lang needs to be this or that because “hacker” is this or that way.

That elusive word, “hacker”. Whence, one can't really get a precise idea what he consider as ideal in a computer language. What is a hacker? and what is the characteristics of a “hacker's language”?

If you read older publications, books, newsgroups, those from the 1980s, you see that the favored language among elite programers, those who talk a lot in newsgroups, seems to be C and Lisp, as far as i've read. These 2 languages are totally different in nature. One is very low level to the machine, close to assembly, the other is at the extreme end of high level. It'd be hard pressed to say there is a common characteristics they share. In fact, lisp and C programers mutually hates the other's lang. Also, which lisp? Common Lisp and Scheme Lisp are also quite opposite, and i don't think even classic hackers of those 1980s of MIT have a consensus on which one is the favored. In the 1990s, perl is also commonly deemed as a hacker's language. Today, the concept of hacker's language is a bit old-fashioned. Today, you don't hear this much anymore. There are today tens of thousands of accomplished programers and computer scientists. Ask them what is hacker's language, i doubt there can be any conclusion to be made. The result top votes will probably be more than 10 of extremely diverse languages in every aspect.

The infatuation with the concept of hacker. I think that is the main problem, and consequently, whatever he comes up i can't deem good. (and from seeing what he actually have done with Arc, you know my opinion of it is shit, and as well it generally isn't well received... e.g. far less fanfare than say Haskell, Clojure, Scala, erlang, OCaml/F#... and far less users than say NewLisp, OCaml, Scheme Lisps...)

In 2008 i wrote a essay listing tens of new langs that document the phenomenon of tremendous growth of new languages in the past decade: Proliferation of Computing Languages.

But in the past 2 years, more have come into the radar! Google's Go (Robert Griesemer, Rob Pike, Ken Thompson), Sun Micro's Fortress (Guy L Steele Jr et al.). All these langs have a bunch of philosophies and defense on how or why they should exist, with complaints about a hole they need to fill. Some are dubious of course, but some do seem sensible. If you consider the problem space of computing, and possibilities of imagination vs what already exists, it really has room for new langs.

Though, as far as i see, i can't see any concrete or theoretical merit of Arc with his “hackers need it!” creed.

Clojure for example, i can justify easily, for one thing, it is a lisp on JVM, along with the whole advantage of established Java libraries. It is also modern lisp without baggage, easy to install, independent, and with concurrency argument. NewLisp, i see merit, for example, it fills the scripting niche, and for hobbyist coders.

I really hate the word “hacker”. Imagine, what Dijkstra will have to say about “a lang designed for ‘hacker’?” LOL.

... what society overwhelmingly asks for is snake oil. Of course, the snake oil has the most impressive names —otherwise you would be selling nothing— like “Structured Analysis and Design”, “Software Engineering”, “Maturity Models”, “Management Information Systems”, “Integrated Project Support Environments” “Object Orientation” and “Business Process Re-engineering” (the latter three being known as IPSE, OO and BPR, respectively).”

— Edsger W Dijkstra (1930-2002), in EWD 1175: The strengths of the academic enterprise.

Leaked Video US Helicopter Killing

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

Leaked Video US Helicopter Killing

Xah Lee, 2010-04-12

Leaked video of 2 US helicopters killing ~10 Iraqi people, on 2007-07-12.

The video is obtained by Wikileaks.

It turns out, among the dead and wounded are 2 Reuters news staff, and 2 children. You can see more detail about this incidence here: http://www.collateralmurder.com/. Quote:

5th April 2010 10:44 EST WikiLeaks has released a classified US military video depicting the indiscriminate slaying of over a dozen people in the Iraqi suburb of New Baghdad -- including two Reuters news staff.

Reuters has been trying to obtain the video through the Freedom of Information Act, without success since the time of the attack. The video, shot from an Apache helicopter gun-site, clearly shows the unprovoked slaying of a wounded Reuters employee and his rescuers. Two young children involved in the rescue were also seriously wounded.

Wikipedia has a article about this incidence: July 12, 2007 Baghdad airstrike.

Who's Fault?

Look at the soldiers go, “O, crawling man, just show a weapon so i can blast you to pieces”. “LOL, look at that! we blew a hole right in the windshield!”.

On the US side, the soldiers say they spotted weapons right off the bat (Rocket-propelled grenade (RGPs) and AK-47), and US officials insist the target are “insurgents”, and the accidentally killed are termed “Collateral damage”. (see: Euphemism)

On the other hand, the humanitarian fuckfaces insist that this is totally wrong, something of a “war crime”, and that war should be carried out with care and policies and ethical considerations.

So, who's the fault? The soldiers? I don't think so. Such a gaming scene is common, probably the daily happenings of soldiers, on any side of war, and throughout history too. Is it the leaders, the fuckface George W Bush? Yes, a lot to do with him. But mostly, the problem is you.

You see, killing is a fundamental pleasure of human animals, in fact, a pleasure of all carnivores. Because, killing is associated with food. If you don't kill, you die, of hunger. However, vast majority of people deny this line of thought. They have moralities, and humanities, ethics, gods, children, human “beings”, etc. After all, which animal can tell us we are not animals, except the gods we made? Starting with this line of untruth, beget us modern concept of human “rights”, from there bred all sort of thorny ethical problems, among which is misery, and spittle war over it.

2010-04-11

Solved: A single tile that tile only aperiodically

aperiodic tile

A single tile that tile only aperiodically.

Whether a single tile exists that tiles only aperiodically is a is unsolved problem. Not anymore!

See: An aperiodic hexagonal tile (2010-03-22), By Joshua E S Socolar, Joan M. Taylor. arxiv.org 1003.4279v1.pdf

via http://www.mathpuzzle.com/.

See also, some of my tiling studies:

三年二班 (Class Ping Pong), 周杰倫 (Jay Chow)

Perm url with updates: http://xahlee.org/Periodic_dosage_dir/sanga_pemci/ping-pong_Jay_Chow.html

三年二班 (Class Ping Pong), 周杰倫 (Jay Chow)

Xah Lee, 2010-04-07

三年二班 by 周杰倫 (Jay Chow) is really a great song. I really love it. Been listening to it for several years. Though, his sing is characterized by mumbling, so it is hard to make out all the lyrics clearly. Here it is.

Title: 三年二班 (Class Ping Pong)
Singer: 周杰倫 (Jay Chow)
Lyrics: 方文山
Music: 周杰倫 (Jay Chow)
Arrangement: 洪敬堯
English translation: 李杀 (Xah Lee)
眼睛你要擦亮 記住我的模樣
表情不用太緊張 我是三年二班
我專心打球的側臉還滿好看
黑板是吸收知識的地方 只是教室的陽光
那顏色我不太喜歡 沒有操場的自然
為何比較漂亮的都是在隔壁班
還有考卷的答案 我剛好都不會算
沒關係 再繼續努力 沒關係

為甚麼上課時舉手很難 為甚麼拿線上寶物簡單
為甚麼女生不喜歡太胖 為甚麼別人手機在響

正手發長球的打法只是初級乒乓
反手短打再狠狠殺球是高級乒乓
迴轉技巧乒乓 前場速攻乒乓
對牆壁 在練習 乒乓 乒乓

  這第一名到底要多強 (不用問 一定有人向你挑戰)
 到底還要過多少關 (不用怕 告訴他們誰是男子漢)
 可不可以不要這個獎 (不想問 我只想要留一點汗)
 我當我自己的裁判 (不想說 選擇對手跟要打的仗)

...

 我不想 就這樣一直走
 每天都遇上 充滿敵意那種眼光
 等機會 就是要打倒對方
 這種結果我不要 這虛榮的驕傲

這目的很好笑 我其實都知道 你只是想炫燿
我永遠做不到 你永遠贏不了
我永遠做不到 你永遠贏不了 永遠贏不了

走鄉下 尋找哪有花香 (為甚麼 這麼簡單你做不到)
坐車廂 朝著南下方向 (為甚麼 這種速度你追不到)
鳥飛翔 穿過這條小巷 (為甚麼 這麼簡單你做不到)
仔細想 這種生活安詳 (為甚麼 這種速度你追不到)

不好笑 不好笑 不好笑
wipe your glasses, remember my face
don't worry too much, i'm a junior from class B
i look pretty good in the side shot of my concentrated face
blackboard is the knowledge source, just that sunshine from the window
i don't care much for the color, the field outside seems more natural
why all the pretty girls are always in the other class
and the answers to the finals, i happen to not know
its ok, i'll work on it more, its ok.

why's it difficult to raise hands, why's it easy to win online prizes
why chicks don't like being fat, why's other cells ringing all the time

long shot serving is the beginner ping pong
chop n smash is the advanced ping pong
spin n drive, ping pong; lob n flip, ping pong!
wall boxing and practice more, ping pong ping pong

how good really is that champion? (no need to ask, someone will challenge you)
how many i'll have to face? (fear not, tell them who's the boss)
won't i forfeit this? (don't care, i just want to sweat a bit)
would i be my own judge? (can't say, i'll pick my opponents)

...

i dont want to go down this road much longer
daily you'll face, enemy's stares
opportunity, is to win the fight
this result i don't want, this ignoble pride

this goal is ridiculous; i know; you just want to show off
i can never make it; you'll never win
i can never make it; you'll never win, you'll never win

a rural hike, seek the fragrance of flowers (O why, you can't do such a easy task)
in a train cabin, towards the south (O why, you can't achieve the speed)
bird flying, passing the corridors (O why, you can't do such a easy task)
thinking hard, this life is peaceful (O why, you can't achieve the speed)

not funny, not funny, not funny

The story as told by the music video is not that good.

This song much describes the mentality of a college student, his fascination with table tennis, his school scenes, his thoughts, his crazed dedication to the sport, and finally, his achievements due to his love of the subject. After reading the lyrics full, you see that near the end, the song's meaning changes. It turns into a philosophical statement about discarding the pursuit of success. Rather not well done. But, in the end, the repeated sequence of “not funny”, makes it into a a sort of self mockery.