Showing posts from 2012

spammer post spam to deceased blogs

when you stop using blogger for a few months, flurry of spammers goes to your blog and post spam.

Xah at Blogger is Desisting!

I'll be stop publishing on this blogger at read my blogs of different subjects, please subscribe at Xah Lee FeedsThis blog won't be closed. All articles stay. I might post once or twice in a year. Especially in emergency situation such as if my sites are down, or testing some blogger widget features (such as poll.)Thank you all for reading, comments, and support!Complaints? Gripes? Comment below to me know. If enough of you want a blogger mirror, you might change my mind.

Geometric Dissection in Expandable Table Furniture


Math Symbol as Function Name in Python 3

Wee, python 3 now supports Unicode in variable and function names! Example:# Python 3 defƒ(n): return n+1 α = 4 print(ƒ(α)) # prints 5 In python 2, you can't do that, also, you'll have to put # -*- coding: utf-8 -*- in the first line if your script if it contains any unicode string.Unicode in Perl & PythonUnicode Support in Ruby, Perl, Python, JavaScript, Java, Emacs Lisp, Mathematica

funny cat pics


Why I Hate C

Perm URL with updates: despise C the language, not because of particular technical aspect, or lacking some functionality such as lacking {automatical memory management, module system, namespace, list/hashtable datatype, complex number datatype, regex, function closure, function as value, OOP support, functional programing support, …}, none of that, but on certain sloppiness that's in the bones of C. (pretty much like unix (they bootstrap each other (it's scam booting scam)))Perhaps the best simple example to illustrate, is its invention of the format function printf. Completely ad hoc, inflexible, cryptic syntax and semantics. When i first learned it (thru Perl. (C/Unix has a knack like virus. Now it's in about every lang.)), i went WTF is this? (i came from Mathematica). The printf can print hex, but with fixed representation of the digits, and can't do arbitrary n-based number system. It can print decimal in several for…

Curiosity: Perl File Extension in Emacs Config

A curiosity question.emacs's “auto-mode-alist” has this value: ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) the regex there seems a bit wild. If i didn't get it wrong, then its like this . ([pP] ( [Llm] | erl | od ) | al ) so it covers: .pl .perl .pod .pm .al plus SOME case variations. e.g. {.pL , .PL}.what's the “.al” for?is it necessary to include the “.pod”? because the perl-mode doesn't do any coloring with “.pod” files, nor cperl-mode. If there's a mode handing “.pod” file am guessing it won't be perl-mode.also, is the “.perl” there necessary? Is that a accepted perl file suffix? (Just checked it's not in any file bundled with perl v5.10.1.)would it be better if it's just ("\\.\\(p\\([lm]\\)\\)\\'" . perl-mode) ?Emacs: How to Associate a File with a Major Mode?Emacs: Text Pattern Matching (regex) tutorialXah's Perl & Python Tutorial

Tonight I'm Frakking You


emacs lisp: getting current buffer path

In your elisp program, you may call (buffer-file-name) to get the full path of the file, but sometimes the current buffer isn't associated with a file, so your program will fail.Here's a idiom: (or (buffer-file-name) default-directory). This way, if the buffer isn't a file, it'll return the directory path of the buffer. (when a buffer is created, its “default-directory” is typically the same as previous buffer. In the case of temp buffers created by emacs such as {*info*, *scratch*, *Bookmark List*, …}, it's usually home dir.)I just searched all my elisp files for this oversight.(info "(elisp) Buffer File Name")Emacs Lisp Idioms (for writing interactive commands)Common Emacs Lisp Functions

BMW's Sexual Ad

post removed because it might violate Google's ad program policy. See here instead: 〈Xah's Sex Blog〉

Gauss's construction of the 17-gon

Gauss's construction of the 17-gon (Heptadecagon). He probably didn't actually draw it, only proved possible.Gauss construction 17-gon (unverified)More info on Wikipedia Constructible polygon

Emacs Lisp: Ways to Exit/Break a Loop

Perm URL with updates: many languages, there's “break” or “exit” keywords that you can use to exit a loop. In functional programing, usually you don't do loops or exit loops, but sometimes that's just what you need.In elisp, to exit loop, you can either use a flag (i.e. set a variable to indicate whether to exit.), or use the built-in catch and throw.Using a FlagHere's a pseudo-code for using a flag: (while (and (not found) (< i listLength)) … ; if found, set found (setq i (1+ i)) ) Here's a actual example using a flag: (defunget-new-fpath (ξfPath moveFromToList) "Return a new file full path for ξfPath. moveFromToList is a alist." (let ((ξfoundResult nil) (ξi 0) (ξlen (length moveFromToList)) ) ;; compare to each moved dir. (while (and (not ξfoundResult) (< ξi ξlen)) (when (string-match (concat "\\`" (regexp-quote (car (elt moveFromToList ξi))) ) ξfPath ) (let…

JavaScript: Exclamation Before function

I come across JavaScript code like this today: !function(d,s,id){…}(…); What does that !function mean?Turns out, it is equivalent to this: (function(d,s,id){…})(…); The exclamation makes the function a expression. (it's the boolean “not” operator.) People do this hack to save one character worth of source code file size. Silly.

List of Keyboards with Mechanical Switch

Perm URL with updates:'s a quick list of keyboards with mechanical switches. They typically start at $70. Ergonomic ones with fancy shapes usually starts at $200. (If you don't know what Cherry MX means, first see: Guide to Computer Keyboard Key Switch Mechanisms.)Note: Microsoft or Logitech keyboards do not use mechanical switches, even expensive ones.Ergonomic• Truly Ergonomic Keyboard (Cherry MX Brown)• The μTRON Keyboard (hard to buy in USA)• Kinesis Contoured Keyboard (Cherry MX Brown)• Maltron KeyboardDatadesk Tech Smartboard Keyboard. (may be hard to buy) Picture at Ergonomic Keyboards GalleryStandard• Corsair K60, K90 (Cherry MX Red)• Filco Majestouch. Produces many different models, with or without numberical keypad, and also with many switch type: Brown, Black, Blue, or Red. Be sure to read model's spec in detail. (104 keys: amazon) (See: Keyboards Without Numberic Keypad.)• Razer BlackWidow. (Cher…

Wordy English: A Etymology Rhapsody on Spiracle

New Wordy English article: 〈A Etymology Rhapsody on Spiracle〉: spiracle, fan, allophone, camouflage @ sure to subscribe Wordy English for literature/writing/vocabulary related articles.

Emacs: Ways to Jump to Points

when coding, there's a common need to jump to a particular place, then return to previous position.There are several ways. Most common standard way are:exchange-point-and-mark 【Ctrl+xCtrl+x】.【Ctrl+uCtrl+Space】I've tried all ways in past years, including custom elisp that push marks. But i found split windows to be the best.e.g. split window. Go to where you wanna be. When done, unsplit. Give split/unsplit a easy key. (➲ Emacs: How to Define Keyboard Shortcuts) e.g. In ErgoEmacs, it's:【Alt+3】 delete-other-windows【Alt+4】 split-window-vertically【Alt+0】 delete-window【Alt+s】 other-windowOn a different note, here's a nice tip when using mouse (thx to Ken Goldman):Middle mouse button on a status bar expands current pane.Right mouse button on a status bar closes current pane.

Emacs Lisp: Adding Your Package to MELPA

Emacs 24's package system is hot. It spreads a few hundred packages to every emacs user. (In GNU emacs, 41 packages (not counting built-in ones). With MELPA, 307 packages.) Before this, it takes years of emacs experience to know what packages are out there that are actually usable.So, if you have written a package, putting it into a package repository would greatly increase your user base. I haven't done it yet myself, but here's a tutorial from Jon-Michael Deldin.MELPA is pretty easy ( after you do it once.Fork the MELPA repository on GitHubCreate a new file in the “recipes” directory with the right format. It's really easy — just take a look at an example recipe ( it with the ./buildpkg script and do M-x package-install-fileOn GitHub, visit your fork and click the Pull Request buttonThat's pretty much it. Marmalade is a lit…

Lisp Syntax Readable?

lisp syntax is really unreadable. 10 years ago, i thought it's more of a joke for those uninitiated. But then surely the basic fact of uniformity is a problem for reading (because in nature, things are not uniform). But now having coded lisp for ≈5 years, i do find it comparatively's sample code am currently reading. (defunkill-new (string &optional replace yank-handler) "Make STRING the latest kill in the kill ring. …" (if (> (length string) 0) (if yank-handler (put-text-property 0 (length string) 'yank-handler yank-handler string)) (if yank-handler (signal 'args-out-of-range (list string "yank-handler specified for empty string")))) (unless (and kill-do-not-save-duplicates ;; Due to text properties such as 'yank-handler that ;; can alter the contents to yank, comparison using ;; `equal' is unsafe. (equal-inclu…

Emacs Key Macro and Elisp Exercise: Reformat XML

2012-07-02, Mihamina Rakotomandimby posted a interesting problem (Source got a big one line XML file. I want to break the lines to make it more readable.Replacing "><" with "C-j" then indenting is the most obvious solution, but would you know a more elegant solution?This is a good exercise for emacs a keyboard macro. Record a key macro, save it, assign it a key. So, just press one key, and the file is indented and indent, just select all then call indent-region 【Ctrl+Alt+\】.For key macro tutorial, see: Emacs: Using Keyboard Macro to Record/Playback Keystrokes.or, if you are a emacs expert but never done any elisp, this is a great exercise. Write a command that does this. It's about 5 lines of elisp. (➲ Emacs Lisp Examples ₁)

Emacs bug: Inserting French Quotation Mark

Perm URL with updates: to reproduce:Start emacs by: emacs -Q.Evaluate this: (global-set-key (kbd "<kp-8>") "«").Now, press the 8 on numerical keypad.Expected result: the french open quote is inserted. However, you get this error: After 0 kbd macro iterations: Keyboard macro terminated by a command ringing the bell Note that the following all work: (global-set-key (kbd "<kp-8>") "「") (global-set-key (kbd "<kp-8>") "『") (global-set-key (kbd "<kp-8>") "〈") (global-set-key (kbd "<kp-8>") "《") (global-set-key (kbd "<kp-8>") "“") (global-set-key (kbd "<kp-8>") "‘") (global-set-key (kbd "<kp-8>") "‹") (global-set-key (kbd "<kp-8>") "〔") GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVIN

Queen - Bohemian Rhapsody

«Galaxy Nexus and Google+ Hangouts: Bohemians»Cute girls. Cute.Now, the real version. A fantastic song. Fantasmagorical.“Queen - Bohemian Rhapsody” amazonBut, half of the charm lies in the lyrics. see: song is written and sung by Freddie Mercury. he died of AIDS, in 1991 (age 45).A Whiter Shade of PaleMoody Blues - Nights in White SatinDavid Bowie - Life on MarsSupertramp (Roger Hodgson) - the Logical SongJefferson Airplane - White RabbitMurray Head - One Night in BangkokChoi Sung-Bong - Nella Fantasia

copy/paste in Linux X11 and emacs 24

In linux, if copy/paste doesn't work with other apps, you need to add this line: (setq x-select-enable-clipboard t) 2012-04-22 in GNU Emacs, that var is set to t now.In X11 (Linux), there are basically 2 major copy/paste mechanisms: ① primary selection. ② clipboard. By convention, when you select a text using mouse, the text is automatically put into the primary selection, and middle click will paste it. The “X11's clipboard” is similar to the clipboard in Mac or Windows. You copy/paste by menu or keyboard. The primary selection and clipboard are independent.(info "(elisp) Window System Selections")X Selections, Cut Buffers, and Kill Rings ≈2002-01-01 By Jamie Zawinski . @ Source www.jwz.orgX Window selectionPerm URL with updates:

Emacs Defect. file-relative-name fail on some MS Windows Styled Path

file-relative-name doesn't work on MS Windows style path when the drive letter is capitalized. (file-relative-name "C:/Users/web/xyz.html""C:/Users/web/") ; returns "C:/Users/web/xyz.html" (file-relative-name "c:/Users/web/xyz.html""c:/Users/web/") ; returns "xyz.html" (file-relative-name "/Users/web/xyz.html""/Users/web/") ; returns "xyz.html" GNU Emacs 24.1.1 (i386-mingw-nt6.1.7601) of 2012-06-10 on MARVINPerm URL with updates:

Emacs Commpand to Copy Rectangle to Clipboard

Here's a command to copy a column of text to clipboard. (defuncopy-rectangle-to-clipboard (p1 p2) "Copy region as column (rectangle) to operating system's clipboard. This command will also put the text in register 0. (see: `copy-to-register')" (interactive "r") (let ((x-select-enable-clipboard t)) (copy-rectangle-to-register ?0 p1 p2) (kill-new (with-temp-buffer (insert-register ?0) (buffer-string) )) ) ) See also: Emacs: Manipulate Column Text, string-rectangle, ASCII-Art

Microsoft Classified FSF Donation site as Gambling

There's this piece of news going around:How Microsoft Threat Management Gateway Classifies (self.gnu)2012-06-15 By Rebbsitor. @ Source www.reddit.comIn summery, a Microsoft security site “Microsoft Reputation Services” classified Free Software Foundation's donation site 〔〕 as in the “gambling” category. (but also {Technical Information, Shareware/Freeware})This means, corporations using Microsoft's services will automatically block visiting such site. More about this is has been written by FSF:Dear Microsoft: is not a “gambling site”2012-06-22 By Posted John Sullivan. @ Source www.fsf.orgI was curious about what Microsoft thought of my website is classified by Microsoft as {Pornography, Blogs/Wiki, Shareware/Freeware}. See: LOL. It appears, their service is quite off.Here's a correction i submitted to their site:hi, your service classified my …

Architectural Beauty: El Jadida Cistern


emacs 24 feature: electric-pair-mode

Perm URL with updates: minor mode electric-pair-mode. When on, typing any left bracket automatically insert the right matching bracket. Brackets includes the ASCII ones: "double" 'single' () {} [], but also any unicode ones: «» ‹› “curly” ‘single’ 「」 『』 〈〉 《》 〔〕 【】…. (➲ Matching Brackets in Unicode)Deleting one bracket doesn't delete the other. (If you want that, install autopairs package. (➲ A Guide on Emacs Package System))Exactly which brackets are auto-closed depends on the current major mode's syntax table. (You can call describe-syntax to see current syntax table. (info "(elisp) Syntax Tables"))If you always want certain brackets be inserted in pairs, you can customize the variable “electric-pair-pairs”. Its value should be a Association List (i.e. a list of cons pairs. (info "(elisp) Association Lists")).For example, the curly bracket {} isn't auto-closed when i…

Controversy of Common Lisp Package in Emacs Lisp

Perm URL with updates: you emacs lisp coders, there's controversy in using the cl package (require 'cl). This page is my introduction about the issue, with opinions from emacs developers.First, here's what the official manual (info "(cl) Top") says about it: *Please note:* the "CL" functions are not standard parts of the Emacs Lisp name space, so it is legitimate for users to define them with other, conflicting meanings. To avoid conflicting with those user activities, we have a policy that packages installed in Emacs must not load "CL" at run time. (It is ok for them to load "CL" at compile time only, with `eval-when-compile', and use the macros it provides.) If you are writing packages that you plan to distribute and invite widespread use for, you might want to observe the same rule. What that means is this: don't use (require 'cl) in your package. But if …

quality hand toy for RSI, emacs users

discovered a quality hand toyCrazy Aaron Thinking Putty. amazon〈Thinking Putty unboxing〉 amazonmore hand toys, bottom:

编辑部的故事, 人工智能人

Perm URL with updates: fantastic TV show from China: 〈Stories from the Editorial Board〉, 1991.Here's a wonderful episode, titled 〈Smart Robot〉. (Chinese only. No English subtitle.)编辑部的故事 EPISODE 22 PART 1编辑部的故事 EPISODE 22 PART 2编辑部的故事 EPISODE 22 PART 3编辑部的故事 EPISODE 22 PART 4编辑部的故事 EPISODE 22 PART 5More info about this show can be found at and 编辑部的故事. Quote:1991年上映的25集电视连续剧《编辑部的故事》,导演赵宝刚。该剧描写一个叫《人间指南》的杂志编辑部里,6个性格各异却都善解人意、乐于助人的编辑之间的交流与碰撞,描写他们与社会发生联系后产生的形形色色的人生故事。这是我国第一部电视系列喜剧,剧中的调侃、幽默、讽刺、戏谑,开电视系列片之先河,它的出现,拓展了我国电视剧的美学品格。

Nation-state sponsored: Flame Malware

Wow, Flame (malware).• Most advanced malware to date.• Likely nation-state sponsored.• Create fake but valid certificates.• hijacks Microsoft update.• User level program can't even see it.• Can record audio, screenshots, keyboard activity and network traffic.[6] The program also records Skype conversations and can turn infected computers into Bluetooth beacons which attempt to download contact information from nearby Bluetooth-enabled devices.• Remotely controlled. Including a command to self-destruct.• Target seems to be Iran.Who wrote it? We did! (suspects: one of {Israel, USA, China}.)

Human Walking Speed, Power Walk, Racewalking

Perm URL with updates: ≈ Sissy-walkRussia's Olga Kaniskina won the women's 20-kilometer walkRacewalking is different from power walk.Power Walk is walking fast, with the criterion that at least one foot must be in contact with the ground. A very good exercise, alternative to jogging.Racewalking has additional rule: when leg contact the ground, the knee must be straight. (i.e. you can't crouch walk like ninja)so, i guess this developed this sissy-like hip swinging form. It's somewhat unnatural. Can't see how it became a olympic sport.average human walking speed = 5 km/h ≈ 1.39 m/s.average person walk very fast = 7 km/h to 9 km/ level racewalk 20km = 14 km/h.2011 Australian Race Walk Champs, CanberraIs Barefoot Running Healthier?

emacs 24: {beginning-of-defun, end-of-defun} in {C, C++} modes

Perm URL with updates:'s some changes on how the cursor moves when you call {beginning-of-defun 【Ctrl+Alt+Home】, end-of-defun 【Ctrl+Alt+End】} in {C,C++} modes in emacs.Now, it move the cursor just one level up of a nested block. Before, it moves several levels up to actual function/class definition, out of several nested blocks of code if necessary.Here's a sample C++ template code you can test on.namespacemy_namespace { voidfunc1() { } voidfunc2() { } classMyClass { public: MyClass() { } voidmethod1() { } voidmethod2() { } }; } Here's a video showing the difference. (Thanks a lot to David Capello.)〈C++ navigation in Emacs 23.4 vs Emacs 24.1〉, by David Capello

Emacs: to Mouse or Not to Mouse?

Bill Meahan, a veteran of emacs users and veteran programer back to 1960s, in a comment said he usually don't mouse in emacs. That is true for me too. Come to think of it, to be honest i do use mouse when i want to adjust the different window or frame sizes (I do this perhaps once a day). I think i also use mouse to scroll sometimes (probably hourly). Another instance where sometimes i use mouse is when browsing info doc for long session.Emacs culture usually sticks to keyboard only. Though, i remember one time i was surprised reading on where i think a experienced emacs user uses mouse for text selection. I think this might be more common before emacs 23 had move by visual line.There's not much data about how average emacs users (who may never read emacs online forums) may or may not use mouse. So, i'd like to ask this to you all.Do you use mouse in emacs? for what operation?Comment at my blogger…

Sci-fi, Orgasm Machine, Pure Pain Machine, and Human Suffering

Perm URL with updates: is a agent, in scifi, that causes orgasm, non-stop, at will, at girls you want. Wonderful. But am thinking, perhaps in a similar train, that there be a agent that causes pure pang for human suffering.No, not pain. Pain, as in torture, is of course popular. Human animals is of no lack of imagination of causing extreme pain to other human animals. There are plenty pure pain machine in scifi. But am talking about a emotional pain, a pain for human suffering. Like, for example, when you are not in the mood and saw a girl being violently raped to death, or such. But if you have the feel of this, then imagine the general suffering of humanity. The poverty, the hunger, atrocities, little wanting, desires, the little kindness, gratitude, even a little innocent smile …it seems am afflicted with such a neurotic disorder. So, am thinking, on scifi train, of such a pure agent that could cause this at will. So, …

emacs regex affair

spent good part of the past 2 days on this.emacs regex affairSee also: Your Regex Brain.

Space Groups, Math and Chicks

got a chick from Moscow State University asking me about implementing Space group in Mathematica. Life's been worth living.Geometry: Plane Tiling Mathematica PackageThe Discontinuous Groups of Rotation and Translation in the PlaneGeometric Tilings and Patterns Image GalleryAnna, yes, you.… haven't worked on this since 1998. I did 2D version. The 3D version would be much spectacular, especially with today's computing technologies (e.g. dynamic rotation in web browser). Also, going into higher dimension (e.g. 4th) would be a wonderful exercise in writing combinatorics programs or exploration into proof systems. Dimension 7 or higher hasn't been solved yet. Fame awaits!Geometry: Requirements for a Visualization System for 2020Algorithmic Mathematical Art ₁

emacs 24 is out

Emacs 24 is out. also: New Features in Emacs 24. I'll add a new item there every few days.

music: Bronski Beat - Smalltown Boy

Perm URL with updates: song, lousy music video. Bronski Beat - Smalltown Boy, 1984.Bronski Beat - Smalltown Boy. amazon Title: Smalltown Boy Music, Lyrics: James Somerville; Lawrence Cole; Steve Bronski You leave in the morning with everything you own In a little black case Alone on a platform, the wind and the rain On a sad and lonely face Mother will never understand Why you had to leave For the answers you seek will never be found at home The love that you need will never be found at home Run away, turn away, run away, turn away, run away Run away, turn away, run away, turn away, run away Pushed around and kicked around, always a lonely boy You were the one that they'd talk about around town As they put you down And as hard as they would try, they'd hurt to make you cry But you'd never cry to them, just to your soul No, you'd never cry to them, just to your soul Run away, turn away, run away, turn away, run away …

Random Math Notes: Friedrich Hirzebruch, Theorema Egregium, … (2012-06-06)

Perm URL with updates: today from my friend Richard Palais that Friedrich Hirzebruch (1927 〜 2012) passed away last week.Friedrich Ernst Peter Hirzebruch (17 October 1927 – 27 May 2012) was a German mathematician, working in the fields of topology, complex manifolds and algebraic geometry, and a leading figure in his generation. He has been described as “the most important mathematician in the Germany of the postwar period.”Complex manifoldsIn differential geometry, a complex manifold is a manifold with an atlas of charts to the open unit disk[1] in Cn, such that the transition maps are holomorphic.The term complex manifold is variously used to mean a complex manifold in the sense above (which can be specified as an integrable complex manifold), and an almost complex manifold.Holomorphic = Holomorphic function. Quote:In mathematics, holomorphic functions are the central objects of study in complex analysis. A holomorphic …

傷心酒店 (Heartbreak Bar)

Perm URL with updates:江蕙+施文彬 - 傷心酒店. 傷心酒店 作詞:羅文聰 作曲:吉幾三 Date: 1993 (女) 冷淡的光線, 哀怨的歌聲, 飲酒的人無心情 (女) 世間的繁華, 好像夢一場, 也是沒有用 (男) 暗淡酒店內, 悲傷誰人知, 痛苦吞腹內 △0 (女) 一杯又再來 (男) 妳若有了解 (合) 甭問我從那來 △1 (女) 不願講出來, 鬱悶在心裡, 感情失落的無奈 (女) 苦苦在等待, 還是等不到愛, 虛情的對待 (男) 多情的世界, 找不到真愛, 引我心悲哀 △2 (女) 有愛也罷 (男) 無愛也快活 (合) 今夜伴我是孤單 (合) 冷淡的光線, 哀怨的歌聲, 飲酒的人無心情 (合) 世間的繁華, 好像夢一場, 也是沒有用 (男) 暗淡酒店內, 悲傷誰人知, 痛苦吞腹內 △0 △1 △2 (男) 多情的世界, 找無真情愛, 引我心悲哀 △2 蔡幸娟+傅振輝 - 傷心酒店Quick translation: Heartbreak Bar cold lights, sad music, this drinker has no mood the beautiful world, a transient dream, useless this dim lit bar, who can understand, i keep to myself drink after drink if you understand don't ask me where i'm from unable to to tell, the sadness in my heart, the feelings of heartbreak waiting for a love, that never came, the uncaring treatment this beautiful world, but no love for me, only the blues 皓皓 - 伤心酒店 (singing both male/female)未識綺羅香 (A Poor Girl)蕭孋珠 - 詩意 (Shiyi)葉蒨文 - 晚风 (Nig…

English Accents

ODE notation considered harmful

Nice article:ODE notation considered harmful2012-06-05 By ?. @ Source stochastix.wordpress.comSee also: The Problems of Traditional Math Notation.

men need to be assholes, women need to be pretty

post removed because it might violate Google's ad program policy. See here instead: 〈Xah's Sex Blog〉

Skateboarding Flips in Slow Motion


Gmail State-Sponsored Attack Warning 2012-06-06

I'm getting a warning from Gmail.Gmail state-sponsored attack warning 2012-06-06It started yesterday. I've since turned on Google's 2-steps verification, but the warning still come on today. It's pretty weird, since am in USA, and am not a China activist. Hardly know anyone in China except a few programers recently met on twitter.

Nice Text Column Commands in cua-mode

There's a nice feature of cua-mode. Turn it on, then 【Ctrl+Enter】 to start selecting rectangle. Then, you can start typing to insert text to the whole column, or press 【⌫ Backspace】 to delete to the left every char on the left boundary, or press 【⌦ Delete】 to delete the whole rectangle, or use any of {Cut, 【Ctrl+x】, Copy 【Ctrl+c】, Paste 【Ctrl+v】}. To cancel selection, press 【Ctrl+Enter】 again.This is much better than emacs's rectangular commands (e.g. kill-rectangle 【Ctrl+xrk】) because it visually highlight only the column selection, and no need for use specialized rectangle commands.via +Markus Schützfor more about working with column text, see: Emacs: Manipulate Column Text, string-rectangle, ASCII-Art

emacs url-unhex-string defect

Perm URL with updates: emacs functions {url-unhex-string, gnus-url-unhex-string} returns incorrect result. Example: (require 'url-util) ;; emacs-24.1.50_2/lisp/url/url-util.el (url-hexify-string "Gauss–Bonnet_theorem") ; returns "Gauss%E2%80%93Bonnet_theorem" (url-unhex-string "Gauss%E2%80%93Bonnet_theorem") ;; returns "Gauss\342\200\223Bonnet_theorem" (require 'gnus-util) ;; emacs-24.1.50_2/lisp/gnus/gnus-util.el (gnus-url-unhex-string "Gauss%E2%80%93Bonnet_theorem") ;; returns "Gauss–Bonnet_theorem" ;; correct result should be: "Gauss–Bonnet_theorem" Another issue is, why there's duplicate {url-unhex-string, gnus-url-unhex-string}?Some discussion and temp solutions at:gnu.emacs.helpcomp.lang.lispReported to FSF: bug#6252.For browser's behavior, see: URL Percent Encoding and Unicode. For example of correct behavior in JavaScript, see: JavaScript Encode …

math: Fractal Gears

“clockwork” (2012) by zy0rg. img src

CSS 3 Selector not in CSS 2.1

Here's CSS 3 selector syntax that's not in CSS 2.1.PatternMeaning‹tag›[‹attr›^="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value begins with the string "‹val›"‹tag›[‹attr›$="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value ends with the string "‹val›"‹tag›[‹attr›*="‹val›"]Matches any ‹tag› element whose ‹attr› attribute value contains the string "‹val›"PatternMeaning‹tag›:rootMatches element ‹tag› that is root of document.‹tag›:nth-child(‹n›)Matches element ‹tag› that is nth child of its parent.‹tag›:nth-last-child(‹n›)Matches element ‹tag› that is nth child of its parent, counting from the last one.‹tag›:nth-of-type(‹n›)Matches element ‹tag› that is nth child of the same type.‹tag›:nth-last-of-type(‹n›)Same as ‹tag›:nth-of-type(‹n›) but counting from bottom.‹tag›:last-childMatches element ‹tag› when ‹tag› is the last child of its parent.‹tag›:first-of-typeSame as ‹tag›:nth-of-type(1)‹tag›:l…

Emacs 24 Package System Problems

Perm URL with updates: page describes some flaws with emacs 24's package system. If you are not familiar what it is, see: A Guide on Emacs 24 Package System.2012-06-02 does anyone have problems with emacs package system?recently, installed several packages with it: {rainbow-mode, “bookmark+”, smex, “expand-region”}.But they all have a similar problem related to autoload. For example, let's say rainbow-mode. When opening a CSS file, it's not loaded. You have to manually call it. So, if you want it to activate in CSS, you have to add stuff to your init file. Then, this means the package system does not really automatically manage things. You still have know some elisp, and manually add things to your init file. (we talking about basic activation, not advanced customization)The issue is more pronounced with modes such as “bookmark+”, smex, “expand-region”. For example, after installing “bookmark+”, restart emacs, th…