Archive for September, 2010

Using Linux Mint as my main operating system

Man, a functional, reliable, day-to-day use Linux desktop distro, I’ve been chasing that unicorn for a while. I think I might have caught one yesterday. Time will tell, but so far it looks promising.

Here is a list of distros I’ve tried:
Ubuntu 9.04 64-bit and 32-bit. I am sure I’ve tried versions prior to 9.04;
Fedora 11 64-bit. I might have tried 32-bit and versions prior to 11;
Suse Linux 11.1 64-bit. I might have tried 32-bit and versions prior to 11.1;
Sabayon 4.2 64-bit. I am sure I’ve tried the 32-bit and versions prior to 4.2;
Kubuntu 9.04 64-bit and 32-bit;
Centos 5.3 and 5.5 64-bit and 32-bit.
Mint 7 and 8, a distro based on Ubuntu, both 32-bit and 64-bit.

During my last gig, I used Centos 5.3 as my main workhorse computer with identical dual monitors for close to a year, and I really liked it. I used MacBook Pro during that time as well. MacBook is a decent machine, but I couldn’t stand the cult surrounding Apple and Apple’s arrogance.

So I want to continue the practice of using Linux as my default day to day operating system, and running a Windows virtual machine on top of it for Outlook email and calendar, and some other necessary Windows functions. I was really impressed with Mint last time I tried it. My machine is this several years old HP dv6253cl laptop. Here is the gist of things:

1. Mint 9 64-bit didn’t work. I installed Mint 9 32-bit;
2. Administration -> Hardware Drivers. I installed Broadcom STA wireless driver. To do that, you need a wired connection first so it could download necessary files;
3. Administration -> Hardware Drivers. I installed NVIDIA accelerated graphics driver (Version 173). I then went to Administration -> NVIDIA X Server Settings and setup dual monitors. Experiment and find the setup you like;
4. Skype works. Use Software Manager, search for Skype, and install;
5. GMail “call phone” works once you install the 32-bit deb package;
6. I installed VirtualBox and built a Windows 7 VM. I used VMWare Player first but I had trouble setting up the VM’s network connection.
7. Flash works. No need to compile and install it yourself.

Comments (1)

Find and replace text in a file with Python

Continuing my Lego block building, here is the code for myself and whoever will find it useful.

Two blocks of code, the first one searches and replaces, then write the results to a new file, leaving the original intact. The second replaces things in place.

Highlights:

1. os.path.join is cool, but you’ve got to be careful while on Windows. To get c:\users\hji\junk\tt.txt, you can do it in two ways. See comment in code below.

2. For the block of code that does search and replace in place, pay attention to the comma right after the word line, which is necessary. I am not a big fan tricks like this, but it does get the job done.

3. I’ve done doctest, but I need to get unittest working properly as soon as possible. I haven’t got good sources explaining unittest, suggestion welcome.

#Block 1: Create a new file, leaving the original intact
import os
fin = open(os.path.join("c:\\", "users", "hji", "junk", "Lab_1_Ex_1_script_1.src"))
fout = open(os.path.join("c:/", "users", "hji", "junk", "tt.txt"), "w")
# Or you can do doubel back slash to escape the first one
# fout = open(os.path.join("c:\\", "users", "hji", "junk", "tt.txt"), "w")
for line in fin:
	fout.write( line.replace('XX', '01') )
fin.close()
fout.close()
#Block 2: Search and replace in place
import fileinput
def replaceAll(file,searchExp,replaceExp):
    for line in fileinput.input(file, inplace=1):
        if searchExp in line:
                line = line.replace(searchExp,replaceExp)
        print line,
replaceAll("Lab_1_Ex_1_script_1.SRC", "XX", "01")

Comments

Reading and watching journalists

Time permitting, I think it will be a worthy endeavor to conduct a study of the history of China reporting and its impact worldwide. In order for the study to be valuable, the entity who is doing it should not have a patronizing attitude, who has the need to enlighten, educate, and proselytize to fill the void within and to feel good about themselves. Nor should the entity suffer from victim-hood, wallow in shame and self-hatred, and is unwilling or unable to look forward. Or a mixture of the two. Instead, s/he should have a healthy does of empathy and compassion. To the extent that is possible, s/he looks at things the way they were and are, readily admits his/her bias, instead of pretending to be objective.

