2011-12-31

ErgoEmacs hit Hacker News

ErgoEmacs hits Hacker News last week. See Emacs for the rest of us: ErgoEmacs @ Source news.ycombinator.com

Thanks to “Macro Lapse” (aka macco) for posting.

Here's a review of ErgoEmacs Keybinding.

Ergonomic Emacs Keybindings (2011-12-30) By Jeff Pace. @ Source jpace.wordpress.com

Macross Plus - Pulse (song)

Song 〈Pulse〉 from Japanese animation Macross Plus. amazon

For lyrics and other detail, see: Macross Plus - Pulse (song).

emacs lisp: cycle hyphen underscore, lisp properties

Updated article.

cycle-hyphen-underscore-space

(defun cycle-hyphen-underscore-space ()
  "Cyclically replace {underscore, space, hypen} chars current line or text selection.
When called repeatedly, this command cycles the {“ ”, “_”, “-”} characters."
  (interactive)
  ;; this function sets a property 「'state」. Possible values are 0 to length of charList.
  (let (mainText charList p1 p2 currentState nextState changeFrom
             changeTo startedWithRegion-p )

    (if (region-active-p)
        (progn
          (setq startedWithRegion-p t )
          (setq p1 (region-beginning))
          (setq p2 (region-end))
          )
      (progn (setq startedWithRegion-p nil ) 
             (setq p1 (line-beginning-position))
             (setq p2 (line-end-position)) ) )

    (setq charList (list " " "_" "-" ))

    (setq currentState
          (if (get 'cycle-hyphen-underscore-space 'state) 
              (get 'cycle-hyphen-underscore-space 'state) 0))
    (setq nextState (% (+ currentState (length charList) 1) (length charList)))

    (setq changeFrom (nth currentState charList))
    (setq changeTo (nth nextState charList))

    (setq mainText (replace-regexp-in-string changeFrom changeTo (buffer-substring-no-properties p1 p2)) )
    (delete-region p1 p2)
    (insert mainText)
    
    (put 'cycle-hyphen-underscore-space 'state nextState)

    (when startedWithRegion-p 
      (goto-char p2)
      (set-mark p1)
      (setq deactivate-mark nil) ) ) )

explanation and detail at http://xahlee.org/emacs/elisp_change_space-hyphen_underscore.html

Steve Jobs on Apple website on 2011-10-05

Steve Jobs on Apple Website on 2011-10-05

apple dot com Steve Jobs 2011-10-05
Apple.com website on 2011-10-05.

For Google website screenshot, see: http://xahlee.org/comp/Death_of_Steve_Jobs.html

2011-12-30

updated: Emacs Lisp Text Processing: find-file vs with-temp-buffer

Updated: Emacs Lisp Text Processing: find-file vs with-temp-buffer.

In my previous report, the timing difference is by a factor of 45. That's because i had stuff in my init file. (i have hooks for both find-file and html-mode, and that probably caused the major slowdown.) Now, the factor is actually just about 5.

You should still use with-temp-buffer instead of find-file besides speed, because find-file has quite some side effects.

Big thanks to Trey Jackson.

Perl Books Survey 2002

06210002

Updated: Perl Books Survey 2002.

2011-12-29

Review of Khan Academy by Xah Lee

Perm URL with updates: http://xahlee.org/math/khan_academy_review.html

So the other day i looked at Khan Academy. Spent a hour to watch a few videos. I find it fantastic, but also disapppointing. Let me explain. (If you don't know already: Khan Academy is a online educational site, basically just thousands of videos, each about 10 minutes. Website at: khanacademy.org)

Khan Academy logo

The Bad

Here's the disappointing parts:

Basics Only. Of all their courses of various subject areas (e.g. sciences, humanities, etc.), the level offered is about first year of university course. At best 2nd year university course.

For example, one of the subject they are known for and have the most number of videos is math. Vast majority of them are highschool level (e.g. fraction arithmetic, highschool algebra, etc.). The most advanced course they offer are: {calculus, linear algebra, differential equations}. This means, if you are a math fan, and you have studied first 2 years of university math, then Khan Academy doesn't do anything for you. (for example, they don't even have basic group theory or basic abstract algebra)

Video Format is Slow. They teach by videos. The Video format is a fixed and slow format. Very time consuming. I'm impatient to sit there and wait for the lecture to go thru second-by-second. In comparison, when learning a subject i don't know (e.g. bio-chemistry), i prefer a encyclopedia such as Wikipedia, where i can read fast, scan parts i already know, delve into parts i want to learn more.

Few Subject Areas. Although they have thousands of videos, but they don't really have coverage of wide range of topics. For example, in the category of Computer Science, all they have is ~30 videos on the very basics of programing Python. That is ALL they have on computer science. Paucity is the word. For what they cover, it's about equivalent of 1 day's worth of reading a python book, and you'd learn much more in depth.

The Good

Here's the fantastic parts:

Basics is Good. Although the level covered are rather basic, but that's also the good part about it. I know math well, but i'm rather ignorant in vast majority of other topics. For example: economics, law, art history, biology, finance, medicine, world history, anthropology, …, etc. This applies to basically everyone. This means, for vast majority of people, the majority of courses offered by Khan Academy are very useful.

Video Format is Engaging. The slow video format also has good aspects. For example, now and then i want to broaden my understanding of law, or art history, subjects that i do not have strong interest. Reading encyclopedia is a very dry experience, and requires high level of concentration. It gets boring and aimless fast. But well arranged course in videos with human voice that guides you thru, is very satisfying. You can sip a drink and passively enjoy the video and learn something.

