20141020 MOVED!
I decided to move my (micro)blog to GitHub Pages powered by Octopress. Now the blog is located at https://zmwangx.github.io.
Claire Keane

Love Begins
h
wallacepolsom
Aqua Utopia|海の底で記憶を紡ぐ

roma★
ojovivo
trying on a metaphor
Monterey Bay Aquarium
Mike Driver
Acquired Stardust
d e v o n

I'd rather be in outer space 🛸
Keni
YOU ARE THE REASON
Game of Thrones Daily
art blog(derogatory)

祝日 / Permanent Vacation

seen from China

seen from Malaysia

seen from Mexico

seen from Singapore
seen from United Kingdom
seen from United States
seen from Germany

seen from Malaysia

seen from Canada
seen from United States
seen from United Kingdom
seen from United States

seen from United States
seen from United States

seen from T1
seen from United States
seen from United States

seen from United States
seen from United States

seen from United States
@zshello3
20141020 MOVED!
I decided to move my (micro)blog to GitHub Pages powered by Octopress. Now the blog is located at https://zmwangx.github.io.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
20141020 Emacs 24.4 released
Announcement.
What's New In Emacs 24.4 by masteringemacs.org.
20141019 Ditching MacPorts for Homebrew
Today I got rid of MacPorts and moved to Homebrew, even before Yosemite upgrade.
My automatic install script is here. My uninstall scripts are here, for uninstalling MacPorts, for instance. A clean uninstall is generally much harder than a clean install, you know.
Contribution is much easier with Homebrew, since git and ruby are easy (while svn and tcl are hard for modern people). In fact, I had a pull request merged to homebrew/homebrew, day one brewing.
Btw, I spun up a Yosemite VM to test the scripts. In the meantime I also tried Opera, and surprisingly enough, there are no unresponsive processes, unlike what people have been moaning about in the Chrome side of the world. I guess it's Chrome specific, then.
Also, I found a laundry list of Yosemite bugs on Google+ (linked from Reddit). Scanning it now. Most are pretty well-known already.
20141019 Two hard things
There are two hard things in computer science:
cache invalidation;
naming things;
off-by-one errors.
20141017 Chromium not yet ready for Yosemite
#397642 on Chromium bug tracker. Once again, the helpers are unresponsive (#304860 for Mavericks — I was part of that collective memory); however, to add injury to insult, this time the helpers seem to be devouring real CPU (according to the bug report; I didn't bother to spin up a VM).
This time I'll wait until the major issues are resolved before I upgrade. Maybe wait until 10.10.1? Will that be too long? (10.9.1 was released 12/16/2013, two months after launch. See OS X release history here; here for backup.) I'll wait and see.
Also, I'm planning to move from port to brew alongside this OS upgrade. When I first chose port between the two, it was mainly due to /usr/local/bin. Nowadays I'm no longer worried about /usr/local/bin (I install most of my personal stuff in ~/bin), and brew seems to be all the rage (just like vim, but I won't hop onto that bandwagon before I see a valid reason), with most well-established packages, and more with brew tap. Also, brew's git and ruby are to some extent much more accessible than port's svn and tclsh (and C, of course). In short, port looks increasingly like yesteryear stuff. So I'll at least give brew a try.
Forgot to mention, mpv default breaks on Yosemite: mpv-player/mpv #953. Not a big deal, easily avoidable. Not a good sign, though.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
20141015 Farewell, PDF.js
Opera stable 25.0.1614.50 is out. Finally, a usable built-in PDF viewer, based on Chromium's PDFium. I pretty much liked it from my experience with it on the beta channel. So, it's time to say goodbye to Mozilla's PDF.js. IIRC I've contributed in patching two bugs, but the crappy interface is simply unpatcheable. It has served me good though, since the beginning of my Opera days. The interface is bad, but it can't be worse than Google Chrome for Mac, for sure.
20141014 A blog
I just stumbled upon this blog, which contains quotes from Ravi (Vakil), Brian (Conrad), Don Knuth, and a post about Maryam (Mirzakhani). Is this a Stanford mathematician by any chance? The blog doesn't feature an ask so I can't find out (unless I follow and wait for fan mail, which I won't). Anyway, it's cool to come across someone on the internet who shares some highly specialized common interests with you.
20141007 GitHub Student Developer Pack
https://education.github.com/pack
Cool. You get a micro account on GitHub and much more from other companies, as long as you are an enrolled student (in some degree program). Obviously I won't need to pay GitHub for private repos until I get my PhD, which is likely seven years or so from now.
20141006 Some thoughts on Copenhagen
I happened to be thinking about Copenhagen stuff on my bike ride back home just now (not recommended). This is due to someone trying to convince me of something (not very related to this post) yesterday by citing the philosophy of uncertainty and probability. The guy was talking about uncertainty and probability in science — I suppose he wasn't aware that I'm a theoretical physicist.
So here goes my take on the Copenhagen interpretation (definitely not exhaustive — I can give a two-hour lecture on this if I have time and am not afraid of embarassing myself). The Copenhagen interpretation introduced something ridiculous called "collapsing the wave function", which is nothing but an ugly empirical tool. This is such an artificial process that it isn't really a process anymore — it's like magic in some black box that you can't possibly probe into, an idea adored by S-matrix folks, I guess. Of course I wouldn't believe in such crap — quantum mechanics is a deterministic theory, and it has to be. I was sold on the idea of explaining everything in terms of the density matrix, which basically characterizes the fundamental lack of knowledge. When you make a measurement, there's no such thing as collapsing the wavefunction — you simply get entangled with the system you measure and (fundamentally) lose knowledge, an analog being the increased entropy. How you end up in a certain branch of the "history" and not the others is yet to be explained (or maybe it's just fundamentally unexplicable), but there's no Copenhagen crap here that mistakes an empical tool for the fundamental principles. (I learned the incomplete yet much correcter interpretation involving density matrices and entanglement from Lenny Susskind — I mean, I didn't first learn density matrices and entanglement from Lenny, but Lenny was the one who first throughly discussed the physical insights in front of me; I'm not sure who proposed this originally, but this is much more rigid and mathematically sound than the original Many Worlds Interpretation, which is attacked as a strawman by many pro-Copenhagen dudes).
Sadly, Copenhagen is unbeatable. Copenhagen is empirical, and experimentation is also empirical, so as long as QM is correct, Copenhagen cannot be proved wrong empirically. However, we are (theoretical) physicists, not some random empirical scientists, so we ought to be guided by something deeper than empirical facts. Were physics solely guided by empiricism, it would be so boring and unenlightened, and it would have exactly Eugene Wigner's "unreasonable effectiveness". The "unreasonable effectiveness" most certainly definitely implies something deep. That's what distinguishes us from the average, say, revolutionary biologist. That's what inspired and motivated me, a mathematical mind and soul.
P.S. I've heard of some people, e.g. David Mermin, advising something called Quantum Bayesianism, or QBism for short. I have not the slightest clue what it is; the Wikipedia article refers to something called SIC-POVMs, which I stopped reading after seeing. Maybe I'll give QBism a try some day.
P.P.S. I can't really recall Wigner's original argument — maybe I should read the essay again some day, but I'm really reluctant to do so, since philosophy (after Plato) is so boring. See Philosophy became a euphemism for crackpot physics (I mean, look at the title, it says a lot — I didn't read the article). Man, I was fervent about philosophy before I went to college; but everything changed during my freshman year. Apart from being a Platonist, now if you ask me if I was inspired by any philosopher, I would simply answer "no", or as Witten did (citing Witten is not for bragging rights for sure), "I was inspired by some 'natural philosophers', like James Clark Maxwell." (If you know the Latin title Philosophiae Naturalis Principia Mathematica, you see what this implies — "I'm a physicist, so shut up.")
Update: I took at look at SIC-POVMs, and they are actually pretty simple, despite the horrible looking name. I still know nothing about QBism though.
P.P.P.S. I've long adopted Feynman's (or maybe Mermin's) "shut up and calculate."
20141004 dev.twitter.com
Dude, even dev.twitter.com looks pretty cool now, as opposed to what it used to be several months ago. (I also posted about Mozilla a while ago.) Web design has come so far.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
20141004 One aesthetic concern about Python
Now that I’m writing more and more Python (in place of C/C++/Bash), some concerns begin to surface.
The one I want to briefly point out is an aesthetic one. When I first learned that in Python you don’t need curly braces (or fi, done, endif, or whatever) for every flow control construct, it was sort of an enlightenment. You know, since my early days of C I’ve been strictly following the doctrine that the bodies of flow control constructs need to be wrapped no matter what (even when it’s not necessary, e.g., a single statement body in C):
/* good */ if (wrapped) { good_student = true; } else { shot_yourself(); } /* bad */ if (wrapped) good_student = true; else shot_yourself();
In Python you get rid of the curly braces (or whatever dangling reserved words) while sticking to the beloved doctrine:
if head == sane: good_student = true else: shot_yourself()
However, the lack of surrounding braces (or reserved words) pose a problem when you have several levels of nesting and long bodies:
def fetch_new_photos: for blog in blogs: # do stuff for post in posts: # do stuff for photo in photos: # do stuff try: # download photo except: # report error # whoops, suddenly back to baseline!
You see the problem. The abrupt return to column 1 is really ugly. In contrast, when you have curly braces or whatever, there’s a graceful transition that naturally brings you back.
Linus Torvalds would argue that when you have three levels of indentation you are screwed anyway, but let’s ignore that. Granted, one solution to this problem is to factor out the bodies at each level. But then you have a lot of defs, and a series of defs in Python is horrible as they obscure the control flow (maybe I’m still thinking procedural programming rather than OO, but honestly for most things I do I see little value in OO, except for more elegant APIs). You know, there’s no visible main; defs can just be littered anywhere, and they really should be — AFAIK there are no declarators in Python so you can’t possibly follow a top-down approach as in C by putting the declarations up front. (Of course you can still bottom up by putting all defs on top but I would definitely freak out if I see a Python source file starting with three hundred lines of defs without an actual statement that at least does something.)
20140929 Adobe expanding market
Chrome Blog post: Adobe joins the Chromebook party, starting with Photoshop.
So what? None of my business. I only hope Adobe makes their pricing saner. Otherwise I’ll continue my “trials” indefinitely.
P.S. Btw, will Linus install the brand new Photoshop on his monstrous Chromebook Pixel? I guess not, since he should have installed a “real distro” by now.
20140929 Programming language subreddits and their choice of words
Check this out: Dobiasd/programming-language-subreddits-and-their-choice-of-words on GitHub.
Turns out that PHP developers curse the most. LOL
20140929 Ruby is from Japan
I mean the programming language. Never knew that. Surprised.
20140928 Google Translate in your shell
Despite all the badmouthing about Bash, GNU, UNIX, FOSS, etc. (partly due to the Shellshock bug in Bash), there are still a billion amazing things we can do in our beloved shell(s), and more importantly, pipe them around, which is the single most amazing thing about UNIX. (When Doug McIlroy invented the pipe, where’s Microsoft? Doug, btw, famously summarized the famous UNIX philosophy — "Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.” Well, I’m not saying Windows don’t have pipes; but they just copied from UNIX.)
Here's one: Translate Shell, previously Google Translate CLI. Usage is amazingly simple. If you just want to translate some Korean, Japanese, or gibberish into English, you do
trans -b '횡설수설'
(-b for brief; by default you also get a detailed explanation of how every word/phrase gets translated), and out it comes:
Gibberish
What’s more surprising is that the program is written entirely in gawk. Awk is one of the UNIX tools that always leave me in awe; it’s a pity that I haven’t yet mastered it (actually I haven’t even finished the canonical tutorial — I’m not a programmer, after all).
Now that I have this baby, the usage of Google Translate web interface will surely diminish.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
20140926 Mozilla Foundation website
Just noticed that the current website design of Mozilla is kinda cool.
20140925 Bash: Shellshock
This morning I learned about the Bash 10/10 security vulnerability, called “Shellshock” by some. See this NYT article. The article (which I only had a skim), IIRC, doesn’t explain the bug at all. But it is immediately clear from Red Hat Bugzilla that this is a code injection vulnerability due to the function export feature — you can specially craft a syntactically wrong environment variable declaration that once evaluated, exports arbitrary code to the subshell and HAS IT EXECUTED. See [1], [2] CVE-2014-6271, [3] CVE-2014-7169, [4] bug 1141597, and [5] bug 1146319.
Bash function export has always been a mixed blessing for me. On the on hand, it is useful, especially during batch processing with, e.g., GNU Parallel. On the other hand, the way it is implemented struck me as weird, like an ugly hack. Function export is not the point of this post, though.
This is obviously very bad and affects a wide range of releases. In fact, if you look at bug-bash, there were patches released for 3.0 through 4.3 — OS X 10.9 uses Bash 3.2, by the way. I’m not sure if more versions are affected. That means many servers are subject to this vulnerability (and the exploit is very simple).
The discovery of this bug again shows that given enough eyes, every bug is shallow, although it did take a little bit too long to have the right eyes look at the right place. The bad thing about this story is that the initial patches did not address the bug completely — there are some leftovers not yet addressed, and now they’re open for everyone. They shouldn’t have hastened the announcement. (Again they didn’t have enough eyes, and after the announcement, the acute eyes — or rather, random Brownian motion of all the system admins uncovered the remaining issue.)
However, some people have taken this so far that they claim this is a failure of *ix and open source. (First and foremost, *ix is not a subset of open source, and neither a superset.) In fact, I heard about the story first from some MSFT proponents. They not only announce this as a win for Windows, but some also went on to claim that since this is a failure of *nix, and since iOS and Android are based on *ix, iOS and Android are not safe anymore, so you should switch to a Windows Phone. Holy crap, this just demonstrates how ignorant and brain damaged they are. What the hell does Bash have to do with iOS and Android? I guess really creative people would compile Bash for their droid (but they won’t be stupid enough to allow people to mess with their env), but 99.99999999% of the users simply have nothing to do with Bash. In fact, if you are a regular user of OS X, Linux, BSD, or whatever (as opposed to a sys admin, or an automatic account), you also don’t need to worry too much, since you are on the client side. Only servers that accept insecure requests and set the env on those requests’ behalf might be subject to code injection attacks; I don’t know of anything from outside that is able to modify my env, especially not with root.
Also, justifying Windows with a security vulnerability (albeit a serious one) in *ix is ultimately stupid. AFAIK, Windows has been dominating the desktop malware market for twenty years with no rivalry. It hasn’t yet dominated the mobile malware market (the throne of which is taken by Android) simply because Windows Phone is so crappy that no one wants to use it. (I’m no stranger to Windows Phone — once used it for three months and absolutely hated it.) Windows is just a crappy desktop OS, and it always will be. Maybe even MSFT runs Linux or BSD in their data centers, who knows (I’m not sure). Windows has been negating itself every now and then in the last ten years — just look at their vastly different releases (they are not innovating, btw). To quote (or rather, paraphrase) Tim Cook, “our competition is confused. They are trying to turn PCs into tablets and tablets into PCs.” Holy crap. That’s it for MSFT.
—
P.S. Btw, MSFT recently spent 2.5 billion on Minecraft and subsequently closed MSR-SVC, an industrial research lab at its best, which has produced amazing basic research. Another example of MSFT’s bad taste. I’m not claiming that Apple is any better in terms of basic research.