
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>「小眾計算學」的迴響</title>
	<atom:link href="http://www.iis.sinica.edu.tw/~scm/ncs/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iis.sinica.edu.tw/~scm/ncs</link>
	<description>for the few of us.</description>
	<lastBuildDate>Mon, 05 Dec 2011 23:35:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>由 Liang-Ting 發表的 單子 (monad) 入門（二）讀取單子 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2009/11/a-monad-primer-2/comment-page-1/#comment-5779</link>
		<dc:creator>Liang-Ting</dc:creator>
		<pubDate>Mon, 05 Dec 2011 23:35:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=30#comment-5779</guid>
		<description>Monad 不是 compositional 的問題，從代數的角度去看可能比較明顯，所有的 monad 都一一對應一個代數理論（algegraic theory），如果是 finitary monad 的話，則對應 finitary algebraic theory 也就是所有的代數操作都只拿有限個元件，例如 Maybe monad 有兩個 operator 這樣，Just 只拿一個元素，Nothing 什麼都沒拿。大部分在 Haskell 的 monad 都是 finitary 的，但是 continuation monad 例外。

兩個 finitary monad 的合成（其實只要 operator 是 bounded 就好，但在 Haskell 上談有限多個以外的參數好像沒意義？），則對應兩個 algebraic theories 的合成，theory 的合成目前已之有幾種方式，一種是直接加在一起，兩邊的 operator 沒有互相影響，第二種則說兩個 theory 的 operator 互相交換（commutes），第三則說是一個 theory 中的 operator 分配到另一個理論的 operator 也就是 a x (b * c) = (a * b) x (a * c) 這樣的。第一種是對任何理論都可以這樣做，後面兩種則有條件的。

而一般給定 monad T, S 若 TS 仍是一個 monad 的話，對應著是 T 的理論分配到 S 上；相對地，ST 則是 S 理論分配到 T 理論上，當然跟 ST 會不一樣。這些在 M. Hyland 02 年的論文中有提到，雖然這篇很數學。J. Power 這些人最幾年很愛談這個東西，我也是最近才發現這套東西的威力，不過似乎還沒有被實作出來。

如果要做 monad 上的 equational reasoning ，我想還是得把 monad 的操作跟滿足的等是淬取出來，這部分 J. Gibbons 跟 R. Hinze 今年（2011）的論文似乎就是在做這個。

