<?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>but why? &#187; programming</title>
	<atom:link href="http://whyoh.wordpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://whyoh.wordpress.com</link>
	<description>i write stuff down</description>
	<lastBuildDate>Fri, 23 Oct 2009 15:02:42 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='whyoh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d35f3f6c4c29fb186df9725fc5490881?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>but why? &#187; programming</title>
		<link>http://whyoh.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://whyoh.wordpress.com/osd.xml" title="but why?" />
		<item>
		<title>how CJK is your page?</title>
		<link>http://whyoh.wordpress.com/2008/04/14/how-cjk-is-your-page/</link>
		<comments>http://whyoh.wordpress.com/2008/04/14/how-cjk-is-your-page/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 12:36:12 +0000</pubDate>
		<dc:creator>whyohwhyohwhyoh</dc:creator>
				<category><![CDATA[foss]]></category>
		<category><![CDATA[japanese]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://whyoh.wordpress.com/?p=37</guid>
		<description><![CDATA[i made a python app that scans the content of a web page to see how Japanese it is based on the characters used.  so it could be Japanese, Chinese etc.  here it is:
# -*- coding: utf-8 -*-
from sys import argv
from urllib2 import build_opener
from HTMLParser import HTMLParser
class jaHTMLParser(HTMLParser):
    ja = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=37&subd=whyoh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>i made a python app that scans the content of a web page to see how Japanese it is based on the characters used.  so it could be Japanese, Chinese etc.  here it is:</p>
<blockquote><p># -*- coding: utf-8 -*-</p>
<p>from sys import argv<br />
from urllib2 import build_opener<br />
from HTMLParser import HTMLParser</p>
<p>class jaHTMLParser(HTMLParser):</p>
<p>    ja = nonja = 0<br />
    encoding = &#8220;utf-8&#8243;</p>
<p>    def handle_starttag(self, tag, attrs):<br />
        for attr in attrs:<br />
            if tag == &#8216;meta&#8217; and attr[0] == &#8220;content&#8221; and attr[1].find(&#8220;charset=&#8221;) != -1 :<br />
            self.encoding = attr[1].split(&#8220;charset=&#8221;)[1]</p>
<p>    def handle_data(self, data):<br />
        if data in (&#8220;/*&#8221;, &#8220;*/&#8221;) or data.isspace(): return<br />
        uni = data.decode(self.encoding)<br />
        for c in uni:<br />
            u8 = c.encode(&#8220;utf-8&#8243;)<br />
            if u8 &gt;= &#8216;⺀&#8217; and u8 &lt;= &#8216;𯨟&#8217;: self.ja += 1 # very approximate<br />
            else: self.nonja += 1</p>
<p>    def unknown_decl(self, data): pass # CDATA is not an error!</p>
<p>opener = build_opener()<br />
opener.addheaders = [('User-agent', 'Mozilla/5.0')] # avoid 403 forbidden</p>
<p>reader = jaHTMLParser()<br />
reader.CDATA_CONTENT_ELEMENTS = [] # don&#8217;t treat any CDATA as textual content<br />
reader.feed(opener.open(argv[1]).read())<br />
reader.close()<br />
print &#8220;%d%%&#8221; % (float(100 * reader.ja) / float(reader.nonja + reader.ja))</p></blockquote>
<p> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/whyoh.wordpress.com/37/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/whyoh.wordpress.com/37/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whyoh.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whyoh.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whyoh.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whyoh.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whyoh.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whyoh.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whyoh.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whyoh.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whyoh.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whyoh.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=37&subd=whyoh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://whyoh.wordpress.com/2008/04/14/how-cjk-is-your-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3f49a49a5a75cc4abd83a4b73f16a99d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">whyohwhyohwhyoh</media:title>
		</media:content>
	</item>
		<item>
		<title>barcoded</title>
		<link>http://whyoh.wordpress.com/2007/11/26/barcoded/</link>
		<comments>http://whyoh.wordpress.com/2007/11/26/barcoded/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 23:17:15 +0000</pubDate>
		<dc:creator>whyohwhyohwhyoh</dc:creator>
				<category><![CDATA[foss]]></category>
		<category><![CDATA[homebrew]]></category>
		<category><![CDATA[milestone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[barcode]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[import]]></category>

		<guid isPermaLink="false">http://whyoh.wordpress.com/2007/11/26/barcoded/</guid>
		<description><![CDATA[well, i&#8217;ve scanned over 200 barcodes now.  but what have i learned?

you can get away with a lot of noise in the picture.
all those silly things that we try at supermarkets to get the scan to work are actually very sensible.
with my dodgy setup it&#8217;s only very slightly quicker than typing.  but lots [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=34&subd=whyoh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>well, i&#8217;ve scanned over 200 barcodes now.  but what have i learned?</p>
<ul>
<li>you can get away with a lot of noise in the picture.</li>
<li>all those silly things that we try at supermarkets to get the scan to work are actually very sensible.</li>
<li>with my dodgy setup it&#8217;s only very slightly quicker than typing.  but lots more geeky fun.</li>
<li>shiny things are bad.</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/whyoh.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/whyoh.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whyoh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whyoh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whyoh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whyoh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whyoh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whyoh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whyoh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whyoh.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whyoh.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whyoh.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=34&subd=whyoh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://whyoh.wordpress.com/2007/11/26/barcoded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3f49a49a5a75cc4abd83a4b73f16a99d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">whyohwhyohwhyoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Achieve! &#8211; Week 45</title>
		<link>http://whyoh.wordpress.com/2007/11/11/achieve-week-45/</link>
		<comments>http://whyoh.wordpress.com/2007/11/11/achieve-week-45/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 00:50:58 +0000</pubDate>
		<dc:creator>whyohwhyohwhyoh</dc:creator>
				<category><![CDATA[achieve!]]></category>
		<category><![CDATA[milestone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[fedora]]></category>

		<guid isPermaLink="false">http://whyoh.wordpress.com/2007/11/11/achieve-week-45/</guid>
		<description><![CDATA[
reached 1000th word in Japanese vocabulary quiz.  it was &#8220;recently&#8221;.  (今度)
cycled again .. twice! &#8211; it&#8217;s been a while
put grapher on hold to focus on table merging
cooked food from actual ingredients
chopped up parts for another monitor stand and built it
tried switching off fans &#8211; got freaked and turned them back on
finished a book
manually [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=27&subd=whyoh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li>reached 1000th word in Japanese vocabulary quiz.  it was &#8220;recently&#8221;.  (今度)</li>
<li>cycled again .. twice! &#8211; it&#8217;s been a while</li>
<li>put grapher on hold to focus on table merging</li>
<li>cooked food from actual ingredients</li>
<li>chopped up parts for another monitor stand and built it</li>
<li>tried switching off fans &#8211; got freaked and turned them back on</li>
<li>finished a book</li>
<li>manually removed remaining spam from a few years of emails</li>
<li>upgraded athlon PC to F8 &#8211; it&#8217;s not very happy about that!</li>
<li>wrote new OS GML loader</li>
<li>joined freecycle and passed on a telly</li>
<li>tidied up slightly</li>
</ul>
<p><a href="http://www.flickr.com/photos/whyohwhyohwhyoh/1955686529/" title="Photo Sharing"></a></p>
<p style="text-align:center;"><a href="http://www.flickr.com/photos/whyohwhyohwhyoh/1955686529/" title="Photo Sharing"><img src="http://farm3.static.flickr.com/2201/1955686529_3f7b6f6c3b_m.jpg" alt="11112007120" border="0" height="180" width="240" /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/whyoh.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/whyoh.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whyoh.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whyoh.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whyoh.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whyoh.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whyoh.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whyoh.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whyoh.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whyoh.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whyoh.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whyoh.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=27&subd=whyoh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://whyoh.wordpress.com/2007/11/11/achieve-week-45/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3f49a49a5a75cc4abd83a4b73f16a99d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">whyohwhyohwhyoh</media:title>
		</media:content>

		<media:content url="http://farm3.static.flickr.com/2201/1955686529_3f7b6f6c3b_m.jpg" medium="image">
			<media:title type="html">11112007120</media:title>
		</media:content>
	</item>
		<item>
		<title>Achieve! &#8211; Week 44</title>
		<link>http://whyoh.wordpress.com/2007/11/04/achieve-week-44/</link>
		<comments>http://whyoh.wordpress.com/2007/11/04/achieve-week-44/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 21:27:19 +0000</pubDate>
		<dc:creator>whyohwhyohwhyoh</dc:creator>
				<category><![CDATA[achieve!]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://whyoh.wordpress.com/2007/11/04/achieve-week-44/</guid>
		<description><![CDATA[
got physics.c to re-calculate each object&#8217;s movement at an independant rate without crashing much
found and updated j-wave MHM download scripts
visited in London  
bought more monitors &#8211; that&#8217;s enough for now
made dataset lists multi-page

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=29&subd=whyoh&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li>got physics.c to re-calculate each object&#8217;s movement at an independant rate without crashing much</li>
<li>found and updated j-wave MHM download scripts</li>
<li>visited in London <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>bought more monitors &#8211; that&#8217;s enough for now</li>
<li>made dataset lists multi-page</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/whyoh.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/whyoh.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/whyoh.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/whyoh.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/whyoh.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/whyoh.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/whyoh.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/whyoh.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/whyoh.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/whyoh.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/whyoh.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/whyoh.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=whyoh.wordpress.com&blog=1363957&post=29&subd=whyoh&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://whyoh.wordpress.com/2007/11/04/achieve-week-44/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3f49a49a5a75cc4abd83a4b73f16a99d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">whyohwhyohwhyoh</media:title>
		</media:content>
	</item>
	</channel>
</rss>