<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chen Yufei's blog</title>
	<atom:link href="http://chenyufei.info/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://chenyufei.info/blog</link>
	<description>Keep your head about you while all those are losing theirs</description>
	<lastBuildDate>Wed, 21 Jul 2010 05:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Release of COREMU</title>
		<link>http://chenyufei.info/blog/2010-07-21/release-of-coremu/</link>
		<comments>http://chenyufei.info/blog/2010-07-21/release-of-coremu/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 02:08:00 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[未分类]]></category>
		<category><![CDATA[coremu]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/2010-07-21/release-of-coremu/</guid>
		<description><![CDATA[到 PPI 半年了，COREMU 终于在 sourceforge 上发布了。COREMU 的主要工作是王肇国（我本科同学，现在也在 PPI）完成的，其他开发人员可以在 PPI 的 COREMU 项目主页上找到。 简单说 COREMU 把 Qemu 并行化了。原先的 Qemu 只能使用一个物理 CPU，COREMU 则是使用多个物理 CPU 来模拟虚拟 CPU。 目前 COREMU 只能在 x86_64 Linux 系统上运行，支持模拟 x86_64 和 ARM Cortex A9 MPCore。在我们的测试用的 4 核系统上能模拟出 255 核，并且成功运行 Linux。 在这里宣传一下。半年来一直与 bug 做斗争，现在终于发布了，希望 COREMU 能够发挥些作用。有什么问题的话欢迎发邮件联系 :) cyfdecyf at gmail dot com]]></description>
			<content:encoded><![CDATA[<p>到 <a href="http://ppi.fudan.edu.cn">PPI</a> 半年了，COREMU 终于在 <a href="http://sf.net/p/coremu">sourceforge</a> 上发布了。COREMU 的主要工作是王肇国（我本科同学，现在也在 PPI）完成的，其他开发人员可以在 PPI 的 COREMU 项目主页上找到。</p>
<p>简单说 COREMU 把 Qemu 并行化了。原先的 Qemu 只能使用一个物理 CPU，COREMU 则是使用多个物理 CPU 来模拟虚拟 CPU。</p>
<p>目前 COREMU 只能在 x86_64 Linux 系统上运行，支持模拟 x86_64 和 ARM Cortex A9 MPCore。在我们的测试用的 4 核系统上能模拟出 255 核，并且成功运行 Linux。</p>
<p>在这里宣传一下。半年来一直与 bug 做斗争，现在终于发布了，希望 COREMU 能够发挥些作用。有什么问题的话欢迎发邮件联系 :) cyfdecyf at gmail dot com</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2010-07-21/release-of-coremu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>RDC 远程 64bit win 7 没声音的解决方法</title>
		<link>http://chenyufei.info/blog/2010-07-07/rdc-64bit-win7-no-soun/</link>
		<comments>http://chenyufei.info/blog/2010-07-07/rdc-64bit-win7-no-soun/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 02:00:37 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/2010-07-07/rdc-%e8%bf%9c%e7%a8%8b-64bit-win-7-%e6%b2%a1%e5%a3%b0%e9%9f%b3%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95/</guid>
		<description><![CDATA[找的有点辛苦。。。装个 hotfix 就可以了，注意不同版本的系统要下不同的 hotfix。 话说微软的 hotfix 要用起来还真麻烦，邮件申请，还要用密码解压。。。好在很快能搞定 另外装了这个 hotfix 以后 CoRD 还是没声音，只好用 RDC 了。]]></description>
			<content:encoded><![CDATA[<p>找的有点辛苦。。。装个 <a href="http://support.microsoft.com/kb/973062">hotfix</a> 就可以了，注意不同版本的系统要下不同的 hotfix。</p>
<p>话说微软的 hotfix 要用起来还真麻烦，邮件申请，还要用密码解压。。。好在很快能搞定</p>
<p>另外装了这个 hotfix 以后 CoRD 还是没声音，只好用 RDC 了。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2010-07-07/rdc-64bit-win7-no-soun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux initial ramdisk 以及启动过程</title>
		<link>http://chenyufei.info/blog/2010-05-01/linux-initial-ramdisk-and-startup-process/</link>
		<comments>http://chenyufei.info/blog/2010-05-01/linux-initial-ramdisk-and-startup-process/#comments</comments>
		<pubDate>Sat, 01 May 2010 05:05:42 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ramdisk]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=300</guid>
		<description><![CDATA[推荐一篇 IBM developerworks 上的文章，Linux initial RAM disk (initrd) overview，很详细一篇介绍，包括了内核里哪些函数涉及到启动过程。另外 man initrd 也有相关的介绍。 不过文章的内容已经有点过时，内核启动过程调用的函数发生变化，默认执行的 initrd 里的程序也从 /linuxrc 变成 /init。另外现在 Linux 发行版大多用 cpio 格式的 initrd)，这篇文章介绍的是 ext2 格式的。如何提取和创建 cpio 格式的 initrd 可以参考下面这篇文章Debian Lenny 5.0.1 PXE initrd update，主要的命令如下： # 提取 zcat ../initrd.gz &#124; cpio -iv # 创建 find . -print0 &#124; cpio -0 -H newc -ov &#124; gzip -c [...]]]></description>
			<content:encoded><![CDATA[<p>推荐一篇 IBM developerworks 上的文章，<a href="http://www.ibm.com/developerworks/linux/library/l-initrd.html">Linux initial RAM disk (initrd) overview</a>，很详细一篇介绍，包括了内核里哪些函数涉及到启动过程。另外 man initrd 也有相关的介绍。</p>
<p>不过文章的内容已经有点过时，内核启动过程调用的函数发生变化，默认执行的 initrd 里的程序也从 /linuxrc 变成 /init。另外现在 Linux 发行版大多用 cpio 格式的 initrd)，这篇文章介绍的是 ext2 格式的。如何提取和创建 cpio 格式的 initrd 可以参考下面这篇文章<a href="http://www.ducea.com/2009/05/19/debian-lenny-501-pxe-initrd-update/">Debian Lenny 5.0.1 PXE initrd update</a>，主要的命令如下：</p>
<pre>
# 提取
zcat ../initrd.gz | cpio -iv
# 创建
find . -print0 | cpio -0 -H newc -ov | gzip -c > ../initrd.gz
</pre>
<p>如果有 Linux 内核源码的话还可以参考 Documentation/initrd.txt，里面有启动过程的介绍和创建和提取 initrd 的说明，内容比 man initrd 更详细，不过也有一点过时。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2010-05-01/linux-initial-ramdisk-and-startup-process/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>推荐个 C 库 sglib</title>
		<link>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/</link>
		<comments>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 09:01:55 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[library]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=296</guid>
		<description><![CDATA[SGLIB &#8211; A Simple Generic Library for C 完全用宏实现，只有一个头文件。提供了如下功能： sorting arrays manipulating linked lists manipulating sorted linked lists manipulating double linked lists manipulating red-black trees manipulating hashed containers 网页提供的下载链接地址不对，提供个sourceforge的下载地址。下载的 tarball 里有 sample 和 doc，看下就知道怎么用了。 一个我比较喜欢的特点是数据结构完全由用户自己定义，sglib 帮你生成操作数据结构的宏，函数声明以及定义。这样做的好处是不需要因为使用库而对数据结构做修改。相比 queue.h，我觉得 sglib 的更容易使用和理解，而且有更多功能。]]></description>
			<content:encoded><![CDATA[<p><a href="http://sglib.sourceforge.net/">SGLIB &#8211; A Simple Generic Library for C</a> 完全用宏实现，只有一个头文件。提供了如下功能：</p>
<ul>
<li>sorting arrays</li>
<li>manipulating linked lists</li>
<li>manipulating sorted linked lists</li>
<li>manipulating double linked lists</li>
<li>manipulating red-black trees</li>
<li>manipulating hashed containers</li>
</ul>
<p>网页提供的下载链接地址不对，提供个<a href="http://sourceforge.net/projects/sglib/">sourceforge的下载地址</a>。下载的 tarball 里有 sample 和 doc，看下就知道怎么用了。</p>
<p>一个我比较喜欢的特点是数据结构完全由用户自己定义，sglib 帮你生成操作数据结构的宏，函数声明以及定义。这样做的好处是不需要因为使用库而对数据结构做修改。相比 queue.h，我觉得 sglib 的更容易使用和理解，而且有更多功能。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2010-04-08/recommend-a-c-library-sglib/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get the current module in Python</title>
		<link>http://chenyufei.info/blog/2009-12-31/get-the-current-module-in-python/</link>
		<comments>http://chenyufei.info/blog/2009-12-31/get-the-current-module-in-python/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 02:47:37 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=290</guid>
		<description><![CDATA[It&#8217;s sometimes useful to do introspection on the module itself you are writing. But python doesn&#8217;t provide any direct way to support this. In fact a PEP about this feature has been rejected. A little google find a solution to this problem. Here&#8217;s the code import sys # get the current module's name modname = [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s sometimes useful to do introspection on the module itself you are writing. But python doesn&#8217;t provide any direct way to support this. In fact a <a href="http://www.python.org/dev/peps/pep-3130/">PEP about this feature</a> has been rejected.</p>
<p>A little google find <a href="http://old.nabble.com/How-to-get-current-module-object-td15532853.html">a solution</a> to this problem. Here&#8217;s the code</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #808080; font-style: italic;"># get the current module's name</span>
modname = <span style="color: #008000;">globals</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'__name__'</span><span style="color: black;">&#93;</span>
<span style="color: #808080; font-style: italic;"># get the module</span>
module = <span style="color: #dc143c;">sys</span>.<span style="color: black;">modules</span><span style="color: black;">&#91;</span>modname<span style="color: black;">&#93;</span>
<span style="color: #808080; font-style: italic;"># or more simply as suggested by E.T</span>
module = <span style="color: #dc143c;">sys</span>.<span style="color: black;">modules</span><span style="color: black;">&#91;</span>__name__<span style="color: black;">&#93;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-12-31/get-the-current-module-in-python/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reviewboard, PIL and virtualenv</title>
		<link>http://chenyufei.info/blog/2009-12-02/reviewboard-pil-and-virtualenv/</link>
		<comments>http://chenyufei.info/blog/2009-12-02/reviewboard-pil-and-virtualenv/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 06:44:27 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[reviewboard]]></category>
		<category><![CDATA[virtualenv]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/2009-12-02/reviewboard-pil-and-virtualenv/</guid>
		<description><![CDATA[I created a separate no site-packages virtualenv directory, and use easy_install to install Reviewboard. However, easy_install installs PIL version 1.1.7 which does not work with the latest stable Reviewboard version 1.0.5.1. Using easy_install PIL==1.1.6 doesn&#8217;t work because of build error. The workaround is to manually download PIL and install it. To make reviewboard work under [...]]]></description>
			<content:encoded><![CDATA[<p>I created a separate no site-packages virtualenv directory, and use easy_install to install Reviewboard.</p>
<p>However, easy_install installs PIL version 1.1.7 which does not work with the latest stable Reviewboard version 1.0.5.1.</p>
<p>Using easy_install PIL==1.1.6 doesn&#8217;t work because of build error. The workaround is to manually download PIL and install it.</p>
<p>To make reviewboard work under virtualenv, additional steps are needed, which in fact are steps for Django application to work under virtualenv.</p>
<ul>
<li>If you use mod_python and apache, <a href="http://mydjangoblog.com/2009/03/30/django-mod_python-and-virtualenv/">this article</a> maybe useful. This works for Reviewboard.</li>
<li>For mod_wsgi, <a href="http://www.danceric.net/2009/03/26/django-virtualenv-and-mod_wsgi/">look here</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-12-02/reviewboard-pil-and-virtualenv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更新 zsh 的 command hash table</title>
		<link>http://chenyufei.info/blog/2009-11-14/updating-zsh-command-hash-table/</link>
		<comments>http://chenyufei.info/blog/2009-11-14/updating-zsh-command-hash-table/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 15:26:42 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=282</guid>
		<description><![CDATA[zsh 下新装了一个软件，tab 补全时新装软件的命令不会出现。以前的解决办法是执行 export PATH=$PATH 让 zsh 去更新缓存。 今天在 Pylons 的 activate 脚本里看到了一条 builtin 命令 hash (man zshbuiltins)，这条命令可以直接修改 command hash table。$PATH 路径下的内容发生变化时可以用 hash -r 来更新。]]></description>
			<content:encoded><![CDATA[<p>zsh 下新装了一个软件，tab 补全时新装软件的命令不会出现。以前的解决办法是执行 <code>export PATH=$PATH</code> 让 zsh 去更新缓存。</p>
<p>今天在 Pylons 的 activate 脚本里看到了一条 builtin 命令 <code>hash</code> (man zshbuiltins)，这条命令可以直接修改 command hash table。$PATH 路径下的内容发生变化时可以用 <code>hash -r</code> 来更新。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-11-14/updating-zsh-command-hash-table/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>screen &amp; LD_LIBRARY_PATH</title>
		<link>http://chenyufei.info/blog/2009-11-13/screen-ld_library_path/</link>
		<comments>http://chenyufei.info/blog/2009-11-13/screen-ld_library_path/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 16:45:24 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[glibc]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=191</guid>
		<description><![CDATA[这篇 post 居然是在今年 1 月份的时候放到 draft 里，到现在才 publish…… 因为用 intel 的编译器，所以设置了 LD_LIBRARY_PATH 这个环境变量，但是每次启动 screen 后这个环境本来都会被 unset。google 到的结果。 screen 可执行文件是 setuid 的（为了 share session，debian 的 screen 安装时默认没有 setuid），glibc 对这样的可执行文件会把那些“危险”的环境变量去掉，所以出现了上面的情况 解决办法两个 1. 把 setuid 位去掉，当然这样 screen 的 share session 就不能工作了，还好一般用不到 2. 把 LD_LIBRARY_PATH 的设置放到 .zshrc/.bashrc 之类的文件里去，这样每次启动 shell 的时候自然会把这个环境变量读入的 if [ -z $LD_LIBRARY_PATH ]; then export $LD_LIBRARY_PATH=XXX else [...]]]></description>
			<content:encoded><![CDATA[<p>这篇 post 居然是在今年 1 月份的时候放到 draft 里，到现在才 publish……</p>
<p>因为用 intel 的编译器，所以设置了 LD_LIBRARY_PATH 这个环境变量，但是每次启动 screen 后这个环境本来都会被 unset。<a href="http://www.mail-archive.com/screen-devel@gnu.org/msg00019.html">google 到的结果</a>。</p>
<p>screen 可执行文件是 setuid 的（为了 share session，debian 的 screen 安装时默认没有 setuid），glibc 对这样的可执行文件会把那些“危险”的环境变量去掉，所以出现了上面的情况</p>
<p>解决办法两个</p>
<p>1. 把 setuid 位去掉，当然这样 screen 的 share session 就不能工作了，还好一般用不到<br />
2. 把 LD_LIBRARY_PATH 的设置放到 .zshrc/.bashrc 之类的文件里去，这样每次启动 shell 的时候自然会把这个环境变量读入的</p>
<pre>
if [ -z $LD_LIBRARY_PATH ]; then
    export $LD_LIBRARY_PATH=XXX
else
    export $LD_LIBRARY_PATH=$LD_LIBRARY_PATH:XXX
fi
</pre>
<p>LD_LIBRARY_PATH 这个环境变量设置起来还真的挺麻烦的，系统的库目录和自己的库目录下有同名不同版本的库的时候，不是自己的程序有问题就是系统的程序有问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-11-13/screen-ld_library_path/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zsh + screen</title>
		<link>http://chenyufei.info/blog/2009-11-12/zsh-screen/</link>
		<comments>http://chenyufei.info/blog/2009-11-12/zsh-screen/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 15:12:14 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=267</guid>
		<description><![CDATA[screen 提供多个 shell 来回切换是很方便，不过有时会忘记应该切换到哪个 window。如果可以根据执行的命令和当前目录来动态设置 window title 的话来回切换时就会可以方便的找到目标 window。其实 zsh-lovers 里就有说明。 screen 可以通过 echo 特殊的字符来设置 window 的 title，而 zsh 有两个特殊的函数 preexec 和 precmd，前者在用户输入命令按下回车但 zsh 还未执行命令前被调用，后者在 zsh 更新 prompt 前被调用（具体说明见 man zshmisc）。把 zsh 和 screen 的功能结合起来就可以在执行命令时把 screen window 的标题设置成当前执行的命令，而在 zsh 等待用户命令时，将 title 设置成当前目录。 先贴 zsh 的相关配置，PS1 的配置不喜欢可以去掉。 autoload colors colors case $TERM in screen*) function sctitle() [...]]]></description>
			<content:encoded><![CDATA[<p>screen 提供多个 shell 来回切换是很方便，不过有时会忘记应该切换到哪个 window。如果可以根据执行的命令和当前目录来动态设置 window title 的话来回切换时就会可以方便的找到目标 window。其实 zsh-lovers 里就有说明。</p>
<p>screen 可以通过 echo 特殊的字符来设置 window 的 title，而 zsh 有两个特殊的函数 preexec 和 precmd，前者在用户输入命令按下回车但 zsh 还未执行命令前被调用，后者在 zsh 更新 prompt 前被调用（具体说明见 man zshmisc）。把 zsh 和 screen 的功能结合起来就可以在<strong>执行命令时把 screen window 的标题设置成当前执行的命令，而在 zsh 等待用户命令时，将 title 设置成当前目录</strong>。</p>
<p>先贴 zsh 的相关配置，PS1 的配置不喜欢可以去掉。</p>
<pre>
autoload colors
colors

case $TERM in
    screen*)
        function sctitle() { print -Pn "\ek$1\e\\"}
        function precmd() { sctitle "%20< ..<%~%<<" }
        function preexec() { sctitle "%20>..>$1%< <" }
        export PS1="%{${fg[cyan]}%}[%D{%H:%M} %20<..<%~%<<]%{$reset_color%} "
    ;;
    *)
        export PS1="%{${fg[cyan]}%}[%D{%H:%M} %n@%m:%20<..<%~%<<]%{$reset_color%} "
    ;;
esac
</pre>
<p>有时命令或者当前目录很长，screen 的 status bar 宽度会不够，zsh 有内置的截短字符串的功能，用 %20< ..<%~%<< 限制目录最长为 20 个字符，把左边的多余字符去掉，截短后用两个点表示，%~ 表示当前目录，如果包含 HOME 目录则用波浪号表示，%<< 标志截短操作的结束。%20>..>$1%< < 类似，preexec 的第一个参数是完整的命令行输入，同样截短成 20 个字符，不过是去掉右边的多余字符。sctitle 就是打印特殊字符来设置 screen window title 的函数。</p>
<p>接下来是 .screenrc。</p>
<pre>
startup_message off
# use visual bell
vbell off
# replace Ctrl-A by `
escape ``
# set a big scrolling buffer
defscrollback 5000
# Set the caption on the bottom line
caption always '%{= kg}[%{G}%H%{g}][%= %{= kw}%?%-Lw%?%{+b r}(%{y}%n %t%?(%u)%?%{r})%{= w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
# %{= kG} first set default color (=), back ground black (k), foreground green (G)
# [%{G}%H%{g}] color bright green, host name (%H), color green
# [%= ...] padding (%=), window left to the current focus window if exists,
#      (current focus window with color yellow), window to the right of the
#      focus window
# [%{B} %m/%d %{W}%c %{g}] color bright blue, month/date (%m%d), color bright white,
#      current time(%c), color green

# open several terminals at startup
screen 5
screen 4
screen 3
screen 2
screen 1
</pre>
<p>因为我用 vim，而且我觉得切换 window 时要按数字键，所以我把 escape 设置成 back tick。这个配置最关键的就是 caption 了，忘记从哪里 copy 过来的了（用 hardstatus 的话 screen 的消息也是在 hardstatus 上显示，所以我喜欢用 caption）。我直接在配置文件里加了点注释，语法很恶心，我都看晕了。关于  caption/hardstatus 里的转义字符说明见 man screen 的 string escape 一节。</p>
<p>试试看吧，这个配置还是很炫而且也蛮实用的。</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-11-12/zsh-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我也来推荐 bpython</title>
		<link>http://chenyufei.info/blog/2009-11-12/recommend-bpython/</link>
		<comments>http://chenyufei.info/blog/2009-11-12/recommend-bpython/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 13:51:10 +0000</pubDate>
		<dc:creator>chenyufei</dc:creator>
				<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://chenyufei.info/blog/?p=262</guid>
		<description><![CDATA[在光华上看到 Zellux 推荐的，bpython。 bpython 对输入的代码有高亮显示，输入代码同时自动补全，不需要按 tab，调用函数时打完左括号文档就自动出现。 现在只是刚刚试了一下，印象不错。 有些 ipython 支持的功能 bpython 里没有，现在发现的是不支持直接执行 shell 命令。（文件名补全的话当前目录的要用 ./ 以后才会出来。）]]></description>
			<content:encoded><![CDATA[<p>在光华上看到 <a href="http://techblog.iamzellux.com/">Zellux</a> 推荐的，<a href="http://www.bpython-interpreter.org/about/">bpython</a>。</p>
<p>bpython 对输入的代码有高亮显示，输入代码同时自动补全，不需要按 tab，调用函数时打完左括号文档就自动出现。</p>
<p>现在只是刚刚试了一下，印象不错。</p>
<p>有些 ipython 支持的功能 bpython 里没有，现在发现的是不支持直接执行 shell 命令。（文件名补全的话当前目录的要用 ./ 以后才会出来。）</p>
]]></content:encoded>
			<wfw:commentRss>http://chenyufei.info/blog/2009-11-12/recommend-bpython/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
