<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yi Wang&#039;s Tech Notes</title>
	<atom:link href="http://cxwangyi.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cxwangyi.wordpress.com</link>
	<description>A blog ported from http://cxwangyi.blogspot.com</description>
	<lastBuildDate>Sun, 29 Jan 2012 03:01:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cxwangyi.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yi Wang&#039;s Tech Notes</title>
		<link>http://cxwangyi.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cxwangyi.wordpress.com/osd.xml" title="Yi Wang&#039;s Tech Notes" />
	<atom:link rel='hub' href='http://cxwangyi.wordpress.com/?pushpress=hub'/>
		<item>
		<title>把 iPhone 变成一台开发工作站</title>
		<link>http://cxwangyi.wordpress.com/2012/01/29/%e6%8a%8a-iphone-%e5%8f%98%e6%88%90%e4%b8%80%e5%8f%b0%e5%bc%80%e5%8f%91%e5%b7%a5%e4%bd%9c%e7%ab%99/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/29/%e6%8a%8a-iphone-%e5%8f%98%e6%88%90%e4%b8%80%e5%8f%b0%e5%bc%80%e5%8f%91%e5%b7%a5%e4%bd%9c%e7%ab%99/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 02:46:35 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Go]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1196</guid>
		<description><![CDATA[iPhone 和 iPad 内部基本上是 CMU 的 Mach 内核上运行着的 NetBSD 操作系统服务。从这些出色的操作系统技术来看， iPhone 和 iPad 不逊色于任何一款电脑。 自从买了 iPhone 4，我一直在琢磨着怎么怎么把它变得跟一台开发用的电脑一样，比如像装了开发环境（Homebrew）的 Mac MINI 一样。从 Apple Store 上买了一根 iPhone/iPad to VGA 适配电缆之后，我的 iPhone 可以输出到电视和显示器。在 jailbreak 工具（redsn0w）和 Cydia 的帮助下，我可以把 iPhone 和无线键盘、无限鼠标连接起来。我还安装了 iPhone 上的 Mobile Terminal  和一些常用的工具程序，包括和 awk 和 vim。随后，感谢牛鼻的黑客们提供了 GCC 4.2 和 Google Go compiler 的 iPhone 版本。然后呢，用 iPhone 写程序大概就是这个样子的（我其实可以把 iPhone 横过来，这样更能充分利用电视宽屏的空间；图中配角男还应该减减肥）： [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1196&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>iPhone 和 iPad 内部基本上是 CMU 的 Mach 内核上运行着的 NetBSD 操作系统服务。从这些出色的操作系统技术来看， iPhone 和 iPad 不逊色于任何一款电脑。</p>
<p>自从买了 iPhone 4，我一直在琢磨着怎么怎么把它变得跟一台开发用的电脑一样，比如像装了开发环境（Homebrew）的 Mac MINI 一样。从 Apple Store 上买了一根 iPhone/iPad to VGA 适配电缆之后，我的 iPhone 可以输出到电视和显示器。在 jailbreak 工具（redsn0w）和 Cydia 的帮助下，我可以把 iPhone 和无线键盘、无限鼠标连接起来。我还安装了 iPhone 上的 Mobile Terminal  和一些常用的工具程序，包括和 awk 和 vim。随后，感谢牛鼻的黑客们提供了 GCC 4.2 和 Google Go compiler 的 iPhone 版本。然后呢，用 iPhone 写程序大概就是这个样子的（我其实可以把 iPhone 横过来，这样更能充分利用电视宽屏的空间；图中配角男还应该减减肥）：</p>
<p><a href="http://cxwangyi.files.wordpress.com/2012/01/100_7535.jpg"><img class="size-full wp-image-1197 alignnone" title="working-with-iphone-and-tv" src="http://cxwangyi.files.wordpress.com/2012/01/100_7535.jpg?w=450&#038;h=337" alt="" width="450" height="337" /></a></p>
<p>在 iPhone 上用 vim 编辑 C 语言和 Go 语言程序的样子如下：</p>
<p><a href="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-c1.png"><img class="alignnone size-medium wp-image-1200" title="mobile-terminal-vim-hello.c" src="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-c1.png?w=200&#038;h=300" alt="" width="200" height="300" /></a>呵呵呵呵<a href="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-go.png"><img class="alignnone size-medium wp-image-1199" title="mobile-terminal-vim-hello.go" src="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-go.png?w=200&#038;h=300" alt="" width="200" height="300" /></a></p>
<p>编译和运行程序的样子是这样的：</p>
<p><a href="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-c-process.png"><img class="alignnone size-medium wp-image-1201" title="mobile-terminal-build-hello.c-process" src="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-c-process.png?w=200&#038;h=300" alt="" width="200" height="300" /></a>呵呵呵呵<a href="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-go-process.png"><img class="alignnone size-medium wp-image-1202" title="mobile-terminal-build-hello.go-process" src="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-go-process.png?w=200&#038;h=300" alt="" width="200" height="300" /></a></p>
<p>附上一些秘笈：</p>
<ul>
<li>Cydia 里默认的 Mobile Terminal 版本低，在 iOS 5 上会crash。安装 up-to-date 的 Mobile Terminal：http://iphonejailbreaks.org/mobile-terminal-crashes-on-ios-4-3-1-here-is-the-solution/</li>
<li>在手机上用 Mobile Terminal，如果没有无限键盘，敲键太慢。通常是通过电脑 ssh 到 iPhone 的：http://www.cultofmac.com/32134/access-your-iphone-file-system-with-ssh-jailbreak-superguide/</li>
<li>在 Apple Store 上购买 iPhone/iPad 的 VGA 转接电缆：http://store.apple.com/us/product/MC552ZM/B</li>
<li>在 Cydia 上安装一个叫 DisplayOut 的软件，把 iPhone 屏幕上的内容通过电缆输出到电视或者显示器上。如果没有安装这个软件，只有部分 iPhone 程序能输出到 VGA。</li>
<li>在 Cydia 上安装一个叫 BT Keyboard 的程序让 iPhone 可以连接无线键盘</li>
<li>在 Cydia 上安装一个叫 BT Mouse 的程序让 iPhone 可以连接无线鼠标</li>
<li>在 iPhone 上安装 GCC 4.2：http://cxwangyi.wordpress.com/2012/01/28/how-to-install-gcc-4-2-on-iphone/</li>
<li>在 iPhone 上用 GCC build Google Go 语言的编译器：http://cxwangyi.wordpress.com/2012/01/28/learning-go-go-for-iphoneipad/</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1196&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/29/%e6%8a%8a-iphone-%e5%8f%98%e6%88%90%e4%b8%80%e5%8f%b0%e5%bc%80%e5%8f%91%e5%b7%a5%e4%bd%9c%e7%ab%99/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>

		<media:content url="http://cxwangyi.files.wordpress.com/2012/01/100_7535.jpg" medium="image">
			<media:title type="html">working-with-iphone-and-tv</media:title>
		</media:content>

		<media:content url="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-c1.png?w=200" medium="image">
			<media:title type="html">mobile-terminal-vim-hello.c</media:title>
		</media:content>

		<media:content url="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-vim-hello-go.png?w=200" medium="image">
			<media:title type="html">mobile-terminal-vim-hello.go</media:title>
		</media:content>

		<media:content url="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-c-process.png?w=200" medium="image">
			<media:title type="html">mobile-terminal-build-hello.c-process</media:title>
		</media:content>

		<media:content url="http://cxwangyi.files.wordpress.com/2012/01/mobile-terminal-build-hello-go-process.png?w=200" medium="image">
			<media:title type="html">mobile-terminal-build-hello.go-process</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning Go: Go for iPhone/iPad</title>
		<link>http://cxwangyi.wordpress.com/2012/01/28/learning-go-go-for-iphoneipad/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/28/learning-go-go-for-iphoneipad/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 14:04:56 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[Go]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1192</guid>
		<description><![CDATA[Strictly speaking, it is hard to say that this post is about &#8220;learning&#8221; the Go language. I just want to tell a story: after I successfully (but might illegally) installed GCC 4.2 on my iPhone 4, I went on to build Go. However, I got the following error messages: Make.inc:79: *** Invalid $GOOS &#8216;darwin&#8217; for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1192&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Strictly speaking, it is hard to say that this post is about &#8220;learning&#8221; the Go language.  I just want to tell a story: after I successfully (but might illegally) installed GCC 4.2 on my iPhone 4, I went on to build Go.  However, I got the following error messages:</p>
<blockquote><p>
Make.inc:79: *** Invalid $GOOS &#8216;darwin&#8217; for GOARCH=arm; must be linux.  Stop.<br />
Did not find Go environment variables.
</p></blockquote>
<p>Then I searched &#8220;go darwin arm&#8221; in go-nuts group, the <a href="https://groups.google.com/forum/#!topic/golang-dev/sAAoT5iAWVA">result</a> leads me to a very new (Jan 7, 2012) and exciting work &#8212; a <a href="https://bitbucket.org/minux/goios/wiki/Home">darwin/arm port </a>of Go.</p>
<p>However, I also noticed a claim by the Go authors at the bottom of the discussion thread:</p>
<blockquote><p>
Date: Sat, 21 Jan 2012 15:48:18 -0500<br />
Subject: Re: [golang-dev] Re: Darwin/ARM (aka. iOS) port of Go is READY<br />
From: Russ Cox<br />
To: minux<br />
Cc: golang-dev@googlegroups.com</p>
<p>Sorry, I meant to reply about this before.  We have decided<br />
not to include the darwin/arm code in the main tree until there<br />
is a way to run it on an ordinary iDevice without any kind of<br />
&#8220;jailbreaking&#8221;.  If the port advances to that point, please let<br />
us know, but until then I&#8217;m afraid you&#8217;ll need to maintain your<br />
own copy.
</p></blockquote>
<p>What a pitty for the official Go community~~ But so what! My best appreciation to minux, the author of the Darwin/ARM port of Go.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1192&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/28/learning-go-go-for-iphoneipad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Install GCC 4.2 on iPhone</title>
		<link>http://cxwangyi.wordpress.com/2012/01/28/how-to-install-gcc-4-2-on-iphone/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/28/how-to-install-gcc-4-2-on-iphone/#comments</comments>
		<pubDate>Sat, 28 Jan 2012 12:42:42 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1190</guid>
		<description><![CDATA[I have an iPhone 4 (16GB) running iOS 5.1. After jailbreak it using redsn0w and installing Cydia, I am able to ssh from my computer to the iPhone. Then, following this great blog post: http://blog.syshalt.net/index.php/2010/09/12/compile-c-applications-with-gcc-on-ios-4-iphone/, I installed GCC 4.2.1 on my iPhone. I also installed vim, nano and ping using apt-get install. Jailbreaking is great! [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1190&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have an iPhone 4 (16GB) running iOS 5.1. After jailbreak it using redsn0w and installing Cydia, I am able to ssh from my computer to the iPhone. Then, following this great blog post: http://blog.syshalt.net/index.php/2010/09/12/compile-c-applications-with-gcc-on-ios-4-iphone/, I installed GCC 4.2.1 on my iPhone. I also installed vim, nano and ping using apt-get install. Jailbreaking is great!</p>
<p>Here copy-and-pastes the content of the post mentioned above:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Here is what you need to do in order to be able to compile and run a C application on iphone:</p>
<blockquote><p>1. You will need to Jailbreak the iPhone first, search on google for more info.<br />
2. Install OpenSSH from Cydia.<br />
3. Connect iPhone to your wireless network and SSH to it.<br />
4. Download this application using: wget <a href="http://www.syshalt.net/pub/iphone/gcc-iphone/fake-libgcc_1.0_iphoneos-arm.deb">http://www.syshalt.net/pub/iphone/gcc-iphone/fake-libgcc_1.0_iphoneos-arm.deb</a><br />
5. Install libcc using: dpkg –i fake-libgcc_1.0_iphoneos-arm.deb<br />
6. Install iphone-gcc using this command: apt-get install iphone-gcc<a href="http://apt.saurik.com/debs/iphone-gcc_4.2-20080604-1-8_iphoneos-arm.deb"><br />
</a>(you can download this version from my website: <a href="http://www.syshalt.net/pub/iphone/gcc-iphone/iphone-gcc_4.2-20080604-1-8_iphoneos-arm.deb">iphone-gcc</a> if does not work on your device the one that is installed by default)<br />
7. Download using: wget <a title="http://www.syshalt.net/pub/iphone/gcc-iphone/sdk-2.0-headers.tar.gz" href="http://www.syshalt.net/iphone/gcc-iphone/sdk-2.0-headers.tar.gz">http://www.syshalt.net/iphone/gcc-iphone/sdk-2.0-headers.tar.gz</a><br />
8. Untar with command: tar -xvzf sdk-2.0-headers.tar.gz<br />
9. Enter in the new created folder with: cd include-2.0-sdk-ready-for-iphone<br />
10. Copy all files to include folder with command: cp –r * /usr/include<br />
11. Now type: cd .. in order to return to the previous folder<br />
12. Download using: wget <a href="http://www.syshalt.net/iphone/gcc-iphone/gcc_files.tar.gz">http://www.syshalt.net/iphone/gcc-iphone/gcc_files.tar.gz</a><br />
13. Untar with command: tar -xvzf gcc_files.tar.gz<br />
14. Enter in the new created folder with command: cd gcc_files<br />
15. Copy all files to /usr/lib using command: cp –r * /usr/lib<br />
16. Install ldid to sign the application (this will prevent iOS to kill the application at startup) using: apt-get install ldid<br />
17. Sign your compilet aplication using: ldid –S &lt;application&gt;<br />
18. Run the application using: ./&lt;application&gt;</p>
<p>Suggestion: Install using: apt-get install nano<br />
This will help you code easy directly from terminal.</p></blockquote>
<p>Here is an example of hello world using C and gcc to compile on iPhone iOS 4:</p>
<p>I used nano hello.c in terminal to open a new files and writed this simple application:</p>
<p>#include &lt;stdio.h&gt;<br />
int main() {<br />
  printf(&#8220;hello, world\n&#8221;);<br />
  return 0;<br />
}</p>
<p>and then CTRL+X to save it, then I typed: gcc –o hello hello.c and after that ldid –S hello<br />
Now you can run your application using ./hello</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1190&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/28/how-to-install-gcc-4-2-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Clang: C++0x Features</title>
		<link>http://cxwangyi.wordpress.com/2012/01/23/using-clang-c0x-features/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/23/using-clang-c0x-features/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 15:49:11 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1188</guid>
		<description><![CDATA[I am using Ubuntu Linux 10.10, with which, comes Clang based on LLVM 2.8. When I use Clang to build google-test, it complains that &#8220;variadic template&#8221; is a C++0x feature and is not yet supported. However, the Clang installed by Homebrew on my Mac OS X 10.7 (Lion) is based on LLVM 3.0 and works [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1188&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am using Ubuntu Linux 10.10, with which, comes Clang based on LLVM 2.8.  When I use Clang to build <a href="http://code.google.com/p/googletest/">google-test</a>, it complains that &#8220;variadic template&#8221; is a C++0x feature and is not yet supported.</p>
<p>However, the Clang installed by Homebrew on my Mac OS X 10.7 (Lion) is based on LLVM 3.0 and works well with google-test.</p>
<p>The homepage of LLVM listed pre-built Clang and LLVM 3.0 for Ubuntu 11.04 and 11.10.  So I guess I would have to upgrade to at least Ubuntu 11.04.</p>
<p>FreeBSD 9.0 comes with Clang based on LLVM 3.0. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1188&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/23/using-clang-c0x-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Python under Linux, Mac OS X and FreeBSD Tells Differently</title>
		<link>http://cxwangyi.wordpress.com/2012/01/21/python-under-linux-mac-os-x-and-freebsd-tells-differently/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/21/python-under-linux-mac-os-x-and-freebsd-tells-differently/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 15:55:28 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1185</guid>
		<description><![CDATA[It is interesting: under Linux and Mac OS X running on x64 computers, Python 2.7 tells the machine is &#8216;x64_64&#8242;; whereas under FreeBSD, Python 2.7 tells &#8216;amd64&#8242;. You can try: import platform platform.machine()<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1185&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is interesting: under Linux and Mac OS X running on x64 computers, Python 2.7 tells the machine is &#8216;x64_64&#8242;; whereas under FreeBSD, Python 2.7 tells &#8216;amd64&#8242;.  You can try:<br />
<code>  import platform<br />
  platform.machine()</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1185/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1185/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1185/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1185&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/21/python-under-linux-mac-os-x-and-freebsd-tells-differently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Clang: Linkers with Different Platforms</title>
		<link>http://cxwangyi.wordpress.com/2012/01/20/using-clang-linker-on-different-platforms/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/20/using-clang-linker-on-different-platforms/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 08:55:11 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1181</guid>
		<description><![CDATA[I am using clang++ as the linker with both Ubuntu Linux and Mac OS X. The Ubuntu version invokes collect2, which has parameters &#8211;whole-archive and &#8211;no-whole-archive to force linking libraries, whereas the Mac OS X version invokes ld (llvm based), which has -force_load for the same purpose.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1181&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am using clang++ as the linker with both Ubuntu Linux and Mac OS X. The Ubuntu version invokes collect2, which has parameters &#8211;whole-archive and &#8211;no-whole-archive to force linking libraries, whereas the Mac OS X version invokes ld (llvm based), which has -force_load for the same purpose.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1181&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/20/using-clang-linker-on-different-platforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Clang: Cannot Find Standard C++ Library</title>
		<link>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-c-library/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-c-library/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 07:40:42 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1178</guid>
		<description><![CDATA[When I use clang as the linker to link a C++ program, it complains cannot find standard symbols like std::cout. But if I use clang++ as the linker, it works. However, on both Ubuntu and Mac OS X, clang++ is just a symbolic link to clang! I guess when clang runs, it checks the name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1178&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When I use clang as the linker to link a C++ program, it complains cannot find standard symbols like std::cout.  But if I use clang++ as the linker, it works.  However, on both Ubuntu and Mac OS X, clang++ is just a symbolic link to clang!  I guess when clang runs, it checks the name in which it was started and work accordingly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1178&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-c-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Clang: Cannot Find Standard C++ Header Files</title>
		<link>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-header/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-header/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 07:15:13 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[System Config Skill]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1176</guid>
		<description><![CDATA[I got a problem with clang today: it complains cannot find standard C++ header files. So I used two magic options: clang -v -E, which outputs details about how it tries to find the header files. This reveals that clang finds in /usr/local/c++/4.4.x, but not including /usr/local/c++/4.5.1, which is my only version installed together with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1176&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got a problem with clang today: it complains cannot find standard C++ header files.</p>
<p>So I used two magic options: clang -v -E, which outputs details about how it tries to find the header files.  This reveals that clang finds in /usr/local/c++/4.4.x, but not including /usr/local/c++/4.5.1, which is my only version installed together with GCC 4.5.1.</p>
<p>So, my solution is simply sudo apt-get install g++-4.4. (Note that is not enough to install gcc-4.4, because that does not bring you C++ header files and libraries.)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1176&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/20/using-clang-cannot-find-standard-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>用Go语言实现Design Patterns</title>
		<link>http://cxwangyi.wordpress.com/2012/01/01/%e7%94%a8go%e8%af%ad%e8%a8%80%e5%ae%9e%e7%8e%b0design-patterns/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/01/%e7%94%a8go%e8%af%ad%e8%a8%80%e5%ae%9e%e7%8e%b0design-patterns/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 15:05:27 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/2012/01/01/%e7%94%a8go%e8%af%ad%e8%a8%80%e5%ae%9e%e7%8e%b0design-patterns/</guid>
		<description><![CDATA[王海磊提醒我注意一篇论文：GoHotDraw: Evaluating the Go Programming Language with Design Patterns。这篇论文里介绍了作者用 Go 语言实现了三种常见的 design patterns：singleton、adaptor 和 template method。作者说，其实他实现了所有的 23 种 GoF design patterns，文中只说了上述三种。 除了这篇论文，我注意到这篇blog：Design patterns in Go programming language 里，作者介绍了如何用 Go 实现另外三种 design patterns：command, strategy 和 factory。 在我的这篇幻灯片里，我本来试图从 design patterns 如何用 Go 实现的角度来介绍 Go 语言。但是因为总结的不够，所以没有这么写。希望接下来能总结一下如何使用 Go 语言。 当然，纯粹的考虑一种语言如何实现一种 pattern 是机械的。一种观点是：如果需要一种 pattern，则说明使用的语言缺乏对应的语法。比如，这篇题为 The (lack of) design patterns in Python [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1175&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>王海磊提醒我注意一篇论文：<a href="http://www.doc.ic.ac.uk/~ncameron/papers/schmager_plateau10.pdf">GoHotDraw: Evaluating the Go Programming Language with Design Patterns</a>。这篇论文里介绍了作者用 Go 语言实现了三种常见的 design patterns：singleton、adaptor 和 template method。作者说，其实他实现了所有的<a href="http://en.wikipedia.org/wiki/Design_Patterns"> 23 种 GoF design patterns</a>，文中只说了上述三种。</p>
<p>除了这篇论文，我注意到这篇blog：<a href="http://loadcode.blogspot.com/2009/12/design-patterns-in-go-programming.html">Design patterns in Go programming language</a> 里，作者介绍了如何用 Go 实现另外三种 design patterns：command, strategy 和 factory。</p>
<p>在我的<a href="http://cxwangyi.wordpress.com/2011/12/13/a-learning-note-on-go/">这篇幻灯片</a>里，我本来试图从 design patterns 如何用 Go 实现的角度来介绍 Go 语言。但是因为总结的不够，所以没有这么写。希望接下来能总结一下如何使用 Go 语言。</p>
<p>当然，纯粹的考虑一种语言如何实现一种 pattern 是机械的。一种观点是：如果需要一种 pattern，则说明使用的语言缺乏对应的语法。比如，这篇题为 <a href="http://assets.en.oreilly.com/1/event/12/_The%20Lack%20of_%20Design%20Patterns%20in%20Python%20Presentation.pdf">The (lack of) design patterns in Python</a> 幻灯片里，作者 Joe Gregorio 展示了一些用 Java 和 C++ 需要专门描述的 designs，如果用 Python，则只需少数几行，以至于没必要总结成一种 pattern。</p>
<p>在我的这篇博文里，列了 Peter Novig 的一个幻灯片，其中说 23 种常见 design patterns 中的 16 种，在 Lisp 语言种都有语法可以支持。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1175&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/01/%e7%94%a8go%e8%af%ad%e8%a8%80%e5%ae%9e%e7%8e%b0design-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
		<item>
		<title>Latent Dirichlet Allocation: The Gritty Details</title>
		<link>http://cxwangyi.wordpress.com/2012/01/01/latent-dirichlet-allocation-the-gritty-details/</link>
		<comments>http://cxwangyi.wordpress.com/2012/01/01/latent-dirichlet-allocation-the-gritty-details/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 03:54:40 +0000</pubDate>
		<dc:creator>cxwangyi</dc:creator>
				<category><![CDATA[Machine Learning]]></category>

		<guid isPermaLink="false">http://cxwangyi.wordpress.com/?p=1104</guid>
		<description><![CDATA[This is my learning note on the LDA model: Latent Dirichlet Allocation: The Gritty Details<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1104&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is my learning note on the LDA model: <a href='http://cxwangyi.files.wordpress.com/2012/01/llt.pdf'>Latent Dirichlet Allocation: The Gritty Details</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cxwangyi.wordpress.com/1104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cxwangyi.wordpress.com/1104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cxwangyi.wordpress.com/1104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cxwangyi.wordpress.com&amp;blog=11093547&amp;post=1104&amp;subd=cxwangyi&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cxwangyi.wordpress.com/2012/01/01/latent-dirichlet-allocation-the-gritty-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/aa326442e1afcccad56609d49b3c5a63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cxwangyi</media:title>
		</media:content>
	</item>
	</channel>
</rss>
