Showing posts from May 27, 2012

a Conflict of Hacks: Unix Shebang, Unicode BOM Mark

BOM mark is part of the unicode standard. If a tech declares full support for unicode, support for BOM mark is necessary. (the story i heard is that Haskell compiler chocked on BOM, and people are blaming Microsoft Notepad for adding the BOM. But the fact is, Haskell spec says it's source code is Unicode, thus chocking on BOM is Haskell's fault.)BOM mark is a hack, but so is unix shebang mark. BOM mark being a given, it wouldn't have any problem if utf-8 isn't invented. utf-8 is invented by unix guy Ken Thompson and unix fanatic Rob Pike largely to help unix world move forward to unicode. As it is, BOM mark conflict with the spirit of utf-8 (because utf-8 is meant to be ASCII compatible as is, yet BOM mark byte sequence isn't in ASCII.)i read the link Thien-Thin Nguyen posted: At first i find it very informative, but in the end i wasn't convinced in its opinion that we should all adopt utf-8 instead of utf-16. I think if one swit…

Edward O'Connor (aka hober) vs Xah Lee

Perm URL with updates: page documents some conflicts between Edward O'Connor (aka hober) and Xah Lee (me), from my perspective.Edward O'Connor (aka hober) guy is a Free Software Foundation fanatic, and quick to label people who disagree with him as “troll”.We first met in Freenode's IRC #emacs channel in ≈2006. At first he is friendly, but quickly considered me a “troll” due to my controversial opinions. Much more detail here: Freenode IRC Emacs Channel Ban on Xah Lee.Why would he consider me troll? Here's few of my essays, he probably consider them trolling. Judge yourself:“Free” Software Morality, Richard Stallman, Paperwork BureaucracyEmacs ModernizationEmacs Idolization: Have You Read the Emacs Manual From Cover to Cover?Edward runs a emacs blog aggregate site In ≈2011-05-31, people suggested that my emacs blog be added, he turned the request down, saying that i'm a “co…

GNAA Weev (Troll) Song


Porn, Wikipedia, Larry Sanger Censorship

〈Porn, Wikipedia, Larry Sanger Censorship〉. Read at:

Keyboard Geeking 2012-05-30

I went to local store and tried a bunch of keyboard again for like a hour. Made several discoveries.• Discovered that Steelseries 6Gv2 keyboard amazon uses Cherry™ Black MX mechanical key switch.• Cherry™ Black MX mechanical key switch. Don't like it at all. Too stiff. (See: Guide to Computer Keyboard Key Switch Mechanisms.)• Discovered Corsair K60 Keyboard. FANTASTIC! Cherry MX Red switch. Full analysis here: Gaming Keyboards: Corsair K60, K90.• Discovered that Logitch {G110, G510, G19} gaming keyboard are shit. That is, the key mechanism is SHIT. They are rubber dome, of course, i knew that. But different rubber dome have different feel, some are ok. Some rubber dome key's tactile feel still gives you a sense when a key is pressed. That is, when you press down a key, at some point, the dome collapses, and the key gets sucked down. This is good for typing. However, on Logitch gaming keyboards, they are rather linear, and no crisp bottom neither. So, the whole feel is mushy. T…

Database Tech Snapshot 2012

Started to do some interview. Here's some random notes of tech snapshot, 2012. Some has been around for a few years and is used by many large companies.Here's large scale database related tech:MongoDB. document-oriented NoSQL database system.Redis. networked, in-memory, key-value data store with optional durability.Memcached. distributed memory caching system. For speed up dynamic database-driven websites by caching data and objects in RAM.RabbitMQ. message broker software (i.e., message-oriented middleware) that implements the Advanced Message Queuing Protocol (AMQP) standard. The RabbitMQ server is written in Erlang. TCP/HTTP Load Balancer. EC2Document-oriented databaseSmall scale database:SQLiteTokyo Cabinet: Beyond Key-Value Store2009-02-13 By Ilya Grigorik. @ Source www.igvita.comDbmSource

Gaming Keyboards: Corsair K60, K90

Perm URL with updates: Vengeance K60, ≈$95Corsair K60 keyboard, with extra colored and specially sculpted key-caps on (these extra caps come with the keyboard). amazonSource www.bit-tech.netamazonThis is EXCELLENT.This keyboard is heavy. It doesn't have fancy features or extra keys, but the most important aspect of keyboard, the key mechanism, is top-notch here.The key switch mechanism is Cherry™ MX Red. (linear feel, no click, light) (See: Guide to Computer Keyboard Key Switch Mechanisms.)The keyboard is also of the highest quality. The keyboard's chassis is actually brush aluminum. Real metal. The keyboard's cable is nothing you've ever seen. It's very thick, wrapped with some type of cloth-like material, kinda like high-class electric cable you find in antic stores.Corsair keyboard cable.It seems to require 2 USB ports (i suppose the reason is because of the 20 Key Roll-over over USB.). However, the keyboard al…

poetic chinese love song: 秋詩篇篇

Perm URL with updates: 銀霞 - Title: 秋诗篇篇 (movie 〈秋诗篇篇〉 theme song) Date: 1978 Singer: 銀霞 Lyrics: 刘家昌 Music: 刘家昌 Arrangement: 鍾興民 深秋楓又紅 秋去留殘夢 我心付諸於流水 恰似落葉然飄零 轉眼之間 白雪遮晴空 寒風襲嚴冬 莫待櫻花盛開春來 也踏雪尋芳蹤 雪花片片未識綺羅香 (A Poor Girl)蕭孋珠 - 詩意 (Shiyi)葉蒨文 - 晚风 (Night Breeze)鄧麗君 - 胭脂泪 (Girl's Tears)梨花淚 (Tears of Pear Blossom)北京欢迎你 (Beijing Welcomes You)

Emacs: Convenient Command to zip File in dired

(defun2zip () "Zip the current file/dir in `dired'. If multiple files are marked, only zip the first one. Require unix zip commandline tool." (interactive) (require 'dired) (let ( (fileName (elt (dired-get-marked-files) 0)) ) (shell-command (format "zip -r '' '%s'" (file-relative-name fileName) (file-relative-name fileName))) )) See also: Emacs: Convert Image Files in Dired.

Popular JavaScript Books 2012

JavaScript & jQuery: The Missing Manual2011-10-28 By David Sawyer Mcfarland. @ amazonJavaScript: The Definitive Guide2011-05-10 By David Flanagan (Author). @ amazonJavaScript: The Good Parts2008-05-30 By Douglas Crockford. @ amazonEloquent JavaScript: A Modern Introduction to Programming2011-02-03 By Marijn Haverbeke. @ amazonProfessional JavaScript for Web Developers2012-01-18 By Nicholas C Zakas. @ amazoni haven't read any. Have you? which's better?

Best Tool for Yak Shaving: Emacs

Perm URL with updates:'s an example:“I was working on my thesis and realized I needed a reference. I'd seen a post on comp.arch recently that cited a paper, so I fired up gnus. While I was searching the for the post, I came across another post whose MIME encoding screwed up my ancient version of gnus, so I stopped and downloaded the latest version of gnus.”“Unfortunately, the new version of gnus didn't work with emacs 18, so I downloaded and built emacs 20. Of course, then I had to install updated versions of a half-dozen other packages to keep other users from hurting me. When I finally tried to use the new gnus, it kept crapping out on my old configuration. And that's why I'm deep in the gnus info pages and my .emacs file — and yet it's all part of working on my thesis.”And that, my friends, is yak shaving. (Not that this particular example happened to me recently or anything.)Programer Humor: Emacs User at W…

post your emacs questions. May 28, 2012

2012-05-28 post your emacs questions.comment here, or on g+ at Source, or twitter

Emacs Lisp: Writing Command to Accept universal-argument

Perm URL with updates: page shows you how to make your emacs lisp command accept universal-argument 【Ctrl+u】 given by user.Problem DescriptionYou have written a emacs command. You want the command's behavior to be slightly different if user presses 【Ctrl+u】 before calling your command.DetailEmacs has a mechanism for a command to have variant behavior if user calls universal-argument 【Ctrl+u】.The universal argument has many uses. It can let user repeat a command n times. For example, type 【Ctrl+u20-】 and it'll type out --------------------.For some commands, the universal argument is useful for variant behavior of the command. For example, in dired, typing w will copy the file name (dired-copy-filename-as-kill), but if you type 【Ctrl+u0w】, the copied name will be file full path.SolutionLet's say you want a command to copy the file path of current file. But if universal-argument is called, then copy just the dir path.…

vim user is shocked!

This tweet is going around:@lichray #Vim 用户表示震惊。 RT @ErgoEmacs: Emacs: How to Copy/Cut Current LineTranslation: «@lichray #Vim users are shocked! RT @ErgoEmacs: Emacs: How to Copy/Cut Current Line»