« October 2004 | Main | December 2004 »

November 28, 2004

Rankings of Safest/Most Dangerous Cities

http://morganquitno.com/cit05pop.htm

没想到NYC还挺安全的,没想到DC很不安全,真是和外表很不一样啊。
还没想到Charlottesville居然没进safest的排名,还没想到Richmond很不安全。

Posted by Roy at 09:23 PM | Comments (0)

Trip in Thanksgiving

去了纽约州的Syracuse市的一个小town,Cazenovia,非常安静祥和,吃了一顿Thanksgiving Meal。
然后到Syracuse连夜坐Greyhound到NYC,真是天堂与地狱的统一体啊。
发现电影和游戏反映的美国其实就是NYC啊,其他的有些地方还是挺传统的。

照片放在personal目录下。

Posted by Roy at 07:57 PM | Comments (0)

November 23, 2004

乐坛鬼才黃霑因肺癌在大围仁安医院病逝

默哀。

http://ent.sina.com.cn/2004-11-24/0811577345.html
http://ent.sina.com.cn/f/hzbingshi/index.shtml

看到新浪相关专题,忽生岁月无常,年华老去之感。

·奥斯卡影帝马龙白兰度病逝

·台湾著名音乐人梁弘志病逝

·梅艳芳患子宫癌去世

·著名演员导演谢添病逝

·柯受良上海意外身亡

·艺人张国荣跳楼自杀身亡

·戏剧家吴祖光因病逝世

·相声泰斗马三立辞世

·香港乐坛教父罗文病逝

·影视明星李媛媛病逝

·著名歌手高枫病逝

Posted by Roy at 11:39 PM | Comments (0)

November 20, 2004

Mathematica's Google Aptitude

http://mathworld.wolfram.com/news/2004-10-13/google/

October 13--Many internet denizens have heard of Sergey Brin, President of Technology at google.com. What they may not know is that before cofounding the precursor to Google in 1998 and subsequently becoming a multibillionaire, Brin was an intern at Wolfram Research (makers of Mathematica, as well as sponsors of MathWorld).

So perhaps it's no great surprise that Google utilizes unusually mathematically oriented recruitment techniques.

...

Posted by Roy at 01:33 AM | Comments (0)

November 18, 2004

Some thoughts on research

The target-dependent part heavily employs assembly languages.
Luckily those codes are not so hard to read.
strata_start(strata.c) -> TI.start -> targ_start(targ-switch.s), push two arguments on stack, then call strata_build_main(build.c)

An important data structure is the "data" array of "hash_entry". I don't know where to find the exact meaning. Some of them can be guessed by looking at targ-build.c.

About optimizing, can I apply some techniques in PL, for example, Continuation Pass Style (CPS)? I don't know, maybe I need to read more literature on dynamic compilation and PL.

Posted by Roy at 10:43 PM | Comments (0)

November 14, 2004

subtract two text files

First, use 'comm' of 'coreutils':
comm -3 file1 file2
Then, select the first column from the output:
| cut -f 1
Finally, you'll need to delete the empty lines in between.

I tried to do this work by awk at first.
To gain performance and reduce complexity, I assume the input files are already sorted.
But the 'sort' program is so weird that it doesn't sort words that contain underscores well.
Therefore my program doesn't work well in this circumstance.

#!/usr/bin/awk -f
# subtract file1 file2
# print lines in file1 that aren't in file2 to stdout
# assume files are preprocessed by "sort -u"

BEGIN {
if (ARGC!=3)
{
print "subtract f1 f2"
exit
}
f1 = ARGV[1]
f2 = ARGV[2]
neof1 = getline l1 < f1
neof2 = getline l2 < f2
while (neof1 && neof2)
{
if (l1 < l2)
{
print l1
neof1 = getline l1 < f1
}
else if (l1 > l2)
{
do
neof2 = getline l2 < f2
while (neof2 && l1 > l2)
}
else
{
neof1 = getline l1 < f1
neof2 = getline l2 < f2
}
}
while (neof1)
{
print l1
neof1 = getline l1 < f1
}
}

# {
# getline tmp< "DIABLO"
# if ($0 == tmp)
# print $0
# }

Posted by Roy at 07:59 PM | Comments (0)

Select an arbitrary column of text in UNIX

http://www.tech-recipes.com/unix_tips161.html

Posted by Roy at 12:32 AM | Comments (0)

November 01, 2004

Colorado真是滑雪的好地方

Denver已经开始下大雪了。

Posted by Roy at 04:27 PM | Comments (0)

Upcoming events

Give presentation on language-based security.
Finish Malware project.
Enhance the project by Dec. 13rd, when those DARPA guys are coming to see if the money is going into rat hole.

Posted by Roy at 04:21 PM | Comments (0)