前晚夢中,自己問了自己,究竟是否在發夢。

還好,夢中我還是在做自己,而不是莊子,更不是蝴蝶。

by khc on Mon Dec 15 19:58:08 2008 Permlink
Tags: chinese

Social experiment and rants about fonts

I am not the biggest fan of Web 2.0 social networking sites. While Web 1.0 social networking sites (of course, they never called themselves social networking sites back then) tend to be fairly simple and navigable, Web 2.0 social networking sites seem to either have a reputation of colorful pre-teens or overweighted professionals. Web 2.0 social networking sites tend to have nothing in common and try to break as many known knowns as possible. The only trend that they share is that they all try to cram as many things on one page as possible, something people like to call "Mashups".

Of course, on those closed systems mashups tend to be possible only in very limited and controlled ways. For example, while Facebook can import an external feed to its Notes section, there's no way to import an external photo album. Getting data in is also much easier than getting data out.

That said, sometimes usefulness can be found. I've used a number of RSS readers and finally settled on Google Reader, and it has a feature that allows you to star or share feed items. I've recently found out that it even allows me to export my starred or shared items. Ah, those beloved mashups!

The end result can be found on the lower right corner of this site. There's no easy way to get statistic about who click on those links, although I seem to remember a way to do that with Google Analytics which is not enabled by default. Judging by stats of this site's visitors (again, with Google Analytics) this new area has a chance of being helpful to some, as they will likely find what I found interesting, interesting. It's even aptly titled "Interesting Stuff".

Those of you who read this site through the feed will of course miss out. I suppose one could subscribe to my google reader's starred items' feed instead.

As I was trying to integrate that starred item mashup onto this site I fiddled with the font sizes in the CSS. I noticed that I have weird font-size all over the place just so that the menu headings and menu items would look the way I want them to. That seems quite silly, so I've taken most of them out and left only the relative sizes there. I also changed Firefox's default font size from 14px to 12px to better match my desktop settings (which is 10pt on 90dpi).

That created a problem though. Many websites take the default font size into account and adjust the font size down to enforce a particular design on web pages. Worse, some websites even do that on the main content (for example, Google News like to insert font size=-1 everywhere). After I decreased the default font size on Firefox some pages become unreadably small. I can set a minimum font size, but that would make correct uses of small font indistinguishable from incorrect uses.

Now that I think about it, this might have been why I hardcoded font sizes on this website. I probably got tired of zooming in all the time on other sites. I think I am trying to do the correct thing here though, so I will see how long this experiment is going to last before I can no longer stand it and change everything back.

While I was fiddling with font size everywhere I also realized GNOME by default assumes 96 dpi, while my real dpi is 90. This made fonts larger than they should. So I fixed that too, and changed the font size at the new/correct dpi to look comfortable on my eyes.

by khc on Fri Dec 5 21:50:33 2008 Permlink
Tags: computer rant

Follow up on my follow up on my lyric display system

lrc.pl, completely rewritten from last time, supports Rhythmbox and Quodlibet. Quodlibet support requires a patch, against quodlibet-1.0 (on ubuntu it's actually part of the package exfalso, and the file is installed as /usr/share/quodlibet/qltk/dbus_.py. Also doesn't support seeking in Quodlibet.

Supports the offset attribute, but I might have offset it the other way, which I found to be more accurate with the pile of LRC files that I have obtained.

As usual, just name the LRC file with a .lrc appended to the song file name. It detects which supported player you have running, and can reattach to it if you restarted it as well. Reattach to a different player is not currently supported. Players other than Rhythmbox and Quodlibet is also obviously not supported, but shouldn't be too hard if it works with DBus.

Oh, if you are using the QuodLibet patch above, make sure that you are careful with the names. I had to use _ instead of . because Dreamhost's configuration stupidly tries to execute every file with a ".pl" or ".py" even when they are in the middle of the file name. Ugh.

by khc on Sun Nov 2 17:50:30 2008 Permlink
Tags: computer

十年如一日

戊子重陽,無眠達旦,大叫一聲:作此篇,兼懷過去!

每個月總有幾日,會心煩氣燥,失眠,胡思亂想。有時,甚至會想將啲胡思亂想寫落嚟,變成胡言亂語。

一個星期前:十幾年來第一前做牙齒檢查,結果?將要去做第一次補牙。

三個月前:踏入廿四歲,開始供退休金,開始 OkCupid。

半年前:又一次番香港,仲去埋雲南,四川,蘇州。

一年前:工作上開始咗一個大工程,結果?尚可。

兩年前:又一次番香港,仲去埋北京,華東,西安。第一份長工,第一次出差,第一次滑雪。

四年前:由大學宿舍搬出,第一次一個人住,第一次無電5日。

六年前:由收到大學通知書,到上大學前嗰幾個月,可能係依十幾年來,最無憂無慮嘅日子。

八年前:第一次番香港,約咗一班以前嘅同學,先至發現,其實我無咩嘢同佢地講。不久之後,第一次同人講…結果,非常失敗。

九年前:第一份工,雖然只做咗一日。

九年半前:唔記得有咩特別事,但為咗平衡,無辦法。

九年九個月前:第一次攞F。

九年十一個月又三個星期前:第一次感覺到咩叫有口難言。

十年餘一日:人生在世不稱意,明朝散發弄扁舟。

十年逾一日:棄我去者,昨日之日不可留。

其他嘅,都係歷史遺落嚟嘅問題了。

by khc on Tue Oct 7 07:37:47 2008 Permlink
Tags: chinese

AMD Phenom b2 linux patch

So AMD's Phenom revision b2 has a hardware bug, I am sure everyone knew that by now. AMD released an "unofficial patch" some time ago against 2.6.23.8, and updated it for 2.6.24 and 2.6.25 later. Those patches not recommended by AMD, and using them may burn down your house in addition to your computer.

That said, at least several people found the patch useful. Since I was one of those who were stupid enough to buy one of those broken CPUs, I looked into updating the patch a while ago to 2.6.24-19, which is what Ubuntu Hardy uses. Most of the patch applied cleanly, except in the area of i386/x86-64 merges. I am no kernel hacker, but I've done my best to make the patch apply. The result is here. I can't vouch its correctness except that I've been running it for almost a week now with 1-2 virtual machines running most of the time.

Again, before using this you should read through the 2 threads linked above. If it breaks, you get to keep the pieces.

by khc on Tue Aug 26 23:01:01 2008 Permlink
Tags: computer
Older Posts