Today there are more and more free online courses or educational materials. Next i'll be looking into Stanford's offers on computer science machine learning.

2011-12-28

Truly Ergonomic Keyboard has Docked!

Big news. The years-in-coming “Truly Ergonomic Keyboard” has arrived. This just might prove to be the ultimate emacs keyboard.

truly ergonomic keyboard 2
“Truly Ergonomic Keyboard”

If you haven't heard about this keyboard before, see my arm-chair philosophy here: Ergonomic Keyboards Gallery. If you wonder why this keyboard is a big deal, see Keyboard Hardware Design Flaws. Otherwise, go here to see keyboard lovers's on-hand discussion about it at: geekhack.org.

Thanks to @dotemacs for the tip.

Computer Keyboard Wrist RSI Problems

Keyboard Angle Issues

keyboarding RSI ulnar deviation
Ulnar deviation = bending the wrist outward to the sides. This is solved by split/ergonomic keyboards where the keys are separated into 2 groups. img src
keyboarding RSI forearm Pronation keyboarding RSI degrees of pronation
Forearm Pronation = rotating the forarm. This is solved by split/ergonomic keyboards that are curved/tilted. img src

and there's also wrist dorsiflexion, meaning bending up the palm. This happens when you use a thick keyboard that sits on a flat desk and your forearm rests on the desk surface. Especially bad when the keyboard's back legs are propped up. This is solved by typing while your wrist hovers above, which is actually the proper typing posture. It is also solved by putting ~5cm thick book in front of the keyboard, or a front tilt as in Microsoft 4000, or a dipped-in keys as in Kinesis Contoured Keyboard, or set your keyboard in a tray below desk surface.

read more: http://xahlee.org/emacs/keyboard_problems.html

emacs keyboard: μTron keyboard

updated the emacs keyboard μTron keyboard.

utron keyboard
“μTRON Keyboard” img src
utron keyboard 02
“μTRON Keyboard”

This is a excellent design. The only design issue i found is that it doesn't have dedicated function keys. The function keys are merged with the number keys. However, the other quality design makes up for it. (For why dedicated function is important, see: Function Keys in Computer Keyboard. For why the μTron is a excellent design, see: Keyboard Hardware Design Flaws.)

Video Intro & Official Website

〈はじめてみようμTRONキーボード〉

much more photo and info at: http://xahlee.org/kbd/uTRON_keyboard.html

more Wonderland Alice artwork

alice in wonderland 2010 by j scott campbell-d2z2q8l
By J Scott Campbell @ j-scott-campbell.deviantart.com

Misc Alice Artwork ₂

the cat yoga (funny video)

〈кошкина йога〉 (The Cat Yoga) (yourlight 2011-12-14)

Yoga b-boying (Breakdance)

Yoga b-boying. The song is “Sail” by AWOLNATION. amazon

For detail about the song used, see: Sail - AWOLNATION.

See also: Acrobatic B-boying Dance (Breakdancing) Videos.

2011-12-27

Song: Lily Allen - Fuck You Very Much

“Lily Allen - Fuck you” amazon
Its Not Me Its You  Lily Allen
Lily Allen's album cover “It's Not Me, It's You”. amazon

lyrics, live version, info at: http://xahlee.org/music/fuck_you_very_much.html

American Imperialism; Killing Hope

Killing Hope USA CIA Interventions map
〈US Military and CIA Interventions Since World War II〉
Killing Hope book cover-2-2-2
Killing Hope: US Military and CIA Interventions Since World War II (2003) amazon

Wikipedia info: Killing Hope. Quote:

Noam Chomsky called it “Far and away the best book on the topic.”[1] Former CIA officer John Stockwell called it “The single most useful summary of CIA history.” [2]

Website: www.killinghope.org

Rogue State William Blum
Rogue State: A Guide to the World's Only Superpower (2000) amazon

Wikipedia info: Rogue State: A Guide to the World's Only Superpower. Quote:

It was mentioned in a speech attributed to Osama bin Laden broadcast on January 19, 2006. Bin Laden stated: “If Bush carries on with his lies and oppression, it would be useful for you to read the book The Rogue State.” Sales subsequently soared.

Noam Chomsky on Death of Osama Bin Laden

Regarding the death of Osama Bin Laden, Chomsky stated: “We might ask ourselves how we would be reacting if Iraqi commandos landed at George W. Bush's compound, assassinated him, and dumped his body in the Atlantic. Uncontroversially, his crimes vastly exceed bin Laden's, and he is not a ‘suspect’ but uncontroversially the ‘decider’ who gave the orders to commit the ‘supreme international crime differing only from other war crimes in that it contains within itself the accumulated evil of the whole’ (quoting the Nuremberg Tribunal) for which Nazi criminals were hanged: the hundreds of thousands of deaths, millions of refugees, destruction of much of the country, [and] the bitter sectarian conflict that has now spread to the rest of the region.”[86]

From Noam Chomsky.

2011-12-26

dance music: Hard in Tango - This is My DJ (Jessica Alba)

A great dance song.

Video clip of film “Honey” with music “This is My DJ” by “Hard in Tango” amazon

for lyrics and info, see: http://xahlee.org/music/this_is_my_dj.html

How Did You Spent Xmas Eve?