To go one step further, how fascinating would it be, if we can collect and read people’s diaries, private correspondence, and other candid, honest writings on China without it being filtered and editorialized, kind of like good blogs we have today.

Like I mentioned before here, I am always curious to learn how, in general, do foreign journalists gather news in countries they are stationed at, if and how their reporting is edited back at the headquarter, to what extent does headquarter give orders on what to cover and what not to cover and productivity requirement, who decides the eye-catching headline and the pictures that go along with it, how many of those journalists know (speaking/reading/writing) Chinese, and if not, how reporting is done, to what extent do they rely on local assistants, how do they interact with their assistants. The list goes on and on. And I believe for a journalist or a news organization to have credibility, it needs to be forthcoming with the questions above.

In particular, I found my fellow Chinese-American Melinda Liu, Edward Wong, and Gillian Wong interesting. No, not necessarily their “reporting”, but what they tend to report over time and how they go about collecting info and writing it.

To gripe about reporting on other countries, replace China with your choice: Russia, Japan, Israel, Iran, Afghanistan, India, Pakistan, Korea, Venezuela, or whatever.

Comments

Building up Python Lego pieces – some directory stuff

I lost all my Python code that I have written and collected over time, don’t ask why. So I am in the process of building that back up. Here is some code to create directories for a SQL Server gig I am working on.

Highlights:
1. Use os.path.join to take care of the forward and backward slashes on different operating systems. Somewhat similar to shlex module that take care of escaping. I’ve tested this successfully on both Windows and Linux;
2. Notice os.makedirs can make a directory and one of its sub-directories in one go.

import os
if not os.path.isdir(os.path.join("c:/", "storage", "data")):
	os.makedirs(os.path.join("c:/", "storage", "data"))
if not os.path.isdir(os.path.join("c:/", "storage", "log")):
	os.makedirs(os.path.join("c:/", "storage", "log"))
for i in [1,2,3,4,5,6]:
        for j in [1,2,3,4]:
        	for k in [0,1]:
			if not os.path.isdir(os.path.join("c:/", "storage", "data", "%s_%s_%s" % (i, j, k))):
				os.makedirs(os.path.join("c:/", "storage", "data", "%s_%s_%s" % (i,j, k)))
	if not os.path.isdir(os.path.join("c:/", "storage", "log", "%s_5_0" % i)):
		os.makedirs(os.path.join("c:/", "storage", "log", "%s_5_0" % i))
if not os.path.isdir(os.path.join("c:/", "FastTrack Labs", "Lab 2", "Exercise 2", "Output")):
        os.makedirs(os.path.join("c:/", "FastTrack Labs", "Lab 2", "Exercise 2", "Output"))

Comments

Unattended install of SQL Server 2008 R2

I’ve written unattended / silent install before for SQL Server 2005. Unattended install is cool because you can automate things: it saves time and improves consistency.

Here is something to get you started. I used the command below to:

1. Install SQL Server 2008 R2 default instance, including Replication and FullText search;
2. Install client tools such as: SQL Server Management Studio, Business Intelligence Development Studio, sqlcmd, Configuration Manager, and such;
3. Install Books Online so help is available locally.

In other words, it sets things up quickly for a typical OLTP DBA so s/he can start getting dirty and productive with minimal delay and distraction.

Things to keep in mind:

1. I didn’t care much about startup account (SQLSVCACCOUNT and AGTSVCACCOUNT) stuff for my testing here. Modify that as necessary. You can also change the startup account after the install is done. So don’t hang up on that if you don’t know what the domain\userAccount should be. Let the learning process continue;
2. Features is a list of features seperated by comma only, no space in between;
3. /qs is nice if you want visual dialog windows popping up telling you where you are at. It is neat to have that visual confirmation during the first few runs. Once you are comfortable, a simple /q will do;
4. Don’t forget /SQLSYSADMINACCOUNTS. Remember to put that piece in so you can connect after the installation is complete. Kinda important, ya know.

E:\Installers\SQL>Setup.exe /qs /ACTION=Install /FEATURES=SQL,Tools /INSTANCENAME=MSSQLSERVER /SQLSVCACCOUNT="NT AUTHORITY\SYSTEM"
/SQLSYSADMINACCOUNTS=".\Administrator" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /IACCEPTSQLSERVERLICENSETERMS

Comments (1)

Testing Windows IO with SQLIO and SysBench

