diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-05-04 18:45:17 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-05-04 18:45:17 -0700 |
commit | 07bf43a314fe65ccd9c7cb663c3c6134a47cc269 (patch) | |
tree | 93104d3f07143b1e62d773d95dd973888cdd7f27 /source/blog | |
parent | ee374553f2ba385157eec9a816cf9b023fbfb18a (diff) | |
download | my_new_personal_website-07bf43a314fe65ccd9c7cb663c3c6134a47cc269.tar.xz my_new_personal_website-07bf43a314fe65ccd9c7cb663c3c6134a47cc269.zip |
edit posts and (mostly) figured out the theme
Also wrote pyblog that currently can generate parts most of the blog.
Diffstat (limited to 'source/blog')
12 files changed, 25 insertions, 30 deletions
diff --git a/source/blog/2014-10-23-ripping-copy-protected-dvd-with-mpv.md b/source/blog/2014-10-23-ripping-copy-protected-dvd-with-mpv.md index 6d1f983b..f017ca7e 100644 --- a/source/blog/2014-10-23-ripping-copy-protected-dvd-with-mpv.md +++ b/source/blog/2014-10-23-ripping-copy-protected-dvd-with-mpv.md @@ -5,7 +5,7 @@ date-display: October 23, 2014 --- **_11/02/2014 update:_** -See [this post](/blog/2014/11/02/vobcopy-dvdbackup-etc/) for issues, explanations, and more. +See [this post](/blog/2014-11-02-vobcopy-dvdbackup-etc.html) for issues, explanations, and more. --- diff --git a/source/blog/2014-10-26-audio-cd-slash-dvd-to-iso-image-on-os-x.md b/source/blog/2014-10-26-audio-cd-slash-dvd-to-iso-image-on-os-x.md index 61504a15..600a890d 100644 --- a/source/blog/2014-10-26-audio-cd-slash-dvd-to-iso-image-on-os-x.md +++ b/source/blog/2014-10-26-audio-cd-slash-dvd-to-iso-image-on-os-x.md @@ -5,7 +5,7 @@ date-display: October 26, 2014 --- **_11/02/2014 update:_** -See [this post](/blog/2014/11/02/vobcopy-dvdbackup-etc/) for issues, explanations, and more. +See [this post](/blog/2014-11-02-vobcopy-dvdbackup-etc.html) for issues, explanations, and more. --- diff --git a/source/blog/2014-11-02-vobcopy-dvdbackup-etc.md b/source/blog/2014-11-02-vobcopy-dvdbackup-etc.md index 0bb4b94f..a6caf233 100644 --- a/source/blog/2014-11-02-vobcopy-dvdbackup-etc.md +++ b/source/blog/2014-11-02-vobcopy-dvdbackup-etc.md @@ -3,7 +3,7 @@ title: "vobcopy, dvdbackup, etc." date: 2014-11-02 15:06:07 -0800 date-display: November 2, 2014 --- -A few days ago, I was cloning my entire Audio CD and DVD collection, and reported some of the findings in [this post](/blog/2014/10/26/audio-cd-slash-dvd-to-iso-image-on-os-x/). As said, the most important commands are +A few days ago, I was cloning my entire Audio CD and DVD collection, and reported some of the findings in [this post](/blog/2014-10-26-audio-cd-slash-dvd-to-iso-image-on-os-x.html). As said, the most important commands are hdiutil makehybrid -iso -joliet -o AUDIO_CD_NAME.iso SOURCE diff --git a/source/blog/2014-11-19-convolution-of-irreducible-characters.md b/source/blog/2014-11-19-convolution-of-irreducible-characters.md index 58a58925..9b95ca94 100644 --- a/source/blog/2014-11-19-convolution-of-irreducible-characters.md +++ b/source/blog/2014-11-19-convolution-of-irreducible-characters.md @@ -9,6 +9,6 @@ __*TL; DR:* The actual PDF write-up is [here](https://dl.bintray.com/zmwangx/gen Yesterday I was trying to establish the formula for orthogonal primitive central idempotents of a group ring. It is possible to establish the result through the convolution of irreducible characters. However, I stuck quite a while on trying to work out the convolutions themselves. For a formidable and unenlightening proof using "matrix entry functions" (i.e., fix a basis, induce a matrix representation, and explicitly expand everything in matrix elements), see [this post](http://drexel28.wordpress.com/2011/03/02/representation-theory-using-orthogonality-relations-to-compute-convolutions-of-characters-and-matrix-entry-functions/) (in fact, this is just one in a series of posts that lead up to the result). That's a really sad proof. -It turns out that I really should have been working the other way round --- first establish the orthogonal idempotents (the proof of which is really simple and elegant, I was just trapped in a single thread of thought), then use that to compute the convolution of irreducible characters. +It turns out that I really should have been working the other way round — first establish the orthogonal idempotents (the proof of which is really simple and elegant, I was just trapped in a single thread of thought), then use that to compute the convolution of irreducible characters. I feel like this is worth presenting (as the only proof I saw online is the really sad one above), so I TeX'ed it up. I tried to convert to MathJax HTML but eventually gave up (that's the story for another post). So, the write-up is in good ol' PDF, available [here](https://dl.bintray.com/zmwangx/generic/20141119-convolution-of-irreducible-characters.pdf). diff --git a/source/blog/2014-11-20-dropbot-for-geeks(r).md b/source/blog/2014-11-20-dropbot-for-geeks(r).md index e46ec401..74faf730 100644 --- a/source/blog/2014-11-20-dropbot-for-geeks(r).md +++ b/source/blog/2014-11-20-dropbot-for-geeks(r).md @@ -6,15 +6,10 @@ date-display: November 20, 2014 I propose the following cloud storage and syncing service model of the future. I call it **Dropbot for Geeks®**, and it totally rules. It's designed for geeks who are tired of the highly limited, miserably unproductive traditional services (based on clicking around). It has the following features: * Standard Unix file system commands exposed as an API, e.g., `cat`, `cd`, `cp`, `du`, `df`, `file`, `find`, `head`, `ln`, `ls`, `mkdir`, `mv`, `pwd`, `rm`, `rmdir`, `tail`, `touch`, etc. - * A rudimentary shell emulator through the web interface exposing the commands above. - * Secure shell access to the file system, also exposing the commands above. Provide two-factor auth for SSH. Clearly, `scp` should also be supported. - * Checksums. Expose, for instance, `md5sum` or `sha1sum`, in the API. Provide checksums on download pages, probably on demand. - * Programmable selective syncing, down to per file level. - * Scriptability. Allow clients to run custom scheduled jobs or daemons with the API above. To prevent the service from becoming full-featured IaaS, though, clients might be limited in CPU time, memory, or command selection. This bullet point is arguable. --- diff --git a/source/blog/2014-11-24-why-i-abandoned-mathjax-and-fell-back-to-pdf.md b/source/blog/2014-11-24-why-i-abandoned-mathjax-and-fell-back-to-pdf.md index 2d2781e6..be8185fc 100644 --- a/source/blog/2014-11-24-why-i-abandoned-mathjax-and-fell-back-to-pdf.md +++ b/source/blog/2014-11-24-why-i-abandoned-mathjax-and-fell-back-to-pdf.md @@ -3,7 +3,7 @@ title: "Why I abandoned MathJax and fell back to PDF" date: 2014-11-24 20:54:36 -0800 date-display: November 24, 2014 --- -Recently I wrote an expository article, [*Convolution of irreducible characters*](/pdf/20141119-convolution-of-irreducible-characters.pdf), and posted it [here](/blog/2014/11/19/convolution-of-irreducible-characters/). At first I intended to use MathJax, but in the end I fell back to good ol' PDF. Here's why. +Recently I wrote an expository article, [*Convolution of irreducible characters*](/pdf/20141119-convolution-of-irreducible-characters.pdf), and posted it [here](/blog/2014-11-19-convolution-of-irreducible-characters.html). At first I intended to use MathJax, but in the end I fell back to good ol' PDF. Here's why. In short, I'm a mathematician. I write math *articles*, not just standalone expressions or formulas. I use AMSLaTeX to its fullest (not really, but at least I use numbering and the `amsthm` package to its fullest). HTML simply wasn't designed for this. Here are two influential markup languages designed for totally different use cases, and bridging them is painful. I tried to use `pandoc`, but it doesn't support `\input`, doesn't support `\def`, and swallows `\begin{theorem} \end{theorem}`, among other things. I tried to use `htlatex`; even the MathML output is suboptimal, with many math symbols translated to non-math (apart from totally human-unreadable), and it uses its custom CSS files that don't play well with everything else. I tried other things. In the end I gave up. Maybe I don't know enough about MathJax, but I certainly don't want to write a translator myself. Leave LaTeX alone. Distribute as PDF. MathJax may be great for Wikis (like Wikipedia) and for math lite blogs, but it's no replacement for real, beefy LaTeX. It's not for mathematicians who want to distribute real articles. diff --git a/source/blog/2014-12-05-python-3-and-unicode.md b/source/blog/2014-12-05-python-3-and-unicode.md deleted file mode 100644 index eb596956..00000000 --- a/source/blog/2014-12-05-python-3-and-unicode.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "Python 3 and Unicode" -date: 2014-12-05 15:01:54 -0800 -date-display: December 5, 2014 ---- -I never realized that in Python 3 Unicode is the default; in particular, `str` in Python 3 is practically equivalent to `unicode` in Python 2. This might be the *one thing* that convince me to migrate. `str.encode()`, `str.decode()`, `unicode.encode()`, `unicode.decode()`, etc. are so confusing that I'm never 100% sure what I'm doing (only-occasionally-used-but-unavoidable-and-worst-of-all-very-confusing "features" are nightmares). diff --git a/source/blog/2015-01-10-fonts-why-chinese-web-design-is-hard.md b/source/blog/2015-01-10-fonts-why-chinese-web-design-is-hard.md index d8788913..9c531229 100644 --- a/source/blog/2015-01-10-fonts-why-chinese-web-design-is-hard.md +++ b/source/blog/2015-01-10-fonts-why-chinese-web-design-is-hard.md @@ -9,6 +9,6 @@ The problem with fonts boils down to the fact that the Chinese writing system ha Another problem triggered by the vast number of glyphs is that font files are large. I looked at a dozen OTF fonts with SC or TC glyphs, and none seems to be below 10 MB. That's clearly a no go on the web — not until everyone has a gigabit connection, I suppose. I tried to Google for Chinese webfonts and had little success, so I'm not sure if woff helps. I've heard that Apple is able to pack a reduced set of PingHei glyphs into woffs less than 1 MB (keep in mind that PingHei being sans serif is simpler than serif fonts like Songti); that's pretty remarkable. I don't know much about font technologies so I can't comment more on this matter, but from my observation all Chinese websites (with the exception of apple.com/cn, I guess) rely on locally installed fonts, and most don't even have a list of fallbacks, i.e., typefaces simply aren't part of their designs. Even if they do have a list of fallbacks, they won't be able to guarantee uniform experience across the board (as far as I know, the lowest common denominator of Chinese fonts across all platforms seem to be zero). Apple has taught us that design must be integrated and perfected (well, Apple wasn't the first to do design, but they did bring it to the digital world and to the masses). Any fragmented design is doomed to fail. -![](http://i.imgur.com/MPmtSJI.png) +![A section of [apple.com/cn/iphone-6](https://www.apple.com/cn/iphone-6/).](http://i.imgur.com/MPmtSJI.png) -![](http://i.imgur.com/hBpdv0B.png) +![The English equivalent.](http://i.imgur.com/hBpdv0B.png) diff --git a/source/blog/2015-01-21-web-design-microsoft-vs-apple.md b/source/blog/2015-01-21-web-design-microsoft-vs-apple.md index 7ffd6c1d..d1b97556 100644 --- a/source/blog/2015-01-21-web-design-microsoft-vs-apple.md +++ b/source/blog/2015-01-21-web-design-microsoft-vs-apple.md @@ -9,9 +9,10 @@ I just had a look at Ars's live blog on today's Windows 10 Event to acquire a se The only thing I would like to see Apple copy from Microsoft is the unlimited OneDrive — come on, we already paid enough for our hardware, why can't we have unlimited cloud storage? I would even pay $10 per month for that — Microsoft is offering Office 365 along with unlimited cloud storage, all for just $10, so it certainly won't hurt Apple. The current iCloud pricing is ridiculous. -All the discussions above are not the main point of this post though. The point is, I went to the Windows website to learn more about Windows 10, and just can't believe my eyes in how awful it is designed. Just look at the font and the layout of <http://windows.microsoft.com/en-us/windows-10/about> (full web page screenshot courtesy of [web-capture.net](http://web-capture.net)). And compare that to <http://www.apple.com/osx/> (scroll past the Windows screenshot). Holy crap, I even booted my Windows 8.1 VM just to make sure I'm not lacking the necessary fonts available on Windows. +All the discussions above are not the main point of this post though. The point is, I went to the Windows website to learn more about Windows 10, and just can't believe my eyes in how awful it is designed. Just look at the font and the layout of [windows.microsoft.com/en-us/windows-10/about](http://windows.microsoft.com/en-us/windows-10/about) (full web page screenshot courtesy of [web-capture.net](http://web-capture.net)). And compare that to [www.apple.com/osx/](http://www.apple.com/osx/) (scroll past the Windows screenshot). Holy crap, I even booted my Windows 8.1 VM just to make sure I'm not lacking the necessary fonts available on Windows. Why Microsoft's web design is so shitty is always beyond my grasp. For OS X, a potential customer would be eager to set his hands on it just by looking at its beautifully-crafted homepage and a few screenshots there. For Windows it's exactly the opposite. I mean, apart from metro apps (worst and ugliest desktop experience ever), modern Windows actually looks pretty good. But their shitty advertising totally ruins it. I guess it doesn't matter much for Microsoft, for all design-savvy folks who are not stuck on Windows are already using OS X, and most of their customers just need a commodity OS. -![](http://i.imgur.com/0eIt4SR.png) -![](http://i.imgur.com/piUO0xY.png) +![Full height screenshot of [windows.microsoft.com/en-us/windows-10/about](http://windows.microsoft.com/en-us/windows-10/about).](http://i.imgur.com/0eIt4SR.png) + +![Full height screenshot of [www.apple.com/osx/](http://www.apple.com/osx/).](http://i.imgur.com/piUO0xY.png) diff --git a/source/blog/2015-02-17-microsoft-is-getting-cool-but-not-its-website.md b/source/blog/2015-02-17-microsoft-is-getting-cool-but-not-its-website.md index fbd587de..70573c20 100644 --- a/source/blog/2015-02-17-microsoft-is-getting-cool-but-not-its-website.md +++ b/source/blog/2015-02-17-microsoft-is-getting-cool-but-not-its-website.md @@ -13,6 +13,6 @@ Meanwhile, ![](http://i.imgur.com/CNv76zw.png) -* Microsoft's UI design is still shit, [as well as their website](/blog/2015/01/21/web-design-microsoft-vs-apple/); I mean, seriously: +* Microsoft's UI design is still shit, [as well as their website](/blog/2015-01-21-web-design-microsoft-vs-apple.html); I mean, seriously: ![](http://i.imgur.com/wu66zZc.png) diff --git a/source/blog/2015-02-24-the-new-onedrive-api.md b/source/blog/2015-02-24-the-new-onedrive-api.md index 1ef5bc58..1c5ea101 100644 --- a/source/blog/2015-02-24-the-new-onedrive-api.md +++ b/source/blog/2015-02-24-the-new-onedrive-api.md @@ -5,4 +5,4 @@ date-display: February 24, 2015 --- Microsoft released the new OneDrive API today. See the blog post announcement [here](https://blog.onedrive.com/the-new-onedrive-api/). One highlight is that [large file upload](http://onedrive.github.io/items/upload_large_files.htm) is now officially supported. Previously, large file upload was handled with a semi-official API using the BITS protocol; the only documentation was a [gist](https://gist.github.com/rgregg/37ba8929768a62131e85). Now it is handled through standard HTTP `POST`. With this major release, there's likely a lot of work to be done with [python-onedrive](https://github.com/mk-fg/python-onedrive). I have opened an issue: `mk-fg/python-onedrive#52` — [New OneDrive API support](https://github.com/mk-fg/python-onedrive/issues/52). -Interestingly, the new OneDrive API doc is hosted on GitHub Pages — [onedrive.github.io](http://onedrive.github.io), rather than MSDN. Exactly a week ago I wrote a piece, "[Microsoft is getting cool (but not its website)](http://zmwangx.github.io/blog/2015/02/17/microsoft-is-getting-cool-but-not-its-website/)". Looks like they are doing something about their website (or better put, their online identity), too. +Interestingly, the new OneDrive API doc is hosted on GitHub Pages — [onedrive.github.io](http://onedrive.github.io), rather than MSDN. Exactly a week ago I wrote a piece, "[Microsoft is getting cool (but not its website)](/blog/2015-02-17-microsoft-is-getting-cool-but-not-its-website.html)". Looks like they are doing something about their website (or better put, their online identity), too. diff --git a/source/blog/2015-05-03-why-oh-my-zsh-is-completely-broken.md b/source/blog/2015-05-03-why-oh-my-zsh-is-completely-broken.md index eb576efc..c33f4c49 100644 --- a/source/blog/2015-05-03-why-oh-my-zsh-is-completely-broken.md +++ b/source/blog/2015-05-03-why-oh-my-zsh-is-completely-broken.md @@ -13,7 +13,8 @@ I was hardly involved in Oh My Zsh development, and I haven't even carefully ins First, look at Oh My Zsh's core [lib](https://github.com/robbyrussell/oh-my-zsh/tree/140034605edd0f72c548685d39e49687a44c1b23/lib): -``` +```zsh +> ls lib bzr.zsh directories.zsh grep.zsh misc.zsh spectrum.zsh completion.zsh functions.zsh history.zsh nvm.zsh termsupport.zsh correction.zsh git.zsh key-bindings.zsh prompt_info_functions.zsh theme-and-appearance.zsh @@ -23,7 +24,7 @@ Wait, why do I see `bzr.zsh`, `git.zsh`, and even `nvm.zsh` in the core lib? The Meanwhile, Prezto does it right. Prezto is highly modular, with the `pmodload` function defined in [`init.zsh`](https://github.com/sorin-ionescu/prezto/blob/08676a273eba1781ddcb63c4f89cfff9bd62eac4/init.zsh) to load modules. That's about the entirety of Prezto's core; everything else are in optional [modules](https://github.com/sorin-ionescu/prezto/blob/08676a273eba1781ddcb63c4f89cfff9bd62eac4/modules), including essential configs like `editor` (ZLE configs), `completion`, and `prompt`. Note that module loading order matters in some cases, but still, working with Prezto's modular structure is a joy. Apart from `init.zsh` and `modules/`, Prezto repo does contain a [`runcoms`](https://github.com/sorin-ionescu/prezto/tree/08676a273eba1781ddcb63c4f89cfff9bd62eac4/runcoms) directory with the rc files, but those are just recommendations that one may disregard. In fact, there are a total of eight lines related to Prezto in my `.zshrc`, and nowhere else (note that I only switched to Prezto today, so this freshly baked `.zshrc` is subject to change): -```sh +```zsh # prezto zstyle ':prezto:*:*' color 'yes' zstyle ':prezto:environment:termcap' color 'no' # disable coloring of less, which is insanely ugly @@ -49,7 +50,7 @@ I guess the list could go on; I didn't spend more time inspecting this crap. We were discussing styles, but obviously style isn't the only problem with this code base. Next onto a case study of how Oh My Zsh does something in the most inefficient way possible. Let's have a look at [the `git.zsh` file](https://github.com/robbyrussell/oh-my-zsh/blob/140034605edd0f72c548685d39e49687a44c1b23/lib/git.zsh). It suffers from almost all problems we have talked about so far, but let's focus specifically on [the `git_prompt_status` function](https://github.com/robbyrussell/oh-my-zsh/blob/140034605edd0f72c548685d39e49687a44c1b23/lib/git.zsh#L78-L122): -```sh +```zsh git_prompt_status() { INDEX=$(command git status --porcelain -b 2> /dev/null) STATUS="" @@ -99,13 +100,13 @@ git_prompt_status() { **This one single function intended to be invoked from a precmd hook (basically excuted every time the prompt is printed), calls `grep` a staggering 14 times inside command substitutions, forking the process 28 times — while all the greps can be replaced with pattern/regex matching right within the shell.** Keep in mind that forking is the most expensive operation of the shell. For instance, `$(echo "$INDEX" | grep '^A ' &> /dev/null)` may well be replaced with -```sh +```zsh [[ $INDEX == *$'\nA '* ]] ``` or -```sh +```zsh [[ $INDEX =~ $'\nA ' ]] ``` @@ -133,11 +134,15 @@ The only time I [submitted a PR](https://github.com/robbyrussell/oh-my-zsh/pull/ One more thing, among countless other problems: the recommended way to install Oh My Zsh is either - curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh +```zsh +curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh +``` or - wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh +```zsh +wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh +``` Cool, huh? How many of you have the `--no-check-certificate` option of `wget` automatically turned on? Thankfully there's no `sudo` in front. |