December 30, 2003

Embedded Linux VPN Router Near Release

Embedded Linux VPN Router Near Release

Posted by hufey at 01:00 PM | Comments (0)

December 25, 2003

The Faces in Front of the Monitors

The Faces in Front of the Monitors

Linus喝啤酒

Posted by hufey at 03:18 PM | Comments (0)

December 23, 2003

装上Linux Kernel 2.6啦

真不容易

更新modutils
更新mkinitrd
更新module-init-tools
make mrproper
make menuconfig
make bzImage
make modules
make modules_install
make install
generate-modprobe.conf /etc/modprobe.conf
修改 /etc/modprobe.conf 里的 usb-uhci 为 uhci-hcd
注释掉 /etc/rc.d/rc.sysinit 中初始化 usb kbd 和 usb mouse的部分

2004/02/29 解决All of your loopback devices are in use的问题
只要 insmod /lib/modules/kernelversion/kernel/drivers/block/loop.[ko,o]即可
原因在于loopback设备没有编译到kernel里

Posted by hufey at 05:35 PM | Comments (0)

December 22, 2003

Linux Kernel Summit Group Photo

Posted by hufey at 02:30 PM | Comments (0)

December 21, 2003

Alan Cox

Alan Cox
这哥们在读MBA,居然!

想起昨天晚上在一个新疆馆子吃饭,邻座有几个长发披肩面目狰狞的人,
我还以为是附近酒吧里的摇滚青年呢。靠,听他们说来说去,原来是
搞房地产的。

哈哈

Posted by hufey at 01:22 PM | Comments (0)

关于GTK,Qt和其他GUI方面的讨论

关于GTK,Qt和其他GUI方面的讨论

Posted by hufey at 12:24 PM | Comments (0)

December 17, 2003

上海图书馆vs北京图书馆

上海图书馆vs北京图书馆

提交者 : hUFEY 于 北京时间 2003-12-17 00:24:52

上海图书馆给外地人办证
俺就是新馆第一个外地人借书证的拥有者
上海图书馆4楼很好,外文期刊杂志,很全,也很新。
1楼落地窗下那块地方也不错。
以前我大部分周末都泡在上海图书馆了

北京图书馆,现在老江题字的叫国家图书馆。
楼老点,可是冬天感觉很温暖。
脚下的那个碎橡胶地板块踩上去很舒服。
我办的是阅览证,没办外借证,好像外地身份证
办不了外借证,至少要凭个介绍信啥的。
也有一个外文期刊阅览室,但是像Time之类的就是半开架的,
要填表登记,我跟管理员抱怨过,一个老头,他听说
上海随便看也叹气说“北京还是保守啊”,种类也不少,
但大部分都是极专业的期刊,反倒是一些ACM Journal,IEEE Journal
和类似PCMag,Byte这种都没有。
但北京图书馆有个外文图书阅览室,非常棒,更新很快,
计算机类的大概那边出了1两个月就能有。不知上海图书馆现在有没有
类似的阅览室。其实北图还有一个老馆在北海文津街,经常搞些
讲座,请的净是名人学者。老馆好像有些宝贝书吧,但是我兴趣不大。

北京图书馆算国家图书馆,跟上海图书馆地位相当的要算首都图书馆,
在潘家园。建筑看上去很大,进去后有逼仄的感觉,特别不痛快。
去过一回,找外文期刊阅览室,结果挂个牌,跟中文期刊室在一起,
就一个小书架。不超过10种,有people之类的,好像还有简氏防务周
刊和摄影类的什么的。其他的没看。

办证,上海当年的临时阅览证好像是10块一个月,参考阅览证100多1年
吧。国图,10块钱阅览证100块押金好像,1年,跟牡丹卡坐在一起;
临时阅览证就是一张纸,当天有效。首都图书馆几块钱来着,也是1个月。

Posted by hufey at 12:47 AM | Comments (2)