24號晚上跟弟弟聊qq。問我平安夜怎麼過。我說沒事幹,睡覺…… 然後弟弟說:“我媽問你是一個人睡還是兩個人睡”……

translation:

on xmas eve, i was chatting with my little brother online. He asked how i spent the night. I said “nothing much, went to bed…” then brother replied “mom asked whether it's 1 person or 2 persons” …

Source plus.google.com

Sephora logo

post removed

technology: skyscraper sized screen

Nokia Lumia 800 smartphone launch event at Millbank, featuring a 118m high building as giant screen.

This is done by 16 projectors across the Thames river, with the building as screen.

The building is Millbank Tower , located at the City of Westminster at Millbank, the banks of the River Thames in London, UK.

The building is 118m high. Each of the building's 800 windows are covered with vinyl. 16 projectors on the other side of the river beamed images onto it.

2011-12-25

2011-12-24

stop Mac OS X Finder from creating .DS_Store

Perm URL with updates: http://xahlee.org/comp/mac_os_xs_DS_Store_unix_init_svn.html

Here's a nice article. The author modified Mac Finder to not generate 〔.DS_Store〕.

(Cached site with images: Source cache.historious.net)

Note that besides 〔.DS_Store〕, the Mac OS X also creates other junk, e.g.:

.DS_Store
.localized
.FBCIndex
.FBCLockFolder
.FBCSemaphoreFile
Desktop DB
Desktop DF

and Windows used to create 〔Thumbs.db〕 among others.

Who started all this fuck? Its your beloved unix, folks. e.g.

.profile
.bashrc
.emacs
.viminfo
.xinitrc

.cvs
.svn
.htaccess
…

These are headaches in many ways. When you “rsync” or “unison” between machines, or zip files from OS X, or take data from USB, or grep. In essence, the problem is that these programs create side-effects for their own convenience, not user's convenience. It stem from certain unix philosophy.

and unixes (linux) still do it to this day happily, as if god said so.

“I liken starting one's computing career with Unix, say as a undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act.” — Ken Pier, Xerox PARC (~1980s?)

Proper solution is for the programs to set a designated folder to store their shit. Either as a OS convention of one single designated folder per user (e.g. Modern Windows's 〔%HOMEPATH%\AppData\〕 or Mac's 〔~/Library/〕). If the OS doesn't provide such a dir, then the app should set a designated folder for it, not litter random files in every folder it touches.

Unix do this fuck up of course because it is convenient at the moment. That's the life story of unix. It's super convenient for the lazy programer, because he doesn't have to deal with one extra directory, dir mapping, data syncing issues, etc. (e.g. 〔.cvs〕.) And you just brain wash your users to feel that's natural way of life.

Here's some useful scripts and tutorials:

Here's some unix hatred articles:

Emacs Lisp: Convert Lisp Form to XML Form

Jon Snader (jcs) wrote a series of nice tutorial about how to transform text in the form of lisp expression into XML form, with a focus on making each head of lisp expression a executable function itself (as opposed to just parsing it and spit out XML form). In the last article, he proposed a little challenge for readers to solve. See:

If you got stuck, check out his previous articles (linked in his article), which shows you how.

sexual mores: illustrated guide to ESRB

Due to Google AdSense policies, please see this article at: http://xahlee.org/sex/illustrated_guide_to_ESRB.html

2011-12-23

Final Fantasy VIII, Ballroom Dance Scene

Final Fantasy VIII, Ballroom Dance Scene

For those with a acute eye for the ethology of human animals, notable in this video is the mannerism of male vs female in courtship.

Observe, the way the girl signals the guy for a dance, and the way the guy responds for a affirmative.

For the song related to this video, see: Faye Wong - Eyes on Me (Final Fantasy VIII).

raunchy women play football video game

“Alex Gaudino - Watch Out” amazon

perm url http://xahlee.org/music/watch_out_Alex_Gaudino.html

2011-12-22

Final Fantasy song: Eyes on Me

“Faye Wong - Eyes on Me” with Final Fantasy VIII scenes. amazon

for detail, see: http://xahlee.org/music/eyes_on_me.html

English History: the Norman Conquest

〈The History of English in 10 Minutes, Chapter 2: The Norman Conquest〉, annotated, at The History of English in 10 Minutes

2011-12-21

〈The History of English in 10 Minutes〉 Annotated

In the following days, each day i'll annotate a chapter of a education video called The History of English in 10 Minutes. Each video is about 1 minute, but are packed with info.

Do you know exactly where Anglo or Saxo were? Do you know what are the gods referred to in the names of weekday? How about the connection of martyr and scope? See the first installment: The History of English in 10 Minutes.

Emacs Lisp: find-file vs with-temp-buffer redux

This is a completely detailed report, with code that you can run.

See: http://xahlee.org/emacs/elisp_find-file_vs_with-temp-buffer.html

music: 王菲 - 容易受傷的女人 (Faye Wong - Fragile Woman)

this is a most tender, feminine, song. Extremely popular in Asia.

Faye Wong - Fragile Woman. (Cantonese) amazon

For info, several more versions, lyrics translations, see: 王菲 - 容易受傷的女人 (Faye Wong - Fragile Woman)

took me 10 hours over 2 days to write this one. Research and translation.

2011-12-19

Learn Words from the Dancing Queen

Do you know all the following words?

deference soliciting disinterest meekness colloquial rub supplication fret diffidently stratagem proffering beseechment vexation coitus deciphered asserted pitch wreck perennial immemorial fixation infatuation explicable edict exigent show stopper

