<?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>崔添翼 § 翼若垂天之云 &#187; 程序园</title>
	<atom:link href="http://cuitianyi.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://cuitianyi.com</link>
	<description>Journey seeking Truth, Love, and Strength.</description>
	<lastBuildDate>Wed, 26 Oct 2011 05:25:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Programming Collective Intelligence 读书总结</title>
		<link>http://cuitianyi.com/blog/programming-collective-intelligence-%e8%af%bb%e4%b9%a6%e6%80%bb%e7%bb%93/</link>
		<comments>http://cuitianyi.com/blog/programming-collective-intelligence-%e8%af%bb%e4%b9%a6%e6%80%bb%e7%bb%93/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 04:31:17 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=974</guid>
		<description><![CDATA[Making Recommendations (Collaborative Filtering) User-based Finding similar users User as vector based on item score Euclidean distance Pearson correlation Reverse users and items, we can find similar items to a given item Sort and recommend items based on sum(user similarity * user&#8217;s item score) for each other user Item-based Find item similarities These results can [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>Making Recommendations (Collaborative Filtering)</li>
<ul>
<li>User-based</li>
<ul>
<li>Finding similar users</li>
<ul>
<li>User as vector based on item score</li>
<ul>
<li>Euclidean distance</li>
<li>Pearson correlation</li>
</ul>
<li>Reverse users and items, we can find similar items to a given item</li>
</ul>
<li>Sort and recommend items based on</li>
<ul>
<li>sum(user similarity * user&#8217;s item score) for each other user</li>
</ul>
</ul>
<li>Item-based</li>
<ul>
<li>Find item similarities</li>
<ul>
<li>These results can be cached and periodically updated</li>
</ul>
<li>Sort and recommend items based on</li>
<ul>
<li>sum((item similarity * user&#8217;s item score) / sum(item similarity)) for each user&#8217;s item</li>
</ul>
<li>Significantly faster and better for sparse dataset</li>
</ul>
</ul>
</ul>
<ul>
<li>Discovering Groups (Clustering)</li>
<ul>
<li>Supervised Learning</li>
<ul>
<li>use example inputs and outputs</li>
<li>neural networks, decision trees, support-vector machines, and Bayesian filtering</li>
</ul>
<li>Word Vectors of texts</li>
<li>Hierarchical Clustering</li>
<ul>
<li>choose two nearest vectors to combine</li>
<li>results in binary tree</li>
</ul>
<li>Can cluster articles or words</li>
<ul>
<li>transpose the matrix</li>
</ul>
<li>Dendrogram drawing</li>
<li>K-Means clustering</li>
<ul>
<li>randomly place k centroids</li>
<li>assign every item to the nearest centroid, and move the centroid to the average location of all items assigned to them</li>
</ul>
</ul>
</ul>
<ul>
<li>Searching and Ranking</li>
<ul>
<li>word index stored in relational database</li>
<li>ranking</li>
<ul>
<li>content-based</li>
<ul>
<li>various metrics: word frequency, document location, word distance</li>
</ul>
<li>use inbound links</li>
<ul>
<li>simple count</li>
<li>PageRank algorithm</li>
<ul>
<li>random walk</li>
<li>sparse matrix multiplication iterations</li>
</ul>
<li>use link text</li>
</ul>
<li>learning from clicks</li>
<ul>
<li>click-tracking neuro-network (multilayer perception network, i.e. MLP network)</li>
<ul>
<li>one hidden layer</li>
</ul>
</ul>
</ul>
</ul>
<li>Optimization</li>
<ul>
<li>stochastic optimization</li>
<ul>
<li>numerical solution</li>
<li>cost function</li>
</ul>
<li>random searching</li>
<li>hill climbing</li>
<ul>
<li>increase the most promising dimension of a vector</li>
</ul>
<li>simulated annealing</li>
<ul>
<li>variable: temperature, starts very high and gradually gets lower</li>
<li>worse solution being accepted depending on temperature</li>
</ul>
<li>generic algorithms</li>
<ul>
<li>mutate, crossover, …</li>
</ul>
</ul>
<li>Document Filtering (to be expanded…)</li>
<ul>
<li>use words as features</li>
<li>naive Bayesian classifier</li>
<li>the Fisher method</li>
</ul>
<li>Modeling with Decision Trees</li>
<ul>
<li>Algorithm: CART (Classification and Regression Trees)</li>
<ul>
<li>choose the best split from all possible splits</li>
<ul>
<li>Gini impurity</li>
<li>information entropy</li>
<ul>
<li>sum of p(x)log(p(x))</li>
</ul>
</ul>
<li>recursively build the whole tree</li>
<li>then can be used to classify new observations</li>
<li>pruning the tree</li>
<ul>
<li>when it becomes overfitted</li>
<li>checking pairs of nodes that have a common parent to see if merging them would increase the entropy by less than a specified threshold</li>
</ul>
</ul>
<li>Dealing with</li>
<ul>
<li>missing data</li>
<ul>
<li>use both branches</li>
</ul>
<li>numerical outcomes</li>
<ul>
<li>use variance instead of entropy</li>
</ul>
</ul>
</ul>
<li>Building Price Models</li>
<ul>
<li>k-nearest neighbors (kNN)</li>
<ul>
<li>weighted</li>
<li>may need scaling or normalizing</li>
<li>to estimate the probability density</li>
</ul>
<li>cross-validation</li>
<ul>
<li>divide data into training sets and test sets</li>
</ul>
</ul>
<li>Advanced Classification: Kernel Methods and SVMs</li>
<ul>
<li>basic linear classification</li>
<ul>
<li>using dot-products to determine distance</li>
</ul>
<li>kernel methods</li>
<ul>
<li>define another dot-product == move the points into different space</li>
</ul>
<li>support-vector machines</li>
<ul>
<li>find the line that is as far away as possible from classes</li>
</ul>
</ul>
<li>Finding Independent Features</li>
<ul>
<li>non-negative matrix factorization</li>
<ul>
<li>factor the article-word matrix into two matrix</li>
<ul>
<li>the features matrix: row for features, column for words</li>
<li>the weight matrix: row for articles, column for features</li>
</ul>
</ul>
</ul>
<li>Evolving Intelligence</li>
<ul>
<li>creating an algorithm that creating algorithms</li>
<li>mutation, crossover/breeding</li>
<li>use trees to represent algorithm to enable evolving</li>
<ul>
<li>use to guess numerical functions or, game AI</li>
</ul>
</ul>
<li>Algorithm Summary</li>
<ul>
<li>Supervised Learning</li>
<ul>
<li>Bayesian Classifier</li>
<li>Decision Tree Classifier</li>
<li>Neural Networks</li>
<li>Support-Vector Machines</li>
</ul>
<li>Unsupervised Learning</li>
<ul>
<li>k-Nearest Neighbors</li>
<li>Clustering</li>
<li>Multidimensional Scaling</li>
<li>Non-Negative Matrix Factorization</li>
</ul>
<li>Optimization</li>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/programming-collective-intelligence-%e8%af%bb%e4%b9%a6%e6%80%bb%e7%bb%93/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>大家来帮我起个名字吧</title>
		<link>http://cuitianyi.com/blog/%e5%a4%a7%e5%ae%b6%e6%9d%a5%e5%b8%ae%e6%88%91%e8%b5%b7%e4%b8%aa%e5%90%8d%e5%ad%97%e5%90%a7/</link>
		<comments>http://cuitianyi.com/blog/%e5%a4%a7%e5%ae%b6%e6%9d%a5%e5%b8%ae%e6%88%91%e8%b5%b7%e4%b8%aa%e5%90%8d%e5%ad%97%e5%90%a7/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 11:47:43 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[同文馆]]></category>
		<category><![CDATA[军机处]]></category>
		<category><![CDATA[程序园]]></category>
		<category><![CDATA[生活志]]></category>
		<category><![CDATA[诗工坊]]></category>
		<category><![CDATA[梦呓语]]></category>
		<category><![CDATA[浮掠影]]></category>
		<category><![CDATA[曾绕梁]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=952</guid>
		<description><![CDATA[前几天的时候，我很闲，我一闲我就想买域名。 域名这种东西吧，最好团购，我一买就买了仨。 biaozhiqiushi.com lizhiqiushi.com qiushihui.me （最后这个的.com被人抢注了，我只好注册.me了。） 域名可以用来做什么呢？表面上看来的话，就是用来做网站的。 但这三个域名到底可以做什么网站呢？ 就拿qiushihui.me为例吧，它可以成为浙大的Facebook，也可以成为一个叫“求实惠”的团购网站。所以我真的没有想好。 但是我已经想好另外两个域名在目前这个阶段适合做什么了，你可千万别点进去看啊。 里之求是和表之求是到底是什么意思，你就自由联想吧。 你可以自由联想，但是你可别瞎联想，我会精神分析的，我自己给自己精神分析分析多了以后就会精神分裂，不过我的精神分裂了没有任何关系，因为我已经久病成良医了。 参考答案1：荔枝糗事，离职求实，理智秋实 参考答案2：标志秋实，表侄求诗，标致囚室 p.s.谁敢送我一卡牧师妹的周边我跟谁急！你又不是不知道我最爱吃什么。 p.s.s.新生推荐美剧《生活大爆炸》，他不会告诉你真实的加州理工，但他会帮你树立一个远大的理想。 p.s.s.s.已经毕业了的老生推荐喜剧，因为你可能对生活失望到看什么喜剧都笑不出来，但这个时候，如果有一部喜剧让你笑出来了，那就代表了隐藏在重重包装下的真实的你自己。对于我来说，这部动漫是《银魂》，又称《银他妈》。对于你来说看什么喜剧还能笑出来我就不知道了。 p.s.s.s.s.如果你属于一个人生的关口，你闯不过去这个关你就彻底地失败了，那你还是看看《日常》吧。 p.s.s.s.s.s.我正在筹备浙大轻音部，敬请期待！我们轻音部一般不表演，但如果表演的话，肯定是在小剧场的舞台上。我负责买茶叶、键盘和作曲和一部分的作词（另外一部分的作词由李白负责），然后现在已经有了两个主唱，一个负责唱戏一个负责唱rap。我就缺一个会敲鼓的女生。这种女生存在吗？达不到四个人我们就要被废部了呀！ p.s.s.s.s.s.s. 你以为我用键盘就做不出琵琶的音效吗？ p.s.s.s.s.s.s.s. 人人网你不要生气，qiushihui.me只不过是浙大轻音部的官网而已，我小时候只会打响板的！ p.s.s.s.s.s.s.s.s. 如果那个唱戏的感冒了我也不是不可以替她唱一下，只不过边弹边唱这种事情其实最难了。 p.s.s.s.s.s.s.s.s.s. 如果只有三个人不会被废部吧！不会吧！ p.s.s.s.s.s.s.s.s.s.s. 我们的首部作品名叫《月下独酌》，我高中同学都听过我唱的。 p.s.s.s.s.s.s.s.s.s.s.s. 你什么时候答应我让我家教我什么时候开始写寻路问题的教材！]]></description>
			<content:encoded><![CDATA[<p>前几天的时候，我很闲，我一闲我就想买域名。</p>
<p>域名这种东西吧，最好团购，我一买就买了仨。</p>
<p>biaozhiqiushi.com lizhiqiushi.com qiushihui.me （最后这个的.com被人抢注了，我只好注册.me了。）</p>
<p>域名可以用来做什么呢？表面上看来的话，就是用来做网站的。</p>
<p>但这三个域名到底可以做什么网站呢？</p>
<p>就拿qiushihui.me为例吧，它可以成为浙大的Facebook，也可以成为一个叫“求实惠”的团购网站。所以我真的没有想好。</p>
<p>但是我已经想好另外两个域名在目前这个阶段适合做什么了，你可千万别点进去看啊。</p>
<p>里之求是和表之求是到底是什么意思，你就自由联想吧。</p>
<p>你可以自由联想，但是你可别瞎联想，我会精神分析的，我自己给自己精神分析分析多了以后就会精神分裂，不过我的精神分裂了没有任何关系，因为我已经久病成良医了。</p>
<p>参考答案1：荔枝糗事，离职求实，理智秋实 参考答案2：标志秋实，表侄求诗，标致囚室</p>
<p>p.s.谁敢送我一卡牧师妹的周边我跟谁急！你又不是不知道我最爱吃什么。</p>
<p>p.s.s.新生推荐美剧《生活大爆炸》，他不会告诉你真实的加州理工，但他会帮你树立一个远大的理想。</p>
<p>p.s.s.s.已经毕业了的老生推荐喜剧，因为你可能对生活失望到看什么喜剧都笑不出来，但这个时候，如果有一部喜剧让你笑出来了，那就代表了隐藏在重重包装下的真实的你自己。对于我来说，这部动漫是《银魂》，又称《银他妈》。对于你来说看什么喜剧还能笑出来我就不知道了。</p>
<p>p.s.s.s.s.如果你属于一个人生的关口，你闯不过去这个关你就彻底地失败了，那你还是看看《日常》吧。</p>
<p>p.s.s.s.s.s.我正在筹备浙大轻音部，敬请期待！我们轻音部一般不表演，但如果表演的话，肯定是在小剧场的舞台上。我负责买茶叶、键盘和作曲和一部分的作词（另外一部分的作词由李白负责），然后现在已经有了两个主唱，一个负责唱戏一个负责唱rap。我就缺一个会敲鼓的女生。这种女生存在吗？达不到四个人我们就要被废部了呀！</p>
<p>p.s.s.s.s.s.s. 你以为我用键盘就做不出琵琶的音效吗？</p>
<p>p.s.s.s.s.s.s.s. 人人网你不要生气，qiushihui.me只不过是浙大轻音部的官网而已，我小时候只会打响板的！</p>
<p>p.s.s.s.s.s.s.s.s. 如果那个唱戏的感冒了我也不是不可以替她唱一下，只不过边弹边唱这种事情其实最难了。</p>
<p>p.s.s.s.s.s.s.s.s.s. 如果只有三个人不会被废部吧！不会吧！</p>
<p>p.s.s.s.s.s.s.s.s.s.s. 我们的首部作品名叫《月下独酌》，我高中同学都听过我唱的。</p>
<p>p.s.s.s.s.s.s.s.s.s.s.s. 你什么时候答应我让我家教我什么时候开始写寻路问题的教材！</p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e5%a4%a7%e5%ae%b6%e6%9d%a5%e5%b8%ae%e6%88%91%e8%b5%b7%e4%b8%aa%e5%90%8d%e5%ad%97%e5%90%a7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>【残稿】新学期第X周：如何选专业</title>
		<link>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%acx%e5%91%a8%ef%bc%9a%e5%a6%82%e4%bd%95%e9%80%89%e4%b8%93%e4%b8%9a/</link>
		<comments>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%acx%e5%91%a8%ef%bc%9a%e5%a6%82%e4%bd%95%e9%80%89%e4%b8%93%e4%b8%9a/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 23:03:11 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[同文馆]]></category>
		<category><![CDATA[军机处]]></category>
		<category><![CDATA[程序园]]></category>
		<category><![CDATA[生活志]]></category>
		<category><![CDATA[诗工坊]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[梦呓语]]></category>
		<category><![CDATA[浮掠影]]></category>
		<category><![CDATA[曾绕梁]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=943</guid>
		<description><![CDATA[在选专业之前，你应该多读读科幻小说，然后找到自己最喜欢的科幻小说。找到了以后就容易多了。 &#160; 如果你是学数学的，你就去读何夕的《伤心者》，告诉自己那里面写的都是真事。 如果你是学物理的，你就去读刘慈欣的《三体》，告诉自己那里面写的是另一个平行世界里的真事。 （⋯⋯这些段子以后再编，今天我要赶火车没时间。） 如果你是学化工自动化的，你就去读《哈利波特》，告诉自己那些神奇的魔药的背后都是未被开拓的化学原理，那些神奇的魔咒背后都是未经考虑的自动化秘籍。 我小时候最爱读哈利波特，长大后，我最爱读的小说不是哈利波特，而是一本哈利波特的同人：Harry Potter and the Method of Rationality。那篇小说还没有大结局，但我相信，如果让我写大结局的话，哈利一定会跟赫敏在一起。 对了，读计算机的人也需要读科幻小说，如果你偏爱国人科幻小说的话，那请期待中文计算机硬科幻这一崭新流派的诞生吧！]]></description>
			<content:encoded><![CDATA[<p>在选专业之前，你应该多读读科幻小说，然后找到自己最喜欢的科幻小说。找到了以后就容易多了。</p>
<p>&nbsp;</p>
<p>如果你是学数学的，你就去读何夕的《伤心者》，告诉自己那里面写的都是真事。</p>
<p>如果你是学物理的，你就去读刘慈欣的《三体》，告诉自己那里面写的是另一个平行世界里的真事。</p>
<p>（⋯⋯这些段子以后再编，今天我要赶火车没时间。）</p>
<p>如果你是学化工自动化的，你就去读《哈利波特》，告诉自己那些神奇的魔药的背后都是未被开拓的化学原理，那些神奇的魔咒背后都是未经考虑的自动化秘籍。</p>
<p>我小时候最爱读哈利波特，长大后，我最爱读的小说不是哈利波特，而是一本哈利波特的同人：<a href="http://www.google.com/search?q=Harry+Potter+and+the+Method+of+Rationality">Harry Potter and the Method of Rationality</a>。那篇小说还没有大结局，但我相信，如果让我写大结局的话，哈利一定会跟赫敏在一起。</p>
<p>对了，读计算机的人也需要读科幻小说，如果你偏爱国人科幻小说的话，那请期待<strong>中文计算机硬科幻</strong>这一崭新流派的诞生吧！</p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%acx%e5%91%a8%ef%bc%9a%e5%a6%82%e4%bd%95%e9%80%89%e4%b8%93%e4%b8%9a/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>【标题党】【七步成诗】新学期第6周：我爱家乡的书法</title>
		<link>http://cuitianyi.com/blog/%e3%80%90%e6%a0%87%e9%a2%98%e5%85%9a%e3%80%91%e3%80%90%e4%b8%83%e6%ad%a5%e6%88%90%e8%af%97%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac6%e5%91%a8%ef%bc%9a%e6%88%91%e7%88%b1%e5%ae%b6%e4%b9%a1%e7%9a%84/</link>
		<comments>http://cuitianyi.com/blog/%e3%80%90%e6%a0%87%e9%a2%98%e5%85%9a%e3%80%91%e3%80%90%e4%b8%83%e6%ad%a5%e6%88%90%e8%af%97%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac6%e5%91%a8%ef%bc%9a%e6%88%91%e7%88%b1%e5%ae%b6%e4%b9%a1%e7%9a%84/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 20:24:59 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>
		<category><![CDATA[生活志]]></category>
		<category><![CDATA[诗工坊]]></category>
		<category><![CDATA[梦呓语]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=877</guid>
		<description><![CDATA[我本来计划等第6周的时候我再给河南安阳的旅游业做点贡献。现在有点等不及了。 安阳有个景点叫羑里城，我曾经去过，那是一个文王拘而演周易的地方。 周易我没看过，因为我知道看也看不懂，据孔子说，它把这个世界上的大道理都说完了。 斯宾诺莎还是莱布尼茨曾经说过，中国人最早发明了二进制，理由就是伏羲造了八卦，文王在他的基础上造了六十四卦。 所以我认为，零和一是世界的本源。 我第一次去杭州市第七人民医院的时候很害怕，因为我害怕我的病情严重到需要被关进精神病院的程度。 第二次去的时候我就不怕了。 哪怕被关进精神病院，哪怕关进去以后再也出不来。 只要能让我写字，哪怕我只能写0和1两个字符。 只要有足够的时间，我相信我可以用两个字符写出一个操作系统。 大家没事的时候还是去看看 The Elements of Computing Systems 吧，虽然我看到最后两章就看不下去了，但我希望你能坚持看完。 (此部分代码已开源，见 https://github.com/tianyicui/No.658659）]]></description>
			<content:encoded><![CDATA[<p>我本来计划等第6周的时候我再给河南安阳的旅游业做点贡献。现在有点等不及了。</p>
<p>安阳有个景点叫羑里城，我曾经去过，那是一个文王拘而演周易的地方。</p>
<p>周易我没看过，因为我知道看也看不懂，据孔子说，它把这个世界上的大道理都说完了。</p>
<p>斯宾诺莎还是莱布尼茨曾经说过，中国人最早发明了二进制，理由就是伏羲造了八卦，文王在他的基础上造了六十四卦。</p>
<p>所以我认为，零和一是世界的本源。</p>
<p>我第一次去杭州市第七人民医院的时候很害怕，因为我害怕我的病情严重到需要被关进精神病院的程度。</p>
<p>第二次去的时候我就不怕了。</p>
<p>哪怕被关进精神病院，哪怕关进去以后再也出不来。</p>
<p>只要能让我写字，哪怕我只能写0和1两个字符。</p>
<p>只要有足够的时间，我相信我可以用两个字符写出一个操作系统。</p>
<p>大家没事的时候还是去看看 The Elements of Computing Systems 吧，虽然我看到最后两章就看不下去了，但我希望你能坚持看完。</p>
<p>(此部分代码已开源，见 <a href="https://github.com/tianyicui/No.658659">https://github.com/tianyicui/No.658659</a>）</p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e3%80%90%e6%a0%87%e9%a2%98%e5%85%9a%e3%80%91%e3%80%90%e4%b8%83%e6%ad%a5%e6%88%90%e8%af%97%e3%80%91%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac6%e5%91%a8%ef%bc%9a%e6%88%91%e7%88%b1%e5%ae%b6%e4%b9%a1%e7%9a%84/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>【残稿】ML笔记(0)：开始之前</title>
		<link>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91ml%e7%ac%94%e8%ae%b00%ef%bc%9a%e5%bc%80%e5%a7%8b%e4%b9%8b%e5%89%8d/</link>
		<comments>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91ml%e7%ac%94%e8%ae%b00%ef%bc%9a%e5%bc%80%e5%a7%8b%e4%b9%8b%e5%89%8d/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 20:13:46 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=896</guid>
		<description><![CDATA[今年，Stanford将计算机课程的公开度又向前迈了一步，将机器学习(Machine Learning)、人工智能(Artificial Intelligence)和数据库基础(Introduction to Databases)三门课全面在网上开放。我打算坚持学习其中的机器学习这门课程，并以笔记的形式向大家分享。 目前ML课程的主页已经可以注册(Enroll)，登录后可以看到课程视频、练习题、和答疑等内容。 其中课程视频其实不用注册也可以在这个网址看到。所有的讲义在这个网址有下载。 除了ml-class网站内部的Q&#38;A模块外，还有一个非官方的reddit上的讨论组专门进行这门公开课的信息分享和课后讨论。那边的讨论都是英文的，如果你习惯中文讨论的话，可以移步至我开设并管理的这个MLCN小组进行讨论。 大家一起学ML吧！]]></description>
			<content:encoded><![CDATA[<p>今年，Stanford将计算机课程的公开度又向前迈了一步，将<a href="http://ml-class.org/">机器学习(Machine Learning)</a>、<a href="http://www.ai-class.com/">人工智能(Artificial Intelligence)</a>和<a href="http://www.db-class.org/">数据库基础(Introduction to Databases)</a>三门课全面在网上开放。我打算坚持学习其中的机器学习这门课程，并以笔记的形式向大家分享。</p>
<p>目前ML课程的主页已经可以注册(Enroll)，登录后可以看到课程视频、练习题、和答疑等内容。</p>
<p>其中课程视频其实不用注册也可以在<a href="http://openclassroom.stanford.edu/MainFolder/CoursePage.php?course=MachineLearning">这个网址</a>看到。所有的讲义在<a href="http://cs229.stanford.edu/materials.html">这个网址</a>有下载。</p>
<p>除了ml-class网站内部的Q&amp;A模块外，还有一个非官方的reddit上的<a href="http://www.reddit.com/r/mlclass">讨论组</a>专门进行这门公开课的信息分享和课后讨论。那边的讨论都是英文的，如果你习惯中文讨论的话，可以移步至我开设并管理的这个<a href="http://reddit.com/r/mlzh">MLCN小组</a>进行讨论。</p>
<p>大家一起学ML吧！</p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e3%80%90%e6%ae%8b%e7%a8%bf%e3%80%91ml%e7%ac%94%e8%ae%b00%ef%bc%9a%e5%bc%80%e5%a7%8b%e4%b9%8b%e5%89%8d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>新学期第4周（残稿）：我的理想是 Linus Torvalds</title>
		<link>http://cuitianyi.com/blog/%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac3%e5%91%a8%ef%bc%9a%e6%88%91%e7%9a%84%e7%90%86%e6%83%b3%e6%98%af-linus-torvalds/</link>
		<comments>http://cuitianyi.com/blog/%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac3%e5%91%a8%ef%bc%9a%e6%88%91%e7%9a%84%e7%90%86%e6%83%b3%e6%98%af-linus-torvalds/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 20:07:20 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>
		<category><![CDATA[生活志]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=781</guid>
		<description><![CDATA[在我常上的 Hacker News 论坛上，有人这样评价 Linus Torvalds 的贡献： I personally know a dozen people who could have written the Linux kernel, at around the time Linus wrote it. What none of them could have done, through, is manage the project when it took off the way Linus did. I suspect 100 years from now, the place [...]]]></description>
			<content:encoded><![CDATA[<p>在我常上的 <a href="http://news.ycombinator.com/">Hacker News</a> 论坛上，有人这样<a href="http://news.ycombinator.com/item?id=1874922">评价</a> Linus Torvalds 的贡献：</p>
<blockquote><p>I personally know a dozen people who could have written the Linux kernel, at around the time Linus wrote it. What none of them could have done, through, is manage the project when it took off the way Linus did.<br />
I suspect 100 years from now, the place you will hear the name &#8220;Linus Torvalds&#8221; the most will be in management classes in business and engineering school. His actual software will be a footnote, merely the platform upon which he demonstrated how to manage a large open source project. Kind of like Henry Ford and the automobile&#8211;Ford made important contributions to the development of the automobile itself, but it is his figuring out how to make the automobile factory that is the main thing we remember him for.</p></blockquote>
<p>这段话将 Linus 界定成了一个管理学天才而非简单的编程牛人。</p>
<p>（这篇文章在我草稿箱里躺了很久了，但一直没开始写，本来我下面想详细展开论述的，但医生不让我过多写文章，这篇文章就这样了，课后习题不布置了，你们自己看着办吧。）</p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e6%96%b0%e5%ad%a6%e6%9c%9f%e7%ac%ac3%e5%91%a8%ef%bc%9a%e6%88%91%e7%9a%84%e7%90%86%e6%83%b3%e6%98%af-linus-torvalds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>《背包问题九讲》2.0 RC1</title>
		<link>http://cuitianyi.com/blog/%e3%80%8a%e8%83%8c%e5%8c%85%e9%97%ae%e9%a2%98%e4%b9%9d%e8%ae%b2%e3%80%8b2-0-rc1/</link>
		<comments>http://cuitianyi.com/blog/%e3%80%8a%e8%83%8c%e5%8c%85%e9%97%ae%e9%a2%98%e4%b9%9d%e8%ae%b2%e3%80%8b2-0-rc1/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 10:46:17 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=906</guid>
		<description><![CDATA[下载地址在 http://love-oriented.com/pack/pack2rc.pdf]]></description>
			<content:encoded><![CDATA[<p>下载地址在 <a href="http://love-oriented.com/pack/pack2rc.pdf">http://love-oriented.com/pack/pack2rc.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/%e3%80%8a%e8%83%8c%e5%8c%85%e9%97%ae%e9%a2%98%e4%b9%9d%e8%ae%b2%e3%80%8b2-0-rc1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LLVM笔记(3)：LLVM的语言（下）</title>
		<link>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b03%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8b%ef%bc%89/</link>
		<comments>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b03%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8b%ef%bc%89/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 02:39:46 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>
		<category><![CDATA[编译原理]]></category>
		<category><![CDATA[LLVM]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=886</guid>
		<description><![CDATA[（本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记，前作为《LLVM笔记(2)：LLVM的语言（中）》。） Instruction Reference terminator instruction indicates which block should be executed after the current block is finished yields &#8216;void&#8217; value, ret (return) ret &#60;type&#62; &#60;value&#62; ret void branch br i1 &#60;cond&#62;, label &#60;iftrue&#62;, label &#60;iffalse&#62; br label &#60;dest&#62; ; Unconditional branch switch &#60;intty&#62; &#60;value&#62;, label &#60;defaultdest&#62; [ &#60;intty&#62; &#60;val&#62;, label &#60;dest&#62; ... ] indirectbr &#60;somety&#62;* [...]]]></description>
			<content:encoded><![CDATA[<p>（本文是 <a href="http://llvm.org/releases/2.9/docs/LangRef.html">http://llvm.org/releases/2.9/docs/LangRef.html</a> 的阅读笔记，前作为《<a href="http://cuitianyi.com/blog/llvm%E7%AC%94%E8%AE%B02%EF%BC%9Allvm%E7%9A%84%E8%AF%AD%E8%A8%80%EF%BC%88%E4%B8%AD%EF%BC%89/">LLVM笔记(2)：LLVM的语言（中）</a>》。）</p>
<ul>
<li>Instruction Reference</li>
<ul>
<li>terminator instruction</li>
<ul>
<li>indicates which block should be executed after the current block is finished</li>
<li>yields &#8216;void&#8217; value,</li>
<li>ret (return)</li>
<ul>
<li>ret &lt;type&gt; &lt;value&gt;</li>
<li>ret void</li>
</ul>
<li>branch</li>
<ul>
<li>br i1 &lt;cond&gt;, label &lt;iftrue&gt;, label &lt;iffalse&gt;</li>
<li>br label &lt;dest&gt; ; Unconditional branch</li>
</ul>
<ul>
<li>switch &lt;intty&gt; &lt;value&gt;, label &lt;defaultdest&gt; [ &lt;intty&gt; &lt;val&gt;, label &lt;dest&gt; ... ]</li>
<li>indirectbr &lt;somety&gt;* &lt;address&gt;, [ label &lt;dest1&gt;, label &lt;dest2&gt;, ... ]</li>
</ul>
<li>invoke</li>
<ul>
<li>invoke [cconv] [ret attrs] &lt;ptr to function ty&gt; &lt;function ptr val&gt;(&lt;function args&gt;) [fn attrs] to label &lt;normal label&gt; unwind label &lt;exception label&gt;</li>
<li>unwind</li>
<li>unreachable</li>
</ul>
</ul>
<li>binary instruction</li>
<ul>
<li>add, fadd, sub, fsub</li>
<li>mul, fmul, udiv, sdiv, fdiv, urem, srem, frem</li>
</ul>
<li>bitwise binary instructions
<ul>
<li>shl, lshr, ashr</li>
<li>and, or, xor</li>
</ul>
</li>
<li>memory instructions</li>
<ul>
<li>Vector Operations</li>
<ul>
<li>extractelement</li>
<ul>
<li>&lt;result&gt; = extractelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, i32 &lt;idx&gt; ; yields &lt;ty&gt;</li>
</ul>
<li>insertelement</li>
<ul>
<li>&lt;result&gt; = insertelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, &lt;ty&gt; &lt;elt&gt;, i32 &lt;idx&gt; ; yields &lt;n x &lt;ty&gt;&gt;</li>
</ul>
<li>shufflevector</li>
<ul>
<li>&lt;result&gt; = shufflevector &lt;n x &lt;ty&gt;&gt; &lt;v1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;v2&gt;, &lt;m x i32&gt; &lt;mask&gt; ; yields &lt;m x &lt;ty&gt;&gt;</li>
</ul>
</ul>
<li>Aggregate Operations</li>
<ul>
<li>extractvalue</li>
<ul>
<li>&lt;result&gt; = extractvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;idx&gt;{, &lt;idx&gt;}*</li>
</ul>
<li>insertvalue</li>
<ul>
<li>&lt;result&gt; = insertvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;ty&gt; &lt;elt&gt;, &lt;idx&gt; ; yields &lt;aggregate type&gt;</li>
</ul>
</ul>
<li>Memory Access and Addressing Operations</li>
<ul>
<li>alloca</li>
<ul>
<li>&lt;result&gt; = alloca &lt;type&gt;[, &lt;ty&gt; &lt;NumElements&gt;][, align &lt;alignment&gt;] ; yields {type*}:result</li>
</ul>
<li>load</li>
<ul>
<li>&lt;result&gt; = load &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;]</li>
<li>&lt;result&gt; = volatile load &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;]</li>
<li>!&lt;index&gt; = !{ i32 1 }</li>
</ul>
<li>store</li>
<ul>
<li>store &lt;ty&gt; &lt;value&gt;, &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;] ; yields {void}</li>
<li>volatile store &lt;ty&gt; &lt;value&gt;, &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;][, !nontemporal !&lt;index&gt;] ; yields {void}</li>
</ul>
<li>getelementptr</li>
<ul>
<li>&lt;result&gt; = getelementptr &lt;pty&gt;* &lt;ptrval&gt;{, &lt;ty&gt; &lt;idx&gt;}*</li>
<li>&lt;result&gt; = getelementptr inbounds &lt;pty&gt;* &lt;ptrval&gt;{, &lt;ty&gt; &lt;idx&gt;}*</li>
</ul>
</ul>
<li>Conversion Operations</li>
<ul>
<li>trunc .. to (truncate value type)</li>
<li>zext .. to (zero ext)</li>
<li>sext .. to (sign ext)</li>
<li>fptrunc .. to (float point truncate)</li>
<li>fpext .. to</li>
<li>fptoui .. to (float point to unsigned int)</li>
<li>fptosi .. to</li>
<li>uitofp .. to</li>
<li>sitofp .. to</li>
<li>ptrtoint .. to (pointer to int)</li>
<li>inttoptr .. to</li>
<li>bitcast .. to</li>
</ul>
</ul>
<li>other instructions</li>
<ul>
<li>&#8216;icmp&#8217; Instruction</li>
<ul>
<li>&lt;result&gt; = icmp &lt;cond&gt; &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; ; yields {i1} or {&lt;N x i1&gt;}:result</li>
</ul>
</ul>
</ul>
<li>Intrinsic Functions</li>
<ul>
<li>Variable Argument Handling Intrinsics</li>
<ul>
<li>llvm.va_start</li>
<li>llvm.va_end</li>
<li>llvm.va_copy</li>
</ul>
<li>Accurate Garbage Collection Intrinsics</li>
<ul>
<li>llvm.gcroot</li>
<li>llvm.gcread</li>
<li>llvm.gcwrite</li>
</ul>
<li>Code Generator Intrinsics</li>
<ul>
<li>llvm.returnaddress</li>
<ul>
<li>declare i8 *@llvm.returnaddress(i32 &lt;level&gt;)</li>
</ul>
<li>llvm.frameaddress</li>
<ul>
<li>declare i8* @llvm.frameaddress(i32 &lt;level&gt;)</li>
</ul>
<li>llvm.stacksave</li>
<ul>
<li>declare i8* @llvm.stacksave()</li>
</ul>
<li>llvm.stackrestore</li>
<ul>
<li>declare void @llvm.stackrestore(i8* %ptr)</li>
</ul>
<li>llvm.prefetch</li>
<ul>
<li>declare void @llvm.prefetch(i8* &lt;address&gt;, i32 &lt;rw&gt;, i32 &lt;locality&gt;)</li>
</ul>
<li>llvm.pcmarker</li>
<ul>
<li>declare void @llvm.pcmarker(i32 &lt;id&gt;)</li>
</ul>
<li>llvm.readcyclecounter</li>
<ul>
<li>declare i64 @llvm.readcyclecounter()</li>
</ul>
</ul>
<li>Standard C Library Intrinsics</li>
<ul>
<li>llvm.memcpy llvm.memmove llvm.memset.*</li>
<li>llvm.sqrt.* llvm.powi.* llvm.sin.* llvm.cos.* llvm.pow.*</li>
</ul>
<li>Bit Manipulation Intrinsics</li>
<ul>
<li>llvm.bswap.*</li>
<ul>
<li>swap high and low</li>
</ul>
<li>llvm.ctpop.*</li>
<ul>
<li>counts the number of bits set</li>
</ul>
<li>llvm.ctlz.*</li>
<ul>
<li>count the number of leading zeros</li>
</ul>
<li>llvm.cttz.*</li>
<ul>
<li>count the number of trailing zeros</li>
</ul>
<li>llvm.sadd.with.overflow.*</li>
<li>llvm.uadd.with.overflow.*</li>
<li>llvm.ssub.with.overflow.*</li>
<li>llvm.usub.with.overflow.*</li>
<li>llvm.smul.with.overflow.*</li>
<li>llvm.umul.with.overflow.*</li>
</ul>
<li>Half Precision Floating Point Intrinsics</li>
<ul>
<li>llvm.convert.to.fp16</li>
<li>llvm.convert.from.fp16</li>
</ul>
<li>Debugger Intrinsics</li>
<ul>
<li>start with llvm.dbg. prefix</li>
</ul>
<li>Exception Handling Intrinsics</li>
<ul>
<li>start with llvm.eh. prefix</li>
</ul>
<li>Trampoline Intrinsic</li>
<ul>
<li>llvm.init.trampoline</li>
</ul>
<li>Atomic Operations and Synchronization Intrinsics</li>
<ul>
<li>llvm.memory.barrier</li>
<li>llvm.atomic.cmp.swap.*</li>
<li>llvm.atomic.swap.*</li>
<li>llvm.atomic.load.add.* llvm.atomic.load.sub.*</li>
<li>llvm.atomic.load.and.* llvm.atomic.load.nand.* llvm.atomic.load.or.* llvm.atomic.load.xor.*</li>
<li>llvm.atomic.load.max.* llvm.atomic.load.min.* llvm.atomic.load.umax.* llvm.atomic.load.umin.*</li>
</ul>
<li>Memory Use Markers</li>
<ul>
<li>llvm.lifetime.start</li>
<li>llvm.lifetime.end</li>
<li>llvm.invariant.start</li>
<li>llvm.invariant.end</li>
</ul>
<li>General Intrinsics</li>
<ul>
<li>llvm.var.annotation</li>
<li>llvm.annotation.*</li>
<li>llvm.trap</li>
<li>llvm.stackprotector</li>
<li>llvm.objectsize</li>
</ul>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b03%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8b%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LLVM笔记(2)：LLVM的语言（中）</title>
		<link>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b02%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%ad%ef%bc%89/</link>
		<comments>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b02%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%ad%ef%bc%89/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 08:27:28 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>
		<category><![CDATA[编译原理]]></category>
		<category><![CDATA[LLVM]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=879</guid>
		<description><![CDATA[（本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记，前作为《LLVM笔记(1)：LLVM的语言（上）》。） Type System Type Classifications integer: i1, i2, i3, &#8230; i8, &#8230; i16, &#8230; i32, &#8230; i64 floating point: float, double, x86_fp80, fp128, ppc_fp128 first class: integer, floating point, pointer, vector, structure, array, label, metadata. primitive: label, void, integer, floating point, x86mmx, metadata. derived: array, function, pointer, structure, packed structure, vector, opaque. Array type [&#60;# elements&#62; x &#60;elementtype&#62;] Function [...]]]></description>
			<content:encoded><![CDATA[<p>（本文是 <a href="http://llvm.org/releases/2.9/docs/LangRef.html">http://llvm.org/releases/2.9/docs/LangRef.html</a> 的阅读笔记，前作为《<a href="http://cuitianyi.com/blog/llvm%E7%AC%94%E8%AE%B01%EF%BC%9Allvm%E7%9A%84%E8%AF%AD%E8%A8%80%EF%BC%88%E4%B8%8A%EF%BC%89/">LLVM笔记(1)：LLVM的语言（上）</a>》。）</p>
<ul>
<li>Type System</li>
<ul>
<li>Type Classifications</li>
<ul>
<li>integer: i1, i2, i3, &#8230; i8, &#8230; i16, &#8230; i32, &#8230; i64</li>
<li>floating point: float, double, x86_fp80, fp128, ppc_fp128</li>
<li>first class: integer, floating point, pointer, vector, structure, array, label, metadata.</li>
<li>primitive: label, void, integer, floating point, x86mmx, metadata.</li>
<li>derived: array, function, pointer, structure, packed structure, vector, opaque.</li>
</ul>
<li>Array type</li>
<ul>
<li>
<pre>[&lt;# elements&gt; x &lt;elementtype&gt;]</pre>
</li>
</ul>
<li>Function Type</li>
<ul>
<li>
<pre>&lt;returntype&gt; (&lt;parameter list&gt;)</pre>
</li>
</ul>
<li>Structure Type</li>
<ul>
<li>
<pre>{ &lt;type list&gt; }</pre>
</li>
</ul>
<li>Packed Structure Type</li>
<ul>
<li>
<pre>&lt; { &lt;type list&gt; } &gt;</pre>
</li>
</ul>
<li>Pointer Type</li>
<ul>
<li>
<pre>&lt;type&gt; *</pre>
</li>
</ul>
<li>Vector Type</li>
<ul>
<li>
<pre>&lt; &lt;# elements&gt; x &lt;elementtype&gt; &gt;</pre>
</li>
</ul>
<li>Opaque Type: represents unknown type</li>
<li>Type Up-references</li>
<ul>
<li>needed by the asmprinter for printing out cyclic types</li>
</ul>
</ul>
<li>Constants</li>
<ul>
<li>Simple Constants</li>
<ul>
<li>Boolean(true, false)</li>
<li>Integer(e.g. 42)</li>
<li>Floating point(3.14 or 6.02E+23 or <code>double 0x432ff973cafa8000</code> (IEEE))</li>
<li>Null pointer (null)</li>
</ul>
<li>Complex Constants</li>
<ul>
<li>Structure constants</li>
<ul>
<li>{ i32 4, float 17.0, i32* @G }</li>
<li>@G = external global i32</li>
</ul>
<li>Array constants</li>
<ul>
<li>[ i32 42, i32 11, i32 74 ]</li>
</ul>
<li>Vector constants</li>
<ul>
<li>[ i32 42, i32 11, i32 74 ]</li>
</ul>
<li>Zero initialization</li>
<ul>
<li>zeroinitializer</li>
</ul>
<li>Metadata node</li>
<ul>
<li>metadata !{ i32 0, metadata !&#8221;test&#8221; }</li>
</ul>
</ul>
<li>Global Variable and Function Addresses</li>
<li>Undefined Values</li>
<ul>
<li>The string &#8216;undef&#8217; can be used anywhere a constant is expected, and indicates that the user of the value may receive an unspecified bit-pattern.</li>
</ul>
<li>Trap Values</li>
<li>Addresses of Basic Blocks</li>
<ul>
<li>blockaddress(@function, %block)</li>
</ul>
<li>Constant Expressions</li>
<ul>
<li>trunc, zext, sext, fptrunc, fpext, fptoui, fptosi, uitofp, sitofp, ptrtoint, inttoptr, bitcast</li>
<li>getelementptr, select, icmp, fcmp, extractelement, insertelement, shufflevector, extractvalue, insertvalue</li>
<li>OPCODE</li>
</ul>
</ul>
<li>Other Values</li>
<ul>
<li>Inline Assembler Expressions</li>
<ul>
<li>Inline Asm Metadata</li>
<li>Metadata Nodes and Metadata Strings</li>
</ul>
</ul>
<li>Intrinsic Global Variables</li>
<ul>
<li>The &#8216;llvm.used&#8217; Global Variable</li>
<ul>
<li>The @llvm.used global is an array with i8* element type which has appending linkage.</li>
</ul>
<li>The &#8216;llvm.compiler.used&#8217; Global Variable</li>
<li>The &#8216;llvm.global_ctors&#8217; Global Variable</li>
<li>The &#8216;llvm.global_dtors&#8217; Global Variable</li>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b02%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%ad%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LLVM笔记(1)：LLVM的语言（上）</title>
		<link>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b01%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8a%ef%bc%89/</link>
		<comments>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b01%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8a%ef%bc%89/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 09:57:20 +0000</pubDate>
		<dc:creator>崔添翼</dc:creator>
				<category><![CDATA[程序园]]></category>
		<category><![CDATA[编译]]></category>
		<category><![CDATA[LLVM]]></category>

		<guid isPermaLink="false">http://cuitianyi.com/?p=800</guid>
		<description><![CDATA[（本文是 http://llvm.org/releases/2.9/docs/LangRef.html 的阅读笔记，前作为《LLVM笔记(0)：在一切开始之前》。） 一句话总结： LLVM is a Static Single Assignment (SSA) based representation that provides type safety, low-level operations, flexibility, and the capability of representing &#8216;all&#8217; high-level languages cleanly. It is the common code representation used throughout all phases of the LLVM compilation strategy. LLVM语言有三种形式：in-memory compiler IR, on-disk bitcode representation, human readable assembly language representation。三种表现形式是等价的。 LLVM语言的目标是：一方面 light-weight and [...]]]></description>
			<content:encoded><![CDATA[<p>（本文是 <a href="http://llvm.org/releases/2.9/docs/LangRef.html">http://llvm.org/releases/2.9/docs/LangRef.html</a> 的阅读笔记，前作为《<a href="http://cuitianyi.com/blog/llvm%E7%AC%94%E8%AE%B00%EF%BC%9A%E5%9C%A8%E4%B8%80%E5%88%87%E5%BC%80%E5%A7%8B%E4%B9%8B%E5%89%8D/">LLVM笔记(0)：在一切开始之前</a>》。）</p>
<ul>
<li>一句话总结： LLVM is a Static Single Assignment (SSA) based representation that provides type safety, low-level operations, flexibility, and the capability of representing &#8216;all&#8217; high-level languages cleanly. It is the common code representation used throughout all phases of the LLVM compilation strategy.</li>
<li>LLVM语言有三种形式：in-memory compiler IR, on-disk bitcode representation, human readable assembly language representation。三种表现形式是等价的。</li>
<li>LLVM语言的目标是：一方面 light-weight and low-level，另一方面expressive, typed, and extensible。</li>
<ul>
<li>&#8220;universal IR&#8221;</li>
</ul>
<li>Identifiers</li>
<ul>
<li>global: @开头</li>
<li>local: %开头</li>
</ul>
<li>&#8216;;&#8217;开始注释</li>
<li>High Level Structure</li>
<ul>
<li>Module</li>
<ul>
<li>llvm linker to combine</li>
<li>global values: functions and global variables</li>
<li>linkage types</li>
<ul>
<li>private, linker_private, linker_private_weak, linker_private_weak_def_auto</li>
<li>internal, available_externally, linkonce, weak, common, appending, extern_weak</li>
<li>linkonce_odr, weak_odr</li>
<li>externally visible (default)</li>
</ul>
<li>Calling Conventions</li>
<ul>
<li>ccc: the C calling convention</li>
<li>fastcc: the fast calling convention</li>
<li>coldcc: the cold calling convention</li>
</ul>
<li>Visibility styles (for global variables and functions):</li>
<ul>
<li>default, hidden, protected</li>
</ul>
<li>Named types</li>
<ul>
<li>e.g. %mytype = type { %mytype*, i32 }</li>
</ul>
<li>Global variables</li>
<ul>
<li>many aspects can be controlled</li>
</ul>
<li>Functions</li>
<ul>
<li>definition and declaration</li>
<li>definition contains a list of basic blocks, Control Flow Graph for the function</li>
<ul>
<li>each basic block optionally starts with a label, contains a list of instructions, and ends with a terminator instruction</li>
<li>first basic block is special: 1. immediately executed on entrance; 2. not allowed to have predecessors</li>
</ul>
</ul>
<li>Aliases</li>
<li>Named Metadata: a collection of metadata</li>
<li>Parameter Attributes</li>
<ul>
<li>zeroext, signext, inreg, byval, sret, noalias, nocapture, nest</li>
</ul>
<li>Garbage Collector Names</li>
<li>Function Attributes</li>
<ul>
<li>&#8230;</li>
</ul>
<li>Module-Level Inline Assembly</li>
<li>Data Layout</li>
<ul>
<li>target datalayout = &#8220;layout specification&#8221;</li>
</ul>
<li>Pointer Aliasing Rules</li>
<ul>
<li>memory access must be through pointers</li>
<li>a pointer value is based on another pointer value according to the rules</li>
</ul>
<li>Volatile Memory Accesses</li>
</ul>
</ul>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://cuitianyi.com/blog/llvm%e7%ac%94%e8%ae%b01%ef%bc%9allvm%e7%9a%84%e8%af%ad%e8%a8%80%ef%bc%88%e4%b8%8a%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