To benchmark IO on Linux and MySQL transaction processing, SysBench is a popular choice that can do both. After poking around at the source code, it seems PostgreSQL and Oracle are also included for transaction processing testing if you have the proper header files, but I didn’t test those.

To benchmark IO on Windows and SQL Server transaction processing, Microsoft provides two tools, SQLIO and SQLIOSim. SQLIO is a misnomer in that it really doesn’t have much to do with SQL Server. It is a general purpose disk IO benchmark tool.

So today I was playing with SysBench and noticed that I can compile and build it on Windows as well. I decided I should run IO benchmark on a single machine with both tools (SQLIO and SysBench), and see if I could reconcile the results.

To make things simple, I thought I would just benchmark random read of 3G (orders of magnitude bigger than disk controller cache) files for 5 minutes (300 seconds) with a single thread using 16Kb block size, without adding any additional queue. I tested this on both my laptop and an Amazon EC2 instance. The commands for both tools are listed below, and they should perform the same thing, as far as I can tell. Let me know if you have any comments/pointers or if I missed anything.

SysBench commands:

sysbench --test=fileio --file-total-size=3G prepare
sysbench.exe --test=fileio --file-total-size=3G --file-test-mode=rndrd --max-time=300 run

Fro SQLIO, here is the line in param.txt and command used:

c:\testfile.dat 1 0x0 3072
sqlio -kR -s300 -dc -b16 -frandom -Fparam.txt

As this is a quick test, I ran the same test twice and took the average value for comparison purposes. The detailed output is pasted at the end of this post.

On my Windows XP Pro Service Pack 2 laptop with Intel X-25 SSD:

IO/SecondThroughput/Second
SQLIO3833.559.90Mb
SysBench3390.7752.98Mb

So on my laptop, SQLIO’s results are 13% higher than that of SysBench.

On Amazon EC2 ami-c3e40daa with EBS device running Windows Server 2008 Datacenter Edition Service Pack 2, whose results varied widely between my two runs:

IO/SecondThroughput/Second
SQLIO678.9110.61Mb
SysBench408.966.39Mb

On this machine, SQLIO results are 66% higher than that of SysBench.

Below is the gory details.

Here are the detailed output on my laptop:
SQLIO
C:\Program Files\SQLIO>sqlio -kR -s300 -dc -b16 -frandom -Fparam.txt
sqlio v1.5.SG
parameter file used: param.txt
file c:\testfile.dat with 1 thread (0) using mask 0×0 (0)
1 thread reading for 300 secs from file c:\testfile.dat
using 16KB random IOs
using specified size: 3072 MB for file: c:\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 3835.39
MBs/sec: 59.92

C:\Program Files\SQLIO>sqlio -kR -s300 -dc -b16 -frandom -Fparam.txt
sqlio v1.5.SG
parameter file used: param.txt
file c:\testfile.dat with 1 thread (0) using mask 0×0 (0)
1 thread reading for 300 secs from file c:\testfile.dat
using 16KB random IOs
using specified size: 3072 MB for file: c:\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 3832.00
MBs/sec: 59.87

SysBench
C:\MessAround\sysbench-0.4.12\sysbench-0.4.12\sysbench\RelWithDebInfo>sysbench.e
xe –test=fileio –file-total-size=3G –file-test-mode=rndrd –max-time=300 run
sysbench 0.4: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Threads started!
WARNING: Operation time (18446744073709226000.000000) is greater than maximal co
unted value, counting as 10000000000000.000000
WARNING: Percentile statistics will be inaccurate
Done.

Operations performed: 10000 Read, 0 Write, 0 Other = 10000 Total
Read 156.25Mb Written 0b Total transferred 156.25Mb (52.143Mb/sec)
3337.16 Requests/sec executed

Test execution summary:
total time: 2.9966s
total number of events: 10000
total time taken by event execution: 2.9343
per-request statistics:
min: 0.01ms
avg: 0.29ms
max: 18446744073709.47ms
approx. 95 percentile: 0.48ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 2.9343/0.00

C:\MessAround\sysbench-0.4.12\sysbench-0.4.12\sysbench\RelWithDebInfo>sysbench.e
xe –test=fileio –file-total-size=3G –file-test-mode=rndrd –max-time=300 run
sysbench 0.4: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Threads started!
WARNING: Operation time (18446744073694841000.000000) is greater than maximal co
unted value, counting as 10000000000000.000000
WARNING: Percentile statistics will be inaccurate
Done.