December 15, 2003

记一下gcc for MIPS compiler目前的bugs

要不时间长了就忘了

  • sprintf返回值始终为0
  • sprintf输出浮点数的时候必须设栈指针为8 bytes对齐
  • toupper错误,好象是会使输入buffer地址+1,这个没仔细研究,待考。
  • 多维数组不能在声明的时候初始化。

    Posted by hufey at 11:52 AM | Comments (0)
  • 记一个地址

    Zhang Le's HomePage


    zhcon的作者


    搞了个NLP的光盘

    Posted by hufey at 10:40 AM | Comments (0)

    December 12, 2003

    参照 Unix Programming Environment 来看NULL pointer

    C FAQ
    5.2: How do I get a null pointer in my programs?

    ... ...
    However, an argument being passed to a function is not
    necessarily recognizable as a pointer context, and the compiler
    may not be able to tell that an unadorned 0 "means" a null
    pointer. To generate a null pointer in a function call context,
    an explicit cast may be required, to force the 0 to be
    recognized as a pointer. For example, the Unix system call
    execl takes a variable-length, null-pointer-terminated list of
    character pointer arguments, and is correctly called like this:

    execl("/bin/sh", "sh", "-c", "date", (char *)0);

    If the (char *) cast on the last argument were omitted, the
    compiler would not know to pass a null pointer, and would pass
    an integer 0 instead. (Note that many Unix manuals get this
    example wrong.)
    ... ....

    《Unix 开发环境》第8章 8.9 小节

    在使用ANSI C原型之前,对e x e c l , e x e c l e和e x e c l p三个函数表示命令行参数的一般方法是:
    char * a rg 0, char *a rg 1, ..., char * a rg n, (char *) 0
    应当特别指出的是:在最后一个命令行参数之后跟了一个空指针。如果用常数0来表示一个空
    指针,则必须将它强制转换为一个字符指针,否则它将被解释为整型参数。如果一个整型数的
    长度与char *的长度不同,e x e c函数实际参数就将出错。

    Posted by hufey at 04:48 PM | Comments (0)

    December 10, 2003

    还真有不是0的NULL,C语言的各种实现太乱了

    5.17: Seriously, have any actual machines really used nonzero null
    pointers, or different representations for pointers to different
    types?

    A: The Prime 50 series used segment 07777, offset 0 for the null
    pointer, at least for PL/I. Later models used segment 0, offset
    0 for null pointers in C, necessitating new instructions such as
    TCNP (Test C Null Pointer), evidently as a sop to all the extant
    poorly-written C code which made incorrect assumptions. Older,
    word-addressed Prime machines were also notorious for requiring
    larger byte pointers (char *'s) than word pointers (int *'s).

    The Eclipse MV series from Data General has three
    architecturally supported pointer formats (word, byte, and bit
    pointers), two of which are used by C compilers: byte pointers
    for char * and void *, and word pointers for everything else.

    Some Honeywell-Bull mainframes use the bit pattern 06000 for
    (internal) null pointers.

    The CDC Cyber 180 Series has 48-bit pointers consisting of a
    ring, segment, and offset. Most users (in ring 11) have null
    pointers of 0xB00000000000. It was common on old CDC ones-
    complement machines to use an all-one-bits word as a special
    flag for all kinds of data, including invalid addresses.

    The old HP 3000 series uses a different addressing scheme for
    byte addresses than for word addresses; like several of the
    machines above it therefore uses different representations for
    char * and void * pointers than for other pointers.

    The Symbolics Lisp Machine, a tagged architecture, does not even
    have conventional numeric pointers; it uses the pair
    (basically a nonexistent handle) as a C null
    pointer.

    Depending on the "memory model" in use, 8086-family processors
    (PC compatibles) may use 16-bit data pointers and 32-bit
    function pointers, or vice versa.

    Some 64-bit Cray machines represent int * in the lower 48 bits
    of a word; char * additionally uses the upper 16 bits to
    indicate a byte address within a word.

    References: K&R1 Sec. A14.4 p. 211.

    Posted by hufey at 03:28 PM | Comments (2)

    December 08, 2003

    note of C FAQ

    颠覆了我多年的观念

    5.9: If NULL and 0 are equivalent as null pointer constants, which
    should I use?

    A: Many programmers believe that NULL should be used in all pointer
    contexts, as a reminder that the value is to be thought of as a
    pointer. Others feel that the confusion surrounding NULL and 0
    is only compounded by hiding 0 behind a macro, and prefer to use
    unadorned 0 instead. There is no one right answer. (See also
    questions 9.2 and 17.10.) C programmers must understand that
    NULL and 0 are interchangeable in pointer contexts, and that an
    uncast 0 is perfectly acceptable. Any usage of NULL (as opposed
    to 0) should be considered a gentle reminder that a pointer is
    involved; programmers should not depend on it (either for their
    own understanding or the compiler's) for distinguishing pointer
    0's from integer 0's.

    NULL should *not* be used when another kind of 0 is required,
    even though it might work, because doing so sends the wrong
    stylistic message. (Furthermore, ANSI allows the definition of
    NULL to be ((void *)0), which will not work at all in non-
    pointer contexts.) In particular, do not use NULL when the
    ASCII null character (NUL) is desired. Provide your own
    definition

    #define NUL '\0'

    if you must.

    References: K&R1 Sec. 5.4 pp. 97-8; K&R2 Sec. 5.4 p. 102.

    Posted by hufey at 03:33 PM | Comments (0)

    回到从前。。。。。。

    前天干了件大事。
    找到了我的破烂并口game pad的驱动
    装了mame
    开始到处找街机的ROM

    找到了雷电、名将、战斧、铁钩船长
    想起了上高中时的青春岁月。。。。。。

    那会根本不想考什么大学
    最大的理想是赶紧上班,赚钱,买台街机放家里。。。。。。


    555555555555555,居然都十几年过去了

    Posted by hufey at 12:28 PM | Comments (0)

    December 05, 2003

    going down?

    Don't worry linuxers worldwide, SCO is going Down! IBM's got our backs ;)
    This is my first wallpaper so be nice.. ;)
    I did the whole thing using Gimp. Most of it is just cut+paste of some pictures I found at google.com.
    The background of the wallpaper is another wallpaper I found here called flung-plastic.
    Hope you like it! :)

    Posted by hufey at 03:03 PM | Comments (0)

    December 03, 2003

    好帅的TabletPC,才999$


    跑linux

    Helium 2100
    [HELIUM2100] $999

    Click to enlarge

    Preconfigured Linux Tablet with Lycoris Desktop/LX

    Key features

    * 14.1-inch XGA (1024 x 768) Touch Panel active matrix display
    * Perfect 2-in-1 convertible design, Notebook and Tablet PC
    * Processor: 1 GHz VIA™ Antaur
    * Stylus included
    * 256MB Installed Memory: up to 1 GB of DDR266 200-pin DRAM via two sockets
    * 30GB Installed Hard Drive: up to 80 GB
    * Keyboard: 85-key keyboard with Extended Function Keys
    * O/S: Powered by Desktop/LX Tablet Edition
    * Battery: up to 3 hours battery life
    * Wireless: internal 802.11b (11 MBps) (OPTIONAL)
    * Ports:
    o 2x USB 1.1/2.0;
    o 1x type II PCMCIA/CardBus slot;
    o 1x IrDA 1.1 FiR;
    o 1x stereo headphone jack;
    o 1x RJ11 for K56flex V90 modem;
    o 1x RJ45 for 10/100 LAN;
    o 1x external CRT port;
    o 4-in-1 Flash Card Reader SD/MMC/MS/SM

    Posted by hufey at 04:28 PM | Comments (0)