If not, you failed the courtship test. Read: ABBA - Take a Chance on Me; Human Courtship Analized by Alien.

AIDS World Map

HIV distribution world map
Map of HIV 2008. img src (data based on Source )
HIV world map game

Perm URL with updates: http://xahlee.org/Periodic_dosage_dir/hiv_map.html

Emacs Lisp Processing 5 Thousand Files: “find-file” vs “with-temp-buffer”

Using find-file to open 5565 files, with font-lock-mode off, backup off etc, takes 10 min plus 8 min garbage collection. Total wall clock time is 18 minutes.

Using with-temp-buffer, 22 seconds.

Moral: when doing batch text processing of thousands of files, don't use find-file, use with-temp-buffer or with-temp-file instead. (use the latter when you need to make changes to the file.)

2011-12-21 Addendum: now fully detailed at http://xahlee.org/emacs/elisp_find-file_vs_with-temp-buffer.html

hot song: Anya Marina - Whatever You Like

“Gossip Girl - Lesbian Kissing Scene with Hilary Duff & Jessica Szohr & Penn Badgley”. Season 3 Episode 9. amazon
“Anya Marina - Whatever You Like” amazon

read more at http://xahlee.org/music/whatever_you_like.html

2011-12-17

Sexual Equality but Please Buy Me Dinner and Diamonds

“Girls That Piss Me Off” By JennaMarbles 2011-05-18
“Beyoncé - Single Ladies (Put A Ring On It)”

Perm URL with updates: http://xahlee.org/sex/sexual_equality_please_buy_me_diamonds.html

Humor: How to Prepare for a Date

“How To Get Ready For A Date” By JennaMarbles 2011-07-20

“smells like desperation”. LOL.

New word i learned today: “sweater puppies”.

“How To Get Laid” By makemebad35 2010-07-03

“Dick No More”. LOL.

Alright. Those are jokes. For you geek boys out there, you might as well pick up some serious tips today. Here's one to start you off.

What to do when you see an attractive girl?

Rush out of sight quietly.

Perm URL with updates: http://xahlee.org/funny/how_to_get_laid.html

2011-12-16

2011-12-15

Who wrote the bible?

A exceedingly funny video that's wildly popular.

“PamelaForeman Another Question For Atheists [reposted]”
tamtampamala who wrote bible
TamTamPamala on “Who Wrote Bible?”

for several more vids and info, see http://xahlee.org/Periodic_dosage_dir/who_wrote_bible.html

Windows: How to Remove “Win 7 Antivirus 2012”