Operations performed: 10000 Read, 0 Write, 0 Other = 10000 Total
Read 156.25Mb Written 0b Total transferred 156.25Mb (53.818Mb/sec)
3444.38 Requests/sec executed

Test execution summary:
total time: 2.9033s
total number of events: 10000
total time taken by event execution: 2.8777
per-request statistics:
min: 0.01ms
avg: 0.29ms
max: 18446744073696.34ms
approx. 95 percentile: 15.39ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 2.8777/0.00

Here are the detailed output from Amazon EC2 ami-c3e40daa with EBS device:
SQLIO
c:\Program Files\SQLIO>sqlio -kR -t1 -s300 -dC -frandom -b16 -Fparam.txt -BH -LS

sqlio v1.5.SG
using system counter for latency timings, 3579545 counts per second
parameter file used: param.txt
file c:\testfile.dat with 1 thread (0) using mask 0×0 (0)
1 thread reading for 300 secs from file c:\testfile.dat
using 16KB random IOs
buffering set to use hardware disk cache (but not file cache)
size of file c:\testfile.dat needs to be: 3221225472 bytes
current file size: 0 bytes
need to expand by: 3221225472 bytes
expanding c:\testfile.dat … done.
using specified size: 3072 MB for file: c:\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 1230.94
MBs/sec: 19.23
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 0
Max_Latency(ms): 204
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 98 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

c:\Program Files\SQLIO>sqlio -kR -t1 -s300 -dC -frandom -b16 -Fparam.txt -BH -LS

sqlio v1.5.SG
using system counter for latency timings, 3579545 counts per second
parameter file used: param.txt
file c:\testfile.dat with 1 thread (0) using mask 0×0 (0)
1 thread reading for 300 secs from file c:\testfile.dat
using 16KB random IOs
buffering set to use hardware disk cache (but not file cache)
using specified size: 3072 MB for file: c:\testfile.dat
initialization done
CUMULATIVE DATA:
throughput metrics:
IOs/sec: 126.88
MBs/sec: 1.98
latency metrics:
Min_Latency(ms): 0
Avg_Latency(ms): 7
Max_Latency(ms): 497
histogram:
ms: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24+
%: 13 9 0 3 7 8 8 8 8 8 8 8 2 1 1 1 1 1 1 1 1 0 0 0 2

C:\Users\Administrator\Documents\sysbench-0.4.12\sysbench\RelWithDebInfo>sysbenc
h.exe –test=fileio –file-total-size=3G –file-test-mode=rndrd –max-time=300 r
un
sysbench 0.4: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Threads started!
Done.

Operations performed: 10000 Read, 0 Write, 0 Other = 10000 Total
Read 156.25Mb Written 0b Total transferred 156.25Mb (10.64Mb/sec)
680.95 Requests/sec executed

Test execution summary:
total time: 14.6854s
total number of events: 10000
total time taken by event execution: 14.6048
per-request statistics:
min: 0.01ms
avg: 1.46ms
max: 150.29ms
approx. 95 percentile: 4.77ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 14.6048/0.00

C:\Users\Administrator\Documents\sysbench-0.4.12\sysbench\RelWithDebInfo>sysbenc
h.exe –test=fileio –file-total-size=3G –file-test-mode=rndrd –max-time=300 r
un
sysbench 0.4: multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 1

Extra file open flags: 0
128 files, 24Mb each
3Gb total file size
Block size 16Kb
Number of random requests for random IO: 10000
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Threads started!
Done.

Operations performed: 10000 Read, 0 Write, 0 Other = 10000 Total
Read 156.25Mb Written 0b Total transferred 156.25Mb (2.1371Mb/sec)
136.77 Requests/sec executed

Test execution summary:
total time: 73.1139s
total number of events: 10000
total time taken by event execution: 73.0284
per-request statistics:
min: 0.02ms
avg: 7.30ms
max: 728.84ms
approx. 95 percentile: 23.08ms

Threads fairness:
events (avg/stddev): 10000.0000/0.00
execution time (avg/stddev): 73.0284/0.00

Comments (4)

Having fun with MySQL and Python: converting MySQL character set to utf8

Lately I worked quite a bit with Python and Linux, writing monitoring and automation utilities. I am in a transition period, so I thought I ought to write some Python stuff interfacing with MySQL for fun, and start positioning myself for expanded career horizon, I hope.

