Showing posts from August 15, 2010

CSS1 And CSS2 Differences

Perm url with updates: And CSS2 DifferencesXah Lee, 2005-11, ..., 2010-08-21This page shows the primary features in CSS2 not in CSS1. If you are not familiar with CSS, see: CSS Basics. If you know the basics and want a practical examples of css tag matching supported by all current versions of browsers, see: CSS Tag Matching (Selector) Syntax. CSS1 is published in 1996. CSS2 is published in 1998. As of today, all major browsers supports pratically 99.9% of CSS2. CSS3 is in works but not out yet. Note: there's no way to specify a CSS version number in your HTML markup. Just test with browsers if you must use new features.Tag MatchingCSS2 provides more powerful ways to associate styles with tags.“*” matches any tag./* make everything red */* {color:red} “>” means parent-child relationship./* p inside div of class header inside body */body > div.header > p {color:red} Space can be used to specify that a tag must have other tags as its ances…

Switching from Mac/Unix To PC/Windows

Perm url with updates: from Mac/Unix To PC/WindowsXah Lee, 2009-05-26, 2009-06-20I bought a PC with Windows today, and am switching to Windows from my 19 years of Mac experience with 10 years of professional unix computing. This page tells the story. This document is partly a blog documenting why i switch from Mac to PC.Why I SwitchedI have a aging Mac. It is a IMac G5 (iSight; MA063L/A) bought in late 2005. It is the last iMac using the PowerPC chip.The machine is great, but is 3.5 years old. I needed a new machine. I went to local shop Fry's Electronics and was just gonna get the new Mac Mini that Apple just released this month. The cheapest Mac Mini is $600. Looking in the store, you find that a PCs for the same price has about 3 times the hardware power. Or, for the same hardware muscle, the PC is about half the price.Mac vs PCMac mini (MB463LL/A)
amazonPC (Campaq Persario SR5710F)
amazonPC (HP Pavilion A6750F)

Sergey Brin Lecture

Perm url with updates: Brin LectureXah Lee, 2008-09-16Sergey Brin Speaks with UC Berkeley Class (2005) - 40 minutes about Wikipedia, search engines, China, desktop software and more. (Sergey Brin is the founder of Google.)More vid of Google is at: Stephenson at Google Talk

Neal Stephenson at Google Talk

Perm url with updates: Stephenson at Google TalkXah Lee, 2009-01-16Was chatting on freenode's irc #rcirc channel out of boredom. I asked out in the open for suggestions on some sci-fi movies to watch. Sabetts (Shawn Betts, author of Ratpoison and Stumpwm) mentioned that Neal Stephenson has a google talk.Neal Stephenson talk at Google on 2008-09-12. I watched the entire 58 min of it. In the beginning 5 or 10 min, you see this boring guy, humorless, self-absorbed, absent-minded nerd, going on monotonously. The entire talk is a emotionless monotone, somewhat demeaning and self-abasing too, entirely devoid of any high points, energy, constantly letting out a subdued sigh. Can't find a single gleam of a smile on his face thru the entire talk.I've of course heard of him, first time in 1998 thru a colleague (Jon Frisby), who named his coding projects after his books. Neal is this sci-fi novel writer, famous for titles …

Yaron Minsky, Janestreet Talk On Ocaml and Functional Language

Perm url with updates: Minsky, Janestreet Talk On Ocaml and Functional LanguageXah Lee, 2008-09-16Caml Trading Yaron Minsky, a programer at “”, giving a talk about using Ocaml in the company. Dated about 2009-03. Highly intelligent. Started my own tutorial about Ocaml about a month ago. OCaml Basics.Neal Stephenson at Google TalkSergey Brin Lecture

Is Microsoft a Monopoly?

Perm url with updates: Microsoft a Monopoly?Xah Lee, 2010-08-20Kenneth Tilton wrote:They've run up the white flag, Microsoft, haven't they?Tim Bradshaw wrote:I think it's what happens to monopolists: they get big by being a monopolist, and because they have no competition they get slow and bureaucratic...many tech geekers don't understand what the word monopoly means.monopoly is preventing others from entering market. Monopoly is not saturation of a market....a bit explanation is in order.When a company prevents others from entering the market by tricks = evvvill!. This is what most tech geekers are thinking.There's not that much example of such in our capitalistic US going on, to the degree that idiot everybody or tech geekers need to be alarmed, maybe except US government.When a company saturates a particular market, such as Microsoft's OS for PC, Google for web search, that's called succe…

Apple iPad Censorship

Perm url with updates: iPad, CensorshipXah Lee, 2010-08-19While writing reviews on Kindle and iPad, i learned that Apple practices heavy censorship. Not just about technology issues of what software technology is allowed to run, such as Adobe Flash, but actual contents from established newspapers, magazines, cartoons. Here are some details gathered from Wikipedia.Censorship on NudityIn May 2009, Apple rejected the first version of 'Newspapers', an iPhone app that let users read content from 50+ newspapers around the world, including the New York Times, France's Le Monde, and the United Kingdom tabloid The Sun. The app was rejected because the topless “Page 3” girls daily features were described as “obscene”. A second version of the application was submitted, removing access to The Sun, and adding a price tag of £0.59. The app was made available in the summer, after the release of the iPhone 3.0 software.[53][54]Note t…

Kindle, iPad, Android, and All That Jazz

