OS X 系统的不 open 导致的痛苦由来已久,早有心意弃之,一直未下决心。现苹果已转投 Intel,放弃 PowerPC,天晓得我的 iBook 还能支持到什么时候?干脆先苹果一步,主动抛弃 OS X,换成了 Debian 5(code named Lenny)。
2009-04-15
2009-04-13
About Bash4
ABS Guide 的作者 Mendel Cooper 在 6.0.05 版中对 Bash4 有如下 Editorial comment:
Associative arrays? Coprocesses? Whatever happened to the lean and mean Bash we have come to know and love? Could it be suffering from (horrors!) "feature creep"? Or perhaps even Korn shell envy?
Note to Chet Ramey: Please add only essential features in future Bash releases -- perhaps for-each loops and support for multi-dimensional arrays. Most Bash users won't need, won't use, and likely won't greatly appreciate complex "features" like built-in debuggers, Perl interfaces, and bolt-on rocket boosters.
俺也感觉 bash4 的开发激进了些, 功能不稳定, feature 太花哨, 不几天的功夫 patch 已经出 17 个了. :(
Posted by
Display Name
-
2:58 PM
0
comments
Labels: Shell/Scripting
Compile Expect 5.44.1.11 on Fedora 3
- Checkout expect from Sourceforge.net
- Open configure.in, comment out following lines:
- TEA_PATH_TKCONFIG
TEA_LOAD_TKCONFIG
TEA_PUBLIC_TK_HEADERS
- Open Makefile.in:
- Remove expectk from var in_BINARIES
- Remove @TK_INCLUDES@ from var INCLUDES
- Remove @TK_LIB_SPEC@ and @TK_LIBS@
- $ autoreconf -fiv
- $ ./configure --prefix=/usr/local/expect-5.44 --exec-prefix=/usr/local/expect-5.44 --with-tcl=/usr/lib --with-tclinclude=/usr/include/tcl-private
- $ make && make install
- Open /etc/ld.so.conf, add one line: /usr/local/expect-5.44/lib/expect5.44.1.11
- $ ldconfig
- $ /usr/local/expect-5.44/bin/expect -v
Posted by
Display Name
-
2:29 PM
0
comments
Labels: Tcl/Expect
Expectk
This is a stand alone interpreter which is the basic equivalent of
#! /usr/bin/tclshNote that this interpreter is not intended to interact with Tk applications - instead, it is intended to allow one to write Tk applications that invoke expect in the background. This allows one to have a GUI interface to gather inputs, etc.
package require Expect
package require Tk
Posted by
Display Name
-
10:25 AM
0
comments
Labels: Tcl/Expect
2009-04-11
About expect 5.44
http://expect.nist.gov/ was the original home Web site for Expect. It supplies sources and considerable history, background, and instruction. It does fail to mention, though, recognition [1] of Expect as one of the 100 most important publications of NIST's [2] first century. Note that the warning regarding expect 5.44 on that page is seriously out of date. The CVS 5.44 version linked to below is fine (and needed to build against Tcl 8.5).
The current maintenance of the package can be found at http://expect.sf.net/ , with access to the CVS available via sf.net's cvs repository. Note that the link (on the sf.net primary page) for the CVS repository is out of date; visit http://sf.net/projects/expect/ and use the link there to look at the cvs repository from your web browser.
This package is part of the ActiveTcl Batteries Included distribution on unix and as of 2005, the Windows version is available via ActiveTcl as well [3].
Posted by
Display Name
-
5:29 PM
0
comments
Labels: Tcl/Expect
2009-04-07
Valgrind for PowerPC on Debian
$ valgrind ./invalid_free
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld.so.1
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld.so.1
valgrind:
valgrind: Possible fix: install glibc's debuginfo package on this machine.
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
$ aptitude install libc-dbg
Posted by
Clark J. Wang
-
9:51 PM
0
comments
Labels: *nix, C/CPP, Debian/Ubuntu, Utils
2009-02-14
2009-01-16
2009-01-15
Jabber.no out of service?
周一开始 gtalk 不能登录 msn 了, 这几天也不行, 难道 jabber.no 报废了?
Posted by
Display Name
-
9:52 AM
0
comments
2009-01-14
Mac version of Picasa is only for Intel-based machines?
很兴奋 google 终于推出了 mac 版的 picasa, 刚下载了一个, 结果不能运行, 上网一查原来只支持 intel 版的 mac, 可怜俺的 ibook g4, 伤心 :(
Posted by
Clark J. Wang
-
9:18 PM
0
comments
[Tiger] port install git-core +svn
To use git-svn, run sudo port install git-core +svn.
Posted by
Clark J. Wang
-
8:55 PM
0
comments
Labels: Apple, Version Control
2008-12-16
How to Change the Ephemeral Port Range
Linux allows you to view and change the ephemeral port range by simply using the file /proc/sys/net/ipv4/ip_local_port_range. For example, this shows the default configuration on a kernel 2.2 system:
$ cat /proc/sys/net/ipv4/ip_local_port_range
1024 4999
To change this to the preferred range, you could do (as superuser):
# echo "49152 65535" > /proc/sys/net/ipv4/ip_local_port_range
Posted by
Display Name
-
9:49 AM
0
comments
Labels: Network/Security
2008-12-15
Thunderbird Add-on
- Buttons!
- Google Contacts
- MinimizeToTray
- Send Later
- Message Filter Import/Export
Posted by
Display Name
-
9:56 AM
0
comments
Labels: Network/Security, Utils
2008-10-28
Install Ubuntu 8.04 from Hard Disk
- Make an ISO file ubuntu804.iso from Ubuntu's LiveCD (8.04 desktop), put the ISO file in D:/ubuntu804.iso
- Mount the ISO file or the LiveCD, copy two files CDROM:/casper/{initrd.gz,vmlinuz} to Windows drive D:/
- Download grub4dos, extract its files to C:/
- Edit C:/boot.ini, add one new line: C:\grldr="GRUB4DOS"
- Edit C:/menu.lst
- title Find and Install Ubuntu
find --set-root /ubuntu804.iso
kernel /vmlinuz boot=casper iso-scan/filename=/ubuntu804.iso
initrd /initrd.gz
- Reboot Windows XP
- Select GRUB4DOS from the boot menu
- ... ...
- Will boot to the same screen as if you're directly booting from the LiveCD.
Posted by
Display Name
-
3:37 PM
0
comments
Labels: Debian/Ubuntu
2008-10-14
Less' history file
偶然发现看 man page 的时候 search 过的字符串是有 history 的, 猜想是 less 的功能, 查了一下根目录下的文件, 发现有一个 .lesshst, 查 less 的 manual, 里面有说到 .lesshst:
. . . Name of the history file used to remember search commands and shell commands between invocations of less. . .
Posted by
Display Name
-
4:30 PM
0
comments
Labels: Utils
2008-10-13
Compile GNU screen from source
- $ git clone git://git.savannah.gnu.org/screen.git
- $ cd screen/src
- $ aclocal --force
- $ libtoolize --copy --force
- $ autoconf --force
- $ autoheader --force
- $ automake --add-missing --copy --force-missing
- $ ./configure --prefix=/usr/local/screen-dev --enable-colors256
- $ make && make install
Posted by
Display Name
-
6:02 PM
0
comments
Labels: Make/Build, Utils
See full screen man pages on Fedora Core 3
ubuntu 6.06 上看 man pages 的时候能全屏显示, 但 Fedora 3 上却不能, 研究一番, 可以自己编译 man-db 来解决:
- Get lastes man-db from http://savannah.nongnu.org/projects/man-db
- $ ./configure --prefix=/usr/local/man-db-2.5.2
- $ make && make install
- Add path to man-db/bin to PATH variable
Posted by
Display Name
-
5:26 PM
0
comments
Labels: Debian/Ubuntu, Utils
2008-08-29
Expect 5.43 takes quite long when exiting
Expect 5.43 的 script 结束时总是很慢, 用 expect -d 发现最后有条 message:
write() failed to write anything - will sleep(1) and retry...查了下 code, 在 exp_chan.c : ExpOutputProc() 中有个 sleep(1), 把它换成 usleep(10 * 1000) 就好了.
Posted by
Display Name
-
6:14 PM
0
comments
Labels: Tcl/Expect
2008-08-01
Yahoo + Del.icio.us
原来 Del.icio.us 是 Yahoo 的了, 而且改名为 Delicious.com 了.
Posted by
Display Name
-
12:54 PM
0
comments
Labels: Misc