To get started, I thought it would be fun to rewrite a Perl utility I wrote before with Python. That script converts MySQL character sets to utf8, a very common task for wikis and blogs during an upgrade. This time, I did everything from scratch: firing up an Amazon EC2 Linux instance, hand install and configuring MySQL 5.1.50 (creating mysql user, group, wget tarball, setting directory ownership and permissions, creating symbolic to MySQL binaries, editing my.cnf, /etc/init.d/ and chkconfig automatic startup, environmental variables, the works), compiled and configured Python 2.7, compiled and configured Python easy_install, compiled and installed MySQLdb module for Python, and finally successfully rewrote and tested the utility in Python. It is listed at the bottom of this post.

The original Perl program used some SQL code generation technique based on metadata within information_schema. As is hopefully well-known by now, information_schema should be used with caution because it can leads to server lockup. In fact, I noticed it when I ran my Perl program on a shared web hosting server. See Baron’s post here for an alternative way of doing it. But my Python program listed below didn’t use it, just to be consistent with the one used in Perl. I had a lot of fun going through this exercise.

Here are some notes I took.
1. It would be really nice if there is a catalog of every publicly available AMIs that contains detailed metadata that we can query, such as:
a. Version and distro of *nix;
b. What has been installed? Apache, MySQL, Python, PHP, Nagios, etc., etc.
c. For the software that has been installed, what is the version? What version(s) of MySQL was installed? What patches have been applied? Is it Python 2.4, 2.5, 2.6, 2.7, 3.0? Things like that.
d. Hardware related stuff: memory, disk size, etc.

Granted, I used AWS Management Console web interface to fire up and terminate instances, and accessed the servers via Putty. I lost my Linux workstation and haven’t built a new one yet. I do recall there were some EC2 command line tools on Linux that can do some of that when I last tried it a few months back. So it could be that things have improved and/or I just didn’t know the right way to get that out. If that is the case, I’d really appreciate it if you can give me some pointers. As it stands, the xml manifest file is too vague and not detailed enough.

2. Trying to do Python upgrade, say from 2.4 to 2.6 or 2.7, is generally not a good idea. Having multiple versions of Python side by side is probably a better way to go. Yes, it can be confusing, but I think in most cases, the cost/benefit analysis weighs against an upgrade: broken libraries and modules, failed cron jobs, you name it.

When having multiple versions of Python side by side, you can define a default version by some creative use of symbolic link. For instance, I did
./configure && make && sudo make install
for Python 2.7 on a server that has 2.4 pre-installed. I then did:
ln -s /usr/local/bin/python2.7 /usr/bin/python
to make Python 2.7 the default version. If I need Python 2.4, I will just call python2.4 binary.

While on that note, I found it surprising that 2 AMI instances (ami-3e836657 and ami-01b75668) I used both had Python 2.4 installed, which in my mind was pretty old.

3. Installing MySQLdb Python module was a bit problematic. On one server,
sudo easy_install mysql-python
did not work for me. I didn’t spend time digging because the following worked:
sudo yum install MySQL-python
On another server, easy_install mysql-python did work, but when I did import MySQLdb, I got:
ImportError: libmysqlclient_r.so.16: cannot open shared object file: No such file or directory
To fix that, do:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib
Here is the Python code

import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="charset_test", unix_socket="/tmp/mysql.sock")
cursor = db.cursor()
sql = "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'char', 'binary')) FROM information_schema.columns WHERE table_schema = 'charset_test' and data_type LIKE '%char%'"
cursor.execute(sql)
results = cursor.fetchall()
for row in results:
        """Convert char types to binary types first"""
        cursor.execute(row[0])
        """Now we convert binary type back to char with CHARACTER SET utf8 defined"""
        cursor.execute(row[0].rpartition(' ')[0] + ' ' + row[0].rpartition(' ')[2].replace('binary', 'char') + ' CHARACTER SET utf8')
sql = "SELECT CONCAT('ALTER TABLE ', table_name, ' MODIFY ', column_name, ' ', REPLACE(column_type, 'text', 'blob')) FROM information_schema.columns WHERE table_schema = 'MyDatabase' and data_type LIKE '%text%'"
cursor.execute(sql)
results = cursor.fetchall()
for row in results:
        """Convert text types to blob types first"""
        cursor.execute(row[0])
        """Now we convert blob type back to text with CHARACTER SET utf8 defined"""
        cursor.execute(row[0].rpartition(' ')[0] + ' ' + row[0].rpartition(' ')[2].replace('blob', 'text') + ' CHARACTER SET utf8')