Perm url with updates:, iPad, Android, and All That JazzXah Lee, 2010-08-19Recently, i noticed there's something called Kindle from Amazon. What's with the jazz? Another hand-held electronic gadget?Kindle ad from Amazon I don't think i'd be interested. If you want a small computer for reading, you can buy a small computer for reading, which lets you do a lot more things than reading. (They are called Subnotebook.) Or, you can buy one of those fancy cellphones. So, i looked up Wikipedia. Quote:Amazon Kindle is a software and hardware platform developed by for the rendering and displaying of e-books and other digital media...Kindle software applications exist for Microsoft Windows, iOS, BlackBerry, Mac OS X and Android[2]. Amazon's first hardware device, the Kindle First Generation, was released only in the United States on November 19, 2007. The latest hardware device, the 3rd generation Kindl…

Windows Starting Too Slow? Disable Windows Startup Apps with msconfig

Perm url with updates: Starting Too Slow? Disable Windows Startup Apps with msconfigXah Lee, 2010-08-18Is your Windows starting super slow?On Windows, just every software automatically adds itself to startup when the machine starts, even if you don't use it. e.g. iTune, Adobe Acrobat, Java. It is a pain in the ass. They do that because when you actually start the application, they appear to start instaneously, making you think they are fast and good. (while Microsoft takes the blame of the overall slowness of Windows startup.)“msconfig” screen of Startup programs. To disable the auto hidden start, you can use Msconfig. Press “Win+r”, then type “msconfig”. Then, click on the Startup pane. There you can disable them. Here's the ones i recommend to disable:Adobe ReaderAdobe AcrobatMobileMe (Apple iTune stuff if you don't have iPod or iPhone stuff)QuickTimeiTunesHP Health Check Scheduler (crap from HP)hpwuSchd App…

world literature classics: thoughts extempore

Perm url with updates: Literature Classics; Thoughts ExtemporeXah Lee, 2010-08-18Spent like a whole day last week revisiting all of my World Literature Classics pages. Rechecked all links, nosed about anything that might be new (e.g. reread Wikipedia articles, checked printing status at amazon, editions, reader comments...), and fixed any unintended grammatical errors and or improved my annotations here and there.Here's a few short ones you might enjoy:This one is hilarious: Little Red Riding Hood (Politically Correct version). Note that the Little Red Riding Hood story changes thru the ages, to suite the waves and tides of the changing times and places.This one by James Agee: A Mother's Tale, is the best presentation of agnosticism. (agnosticism here is not with respect to god, but epistemology.)This one, is just classic. Cupid and Psyche. Very typical of greek mythology. In which, you learned t…

new version of ErgoEmacs Keybinding (5.3.4)

Perm url with updates: new version of the ErgoEmacs Keybinding is out.The new version is 5.3.4. New is a Swedish layout, and also the window splitting keys have changed for the ergonomically better. See the included “_HISTORY.txt” file for more detailed release notes. Thanks to Kristian Hellquist for the Swedish layout.Also thanks to many who have voiced support.

How to Replace Multiple String Pairs in Emacs Lisp Buffer

Perm url with updates: to Replace Multiple String Pairs in Emacs Lisp BufferXah Lee, 2010-08-17This article is a detailed tutorial for emacs lisp programers, on how to do multiple pairs of find/replace string for a given region in a buffer.ProblemYou have a given region in a buffer. You want to do one or more pairs of find/replace strings. For examples:html entities & ↔ &amp; < ↔ &lt; > ↔ &gt; url percentage encoding “ ” ↔ “%20” ~ ↔ %e7 _ ↔ %5f writing math alpha ↔ α beta ↔ β gamma ↔ γ quote/unquote in elisp string " ↔ \" \ ↔ \\ \" ↔ " converting paths (Unix, Windows, UNC, URL, local) \ ↔ / \ ↔ \\ C:\Users\mary ↔ ~/ file:///C:/Users ↔ C: "../ ↔ "http:// Some of these tasks are generalized and well defined, so there may be existing lisp package to deal with them. Examples:URL percentage encodingHTML entities encodingWindows/Unix path conversionURL/UNC conversionHowever, usua…

Left Wrist Motion Pain; vi Esc Syndrome

Perm url with updates: Wrist Motion Pain; vi Esc key SyndromeXah Lee, 2010-08-16In the past month, my left hand wrist started to feel funny. Especially yesterday after several hours of heavy coding. Not pain yet, but distinctively something is wrong. The closest description is tingling, and tingling sensation is the first symptom to RSI.(Been using emacs for like 16 hours per day for the past 6 months. Especially in the past 3 months. No it's not a exaggeration. Hard to say the exact hours my fingers are actually typing, but literally from the time i wake to the time i sleep i'm in front of comp, and about half of that time i'm inside emacs.)I consider myself a keyboarding expert. I use a fancy ergonomic keyboard (since 2005). I use the Dvorak Layout (since ~1992). I use a ergonomic emacs keybinding system (since 2007). I have extensive system-wide custom-designed shortcuts to save keystrokes. I read extensively on all thing…

emacs lisp: escape quotes

small elisp programing tip.
elisp has the toothpick syndrom. When you use elisp to process
html, all the "quote" characters needs to be escaped. (worse if you
have backslash (e.g. Windows style path) and need to process it with
emacs regex.)
Here's a quick function i've been using for a couple of years:
(defunescape-quotes-region (start end) (interactive "r") "Replace \" by \\\"." (replace-pairs-region start end '(["\"""\\\""]))) (defununescape-quotes-region (start end) (interactive "r") "Replace \\\" by \"." (replace-pairs-region start end '(["\\\"""\""])))
You can assign a key to them.
This calls replace-pairs-region. Which i have defined. See if you can code that. I'll post my code tomorrow.

The Metamorphosis of Prime Intellect

The torture porn scifi, 《The Metamorphosis of Prime Intellect》, is now available as a printed book. amazon.