Big warning to you all. I just got hit by a virus on my Windows 7 machine. The virus is called: “Win 7 Antivirus 2012”. (it's a virus that pretends to be a antivirus software)

First i describe how to remove it for those of you came here for that. Then i blog about how i got this virus and my PC experiences.

What's “Win 7 Antivirus 2012”

It's a virus that pretends to be a anti-virus software. It basically screws up your computer, prevents you to run any app, and kept asking with a pop-up dialogue for you pay by credit card for a bogus anti-virus software.

Windows: How to Remove “Win 7 Antivirus 2012”

The virus cames with several different names. e.g. {“Win 7 Antivirus 2012”, “Win 7 Security 2012 ”, “XP Antivirus 2012”, …}. To remove it, i recommend following this article at:

Remove Win 7 Security 2012 (Uninstall Guide) (2011-12-06) By Grinler. @ Source www.bleepingcomputer.com

That article will ask you to download some tools. Do it. I've used their product in the past years. I trust them. It is free.

Just in case that site is being hijacked or sometimes in the future no longer exists or sold with changed info, the following is a guide on how to remove from my own experience.

• Download “FixNCR.reg” at http://download.bleepingcomputer.com/reg/FixNCR.reg and run it. This will fix the registry. Wait for the program to finish. It should take no more than 2 minutes.

• Download “RKill” at http://www.bleepingcomputer.com/download/anti-virus/rkill and run it.

“RKill” will terminate the rogue program that's running. Some rogue program prevents RKill to run. So, if you double click on RKill and it won't run, try download the same program but different name from the site above.

• Download “Malwarebytes' Anti-Malware” at http://www.bleepingcomputer.com/download/anti-virus/malwarebytes-anti-malware.

“Malwarebytes' Anti-Malware” is a anti-virus software, one of which i trust. It's shareware.

Install it, follow all default options, then run it. Allow it to update when it starts. Then, do a full scan. (May take 1 hour.) After scan, remove the virus detected. After it's done, it'll create a log file listing the removed rogue software.

Malwarebytes
Malwarebytes screenshot.

My Experiences of Virus on Windows

read more at Perm URL: http://xahlee.org/mswin/Windows_7_Antivirus_2012.html

Christian and Islam Kills for Blasphemy

new article, see English: Etymology of Blasphemy

2011-12-14

Sexual fantasy & Orgy — in Laura Branigan's Self Control

Here's a music video that depicts a fundamental human desire, sex, and orgy.

“Laura Branigan - Self Control” amazon

For lyrics, see Laura Branigan - Self Control

Xah's Blogs and Asking for help

Reminder. If you like this blog, you can subscribe to each individual topics:

Also, a donation is much appreciated. You can also help out by purchasing items from the amazon links on my site. Any item for yourself or gifts for the holiday. Or, tweets, links, are appreciated. My entire site, of 3000+ original articles written over the past 15 years on the above topics, are also available for offline reading for $100. Just make a paypal donation of $100 to xah@xahlee.org with subject “xahlee.org site zip file”. Thank you!

Total Eclipse of the Heart, parody,

“Total Eclipse of the Heart: Literal Video Version (REFRAMED)”, by David A Scott (aka dascottjr).

If you have a eye for humanity, language, art, then you'll note quite a few things.

  • The original music video is done as a arthouse film. Top quality directing and imagination. Very rare today.
  • The song is about a woman's loneliness and fantasy of sex with boys. A taboo topic in today's USA.
  • The video shows masculine beauty. All the pretty boys. And the swim team, karate, fencing, football, gymnasts. She is the only women in the film.
  • Go thru and understand all the slangs, allusions, references, in the parody version. Parodies, and comics, usually captures the real world observations, pop culture, as they are, because in order to make people laugh, you have to be real. (as opposed to what academicians, politicians, activists, or grammarians, want to tell you about feminism, language, etc.)
  • The parody version has several slangs. “effing” = fucking. Also, there's “felt me up” and “weirded out”. I think they started as teen girl slangs. If you know the history of these, please tell.

for the full Xah experience, see: Bonnie Tyler - Total Eclipse of the Heart.

2011-12-13

CoffeeScript or Dart, Javascript Replacement?

Perm URL with updates: http://xahlee.org/comp/CoffeeScript_Dart_Javascript.html

Good article i agree on:

A Case Against Using CoffeeScript (2011-12-10) By Ryan Florence. @ Source ryanflorence.com

Every point he mentioned i agree. Here's some elaborations on some syntax aspects:

  • Don't be a fucking smartass and create a layer of lang on top of a lang and think that you improved it. It introduces complexity.
  • The grammar of syntax should be simple, and each symbol should ideally have one and only one meaning. It should never be context dependent. Syntax should be free-flow of sequence of symbols so it can be automatically formatted.
  • Don't fuck with whitespace like Python and Haskell. Using whitespace for code block makes the semantics of whitespace symbols extremely complicated.
  • If you like whitespace indentation for readability, proper solution is to create a layer of format language (e.g. HTML) instead, like in Mathematica. (e.g. When in a special reader or editor, you have headers, sub-headers, inclusion of images or illustrations, audio, and expressions can be renders as “2-dimensional” math expression.)
  • The brackets ()[]{} and other matching pairs 【】〈〉「」 etc are the most important classes of symbols in syntax. They have the property of demarcation at the syntax level. That is, you do not need complex parser to know how the code is nested.
  • Don't fuck with symbols. Don't replace && || by and or. Or replacing {} by begin end (Ruby commit this idiocy). Math uses symbols for a reason. If you can, incorporate Unicode symbols in your lang.
  • Don't be a fucking smartass and start to use complex things such as the idiotic lisp macros, or Python's “List Comprehension”, or “closures” fuck. The perl idiots are the group that loves to diddle code at syntax level (e.g. the one-liner fuck). Stick with basic code, and even avoid idioms. Use these only when the it is natural in the language and really appropriate. Most of time you probably should leave your code verbose.

Moral: Don't use CoffeeScript, also, don't use Google's Dart. Stick with Javascript.

Q: What's Dart in a nutshell?
A: Javascript with Java syntax.

For general understanding of syntax and formatting, see:

For essays on use of symbols in syntax, see:

For some semantic issues, see:

bubblegum dance: caramell dance

caramel dancing
Caramell Dance

more and info at Caramell - Caramel Dancing (Caramelldansen)

Male vs Female, Real World Observations

wearing the same shirt guys vs girls-c100-d4

more at: Male vs Female, Real World Observations

bubblegum dance music: Butterfly

Butterfly 09 (United Forces Airplay Edit), sung by Veronica Almqvist and Malin Kernby. (2009) amazon

Smile.dk - Butterfly (Song from Dance Dance Revolution)

2011-12-12

human furniture

post removed because it might violate Google's ad program policy. See here instead http://xahlee.org/sex/human_furniture.html

Song: all the same to me, by Anya Marina

A fantastic song by Anya Marina.

The word that describe this song's feel would be: lackadaisical.

“Anya Marina - All The Same To Me” amazon

Very nice music video, directed by Josh Forbes.

Anya Marina also sung a sexy version of TI's “Whatever You Like”, made popular by the TV show Gossip Girl. See: Anya Marina - Whatever You Like (Gossip Girl).

Another circus-like song is Björk's Unison. Also similar is Lily Allen's Fuck You Very Much.

For lyrics, see: Anya Marina - All the Same to Me

2011-12-08

How to choose a keyboard with good function keys

bad function keys-2
Worst example of function keys. ① Continuous row, no group-gap. ② hard-to-press cheap buttons.
keyboard function keys
Good Function Keys. Quality standard key. Grouped so it's easy to hit the correct key without sight.

See explanation at Computer Keyboard: What Are F1 … F12 Keys Used For? Increase Productivity Using Function Keys

Fixing Emacs's Scratch Buffer

Emacs's scratch buffer has lots of problems. This is a controversial issue, because the scratch buffer is one of those things that serves as a identity of emacs. Any criticism on it is like attacking emacs.

But i tell you, dear readers, frankly and directly, this is a emacs cult problem and i've wrote about often. (See: Emacs Undo & Emacs Cult ProblemEmacs Idolization: Have You Read the Emacs Manual From Cover to Cover?)

For a detailed description of scratch buffer problems, see: Emacs: Problems of the Scratch Buffer.

If you are a user of ErgoEmacs Keybinding, the problem is already fixed for you. Simply press 【Ctrl+n】 and new scratch will be created for you, and when you close a modified unsaved buffer, it'll prompt you for save.

In ErgoEmacs keybinding, it's implemented by 2 commands: {new-empty-buffer, close-current-buffer}. The “new-empty-buffer” simply creates a new buffer, titled “untitled”, “untitled<2>”, etc. The code for “close-current-buffer” is a bit more involved. It kills the current buffer, but check if it is modified, but also, add the closed file into a list, so that people can re-open the last closed file, much like web browser's 【Ctrl+Shift+t】. The key is the same. The key to close current file is also the browser standard 【Ctrl+w】.

If you really want to stick with GNU emacs's keys, but want these convenient functions, you can download and copy/modify the code from ErgoEmacs keybinding. Or, J V Toups provided a implementation for persistent scratch buffer. See:

English: animalistic cries

today's Wordy English over at http://wordy-english.blogspot.com/: animalistic cries!

  • horses neigh
  • donkeys bray
  • bulls snort
  • hogs grunt
  • goats bleat
  • lions roar
  • wolves howl
  • cats meow and purr
  • dogs growl and bark
  • puppies yelp

can you think of more? and what do human animals do?

See: http://xahlee.org/PageTwo_dir/Vocabulary_dir/danlu_sance.html.

Python vs Lisp: comp.lang newsgroup spittle

On 2011-12-04, Eduardo Costa asked in comp.lang.lisp:

I pose the questions below out of sheer curiosity, not to cause outbursts of indignation. That said, here are my questions.

… I noticed that many LISP programmers and universities are switching to Python, even to teach AI. For instance, Norvig and the people at MIT replaced Scheme with Python. My own experience with Python was dismaying. The language is much slower than SBCL. There is no tail call optimization. No macros.  Then, my first question is ... Why Python?

Xah Lee wrote:

… python has more readible syntax, more modern computer language concepts, and more robust libraries. These qualities in turn made it popular.

Tim Bradshaw wrote:

Yet you still post here [comp.lang.lisp]: why?

i don't like python, and i prefer emacs lisp. The primary reason is that python is not functional, especially with python 3. The python community is full of fanatics with their drivels. In that respect, it's not unlike Common Lisp community and Scheme lisp community.

See also:

Xah

2011-12-07

Alexandra Wallace Incident: Asians in UCLA

There's this video on youtube bitching about Asians in UCLA.

Alexandra Wallace bitching on Asians

Parody

Now, the Parodies!

Alexandra Wallace parody by AfricanoBoiShow.

for more and my comment, see http://xahlee.org/funny/asians_in_ucla.html

ASUS graphics card

ASUS GTX570 DirectCU II GPU
“ASUS GTX570 DirectCU II graphics card” amazon

read more at http://xahlee.org/mswin/PC_graphics_card.html

My Life is Reading Encyclopedias

newly generated: Links to Wikipedia from XahLee.org.

6304 links to Wikipedia articles. About 1/4 of my wake time in my life is spent reading encyclopedias. See also:

Logitech Wireless Gaming Mouse G700

logitech g700 mouse 1-s logitech g700 mouse 2-s logitech g700 mouse 3-s
“Logitech Wireless Gaming Mouse G700” amazon

This is top-of-the-line model. Features:

  • Wireless! with charger.
  • 13 programable buttons!
  • Scroll wheel can be set to notched or smooth.
  • On-board memory. (5 profiles for storage of settings)
  • Instant sensitivity (DPI) change.
  • Penny sized USB plug.

This one is comparable to Microsoft SideWinder X8 mouse. I consider the G700 better, because: • 6 more programable buttons. • On-board memory. • Scroll wheel can be set to notched or smooth.

reviews of more Logitech gaming mouses at http://xahlee.org/kbd/logitech_gaming_mouse.html

singer in concert as hologram!

Hatsune Miku on car
Hatsune Miku painted on a car. img src

Here's her concert, in Tokyo, Japan.

“Hatsune Miku - World is Mine Live in Tokyo, Japan”

read more, at http://xahlee.org/arts/Hatsune_Miku.html

2011-12-06

Emacs: Convert Image Files and Change Size in Dired

I want a command, so that i can convert all jpg files to png or any other format, for all marked files in dired. Also, same for scaling images.

Solution

(defun scale-image (fileList scalePercentage)
  "Create a scaled jpg version of images of marked files in dired.
The new names have “-s” appended before the file name extension.
Requires ImageMagick shell tool."
  (interactive
   (list (dired-get-marked-files) (read-from-minibuffer "scale percentage:")))
  (require 'dired)

  (mapc
     (lambda (ξf)
       (let ( newName cmdStr )
         (setq newName (concat (file-name-sans-extension ξf) "-s" ".jpg") )
         (while (file-exists-p newName)
           (setq newName (concat (file-name-sans-extension newName) "-s" (file-name-extension newName t))) )

         ;; relative paths used to get around Windows/Cygwin path remapping problem
         (setq cmdStr (concat "convert -scale " scalePercentage "% -quality 85% " (file-relative-name ξf) " " (file-relative-name newName)) )
         (shell-command cmdStr)
         ))
     fileList ))
(defun 2jpg (fileList)
  "Create a jpg version of images of marked files in dired.
Requires ImageMagick shell tool.
"
  (interactive (list (dired-get-marked-files) ))
  (require 'dired)

  (mapc
     (lambda (ξf)
       (let ( newName cmdStr )
         (setq newName (concat (file-name-sans-extension ξf) ".jpg") )
         (while (file-exists-p newName)
           (setq newName (concat (file-name-sans-extension newName) "-2" (file-name-extension newName t))) )

         ;; relative paths used to get around Windows/Cygwin path remapping problem
         (setq cmdStr (concat "convert " (file-relative-name ξf) " " (file-relative-name newName)) )

         ;; (async-shell-command cmdStr)
         (shell-command cmdStr)
         ))
     fileList ))

For detail, see http://xahlee.org/emacs/emacs_dired_convert_images.html

Art: anime girl stepping out of screen!

anime girl coming out of screen
Hatsune Miku coming out of screen.

The original source might be: Source www.pixiv.net.

Thanks to Gwern Branwen for help.

Microsoft Discontinued SideWinder Gaming Mouse X8

Microsoft sidewinder x8 mouse 2
Microsoft sidewinder x8 mouse. amazon

It looks like Microsoft has discontinued its SideWinder Gaming mouse X8. It's quite a pity. This mouse was just introduced in 2009, with several advanced technologies. • Charger with magnetic connector. • Wireless. • Blue laser tracking. • Tilt scroll wheel. • 4000 DPI. For review, see: Microsoft SideWinder Gaming Mouses Review.

According to online rumors, Microsoft discontinued it not because of poor sale, but rather, too much competition from many companies that are dedicated to gaming devices. It appears that Microsoft has discontinued the entire SideWinder brand. (i wasn't able to confirm this 100%) Some of the models such as SideWinder X8 mouse are no longer listed on Microsoft's site, but they still sell some other models of gaming keyboard and mouse.

2011-12-05

Visual Art: Crocodile sex codex

crocodile sex codex-s
See: Artwork: Crocodile Sex Codex.

What's the Ugly Bump at the End of Computer USB Cables

In your computer mouse cable, or USB device or monitor cable, often there's one big ugly chunk of cylinder somewhere in the cable. What's that big ugly cylinder for?

Cable end-s
USB cable Bump. img src

Answer: It's a electronic component called Ferrite bead. It's used to suppress high frequency noise in electronic circuits. This is needed because cables that are not Shielded can also act as antenna and broadcasting device, creating inteference.

Why Apple's computer doesn't have such ugly bump? I guess because either Apple uses shielded cables, or the component is moved to inside the computer.

Thanks to Aaron Coakley for answer.

2011-12-04

Differences Between Crocodile and Alligator

gavial vs aligator vs crocodile
Left to right: gavial, alligator, crocodile. img src

Excerpt from Crocodilia:

While alligators (and caimans) are often confused with crocodiles, they belong to two quite separate taxonomic families.

The most obvious external differences are visible in the head — alligators and caimans have wider and shorter heads, and a more U-shaped than V-shaped snout. The alligator's upper jaw is wider than its lower jaw, and the teeth in the lower jaw fit into small depressions in the upper jaw. The upper and lower jaws of the crocodiles are the same width, and teeth in the lower jaw fall along the edge or outside the upper jaw when the mouth is closed. When the crocodile's mouth is closed, the large fourth tooth in the lower jaw fits into a constriction in the upper jaw. For hard-to-distinguish specimens, the protruding tooth is the most reliable feature to define a species. However, in captivity, alligators and caimans may show jaw deformities which result in lower teeth protruding.

Alligators lack the jagged fringe which appears on the hind legs and feet of the crocodile and have the toes of the hind feet webbed, not more than halfway to the tips. Alligators strongly prefer freshwater, while crocodiles can better tolerate seawater due to specialized glands for filtering out salt. However, both can survive in either.

Both species of alligator also tend to be darker in color than crocodiles — often nearly black — but color is very dependent on water quality. Algae-laden waters produce greener skin, while tannic acid from overhanging trees can produce often darker skin.

When cleaning alligator pools, some zookeepers can tread on alligators without eliciting a response, though crocodiles almost invariably react aggressively and are for the most part more aggressive in their natural habitat.

Perm URL with updates: http://xahlee.org/Periodic_dosage_dir/crocodile_vs_alligator.html

humor: Mac vs PC

Mac vs PC
Mac vs PC

See also:

Internet Self-Portraits by Gender

internet self-portraits by gender
Internet Self-Portraits by Gender

See also: Postures of Female and Male.

art: She Cuts Thru My Heart

she cut thru my heart klamstwo
by Joseph Wierenga. “She Cuts thru My Heart”

See also:

2011-12-02

Xah's Edu Corner: American History 101: Civil War, KKK, and Emancipation:

In 1861, president Lincoln declared in his inauguration speech: “We must hang together or hang individually”. This statement angered the United Federation states, especially the Ku Klux Klan corporation, who has lobbied against The Bill of Rights for years. A bloody Civil War ensued. Other great powers at the time, Germany, United Empire, Japan, took a opportunistic watch-and-see stance.

In 1865, the Northern states demonstrated the power of Atomic Bomb from its Manhattan Project of New York, but the test target is strategically set in a remote location in California that's ostentatiously neither Northern or Southern territory. This action spoke louder than words. The Americans since understood Lincoln's declaration, and the civil war comes to an end. The Ku Klux Klan eventually got disbanded by Martin Lurther King.

A Disney Future

disney nation mickey no more by bopchara
Mickey no more (2011-05) by bopchara

read more at http://xahlee.org/Periodic_dosage_dir/copyright_duration.html

On Copyright and its Duration

Copyright: Forever Less One Day (2011-08-23) By Cgp Grey.. @ Source blog.cgpgrey.com

read more at: http://xahlee.org/Periodic_dosage_dir/copyright_duration.html

what's the diff between england, ireland, scotland, britain??

The difference between the United Kingdom, Great Britain and England.

From: The difference between the United Kingdom, Great Britain and England (and a whole lot more) (2011-01-30) By C G P Grey. @ Source blog.cgpgrey.com

2011-12-01

Attention Deficit Disorder song

This is how I show my love
I made it in my mind because
Blame it on my A.D.D. baby

This is how an angel dies
Blame it on my own sick pride
Blame it on my A.D.D. baby

Sail

Maybe I should cry for help
Maybe I should kill myself
Blame it on my A.D.D. baby

Maybe I'm a different breed
Maybe I'm not listening
Blame it on my A.D.D. baby

Sail

Sail with me into the dark

Sail
Sail - AWOLNATION, parody.

The song is about attention deficit disorder. Above is a video parody.

For the official music video, and other detail, see: http://xahlee.org/music/sail_awolnation.html

yoga b-boying (breakdancing)

yoga b-boying

More at: Acrobatic B-boying Dance (Breakdancing) Videos

chick porn at its best

In The Service Of The King by Laura Kaye
In The Service Of The King by Laura Kaye.

from New Cover Goodness! #Vampire + Castle + Rope = Woot! (2011-12-01) By Laura Kaye. @ Source laurakayeauthor.blogspot.com

Here's the blurb:

Kael the Fair, one of seven reigning vampire warrior kings, loathes the Night of the Proffering — the night he must feed from a human female virgin to maintain his immortality and his humanity. By feeding directly from the veins of the Proffered as he takes her virginity, Kael could determine whether the mating bond exists between them — but war and a previous loss lead the king to refuse to take a mate. Groomed for the Proffering, twenty-year-old Shayla McKinnon risks her promising academic career to make two other dreams come true — vengeance for her sister's murder at the hands of the evil Soul Eaters and the impossible goal of capturing the Warrior King's heart. In the feeding chamber this night, a battle of wills ensues, one played out through a game of domination and submission that might prove dangerous to both of their hearts.

Xah's analysis:

  • It's not just a powerful man, but the most powerful — a King!
  • It's not just powerful, but a young, virile, hunk — a warrior king!
  • It's not just a warrior king, but posseses magical powers — vampire warrior king.
  • He is not some creepy lonewolf, but a respected, elite, leader — one of seven — and reigning.

This man, feeds AND copulates virgins. He had plenty, but is still looking for that One. Comes the heroine: a 21 years old girl. She, a loving yet able woman, wants this man not just for justice of her sister, but also wants to win his heart!

read more at: http://xahlee.org/Periodic_dosage_dir/bodice-ripper.html

2011-11-30

Anne Rice's Vampire and Sleeping Beauty

post moved to http://wordyenglish.com/lit/Anne_Rice_vampire_n_sleeping_beauty.html

Time Magazine Covers, USA vs World

Perm URL with updates: http://xahlee.org/Periodic_dosage_dir/Time_Magazine_covers_USA_vs_World.html

Time Mag 2001-12-05 cover
Time Mag 2001-12-05 cover.

Here's more.

Time Magazine covers USA vs World
Time Magazine covers, USA vs World.

Google Earth Flight Simulator

google earth flight simulator hud
Google Earth Flight Simulator HUD. The left bar is speed, right bar is altitude. Top is direction. Middle is angle (pitch) and roll. (you might need to adjust your window size to see the top bar.)

for detail, see: http://xahlee.org/dinju/Google_Earth_flight_simulator.html

2011-11-29

emacs lisp exercise: latitude-longitude-decimalize

This week's emacs lisp exercise, write a function “latitude-longitude-decimalize”.

It should take a string like this: 「"37°26′36.42″N 06°15′14.28″W"」. The return value should be a pair of numbers, like this: 「[37.44345 -6.25396]」.

Feel free to use perl, python, ruby, etc.

2014-01-21 solution collected at Programing: Decimalize Latitude Longitude

effective emacs

Updated: Tips on Long Term Emacs Productivity.

Solar Power: Photovoltaic vs Solar Thermal

Been spending few hours geeking about solar power.

There are 2 primary types: photovoltaic and solar thermal. Photovoltaic is the solar panels we are familiar with. i.e. a flat panel that turns sun ray into electricity directly. (e.g. on your calculator or house roof)

Solar thermal is using reflection to direct sun ray into a focal point, which turns into heat, and in turn generates electricity (usually by steam turbine).

Being a efficiency nerd, my question is, which type is more efficient at massive scale?

There are power plants using either types.

Photovoltaic is rather boring looking. You just have lots of flat panels on the ground. The reflection type is more sci-fi. (e.g. death star).

There are varieties of the reflection design. e.g. reflection parabolic troughs, that focus light into a line. The line is typically a thin oil pipe. This type is still boring to look at. You just have lots trough-like structures on the ground. Quite ugly too. Then there's arrays of flat mirrors on the ground that focus light into a high tower. Then there's giant parabolic dish ones — like a death star — the most eye-catching. See:

My question about efficiency probably involves too many factors to be specified before one could say “which is more efficient”, but anyone got some comments?