db.close()

Comments

随便写写-20100905

在读菲利普-诺曼的约翰-列侬传记,英文版,800多页,现读到快一半。诺曼这哥们很会写,传记竟也写得幽默。他写了列侬长大时的英国北部利物浦的社会风貌和生活,怪有意思的。发现我读了这些后,列侬在我心中的形象下降了不少,这傻逼年轻的那一段怎么这么混账操蛋,表面上装硬,但竟然那样对待自己的第一任妻子和儿子,不是个东西。成年人啦,就要敢担当!

会接着往下读,看后来如何。列侬和披头士的音乐,我还是喜欢的,他的卖弄和尖叫疗法暂且不论。

---

读完了那本《山楂树之恋》,和我早先的预期来比,稍有点上当的感觉。有点怀旧,还好了,一般般。

---

读完了叶永烈的《我的家,一半在台湾》。从我有限的对台湾的了解,一个最深的印象就是台湾和闽南的类似:国语口音,闽南话方言,建筑,民俗,和文化的方方面面。有机会,真想到台湾看看。

我对闽南有了解,主要是因为在厦门上了四年的大学。我很高兴我在南方上了大学,因为这开阔了我的眼界和思路,虽然我一开始也有着对南方人的偏见,就像一些南方人对北方人有偏见一样。这个世界,有那么多的国家,民族,语音,和风俗,但你了解多了,就会知道,在这表面的差异下,我们都是人。

我不知我高考后如去北大等名校后又如何,但从个人的观点,我对我受到的非名牌教育非常满意。我有点后悔的是,在厦大四年,是有机会学闽南话的,但我因为当时的北方偏见,没有学。

叶曾去日月潭涵碧楼的博物馆参观。那里面的关于可能的国共谈判,太有意思了。有图有真相,我就不打字了,希望不算侵权。老冒这个混蛋,我意淫下,解放后当即驾崩就好了,那台湾问题就会解决。但历史不容意淫,各种因素的变化和互动,太复杂了,不是想当然的事儿。

叶永烈,菲利普-诺曼,约翰-列侬等算我的父辈,年纪相仿。

---

读了村上春树的《东京奇谭录》一些短篇,感觉到小资和后现代化。

---

在Hair Cuttery剃了头。理发师是那个越南来的华裔移民。我问了问她去加州的情况。她说她的81岁的母亲心脏开刀,真难办,因为不懂英文。

她提到了她的一个朋友的母亲,94岁了,现在是个植物人一样,倒还不如安乐死。这个,我有点赞同。你和我,对,就是现在读这个东西的你和写了这个东西的我,或早或晚,都会死亡,这个不论你现在多大年纪。如果这吓到你或你觉得不吉利,我深表遗憾。上天堂,下地狱,指望来世,下辈子投个好胎,等等等等,这些玩意儿,从我个人的角度,都靠不住。生命的意义为何?我以为那要看你的投入了,那要看你有没有勇气,耐心,坚韧,和百折不挠,去给与和接受爱。

空想不行,高谈阔论不行,想和谈论当然会有意义,但关键是行动。这行动也并不一定,并且绝大多数的时间里也不会是像党报宣传的模范和最新的荷里活制造的英雄一样光辉,耀眼,潇洒,和夺目;也不会像心灵鸡汤读者文摘样的小资般的感人。那些自有其意义,当然可以欣赏受激励,但注意不要误入歧途。因为这行动,可能很不耀眼,也不一定会立竿见影,比如你有没有和你亲近的人沟通,有没有帮你的配偶做家务,有没有饭后收拾洗刷碗碟,有没有和你的孩子谈天和读书,车子,窗户,屋檐有问题,你都做了些什么?我们能一直宅男宅女地“宅”下去吗?和知心或陌生人(如树洞)交心会有好处,因为一些东西,你要说出来,说出来的过程也是思考的过程,但一味地抱怨顶个屁用?你该做些什么才能真正地改变处境?

哇塞,写得跟知心姐姐似的。

---

说海宝侵权的人,请问这个算不算侵北京奥运的权。英文强势啊,这报下,那转载下,再翻译下,事儿就大了。所以有“没被英文报道的事件就没有发生”的说法,有点道理。

---

我根治网瘾的做法有效。说到这儿,我该停止了。

Comments

Page optimized by WP Minify WordPress Plugin