monad transformer 我則是還不知道它對應 category theory 上什麼東西 ...</description>
		<content:encoded><![CDATA[<p>Monad 不是 compositional 的問題，從代數的角度去看可能比較明顯，所有的 monad 都一一對應一個代數理論（algegraic theory），如果是 finitary monad 的話，則對應 finitary algebraic theory 也就是所有的代數操作都只拿有限個元件，例如 Maybe monad 有兩個 operator 這樣，Just 只拿一個元素，Nothing 什麼都沒拿。大部分在 Haskell 的 monad 都是 finitary 的，但是 continuation monad 例外。</p>
<p>兩個 finitary monad 的合成（其實只要 operator 是 bounded 就好，但在 Haskell 上談有限多個以外的參數好像沒意義？），則對應兩個 algebraic theories 的合成，theory 的合成目前已之有幾種方式，一種是直接加在一起，兩邊的 operator 沒有互相影響，第二種則說兩個 theory 的 operator 互相交換（commutes），第三則說是一個 theory 中的 operator 分配到另一個理論的 operator 也就是 a x (b * c) = (a * b) x (a * c) 這樣的。第一種是對任何理論都可以這樣做，後面兩種則有條件的。</p>
<p>而一般給定 monad T, S 若 TS 仍是一個 monad 的話，對應著是 T 的理論分配到 S 上；相對地，ST 則是 S 理論分配到 T 理論上，當然跟 ST 會不一樣。這些在 M. Hyland 02 年的論文中有提到，雖然這篇很數學。J. Power 這些人最幾年很愛談這個東西，我也是最近才發現這套東西的威力，不過似乎還沒有被實作出來。</p>
<p>如果要做 monad 上的 equational reasoning ，我想還是得把 monad 的操作跟滿足的等是淬取出來，這部分 J. Gibbons 跟 R. Hinze 今年（2011）的論文似乎就是在做這個。</p>
<p>monad transformer 我則是還不知道它對應 category theory 上什麼東西 &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Liang-Ting 發表的 單子 (monad) 入門（一） 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2009/11/a-monad-primer/comment-page-1/#comment-5778</link>
		<dc:creator>Liang-Ting</dc:creator>
		<pubDate>Mon, 05 Dec 2011 15:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=27#comment-5778</guid>
		<description>啊，我忘了，其實 Kleisli 還是要滿足些條件，也就是文章中提及的三個性質。只是會比證明 natural transformations 以及相關的性質少一些。</description>
		<content:encoded><![CDATA[<p>啊，我忘了，其實 Kleisli 還是要滿足些條件，也就是文章中提及的三個性質。只是會比證明 natural transformations 以及相關的性質少一些。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Liang-Ting 發表的 單子 (monad) 入門（一） 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2009/11/a-monad-primer/comment-page-1/#comment-5777</link>
		<dc:creator>Liang-Ting</dc:creator>
		<pubDate>Mon, 05 Dec 2011 14:55:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=27#comment-5777</guid>
		<description>想到我曾經問了這個問題，我想有一個答案：

Monad 有兩種定義方式，一種是數學教科書上常見的，在 category C 下給定一個 functor T, 兩個 natural transformations, \eta : I -&gt; T, \mu : T^2 -&gt; T 滿足 \mu . T\mu = \mu . \mu 以及 id = \mu . T\eta 。

另外一種定義是透過我們稱為 Kleisli triple 給定一個 object function T : obj(C) -&gt; obj(C) （注意，我們不需要 T 是一個 functor ！），以及對每個 object c 都有一個 morphism u : c -&gt; Tc in C 以及對所有的 f : c -&gt; Td 有一個 Kleisli extension, f* : Tc -&gt; Td. 

這兩種定義是一一對應的，也就是說從 Kleisli triple 可以定義一個 monad, 從 monad 可以定義 Kleisli triple 而且 monad -&gt; K. tri. -&gt; monad 會得到原來的 monad, 反之亦然。

第二種方式是 Haskell 採用的，所以 T 不被要求為一個 functor, 理論上就不需要有 fmap 了。一個明顯的好處是，在 Haskell 上沒辦法直接描述什麼是 natural transformation ，但是用 Kleisli triple 的定義就迴避了這個困難點。</description>
		<content:encoded><![CDATA[<p>想到我曾經問了這個問題，我想有一個答案：</p>
<p>Monad 有兩種定義方式，一種是數學教科書上常見的，在 category C 下給定一個 functor T, 兩個 natural transformations, \eta : I -&gt; T, \mu : T^2 -&gt; T 滿足 \mu . T\mu = \mu . \mu 以及 id = \mu . T\eta 。</p>
<p>另外一種定義是透過我們稱為 Kleisli triple 給定一個 object function T : obj(C) -&gt; obj(C) （注意，我們不需要 T 是一個 functor ！），以及對每個 object c 都有一個 morphism u : c -&gt; Tc in C 以及對所有的 f : c -&gt; Td 有一個 Kleisli extension, f* : Tc -&gt; Td. </p>
<p>這兩種定義是一一對應的，也就是說從 Kleisli triple 可以定義一個 monad, 從 monad 可以定義 Kleisli triple 而且 monad -&gt; K. tri. -&gt; monad 會得到原來的 monad, 反之亦然。</p>
<p>第二種方式是 Haskell 採用的，所以 T 不被要求為一個 functor, 理論上就不需要有 fmap 了。一個明顯的好處是，在 Haskell 上沒辦法直接描述什麼是 natural transformation ，但是用 Kleisli triple 的定義就迴避了這個困難點。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Fergon 發表的 單子 (monad) 入門（二）讀取單子 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2009/11/a-monad-primer-2/comment-page-1/#comment-1512</link>
		<dc:creator>Fergon</dc:creator>
		<pubDate>Wed, 26 Oct 2011 15:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=30#comment-1512</guid>
		<description>太精采了，我都看的入迷了，怎么没了呢？</description>
		<content:encoded><![CDATA[<p>太精采了，我都看的入迷了，怎么没了呢？</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 C++面试题 C++笔试题 C++编程，数据结构，算法类面试题集(5) - IT公司面试手册 發表的 荷蘭國旗問題 The Dutch National Flag Problem（上） 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-flag-problem/comment-page-1/#comment-1501</link>
		<dc:creator>C++面试题 C++笔试题 C++编程，数据结构，算法类面试题集(5) - IT公司面试手册</dc:creator>
		<pubDate>Mon, 24 Oct 2011 12:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=154#comment-1501</guid>
		<description>[...] http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-fl [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-fl" rel="nofollow">http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-fl</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 2010-06 久違的Blog更新 &#124; Mr. Big Cat 發表的 2010 「邏輯、語言與計算」暑期研習營  (FLOLAC &#8217;10) 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2010/04/flolac-2010/comment-page-1/#comment-577</link>
		<dc:creator>2010-06 久違的Blog更新 &#124; Mr. Big Cat</dc:creator>
		<pubDate>Sat, 29 Jan 2011 18:03:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=44#comment-577</guid>
		<description>[...] 今年終於跟公司請了十天的假，去參FLOLAC 2010的課程    看完了龍紋身的女孩三部曲，讓我熱血（？）的研究了一陣子破解技術 雖然目前還只是基礎Wargame都可能卡關的肉腳程度啦  我大概還滿嚮往「在資訊領域中極度自由」的感覺的 不管是「在Open Source的世界中，想要什麼都可以自己來」 或是「在資訊安全的領域中，如入無人之境」  不過這種「想要什麼，信手拈來」的自由，先決條件是在該領域各方面都很強吧&#8230;   GCJ打到前3000名不是什麼太好看的成積 [...]</description>
		<content:encoded><![CDATA[<p>[...] 今年終於跟公司請了十天的假，去參FLOLAC 2010的課程    看完了龍紋身的女孩三部曲，讓我熱血（？）的研究了一陣子破解技術 雖然目前還只是基礎Wargame都可能卡關的肉腳程度啦  我大概還滿嚮往「在資訊領域中極度自由」的感覺的 不管是「在Open Source的世界中，想要什麼都可以自己來」 或是「在資訊安全的領域中，如入無人之境」  不過這種「想要什麼，信手拈來」的自由，先決條件是在該領域各方面都很強吧&#8230;   GCJ打到前3000名不是什麼太好看的成積 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Tweets that mention 單子 (monad) 入門（二）讀取單子 -- Topsy.com 發表的 單子 (monad) 入門（二）讀取單子 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2009/11/a-monad-primer-2/comment-page-1/#comment-473</link>
		<dc:creator>Tweets that mention 單子 (monad) 入門（二）讀取單子 -- Topsy.com</dc:creator>
		<pubDate>Mon, 22 Nov 2010 02:17:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=30#comment-473</guid>
		<description>[...] This post was mentioned on Twitter by 刘鑫, Alex Dong and haohaolee, zhasm. zhasm said: RT @marchliu: http://is.gd/hyLk6 http://is.gd/hyLlD 两篇非常好的haskell monad 教程，至少我学了这么久，读了这两篇才算会用。当然，这毕竟是haskell，文章还要涉及解释器和抽象代数…… [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by 刘鑫, Alex Dong and haohaolee, zhasm. zhasm said: RT @marchliu: <a href="http://is.gd/hyLk6" rel="nofollow">http://is.gd/hyLk6</a> <a href="http://is.gd/hyLlD" rel="nofollow">http://is.gd/hyLlD</a> 两篇非常好的haskell monad 教程，至少我学了这么久，读了这两篇才算会用。当然，这毕竟是haskell，文章还要涉及解释器和抽象代数…… [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 2010-06 久違的Blog更新 &#124; 大貓新樂園 發表的 2010 「邏輯、語言與計算」暑期研習營  (FLOLAC &#8217;10) 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2010/04/flolac-2010/comment-page-1/#comment-420</link>
		<dc:creator>2010-06 久違的Blog更新 &#124; 大貓新樂園</dc:creator>
		<pubDate>Mon, 01 Nov 2010 08:11:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=44#comment-420</guid>
		<description>[...] 今年終於跟公司請了十天的假，去參FLOLAC 2010的課程    看完了龍紋身的女孩三部曲，讓我熱血（？）的研究了一陣子破解技術 雖然目前還只是基礎Wargame都可能卡關的肉腳程度啦  我大概還滿嚮往「在資訊領域中極度自由」的感覺的 不管是「在Open Source的世界中，想要什麼都可以自己來」 或是「在資訊安全的領域中，如入無人之境」  不過這種「想要什麼，信手拈來」的自由，先決條件是在該領域各方面都很強吧&#8230;   GCJ打到前3000名不是什麼太好看的成積 [...]</description>
		<content:encoded><![CDATA[<p>[...] 今年終於跟公司請了十天的假，去參FLOLAC 2010的課程    看完了龍紋身的女孩三部曲，讓我熱血（？）的研究了一陣子破解技術 雖然目前還只是基礎Wargame都可能卡關的肉腳程度啦  我大概還滿嚮往「在資訊領域中極度自由」的感覺的 不管是「在Open Source的世界中，想要什麼都可以自己來」 或是「在資訊安全的領域中，如入無人之境」  不過這種「想要什麼，信手拈來」的自由，先決條件是在該領域各方面都很強吧&#8230;   GCJ打到前3000名不是什麼太好看的成積 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Shin 發表的 荷蘭國旗問題 The Dutch National Flag Problem（上） 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-flag-problem/comment-page-1/#comment-380</link>
		<dc:creator>Shin</dc:creator>
		<pubDate>Thu, 21 Oct 2010 06:59:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=154#comment-380</guid>
		<description>Oops oops... 已更正了。Thanks!</description>
		<content:encoded><![CDATA[<p>Oops oops&#8230; 已更正了。Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>由 Yu-Han 發表的 荷蘭國旗問題 The Dutch National Flag Problem（上） 迴響</title>
		<link>http://www.iis.sinica.edu.tw/~scm/ncs/2010/10/dutch-national-flag-problem/comment-page-1/#comment-377</link>
		<dc:creator>Yu-Han</dc:creator>
		<pubDate>Thu, 21 Oct 2010 02:01:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.iis.sinica.edu.tw/~scm/ncs/?p=154#comment-377</guid>
		<description>應該是Bentley喔～</description>
		<content:encoded><![CDATA[<p>應該是Bentley喔～</p>
]]></content:encoded>
	</item>
</channel>
</rss>

