Showing posts from June 30, 2013

Emacs Regex Advantages, Whitespace Syntax & Semantics Complexity in Computer Languages

Emacs Regex Advantagesemacs regex is usually a pain, but it has, i need to change text like this:<p>盖闻天地之数,有十二万九千六百岁为一元。将一元分为十二会,乃子、丑、 寅、卯、辰、巳、午、未、申、酉、戌、亥之十二支也。每会该一万八百岁。且 就一日而论:子时得阳气,而丑则鸡鸣;寅不通光,而卯则日出;辰时食后,而 巳则挨排;日午天中,而未则西蹉;申时晡而日落酉;戌黄昏而人定亥。</p>to this:<p>盖闻天地之数,有十二万九千六百岁为一元。将一元分为十二会,乃子、丑、寅、卯、辰、巳、午、未、申、酉、戌、亥之十二支也。每会该一万八百岁。且就一日而论:子时得阳气,而丑则鸡鸣;寅不通光,而卯则日出;辰时食后,而巳则挨排;日午天中,而未则西蹉;申时晡而日落酉;戌黄昏而人定亥。</p>Basically, i need to remove newline chars, and only if it is inside the “p” paragraph tag, and only when that text is Chinese, not English.there are few hundred of such pages i need to do this.Emacs regex has a nonascii character class. So, i can use this regex:\([[:nonascii:]]\{3\}\) \([[:nonascii:]]\{3\}\)and replacement is this:\1\2〔☛ Emacs: Text Pattern Matching (regex) tutorial〕I looked at Python, it doesn't have a named char class for Unicode. Though, am sure one can use a char range. Perl does support Unicode char class, same syntax as emacs, whic…

HTML Meta Language Tag Obsolete

the meta language tag:<metahttp-equiv="content-language"content="zh">is now obsolete. See:, use the “lang” attribute, like this:<bodylang="zh">…</body>

Douglas C Engelbart Died

Douglas C Engelbart died yesterday, on July 2nd. 1925 〜 2013. 88 years old.he invented the mouse 〔☛ Computer Mouse, Trackball, Input Devices〕, and is a pioneer of computer networks.I figured since i write so much about keyboard and mouse, i should mention it.See this interesting post to learn more about him. 〔Engelbart's Violin2012-05-23 By Stanislav. @…

Paris Hilton, on Sexual Competition Among Primates

ran into a pop love song today, sung by female. One of its salient vocal goes like this: I can do what she can do so much better and, what a wonder, it's a song by Paris Hilton.

Unicode Navigational Pointers

◄►◅▻☚☛☜☝☞☟👆👇👈👉🔙🔚🔛🔜🔝These are new in Unicode 6 i think. If it doesn't display, get the font, see: Unicode 6 Emoticons and Supporting Fonts. For many other arrows, see: Unicode: Arrow Symbols ← → ↑ ↓

Emacs Lisp, Coding Style, Language Idioms, Controversy

now and then, i get criticisms on my emacs lisp tutorial. They point out that i'm not following convention. Most of the time, they just pointing out that my trailing parenthesis are not tugged into a single line (aka hanging parenthesis). Other common complaints is that my code is not idiomatic.I appreciate criticisms, and welcome negative ones. Though, coding style and idiomatic programing are two aspects of programing i've put a lot thought in, more so than most programers.In summary:Coding style conventions are mostly harmful. The language's syntax and semantics should naturally enforce it.Idiomatic programing are harmful. It should be ban'd, except the type of idiom that has a non-trivial effect on algorithm or computational's some excerpt from discussion on Google Plus thread+Nick Alcock +Elias Mårtenson i think the concept of code formatting style is harmful, for a lang with regular syntax, such as lisp, xml, Mathematica. In the latter two, on…

lisp cult

i damn hate the lispers, in particular, old Common Lispers. Sputtering scientifically baseless shit.programing lang communities need more science. Not lore, convention, cult is incredible, that lisp monotonic syntax is a problem seen by all non-lispers and expert lispers, but the lisp cult insists no problem.then, lispers sing macros, but none ever seen Mathematica pattern matching.lisper insists regular nested paren, data is code shit, yet when u point out it's not regular, they say it's ok.while, lispers don't seem to see the XML, Mathematica, both have more regular nested syntax, and code is data's helpless, because years after year, the cult cultivates untruth. Thoughts are ingrained. like religion.Concepts & Confusions of {Prefix, Infix, Postfix, Fully Nested} NotationsPrograming Language: Fundamental Problems of LispPrograming Language: LISP Syntax Problem of Piping FunctionsLISP Sans Parenthesis, 1958 to 2013, a SurveyWhat Are Good Qualities of C…