March 15, 2006
使用QEMU调试FreeBSD/Linux内核
http://www.cublog.cn/u/10543/?u=http://www.cublog.cn/u/10543/article.php?frmid=20324
Also see the QEmu Documentation, Section 3.10 GDB Usage.
Another tutorial on general debugging techniques.
Posted by Roy at 11:46 AM in Work | Comments (0)
March 14, 2006
Parking in DC
For parking information and some other fun stuffs coming soon, check out http://www.nationalcherryblossomfestival.org.
Summary:
Hains Point: free parking.
Center City Parking: $10/Day after 10am, $20 before.
Union Station: $10 - 16.
Posted by Roy at 10:20 PM in Leisure | Comments (0)
Differences between OCaml and Standard ML/NJ
http://www.cs.berkeley.edu/~necula/autded/project/project.html
· Many small syntactic differences. Hard to say if for better or worse. What is worse however is the very poor parser that will basically tell you that there is a syntax error with no other help to figure out why.
· Mutable records. Very convenient.
· Objects and classes (although the project is not setup to use them)
· Nice assert statement that reports the position in the program of an assertion failure
· Significant differences in the standard library.
· A debugger with backstep capability (works on Unix/Linux only and is integrated with Emacs). You can easily do without this.
· Good integration with C
· Good profiler
· Faster compilation and reasonably fast compiled code
· Not quite as powerful of a compilation manager
· Very portable in its bytecode incarnation. A few platforms (e.g, x86) have native compilers as well. but don't be afraid of using the bytecode. It is only 2-3 times slower than the native code version.
Also see the Comp.Lang.ML FAQ, http://user.it.uu.se/~jenso/programming/sml_vs_ml.txt, and http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html for syntactic differences.
Posted by Roy at 11:51 AM in Work | Comments (0)
March 09, 2006
加拿大DC使馆签证纪行
昨天去加拿大使馆顺利拿到了签证,为了以后查询方便,特记录如下:
1. 签证tips
基本材料和要求和主页上的说明一致。但是好像接受cash。有的国家需要双份copy的申请表,China不幸为其中之一,甚至in some cases,材料的处理要等上一个礼拜。
周三11点就关门,有人11:10过来就不让进了。一个family只需填一份表(family仅含spouse及dependent children,不含parents)。
加拿大的临时访问签证(TRV)是非常容易的,只要写上一个粗略的访问计划,带上足够的资金证明就可以了。我写的是tourism,没有写去开会,也没写要访问谁,轻松搞定,等了1个多小时,因为我们到的比较晚。
要求两张6个月内的照片,AAA members可以在AAA的local branch照相,8块左右。
2. 进出DC tips
weekdays的traffic真不是人能忍受得了的。我们6点出发,满以为8点就能到预计的停车场了。最主要的因素是我比较了常走的路线和google生成的另一条路线后选了个冒险的路线。这条路线我早就想走了,这次以为它从395直接进DC然后到达我们的目的地所以比较方便。没想到一开始走的就不顺利:我们按照google的路线在250上没走多久后就拐上22,是一条单lane弯来弯去的小路,根本就开不快。沿着22一直开会开上231然后拐上15。google估计是按照最短距离生成的,其实应该不上250,沿着64走到与15的交界处直接上15。在爽爽的15上没走多久,就拐上20然后沿着3号路开上I-95高速。20和3有一条路也走不快,忘了是哪一条了,总之走得很郁闷。
好容易盼到了95,以为是高速了,谁知道进城的人爆多无比,平均时速在10mi/h。进城有条HOV,巨快,但9点以前必须有3个人以上才能开,我们只好在龟速公路上慢慢开。估计下95走local会更快,但地形不熟也就不敢轻举妄动,乖乖的follow打印的driving directions。95开到70出口左右大概就没有路了,分成了395和495。395很短,只是连到DC市内。495是环绕着DC的一条环形高速。395到了DC基本上就不算高速了,到处都是出口,我们被搞得晕晕乎乎的。
总而言之,去DC其实还是应该走29,66。66到了DC就结束了,但可以沿着50进DC,很容易。回来的时候要注意上66的口,容易错过。
最后要说的是,真没想到回来的时候也有爆多的人。当时从fairfax到gainsville的那一段我图省事没上66,直接走了29,谁知道又是堵得像乌龟一样,下次吸取教训,有高速一定要走高速。
如果没有很好的心理准备,weekdays去DC最好还是开车到metro的station, 停在那里坐metrorail。周末在那里的parking是free的,weekdays不是,而且交parking fee还得买一张见鬼的卡,那张卡成本就得5块钱:( 坐monorail可以买一天的通票很划算,但在上班高峰期是不可以用的。
3. parking tips
事先做了些研究,但在网上只查到union station可以停,其他的停车场在网上都找不到。union station是一个很大的车站,有上千个停车位,还有一些shopping的场所。其实停车不用担心,仔细转转能找到不少停车场,费用大概都在14-18一天。只停1小时会便宜,但便宜得很少,半天到一天比较划算。
细心的找的话也能找到metered parking,15分钟一个quarter,缺点是只能停2小时,偏远地区也有可以停4小时的。
我们很幸运的找到了停车位,顺利地在11点前submit了签证申请,并在2小时内赶回了停车处:)
周末在DC大部分street parking是free的。
附上在95抓拍的酷牌照一张:

1上面一行是“VIRGINIA”,下面一行好像是“US Congress”。
Posted by Roy at 10:05 PM in Leisure | Comments (0)