<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Victor's Blog</title>
	<atom:link href="http://victor.csie.org/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://victor.csie.org/blog</link>
	<description>May the source be with you</description>
	<lastBuildDate>Sun, 10 May 2009 10:47:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
		<item>
		<title>snipMate, better than snippetsEmu!</title>
		<link>http://victor.csie.org/blog/archives/419</link>
		<comments>http://victor.csie.org/blog/archives/419#comments</comments>
		<pubDate>Sun, 10 May 2009 02:23:58 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/?p=419</guid>
		<description><![CDATA[Mac 上的 TextMate 最有名的 feature 就是會幫你補完程式碼，vim 也有個叫 snippetsEmu 的 plugin。好久以前曾經試用過，覺得很難用，而且 coding style 很醜 XD 今天我發現 vim 現在有個叫 snipMate 的 plugin，做的比 snippetsEmu 好很多! 另外，snippetsEmu 也已經一年多沒更新了，snipMate 則比較活躍，也比較令人期待。不多說，直接看作者提供的 screencast 吧: snipMate.vim Introductory Screencast from Michael Sanders on Vimeo. 除此之外，它的 snippet 還支援 backtick 跟 vim script: snippet date `system("date +%Y-%m-%d")` snippet filename_foo `filename()` 如果你用 Emacs，可以試試 gugod 提到的 yasnippet。]]></description>
			<content:encoded><![CDATA[<p>Mac 上的 TextMate 最有名的 feature 就是會幫你補完程式碼，vim 也有個叫 <a href="http://www.vim.org/scripts/script.php?script_id=1318" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vim.org');">snippetsEmu</a> 的 plugin。好久以前曾經試用過，覺得很難用，而且 coding style 很醜 XD</p>
<p>今天我發現 vim 現在有個叫 <a href="http://www.vim.org/scripts/script.php?script_id=2540" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vim.org');">snipMate</a> 的 plugin，做的比 <a href="http://www.vim.org/scripts/script.php?script_id=1318" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vim.org');">snippetsEmu</a> 好很多! 另外，<a href="http://www.vim.org/scripts/script.php?script_id=1318" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vim.org');">snippetsEmu</a> 也已經一年多沒更新了，<a href="http://www.vim.org/scripts/script.php?script_id=2540" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vim.org');">snipMate</a> 則比較活躍，也比較令人期待。不多說，直接看作者提供的 screencast 吧:</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3535418&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3535418&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>
<p><a href="http://vimeo.com/3535418" onclick="javascript:pageTracker._trackPageview ('/outbound/vimeo.com');">snipMate.vim Introductory Screencast</a> from <a href="http://vimeo.com/user1404868" onclick="javascript:pageTracker._trackPageview ('/outbound/vimeo.com');">Michael Sanders</a> on <a href="http://vimeo.com" onclick="javascript:pageTracker._trackPageview ('/outbound/vimeo.com');">Vimeo</a>.</p>
<p>除此之外，它的 snippet 還支援 backtick 跟 vim script:</p>
<blockquote><p><code><br />
snippet date<br />
        `system("date +%Y-%m-%d")`</p>
<p>snippet filename_foo<br />
        `filename()`<br />
</code></p></blockquote>
<p>如果你用 Emacs，可以試試 gugod <a href="http://gugod.org/2009/05/writing-moose-code-with-yasnippet.html" onclick="javascript:pageTracker._trackPageview ('/outbound/gugod.org');">提到</a>的 <a href="http://code.google.com/p/yasnippet/" onclick="javascript:pageTracker._trackPageview ('/outbound/code.google.com');">yasnippet</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/419/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>當 Dororo 遇上 iPod shuffle</title>
		<link>http://victor.csie.org/blog/archives/412</link>
		<comments>http://victor.csie.org/blog/archives/412#comments</comments>
		<pubDate>Sun, 03 May 2009 08:04:28 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/?p=412</guid>
		<description><![CDATA[有一天走在路上看到 iPod shuffle，覺得他跟 Dororo 實在太像了 &#8230; 來合體吧!]]></description>
			<content:encoded><![CDATA[<p><a href="http://picasaweb.google.com/lh/photo/gMauSaD0J4TRmhspaGVRIw?feat=embedwebsite" onclick="javascript:pageTracker._trackPageview ('/outbound/picasaweb.google.com');"><img src="http://lh5.ggpht.com/_FDZ3sPBNe64/Sfv9OmhPr5I/AAAAAAAAE50/eUKotYk1wDw/s288/Dororo.png" /></a></p>
<p>有一天走在路上看到 iPod shuffle，覺得他跟 Dororo 實在太像了 &#8230; 來合體吧!</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/412/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>退伍倒數計時器 手機版</title>
		<link>http://victor.csie.org/blog/archives/392</link>
		<comments>http://victor.csie.org/blog/archives/392#comments</comments>
		<pubDate>Fri, 20 Feb 2009 14:40:28 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/?p=392</guid>
		<description><![CDATA[前幾個禮拜發現我的舊手機也可以跑 Java，於是決定參考軒田教授的退伍日期計時器寫個手機版，這樣我在部隊裡面也可以看了（有那麼想看嗎 XD） 下載網址: http://code.google.com/p/countmento/downloads/list Project 網頁: http://code.google.com/p/countmento/ (別人都在寫 iPhone、Android，我還在寫 Java ME&#8230;)]]></description>
			<content:encoded><![CDATA[<p>前幾個禮拜發現我的舊手機也可以跑 Java，於是決定參考軒田教授的<a href="http://www.work.caltech.edu/~htlin/program/doc/MilitaryCal.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.work.caltech.edu');">退伍日期計時器</a>寫個手機版，這樣我在部隊裡面也可以看了（有那麼想看嗎 XD）</p>
<p>下載網址: <a href="http://code.google.com/p/countmento/downloads/list" onclick="javascript:pageTracker._trackPageview ('/outbound/code.google.com');">http://code.google.com/p/countmento/downloads/list</a><br />
Project 網頁: <a href="http://code.google.com/p/countmento/" onclick="javascript:pageTracker._trackPageview ('/outbound/code.google.com');">http://code.google.com/p/countmento/</a></p>
<p>(別人都在寫 iPhone、Android，我還在寫 Java ME&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/392/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>LISP Practice</title>
		<link>http://victor.csie.org/blog/archives/385</link>
		<comments>http://victor.csie.org/blog/archives/385#comments</comments>
		<pubDate>Sun, 16 Nov 2008 02:45:58 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/?p=385</guid>
		<description><![CDATA[Quick-sort (defmacro for-all (x op xs) `(remove-if-not #'(lambda (y) (,op y x)) xs)) (defun qsort (nums) (if (not nums) () (let ((x (first nums)) (xs (rest nums))) (if (eq x nil) () (append (qsort (for-all x < xs)) (list x) (qsort (for-all x >= xs))))))) Permutation (defun remove-first (n nums) (remove n nums :count 1)) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Quick-sort</strong></p>
<p><code><br />
(defmacro for-all (x op xs)<br />
 `(remove-if-not #'(lambda (y) (,op y x)) xs))</p>
<p>(defun qsort (nums)<br />
 (if (not nums)<br />
  ()</p>
<p>  (let ((x (first nums))<br />
        (xs (rest nums)))<br />
   (if (eq x nil)<br />
    ()</p>
<p>    (append<br />
     (qsort (for-all x < xs))<br />
     (list x)<br />
     (qsort (for-all x >= xs)))))))<br />
</code></p>
<p><strong>Permutation</strong><br />
<code><br />
(defun remove-first (n nums)<br />
 (remove n nums :count 1))</p>
<p>(defun join-sublists (superlist)<br />
 (reduce #'(lambda (l1 l2) (append l1 l2)) superlist))</p>
<p>(defun permute-sorted-list (nums perm)<br />
 (if (eq nums nil)<br />
  (list perm)</p>
<p>  (let ((unique-nums (remove-duplicates nums)))   (join-sublists<br />
    (mapcar (lambda (n)<br />
             (permute-sorted-list (remove-first n nums) (append perm (list n))))<br />
    unique-nums)))))</p>
<p>(defun permutation (nums)<br />
 (permute-sorted-list (sort nums #'<) '()))<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/385/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>LISP 初體驗</title>
		<link>http://victor.csie.org/blog/archives/380</link>
		<comments>http://victor.csie.org/blog/archives/380#comments</comments>
		<pubDate>Sun, 16 Nov 2008 02:37:53 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[lisp]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/?p=380</guid>
		<description><![CDATA[原本以為 LISP 只是一個普通的 functional language，所以之前都沒去接觸。但是在看完&#60;&#60;駭客與畫家&#62;&#62;之後，開始對 LISP 產生興趣。 書裡面提到 LISP 擁有許多最近新語言開始導入的 feature，而 LISP 也擁有一些其他語言沒有的功能。像我主要是被 LISP 的 macro 吸引（比 C 的 macro 強大多了。可以先把他想像成是 return 程式碼的 function，而且是在 compile 前先展開。），所以開始看 &#60;&#60;Practical Common Lisp&#62;&#62; 一書。目前為止，大家比較熟悉的語言中，我只有在 Perl 6 裡面看到 (http://en.wikipedia.org/wiki/Perl_6#Macros)。 大部分的人對 LISP 的印象就是一堆噁心的括號，寫個加法都要用 (+ 1 2) 這種前置式來敘述，實在是不符合人類的直覺。而 LISP 整個程式碼都是這樣 &#8212; 由一堆 &#8220;list&#8221; 所組成。(* (+ 1 2) (+ 3 4)) 有一個 list，第一個元素是 [...]]]></description>
			<content:encoded><![CDATA[<p>原本以為 LISP 只是一個普通的 functional language，所以之前都沒去接觸。但是在看完<a href="http://www.oreilly.com.tw/product_others.php?id=a181" onclick="javascript:pageTracker._trackPageview ('/outbound/www.oreilly.com.tw');">&lt;&lt;駭客與畫家&gt;&gt;</a>之後，開始對 LISP 產生興趣。</p>
<p>書裡面提到 LISP 擁有許多最近新語言開始導入的 feature，而 LISP 也擁有一些其他語言沒有的功能。像我主要是被 LISP 的 macro 吸引（比 C 的 macro 強大多了。可以先把他想像成是 return 程式碼的 function，而且是在 compile 前先展開。），所以開始看 <a href="http://www.gigamonkeys.com/book/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.gigamonkeys.com');">&lt;&lt;Practical Common Lisp&gt;&gt;</a> 一書。目前為止，大家比較熟悉的語言中，我只有在 Perl 6 裡面看到 (<a href="http://en.wikipedia.org/wiki/Perl_6#Macros" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">http://en.wikipedia.org/wiki/Perl_6#Macros</a>)。</p>
<p>大部分的人對 LISP 的印象就是一堆噁心的括號，寫個加法都要用 (+ 1 2) 這種前置式來敘述，實在是不符合人類的直覺。而 LISP 整個程式碼都是這樣 &#8212; 由一堆 &#8220;list&#8221; 所組成。(* (+ 1 2) (+ 3 4)) 有一個 list，第一個元素是 * 這個 &#8220;function&#8221;，第二、三個是另外兩個 list。類似這樣的語法，在定義 function、if、while 等等都一樣。</p>
<p>但這之前隱含了一件事實：LISP 本身的程式碼，就是一個資料結構! 所以 LISP 的 macro 做的事情就是生出程式碼的資料結構，我覺得這就比 Perl 6 的 macro 那種 template 的方式優雅多了。不過，這個優點是建立在令人卻步的括號海上的&#8230;</p>
<p>接下來，po 幾個我的 LISP 練習 XD</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/380/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>zfs again</title>
		<link>http://victor.csie.org/blog/archives/377</link>
		<comments>http://victor.csie.org/blog/archives/377#comments</comments>
		<pubDate>Fri, 25 Jan 2008 17:49:03 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/archives/377</guid>
		<description><![CDATA[今天才發現我弄錯了，昨天那篇提到的只是不會 cache，不會導致 kmem_map too small。 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c version 1.4 調了一些參數試圖緩和 memory 用光的情形&#8230;]]></description>
			<content:encoded><![CDATA[<p>今天才發現我弄錯了，<a href="http://victor.csie.org/blog/archives/376">昨天那篇</a>提到的只是不會 cache，不會導致 kmem_map too small。</p>
<p>http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c</p>
<p>version 1.4 調了一些參數試圖緩和 memory 用光的情形&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/377/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>zfs 雷</title>
		<link>http://victor.csie.org/blog/archives/376</link>
		<comments>http://victor.csie.org/blog/archives/376#comments</comments>
		<pubDate>Thu, 24 Jan 2008 16:10:03 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/archives/376</guid>
		<description><![CDATA[i386 跑 zfs 很容易會遇到 kmem_map too small，然後 panic。（搞錯了，不是這個 patch，請看下一篇） 剛才 rafan 貼了一段 message 給我 Change type of kmem_used() and kmem_size() functions to uint64_t, so it doesn&#8217;t overflow in arc.c in this check: if (kmem_used() > (kmem_size() * 4) / 5) return (1); With this bug ZFS almost doesn&#8217;t cache. Only 32bit machines are affected that [...]]]></description>
			<content:encoded><![CDATA[<p>i386 跑 zfs 很容易會遇到 kmem_map too small，然後 panic。（搞錯了，不是這個 patch，請看下一篇）</p>
<p>剛才 <a href="http://www.rafan.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.rafan.org');">rafan</a> 貼了一段 message 給我</p>
<blockquote><p>
  Change type of kmem_used() and kmem_size() functions to uint64_t, so it<br />
  doesn&#8217;t overflow in arc.c in this check:</p>
<p>          if (kmem_used() > (kmem_size() * 4) / 5)<br />
                  return (1);</p>
<p>  With this bug ZFS almost doesn&#8217;t cache.</p>
<p>  Only 32bit machines are affected that have vm.kmem_size set to values >=1GB.
</p></blockquote>
<p><a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/opensolaris/kern/opensolaris_kmem.c?r1=1.3#rev1.3" onclick="javascript:pageTracker._trackPageview ('/outbound/www.freebsd.org');">src/sys/compat/opensolaris/kern/opensolaris_kmem.c#rev1.3</a>，還有 <a href="http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/opensolaris/kern/opensolaris_kmem.c.diff?r1=1.2;r2=1.3;f=h" onclick="javascript:pageTracker._trackPageview ('/outbound/www.freebsd.org');">diff</a>。</p>
<p>搞笑 XD</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/376/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>SCSI&#8211;</title>
		<link>http://victor.csie.org/blog/archives/375</link>
		<comments>http://victor.csie.org/blog/archives/375#comments</comments>
		<pubDate>Sat, 19 Jan 2008 09:55:43 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/archives/375</guid>
		<description><![CDATA[這一兩個學期來，實驗室買了幾台 RAID 來裝大家實驗用的資料。幾個禮拜前，file system 爆炸，我們損失了不少資料 重點提要： 同一個 channel 不要接超過三組 RAID 同一個 channel 不要接不同廠牌的 RAID SCSI 線跟 terminator 是消耗品 接 RAID 的機器是跑 FreeBSD 7.0-PRERELEASE。一開始發現異常，是 zfs 說他寫進去的資料跟讀出來的 checksum 不一樣，於是就爆了三個 zfs 的 partition。接在同一個 SCSI channel 的 RAID 共有四台，三台 proware 跟一台 festora(?)，zfs 叫有 error 的是其中兩台 proware，所以我們懷疑是 RAID 本身有問題。 後來找了 proware 的工程師來幫我檢查 RAID，他說我們接四組 RAID 太多了&#8230; 小時候學到的 SCSI device 不就是要用串的嗎，可是沒想到四組就算太多 orz [...]]]></description>
			<content:encoded><![CDATA[<p>這一兩個學期來，實驗室買了幾台 RAID 來裝大家實驗用的資料。幾個禮拜前，file system 爆炸，我們損失了不少資料 <img src='http://victor.csie.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>重點提要：</p>
<ol>
<li>同一個 channel <strong>不要</strong>接超過三組 RAID</li>
<li>同一個 channel <strong>不要</strong>接不同廠牌的 RAID</li>
<li>SCSI 線跟 terminator 是消耗品</li>
</ol>
<p>接 RAID 的機器是跑 FreeBSD 7.0-PRERELEASE。一開始發現異常，是 zfs 說他寫進去的資料跟讀出來的 checksum 不一樣，於是就爆了三個 zfs 的 partition。接在同一個 SCSI channel 的 RAID 共有四台，三台 proware 跟一台 festora(?)，zfs 叫有 error 的是其中兩台 proware，所以我們懷疑是 RAID 本身有問題。</p>
<p>後來找了 proware 的工程師來幫我檢查 RAID，他說我們接四組 RAID 太多了&#8230; 小時候學到的 SCSI device 不就是要用串的嗎，可是沒想到四組就算太多 orz 而且最好不要把不同廠牌的 RAID 接在一起&#8230;  因為訊號可能會互相干擾 @@ （我以為這應該有標準，可是看起來接在一起的確不太好&#8230;）</p>
<p>於是我們把四台 RAID 分到兩張 scsi 卡上（之前因為某些原因沒這麼做），其中一個 channel 是一組 proware + 一組 festora。然後今天下午一直發現 zfs 又開始抱怨了&#8230; 一個月前這麼接還沒事的耶 orz 真是 ooxx 現在改成三組 proware 接同一張 scsi card，另一組自己接一張，zfs 就不叫了。</p>
<p>(%&#038;$#@!*(%!#@^!)</p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/375/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>清朝奏章上的「囧」</title>
		<link>http://victor.csie.org/blog/archives/374</link>
		<comments>http://victor.csie.org/blog/archives/374#comments</comments>
		<pubDate>Sun, 25 Nov 2007 02:12:43 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[fun]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/archives/374</guid>
		<description><![CDATA[今天去故宮看到的 XD]]></description>
			<content:encoded><![CDATA[<p>今天去故宮看到的 XD</p>
<p><a href="http://picasaweb.google.com/victorhsieh/Random/photo#5136456500048051554" onclick="javascript:pageTracker._trackPageview ('/outbound/picasaweb.google.com');"><img src="http://lh6.google.com/victorhsieh/R0hb-QGcPWI/AAAAAAAACsg/lxZakWWHqpU/s400/%E5%9B%A7.jpg" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/374/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
		<item>
		<title>Flickr API undocumented limitation</title>
		<link>http://victor.csie.org/blog/archives/373</link>
		<comments>http://victor.csie.org/blog/archives/373#comments</comments>
		<pubDate>Fri, 23 Nov 2007 11:38:58 +0000</pubDate>
		<dc:creator>victor</dc:creator>
				<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://victor.csie.org/blog/archives/373</guid>
		<description><![CDATA[我目前在學校有個 project 需要從 flickr 抓取大量資料，包括照片的 tag、owner 等 meta data。但是我發現我拿到的 data 怪怪的，一些常用的 tag 竟然只有幾百筆。我用的 API 是 flickr.photos.search，它可以接受很多條件，然後傳回符合的照片，其中有兩個條件是最早跟最晚的上傳時間。於是我只好把時間間隔縮小很多。 直到昨天，我收到一封恐嚇^H^H警告信，說明 query return 回來的 offset 不能超過 4000，換句話說頂多拿到 4000 筆左右的結果。API 的文件沒提到這件事，query 傳回來的 status 也都是正常 &#8230; 還好我抓得夠暴力(?)，不然如果沒收到這封信，之後學校的實驗就可能是錯的了 Greetings! We have noticed that the api key 72157602728288126 registered to you is sending very large offset queries to us. example (offset=16893165) Can you [...]]]></description>
			<content:encoded><![CDATA[<p>我目前在學校有個 project 需要從 flickr 抓取大量資料，包括照片的 tag、owner 等 meta data。但是我發現我拿到的 data 怪怪的，一些常用的 tag 竟然只有幾百筆。我用的 API 是 flickr.photos.search，它可以接受很多條件，然後傳回符合的照片，其中有兩個條件是最早跟最晚的上傳時間。於是我只好把時間間隔縮小很多。</p>
<p>直到昨天，我收到一封恐嚇^H^H警告信，說明 query return 回來的 offset 不能超過 4000，換句話說頂多拿到 4000 筆左右的結果。API 的文件沒提到這件事，query 傳回來的 status 也都是正常 &#8230;</p>
<p>還好我抓得夠暴力(?)，不然如果沒收到這封信，之後學校的實驗就可能是錯的了 <img src='http://victor.csie.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<blockquote><p>
Greetings!<br />
We have noticed that the api key 72157602728288126<br />
registered to you is sending very large offset queries to<br />
us.<br />
example (offset=16893165)<br />
Can you please check your usage and reconsider using these<br />
high offsets? They are heavy/costly queries that tax our<br />
backends.</p>
<p>Also to note: the search backend currently will not return<br />
any results greater than offset 4000.</p>
<p>If you could limit the max offset to below 4000, we would<br />
greatly appreciate it (and not have to disable the key -<br />
not because we want to, but because our backends can&#8217;t take<br />
very much of it).</p>
<p>Thanks!<br />
- Flickr Team
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://victor.csie.org/blog/archives/373/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/2.5/tw/</creativeCommons:license>
	</item>
	</channel>
</rss>
