<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>im addicted</title>
	
	<link>http://imaddicted.ca</link>
	<description>i'm always on</description>
	<lastBuildDate>Fri, 05 Mar 2010 19:18:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/imaddicted" /><feedburner:info uri="imaddicted" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>43.658719</geo:lat><geo:long>-79.395976</geo:long><item>
		<title>CrisisCampTO</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/Y-A3turu6TQ/</link>
		<comments>http://imaddicted.ca/dev/crisiscampto/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 22:58:32 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=664</guid>
		<description><![CDATA[Yesterday was the first CrisisCamp in Toronto. I heard about it from Jacqui Maher&#8217;s presentation at CUSEC, and I decided to attend not really knowing what to expect. It turned out that there were six projects to tackle, and I tried to help with the machine translation project.
The idea was to provide an easily accessible [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday was the first CrisisCamp in Toronto. I heard about it from <a  href="http://brighter.net/">Jacqui Maher</a>&#8217;s presentation at CUSEC, and I decided to attend not really knowing what to expect. It turned out that there were six projects to tackle, and I tried to help with the <a  href="http://code.google.com/p/ccmts/">machine translation project</a>.</p>
<p>The idea was to provide an easily accessible translator for people on the ground. At the time the project started there was no Google Translate project that worked back and forth between for English and Haitian Creole. I think it was Chris that got a translator working based on moses after it&#8217;d been fed a corpus of every piece of Creole that he could get his hands on. The CCTO team&#8217;s job was to put together a web front end, and an API.</p>
<p><span id="more-664"></span></p>
<p>We were asked to write in python. There was no binding for the frontend, but Google had just made their Creole translator accessible. For testing purposes, we&#8217;re using their AJAX frontend. After a couple false starts with mod_python and Django, Brian and Kevin rewrote using the Twisted framework. It&#8217;s a little more obscure but it&#8217;s going to be easier to plug in other mediums like SMS.</p>
<p>We did in eight hours what a more organized team could&#8217;ve done in one. It&#8217;s hard to feel like I contributed anything other than two false starts and a bit of test code, but I&#8217;m still glad I went. I got to participate in creating what I think will be useful on the ground, even if I didn&#8217;t add much traction. At the very least I got to learn what it feels like to have a deliverable and a deadline but no spec.</p>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Fdev%2Fcrisiscampto%2F&#038;linkname=CrisisCampTO"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=Y-A3turu6TQ:ac2U4v1fQ4I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=Y-A3turu6TQ:ac2U4v1fQ4I:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=Y-A3turu6TQ:ac2U4v1fQ4I:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/Y-A3turu6TQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/dev/crisiscampto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/dev/crisiscampto/</feedburner:origLink></item>
		<item>
		<title>Liveblogging for #CUSEC 2010</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/zN339v5mjR4/</link>
		<comments>http://imaddicted.ca/cusec/liveblogging-for-cusec-2010/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 20:15:31 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[cusec]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Matt Knox]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=660</guid>
		<description><![CDATA[I&#8217;m still at CUSEC 2010 in Montreal. My plan was to take notes and quickly publish here, but then at the last minute I decided to liveblog for CUSEC instead. It&#8217;s at http://live.cusec.net/. So far my favourite talk was from Matt Knox, talking about ethics and how the human brain has a remote root: we [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still at CUSEC 2010 in Montreal. My plan was to take notes and quickly publish here, but then at the last minute I decided to liveblog for CUSEC instead. It&#8217;s at <a  href="http://live.cusec.net/">http://live.cusec.net/</a>. So far my favourite talk was from Matt Knox, talking about ethics and how the human brain has a remote root: we bend to authority and do wrong too easily. The Milgram experiment as well as the more recent pranknet arrests illustrated this.</p>
<p>You can see the notes by visting the site and clicking on the archives. Unfortunately I can&#8217;t do permalinks very readily, so I might export and clean it up later.</p>
<p>The last reason I didn&#8217;t post my notes here is due to my blog being in need of spring cleaning. I need to switch to a cleaner, less busy theme, so might pick one up from WooThemes. I&#8217;ll be taking another look at that later tonight, as well as merging my categories.<span id="more-660"></span></p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/d1a4c290-3951-4b42-9e32-217aded7a947/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=d1a4c290-3951-4b42-9e32-217aded7a947" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Fcusec%2Fliveblogging-for-cusec-2010%2F&#038;linkname=Liveblogging%20for%20%23CUSEC%202010"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=zN339v5mjR4:UBbEKpw-rBs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=zN339v5mjR4:UBbEKpw-rBs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=zN339v5mjR4:UBbEKpw-rBs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/zN339v5mjR4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/cusec/liveblogging-for-cusec-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/cusec/liveblogging-for-cusec-2010/</feedburner:origLink></item>
		<item>
		<title>Links about the Haiti earthquake disaster</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/eJkRFupUYB4/</link>
		<comments>http://imaddicted.ca/uncategorized/links-about-the-haiti-earthquake-disaster/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 20:18:20 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=656</guid>
		<description><![CDATA[By now everyone has heard of the earthquake that hit Haiti.  There isn&#8217;t much of a food reserve, there isn&#8217;t a great deal of domestic rescue equipment or personnel, and there isn&#8217;t an abundance of shelter. I recently read a report saying that none of the hospitals in Port-au-Prince were operational.
Since most of my readers [...]]]></description>
			<content:encoded><![CDATA[<p>By now everyone has heard of the <a  href="http://en.wikipedia.org/wiki/Haiti_earthquake">earthquake that hit Haiti</a>.  There isn&#8217;t much of a food reserve, there isn&#8217;t a great deal of domestic rescue equipment or personnel, and there isn&#8217;t an abundance of shelter. I recently read a report saying that none of the hospitals in Port-au-Prince were operational.</p>
<p>Since most of my readers are American, I&#8217;ll start off by linking to the <a  href="http://www.msnbc.msn.com/id/34835478/ns/world_news-haiti_earthquake/">MSNBC list of suggested aid organizations</a>. Many groups in the list have Canadian counterparts too.</p>
<p>I tried to decide between <a  class="zem_slink" title="Médecins Sans Frontières" rel="wikipedia" href="http://en.wikipedia.org/wiki/M%C3%A9decins_Sans_Fronti%C3%A8res">Doctors Without Borders</a> or <a  class="zem_slink" title="International Red Cross and Red Crescent Movement" rel="wikipedia" href="http://en.wikipedia.org/wiki/International_Red_Cross_and_Red_Crescent_Movement">Red Cross</a>. It seems that they&#8217;re neck and neck in terms of <a  href="http://www.moneysense.ca/2009/12/21/canadas-40-biggest-charities/">their administrative cost</a>, so I went with the Red Cross due to their shelter programs. I donated using their <a  href="http://www.redcross.ca/main.asp?id=033907">online donation box</a>.</p>
<p><span id="more-656"></span></p>
<p>The Canadian government has pledged $5 million so far, as well as sent a DART team and put the HMCS Halifax on standby.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a  href="http://www.gettingattention.org/my_weblog/2010/01/red-cross-communications-innovation-boostout-in-front-communicating-on-haitian-disaster-relief-effort.html">&#8220;Red Cross&#8217; Communications Innovation in Haitian Disaster Relief Effort &#8212; Smart Stuff&#8221; and related posts</a> (gettingattention.org)</li>
<li class="zemanta-article-ul-li"><a  href="http://www.ecorazzi.com/2010/01/13/wyclef-jean-pleads-for-help-in-wake-of-haiti-earthquake/">&#8220;Wyclef Jean Pleads For Help In Wake Of Haiti Earthquake&#8221; and related posts</a> (ecorazzi.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://r.zemanta.com/?u=http%3A//www.newswire.ca/en/releases/archive/January2010/13/c8285.html&#038;a=11505758&#038;rid=c27c9b64-5256-41bf-a759-752b508dcdfa&#038;e=3cad6552de622cb133a2a9257bcdfb97">TD Donates $100,000 to the Red Cross in support of earthquake relief in Haiti</a> (newswire.ca)</li>
<li class="zemanta-article-ul-li"><a  href="http://r.zemanta.com/?u=http%3A//www.cbc.ca/canada/ottawa/story/2010/01/13/ottawa-haiti-quake.html%3Fref%3Drss&#038;a=11498041&#038;rid=c27c9b64-5256-41bf-a759-752b508dcdfa&#038;e=a12ae02c4f0292e8a14c723e1344b1a6">Haiti quake leaves Ottawa relatives anxious</a> (cbc.ca)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/c27c9b64-5256-41bf-a759-752b508dcdfa/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=c27c9b64-5256-41bf-a759-752b508dcdfa" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Funcategorized%2Flinks-about-the-haiti-earthquake-disaster%2F&#038;linkname=Links%20about%20the%20Haiti%20earthquake%20disaster"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=eJkRFupUYB4:WtWF6kl7deY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=eJkRFupUYB4:WtWF6kl7deY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=eJkRFupUYB4:WtWF6kl7deY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/eJkRFupUYB4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/uncategorized/links-about-the-haiti-earthquake-disaster/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/uncategorized/links-about-the-haiti-earthquake-disaster/</feedburner:origLink></item>
		<item>
		<title>The EC-GC spoof is toast, whodunnit?</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/K8mHXIprmJY/</link>
		<comments>http://imaddicted.ca/internet/the-ec-gc-spoof-is-toast-whodunnit/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 23:18:29 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Government of Canada]]></category>
		<category><![CDATA[Serverloft]]></category>
		<category><![CDATA[Yes Men]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=644</guid>
		<description><![CDATA[(Screenshot snagged from straight.com.)
I remember when Telus shut down thousands of websites to take down their union&#8217;s website. Serverloft might have just done the same. The Seattle Post-Intelligencer has an article on the takedown of the Yes Men site. I did find an article from straight.com which claims to have the original complaint. The IP [...]]]></description>
			<content:encoded><![CDATA[<p>(Screenshot snagged from straight.com.)</p>
<p>I remember when Telus shut down thousands of websites to take down their union&#8217;s website. Serverloft might have just done the same. The <a  class="zem_slink" title="Seattle Post-Intelligencer" rel="homepage" href="http://seattlepi.nwsource.com/">Seattle Post-Intelligencer</a> has <a  href="http://blog.seattlepi.com/seattlepolitics/archives/189467.asp">an article on the takedown of the Yes Men site</a>. I did find an article from straight.com which claims to <a  href="http://www.straight.com/article-279430/vancouver/government-canada-sees-yes-mens-copenhagen-hoax-dismantled">have the original complaint</a>. The IP address in the complaint there is the same one that ec-gc.ca is currently hosted on. Ole Tange is the contact for PiWeb listed in the IP address for that whois.</p>
<p><span id="more-644"></span></p>
<p>At first I was convinced that Serverloft did in fact pull the plug on PiWeb&#8217;s netblock. A slashdot comment gave me pause. After all, the message from Mr. Tange is on a website controlled by the Yes Men, and his contact details are publicly available. As of this writing, the PiWeb status page makes <a  href="http://translate.google.ca/translate?js=y&#038;prev=_t&#038;hl=en&#038;ie=UTF-8&#038;layout=1&#038;eotf=1&#038;u=http%3A%2F%2Fwww.pi.dk%2Fdriftstatus.php&#038;sl=da&#038;tl=en">no mention of related downtown</a>. Maybe the Yes Men took down their own site as a PR stunt. Here&#8217;s a paste from the disputed website.</p>
<blockquote>
<h1>Website suspended</h1>
<p>Serverloft blocked the IP-range for this server because of the   content of the client&#8217;s website and would only unblock the IP-range   if we suspended the website. The website was used in    <a  href="http://theyesmen.org/canada">a spoof by The Yes Men</a>.</p>
<p>Serverloft blocked the IP-range without a warrant and without   calling us and thus affecting servers hosting 4500 of our customers&#8217;   websites until we ourselves discovered the problem, and convinced   Serverloft to unblock. Serverloft <em>did</em> send us an email   explaining that they would not unblock the IP-range until the   websites were taken offline. The email was sent 5 minutes after they   cut of the access to the mail server, so we only received the email   after the 4500 websites were back online.</p>
<p>Convincing Serverloft that their systems had blocked access on   purpose was hard because Serverloft frontline support claimed that   all their systems were working fine and they therefore assumed that   the problem was a configuration problem on our server. They refused   to help troubleshooting the issue.</p>
<p>Serverloft could simply have called us and asked us to deal with the   situation. We would then have asked the Canadians for a warrant. If   the Canadians had shown us a warrant we would have taken down the site   immediately. As others have pointed out the Canadians could probably   just have gone through <a  href="http://www.cira.ca/cdrp">CIRA</a> and   have the domain suspended, which would not have affected any of the   other 4500 websites.</p>
<p>As we cannot go through every single page that our customers put on   their websites we anticipate a similar situation may arise again.   We have therefore asked Serverloft to revise their procedures so we   at least would get a phone call before they cut our connection. They   have so far refused to do so. They have answered:</p>
<blockquote><p>your net was blocked because of hosting phishing sites. I&#8217;ve     attached the information, we have, below our signature. I&#8217;m sorry,     but we cant call every costumer for abuse. In some cases we&#8217;ve to     respond very fast and have to block the net or server.</p></blockquote>
<p>While I appreciate Serverloft respond fast, it is no good if the   collateral damage is more than 1000 times as big. Had they called I   am sure we would have found an arrangement that would satisfy both   of us.</p>
<p>For more information: contact Ole Tange   &lt;ole@tange.dk&gt;</p></blockquote>
<p>The only other website I can find running on the listed IP is good-cop15.org, which is also the default vhost for that IP. It&#8217;s a site about the Copenhagen conference and links to the Yes Men hoax. Judging from the reverse lookup on the address it&#8217;s probably a virtual machine, quite possibly run by the Yes Men. It turns out that there is actually a Bruce Moore at CCIRC, but he wasn&#8217;t on duty when I called. Ec-gc.ca isn&#8217;t on any phishing list that I can find so that charge was overblown.</p>
<p>I don&#8217;t particularly like the Yes Men. They go from satire to impersonation. I&#8217;d have loved to see CIRA close down their ec-gc.ca domain but the domain dispute takes a long while. I can understand the letter from the CCIRC. The Yes Men website will do the most damage now, not in the time after CIRA is through with its dispute process. I find it very plausible that the Canadian Government would send such a request.</p>
<p>I also find it very plausible that Serverloft would issue a knee-jerk takedown. It&#8217;s relatively common for service providers to take down material immediately after a complain, especially among low margin resellers. From the WHT opinions, <a  href="http://www.webhostingtalk.com/showthread.php?t=748250&#038;highlight=serverloft">it sounds like that fits Serverloft</a>. If that IP address was limited to a virtual machine run by the Yes Men, and Serverloft was okay with risking their reputation by acting on the complaint rather than following up with PiWeb, they could have at least minimized damage by only nullrouting the VM&#8217;s IP address.</p>
<p>There&#8217;s enough negative material on WebHostingTalk that I wouldn&#8217;t want to use Serverloft regardless of the outcome of this case. I&#8217;d like to see some official statement from PiWeb on an official channel before I believe the details though.</p>
<p>Update Jan 2nd 2010: It looks like Ole Tange has updated his personal website with <a  href="http://ole.tange.dk/canadian-takedown/timeline">details of the takedown</a>.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a  href="http://www.nationalpost.com/story.html?id=2340101">Yes Men take credit for Canada climate hoax</a> (nationalpost.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://yro.slashdot.org/story/09/12/29/1921257/Canadian-Censorship-Takes-Down-4500-Sites?from=rss">Canadian Censorship Takes Down 4500 Sites</a> (yro.slashdot.org)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/6da5685c-21b7-48cd-91d9-931d53ed58e5/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=6da5685c-21b7-48cd-91d9-931d53ed58e5" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Finternet%2Fthe-ec-gc-spoof-is-toast-whodunnit%2F&#038;linkname=The%20EC-GC%20spoof%20is%20toast%2C%20whodunnit%3F"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=K8mHXIprmJY:-yz3JNMjgBA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=K8mHXIprmJY:-yz3JNMjgBA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=K8mHXIprmJY:-yz3JNMjgBA:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/K8mHXIprmJY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/internet/the-ec-gc-spoof-is-toast-whodunnit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/internet/the-ec-gc-spoof-is-toast-whodunnit/</feedburner:origLink></item>
		<item>
		<title>Block printing at the hacklab</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/DdgQonNOHVI/</link>
		<comments>http://imaddicted.ca/technology/block-printing-at-the-hacklab/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 21:00:23 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Artistic Printing]]></category>
		<category><![CDATA[hacklabto]]></category>
		<category><![CDATA[Laser etcher]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Publishing and Printing]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=603</guid>
		<description><![CDATA[Alex is here to lead us in a print workshop. My previous printing experiment failed with intaglio style printing. I meant to try imitation letterpress but didn&#8217;t get around to it. Alex is showing us block printing and she knows what she&#8217;s doing. Here I try to liveblog what she&#8217;s doing. It&#8217;s not going to [...]]]></description>
			<content:encoded><![CDATA[<p>Alex is here to lead us in a print workshop. My previous <a  class="zem_slink" title="Printing" rel="wikipedia" href="http://en.wikipedia.org/wiki/Printing">printing</a> experiment failed with intaglio style printing. I meant to try imitation letterpress but didn&#8217;t get around to it. Alex is showing us block printing and she knows what she&#8217;s doing. Here I try to liveblog what she&#8217;s doing. It&#8217;s not going to be complete so you&#8217;ll want to watch the video too, and probably <a  href="http://www.instructables.com/tag/?q=block+printing&#038;limit%3Atype%3Aid=on&#038;type%3Aid=on&#038;type%3Auser=on&#038;type%3Acomment=on&#038;type%3Agroup=on&#038;type%3AforumTopic=on&#038;type%3AforumTopic=on&#038;sort=none">search for block printing on instructables</a>.</p>
<p><a  href="http://imaddicted.ca/wp-content/PC290107.jpg" class="thickbox no_icon" rel="gallery-603" title="PC290107"><img class="alignright size-thumbnail wp-image-610" title="PC290107" src="http://imaddicted.ca/wp-content/PC290107-150x112.jpg" alt="PC290107" width="150" height="112" /></a>You can see her laying down markings in pencil. The marks are slightly bigger than the blocks we&#8217;ll be using. After she marks them, she uses a syringe to lay out drops of water along the lines. You can see in the photo that the water is beading. She fixes that by scoring over the lines so the water can absorb. After that, she can tear.</p>
<p><span id="more-603"></span></p>
<p>Once the paper is torn up she tosses them into a flat tupperware container that&#8217;s filled with water. Note that this paper actually has cotton in it, it&#8217;s not entirely wood pulp like printer paper. You soak it to get the sizing out, which is a starchy glue thing that keeps it stiff. Warm water works best for this. With that out you can use less force in order to press the paper and leave the indent, also known as the &#8220;kiss&#8221; of the block. The water also resists the oil so you get a cleaner print.</p>
<div id="attachment_619" class="wp-caption alignleft" style="width: 160px"><a  href="http://imaddicted.ca/wp-content/PC290113.jpg" class="thickbox no_icon" rel="gallery-603" title="Extender onto the paint"><img class="size-thumbnail wp-image-619" title="Extender onto the paint" src="http://imaddicted.ca/wp-content/PC290113-150x112.jpg" alt="The extender looks like runny caulk" width="150" height="112" /></a><p class="wp-caption-text">The extender looks like runny caulk</p></div>
<p>Now, she mixes the paint. Some tips: You don&#8217;t need printer&#8217;s ink, and you don&#8217;t need to use paint thinner or <a  class="zem_slink" title="Mineral spirits" rel="wikipedia" href="http://en.wikipedia.org/wiki/Mineral_spirits">mineral spirits</a> to clean up. In fact paint thinner or mineral spirits in the kitchen is a bad idea unless you want to be poisoned to death. We&#8217;re using oil based paint with an extender. It&#8217;s cheap. To clean up we&#8217;re using tough-on-grease palmolive. It&#8217;s also cheap. Also note that we&#8217;re using a dye based paint, not powder in an oil suspension. You can&#8217;t mix the two.  After that we&#8217;re using corn oil as a cheap alternative to printer&#8217;s medium. You might notice that cheap is a theme here. Mix and scrape and tweak to get the desired viscosity. Once that&#8217;s done it&#8217;s time to ink.</p>
<p>The next segments I&#8217;ve conveniently got available in video form! Apologies for the shakycam and poor framing. They were taken on impulse using my point and shoot camera. If we do another workshop we&#8217;ll bring a real video camera.</p>
<div id="attachment_621" class="wp-caption alignright" style="width: 160px"><a  href="http://imaddicted.ca/wp-content/PC290115.jpg" class="thickbox no_icon" rel="gallery-603" title="Rolling the ink"><img class="size-thumbnail wp-image-621 " title="Rolling the ink" src="http://imaddicted.ca/wp-content/PC290115-150x112.jpg" alt="Lucite roller used to ink the mandelbrot block" width="150" height="112" /></a><p class="wp-caption-text">Lucite roller used to ink the mandelbrot block</p></div>
<p>It&#8217;s best to use a roller than can go over the entire block at once and take as much time as you need for this part. Alex takes her time here, explaining that a lucite roller works, or you can use a rubber one. She explains that attention to detail is probably the most important part. You will get some ink splatter away from the raised edges. Leave that for a photocopier-like effect. She thinks that&#8217;s cool, like an underground zine. Sponge it off if you want it to look perfect. Not for Alex, though. If she wants perfect she uses a laser printer. It looks like this is where you get creative and can decide things like if you want to ink the edges of the block so that you get a border when you&#8217;re pressing down with the barren.</p>
<p>Finally, we&#8217;re ready to do the actual pressing. Alex takes some paper out of the soak tank and blots it from both sides with a towel. She leaves it damp. She lays the paper on the inked block, then takes her time and presses it with the barren several times with even of a pressure. Watch the end of the first video for a better explanation of what to do.</p>
<p>Alex demonstrates this in the <a  href="http://www.youtube.com/watch?v=pudWo4ubE7M">first video using a laser etched wood block</a>. The second part we do the same thing but <a  href="http://www.youtube.com/watch?v=Q3WrL23kSac">using a laser etched acrylic block</a>. The <a  href="http://www.youtube.com/watch?v=omuyiSDTnlI">last video explains cleanup</a>.</p>
<p>Cleanup without the solvents involves a lot of scraping. Alex would first scrape off most of the ink onto tin foil if she wants to use it later, but this time she uses newsprint since it&#8217;s going to be thrown out. Eventually she just can&#8217;t scrape off any more and she&#8217;s left with a fine film. She pours on some corn oil. This dilutes the oil paint and lets her spread it around again. She can polishes it off using crumpled newsprint. After that, she uses grease busting dish soap to clean the remnants off.</p>
<p>All of this is very cheap to do. The tube of extender cost $45 and is the most expensive part. The barren was ten to fifteen dollars at any art store. The lucite roller was about twenty dollars. The tube we used here is still more than a third full and it&#8217;s been used for seven years. The oil pant you can find on sales for cheap. The spreaders come in three and six packs from hardware stores and cost only a couple bucks. Best of all, this all can be done in a kitchen, just like the video shows.</p>
<p>Whew. And that&#8217;s the end of the liveblog attempt. Take a look at <a  href="http://www.flickr.com/photos/derspiny/sets/72157622817585163/">Owen&#8217;s photo set on flickr</a> and my gallery below. I have photos for the first few steps which Owen missed, and he&#8217;s got photos that I couldn&#8217;t take while I was recording video.</p>

<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290100/" title="PC290100"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290100-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290100" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290101/" title="PC290101"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290101-150x112.jpg" class="attachment-thumbnail" alt="Laying down cut lines" title="PC290101" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290102/" title="PC290102"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290102-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290102" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290103/" title="PC290103"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290103-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290103" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290105/" title="PC290105"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290105-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290105" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290106/" title="PC290106"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290106-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290106" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290107/" title="PC290107"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290107-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290107" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290108/" title="PC290108"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290108-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290108" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290109/" title="PC290109"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290109-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290109" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290110/" title="PC290110"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290110-150x112.jpg" class="attachment-thumbnail" alt="" title="PC290110" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290111/" title="Mixing the ink"><img width="112" height="150" src="http://imaddicted.ca/wp-content/PC290111-112x150.jpg" class="attachment-thumbnail" alt="This is actually oil based paint" title="Mixing the ink" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290112/" title="Mixing the ink"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290112-150x112.jpg" class="attachment-thumbnail" alt="" title="Mixing the ink" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290113/" title="Extender onto the paint"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290113-150x112.jpg" class="attachment-thumbnail" alt="The extender looks like runny caulk" title="Extender onto the paint" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290115/" title="Rolling the ink"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290115-150x112.jpg" class="attachment-thumbnail" alt="Lucite roller used to ink the mandelbrot block" title="Rolling the ink" /></a>
<a  href="http://imaddicted.ca/technology/block-printing-at-the-hacklab/attachment/pc290116/" title="Blue inked glass"><img width="150" height="112" src="http://imaddicted.ca/wp-content/PC290116-150x112.jpg" class="attachment-thumbnail" alt="This is the glass where we mixed the ink." title="Blue inked glass" /></a>

<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/f5ab5c92-1924-42da-8e4c-064a78df8f7d/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=f5ab5c92-1924-42da-8e4c-064a78df8f7d" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Ftechnology%2Fblock-printing-at-the-hacklab%2F&#038;linkname=Block%20printing%20at%20the%20hacklab"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=DdgQonNOHVI:zeQd0jIM3is:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=DdgQonNOHVI:zeQd0jIM3is:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=DdgQonNOHVI:zeQd0jIM3is:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/DdgQonNOHVI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/technology/block-printing-at-the-hacklab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/technology/block-printing-at-the-hacklab/</feedburner:origLink></item>
		<item>
		<title>Worthwhile vim tips</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/RVRFmX0_tqI/</link>
		<comments>http://imaddicted.ca/dev/worthwhile-vim-tips/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 07:12:46 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[dev]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=594</guid>
		<description><![CDATA[David Wolever is the man who made me productive in vim. Not from the ground up, mind you. I already knew the basics from my internship like how to swap between modes. I&#8217;d internalized that each string of keystrokes forms a command with a verb[0] and, if applicable, movement keys. It was enough to use [...]]]></description>
			<content:encoded><![CDATA[<p>David Wolever is the man who made me productive in vim. Not from the ground up, mind you. I already knew the basics from my internship like how to swap between modes. I&#8217;d internalized that each string of keystrokes forms a command with a verb<sup>[0]</sup> and, if applicable, movement keys. It was enough to use as a lowest common denominator if I had to edit a configuration file on a server but I was fooling myself by thinking I knew enough to use it as a <a  class="zem_slink" title="Integrated development environment" rel="wikipedia" href="http://en.wikipedia.org/wiki/Integrated_development_environment">development environment</a>.</p>
<p>Here he puts into writing <a  href="http://blog.codekills.net/archives/63-You-and-Your-Editor-The-Bare-Minimum-You-Should-Be-Doing-1-of-N.html">the same tips he gave me last year</a> when taking an operating systems course together. (It was the first time I had to use vim on a project of a considerable size.)<span id="more-594"></span></p>
<blockquote>
<div><span> </span></p>
<div>
<p>It&#8217;s come up a few times, so I&#8217;ll just go and post it here: the things, in no particular order, I believe to be the bare minimum you should be able to do while you&#8217;re editing source code (and how to do them in Vim): [Easily move between files, jump-to-definition, and search for/highlight the current word.]</p></div>
</div>
</blockquote>
<p>The first two tips on movement between files, and jumping to function definitions are the most important and have turned vim from small project editor (like, oh, university assignments excepting the operating systems course) to an editor that I can use on moderately sized projects. It doesn&#8217;t take that much practice to use the :tag command but I still fumble when using the hjkl movement keys. David was right to encourage me to use them over the arrow keys, though, as it&#8217;s the convention used in just about all of the vim commands.</p>
<p>In the same spirit here&#8217;s a couple things that I wish someone told me about while I was still an intern, using vim to edit config files because it was the only thing available on those Solaris boxes. They&#8217;re basic where David&#8217;s tips are intermediate, but they&#8217;re also essential:</p>
<h3>Know your movement keys</h3>
<p>And not just hjkl or the arrow keys. Vim likes to have upper and lowercase characters mean different things but it doesn&#8217;t always hold in the case of movement keys. Know that &#8220;b&#8221; goes to the beginning of a word and &#8220;e&#8221; goes to the end of the word. Meanwhile, &#8220;g&#8221; goes to the beginning of the document and &#8220;G&#8221; goes to the end of the document. These can be combined with commands like delete. The [t]ill movement key is especially helpful there, and I often find myself typing &#8220;dt(&#8221; which means &#8220;delete until the ( character.&#8221; Lastly, you can easily jump to a specific line number mentioned in the trace by prefixing it with a colon, so skip to line 13 with :13.</p>
<h3>Use set</h3>
<p>Even today half the time that I use vim it&#8217;s on someone else&#8217;s machine. The easiest way to turn on line numbering is to type &#8220;:set number&#8221; which will toggle it on. To toggle it off you use &#8220;:set nonumber&#8221;. There&#8217;s no meddling with someone&#8217;s .vimrc this way and it won&#8217;t persist, so no worries about upsetting anyone&#8217;s preferences.</p>
<p>Similarly, you can use set to change values of settings, like change the tabstop to five spaces with &#8220;:set tabstop=5&#8243;. This is especially useful when editing someone else&#8217;s python files where they use a different tabstop than you, and you don&#8217;t want to permanently change your tabstop but just want to edit their file.</p>
<h3>String search and replace</h3>
<p>Okay, now you&#8217;ve got line numbering on, so you can do a search and replace. It works based on the string search and replace regular expression. You have to specify a range, but there&#8217;s a convenient shorthand for a range of the entire file.</p>
<p>For lines 5-15 inclusive, you can replace &#8220;fizz&#8221; with &#8220;buzz&#8221; by:</p>
<p>:5,15 s/fizz/buzz/g</p>
<p>And to replace fizz with buzz on the entire file, use:</p>
<p>:% s/fizz/buzz/g</p>
<p>Using the regular expression here can be quite powerful, so if you&#8217;re not aware then I suggest you read up on it. If not, know that the s denotes string search and replace, the first thing between the slashes (fizz) is what you&#8217;re replacing, the second (buzz) is what you&#8217;re replacing it with, and the &#8220;g&#8221; means that you&#8217;re doing a &#8220;replace all.&#8221; Remove the trailing &#8220;g&#8221; if you only want to replace the first instance from the cursor.</p>
<p>And it&#8217;s not related to vim, but you can do a string search and replace on several files by using a command similar to:</p>
<p>perl -pi -e &#8220;s/string_to_replace/string_to_replace_with/g&#8221; *.conf</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a  href="http://zzzoot.blogspot.com/2009/07/emacs-mode-and-learning-modes.html">Emacs &#8216;mode&#8217; and learning `modes`</a> (zzzoot.blogspot.com)</li>
</ul>
<p><sup>[0]</sup> Wincent.com has <a  href="https://wincent.com/blog/10-minutes-with-vim">a writeup that includes similar observations</a>, and contrasts to <a  class="zem_slink" title="Emacs" rel="homepage" href="http://www.gnu.org/software/emacs/">Emacs</a>.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/1768ccac-669c-4e64-a95e-a5e7b975a90c/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=1768ccac-669c-4e64-a95e-a5e7b975a90c" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Fdev%2Fworthwhile-vim-tips%2F&#038;linkname=Worthwhile%20vim%20tips"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=RVRFmX0_tqI:f5_3Bml53vY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=RVRFmX0_tqI:f5_3Bml53vY:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=RVRFmX0_tqI:f5_3Bml53vY:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/RVRFmX0_tqI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/dev/worthwhile-vim-tips/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/dev/worthwhile-vim-tips/</feedburner:origLink></item>
		<item>
		<title>Fooling around with Wave</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/R0OGwAJqKwY/</link>
		<comments>http://imaddicted.ca/web/fooling-around-with-wave/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 03:09:08 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[LaTeX]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=589</guid>
		<description><![CDATA[I&#8217;ve received two e-mails from Google today. They&#8217;re both regarding Wave. First, there&#8217;s the e-mail saying that my name was put forth by a Googler (thank you to the chap from #hacklabto, you know who you are) for a developer sandbox account and please fill out this form with your desired usernames. The next was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received two e-mails from Google today. They&#8217;re both regarding Wave. First, there&#8217;s the e-mail saying that my name was put forth by a Googler (thank you to the chap from #hacklabto, you know who you are) for a developer sandbox account and please fill out this form with your desired usernames. The next was saying that I was accepted into the preview. Sorry, my invites are already spoken for.</p>
<p>After a bit of play with Wave my first instinct is that it&#8217;ll be great for collaborating on taking class notes. The problem is that most of my class notes involve pretty big formulas. The solution? I&#8217;m writing a gadget that takes in <a  class="zem_slink" title="LaTeX" rel="wikipedia" href="http://en.wikipedia.org/wiki/LaTeX">LaTeX</a> code and returns a PNG suitable as a blip. I&#8217;ll be using <a  href="http://www.mayer.dial.pipex.com/tex.htm#latexrender">LatexRender</a> for that part. The downside that I can immediately see is that most of my lecture halls don&#8217;t have wifi signal, but maybe releasing the gadget will be useful to someone out there.</p>
<p><span id="more-589"></span></p>
<p>I don&#8217;t yet have my developer sandbox account but I&#8217;m working with the <a  href="http://code.google.com/apis/wave/extensions/gadgets/guide.html">Wave gadgets tutorial</a>. It looks like an AJAX-enabled textbox will do the trick. The state handler will check if there&#8217;s a pre-rendered PNG; if so it&#8217;ll display that, and if not it&#8217;ll query the PHP script. I&#8217;m hoping that I&#8217;ll be able to instead replace the gadget with the static PNG render once the editing of the Wave is done but I haven&#8217;t discovered the hook for that yet. I also hope that the state handler will be called immediately after init, and I think that&#8217;s the case, but judging from the documentation I&#8217;m not entirely sure.</p>
<p>I&#8217;m hoping to have a simple version of the gadget that just takes LaTeX within two weeks of getting my sandbox. The pipe dream feature would be a WYSIWYG editor that outputs LaTeX, so for the foreseeable future I&#8217;ll just be copying and pasting from LyX.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a  href="http://www.techcrunch.com/2009/10/09/google-wave-is-easier-to-understand-than/">Google Wave Is Easier To Understand Than&#8230;</a> (techcrunch.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://www.techcrunch.com/2009/10/13/google-waves-little-secret-it-already-works-on-the-iphone/">Google Wave&#8217;s Little Secret: It Already Works On The iPhone</a> (techcrunch.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://www.techcrunch.com/2009/09/30/google-wave-there-will-be-backlash/">Google Wave: There Will Be Backlash</a> (techcrunch.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://www.jeffisageek.net/blog/2009/09/29/google-wave-wednesday/">Google Wave Wednesday</a> (jeffisageek.net)</li>
<li class="zemanta-article-ul-li"><a  href="http://jessenewhart.com/google/why-you-havent-got-you-google-wave-invite-yet/">Why You Haven&#8217;t Got You Google Wave Invite Yet</a> (jessenewhart.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/bc744816-48c5-41be-b41b-185275878275/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=bc744816-48c5-41be-b41b-185275878275" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Fweb%2Ffooling-around-with-wave%2F&#038;linkname=Fooling%20around%20with%20Wave"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=R0OGwAJqKwY:RTIRf19JIxA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=R0OGwAJqKwY:RTIRf19JIxA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=R0OGwAJqKwY:RTIRf19JIxA:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/R0OGwAJqKwY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/web/fooling-around-with-wave/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/web/fooling-around-with-wave/</feedburner:origLink></item>
		<item>
		<title>An experiment in printing</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/DSmg7tI_F8g/</link>
		<comments>http://imaddicted.ca/technology/an-experiment-in-printing/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 07:06:09 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[Etching]]></category>
		<category><![CDATA[hacklab]]></category>
		<category><![CDATA[Laser]]></category>
		<category><![CDATA[Letterpress printing]]></category>
		<category><![CDATA[Printing]]></category>
		<category><![CDATA[Publishing and Printing]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=584</guid>
		<description><![CDATA[I was sitting in my book history lecture and looking at a picture of a compositor putting his type into a galley. Later, we watched a video of John Kristensen talking up letterpress. It shows him laying out illumination by hand. It also shows his linotype, but he still spent a fair bit of time [...]]]></description>
			<content:encoded><![CDATA[<p>I was sitting in my book history lecture and looking at a picture of a <a  title="Compositing" rel="wikipedia" href="http://en.wikipedia.org/wiki/Typesetting">compositor</a> putting his type into a galley. Later, we watched a <a  href="http://www.youtube.com/watch?v=Iv69kB_e9KY">video of John Kristensen talking up letterpress</a>. It shows him laying out illumination by hand. It also shows his <a  href="http://en.wikipedia.org/wiki/Linotype_machine">linotype</a>, but he still spent a fair bit of time laying out type.</p>
<p>John got me interested in letterpress. I don&#8217;t think I&#8217;ve seen a letterpress book in person yet, and though I have opportunity to in the Fisher Rare Book Library, I figured it&#8217;d be more fun to make my own little booklet. I don&#8217;t have a linotype, but I do have access to a 500 dpi laser etcher. I&#8217;m sure it won&#8217;t meet John&#8217;s standards but I&#8217;ve decided to attempt to make a couple printing plates out of acrylic.</p>
<p><span id="more-584"></span></p>
<p>Book history buffs might immediately think of <a  href="http://en.wikipedia.org/wiki/Intaglio_%28printmaking%29">intaglio printing</a>. While it&#8217;d be easier to etch the forms for intaglio printing, I&#8217;m a bit worried that it&#8217;ll be a lot harder in the long run. It&#8217;ll certainly mean I&#8217;ve got more work since I need to clean excess ink off the plate. I&#8217;m not sure if it works with straight-down pressure rather than a roller and, if it does, it looks like it&#8217;ll need more than your standard <a  class="zem_slink" title="Movable type" rel="wikipedia" href="http://en.wikipedia.org/wiki/Movable_type">movable type</a> press. I think a roller is more likely to break off parts of the acrylic than pressing right down; pieces like the circle inside an engraved &#8220;a&#8221; would be easy to snap. The worst part is it&#8217;s impossible to accurately control the depth of the cut in our laser etcher, there might be a problem with the grooves or maybe it&#8217;ll be too deep or too shallow.</p>
<p>Instead I&#8217;ll try to carve out the equivalent to a movable type form, burning down the majority of the acrylic. The downside here is running the laser that long. A single plate will take ages, and I worry about the heat and exhaust. There&#8217;s still a chance that the acrylic will just break when put through the press.</p>
<p>I&#8217;m going to make a small plate for each type of printing and give it a go before I make what&#8217;ll likely be a pair of plates for a quarto print.</p>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a  href="http://www.weprintcolor.com/paper-and-ink/paper-ink-summary.php">Ink and Paper- A Pressman&#8217;s Perspective</a> (weprintcolor.com)</li>
<li class="zemanta-article-ul-li"><a  href="http://stirrup-queens.blogspot.com/2009/09/in-valley-of-etchers-one-armed-man-is.html">In the Valley of the Etchers, the One Armed Man is King</a> (stirrup-queens.blogspot.com)</li>
</ul>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/007438b8-326c-45bb-b3b9-48b56b5b6693/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=007438b8-326c-45bb-b3b9-48b56b5b6693" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Ftechnology%2Fan-experiment-in-printing%2F&#038;linkname=An%20experiment%20in%20printing"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=DSmg7tI_F8g:8xCuyCctfAs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=DSmg7tI_F8g:8xCuyCctfAs:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=DSmg7tI_F8g:8xCuyCctfAs:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/DSmg7tI_F8g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/technology/an-experiment-in-printing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/technology/an-experiment-in-printing/</feedburner:origLink></item>
		<item>
		<title>So long SugarSync, hello Dropbox</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/ubhND1NW0BQ/</link>
		<comments>http://imaddicted.ca/technology/so-long-sugarsync-hello-dropbox/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 02:41:32 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[SugarSync]]></category>
		<category><![CDATA[Windows Mobile]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/technology/so-long-sugarsync-hello-dropbox/</guid>
		<description><![CDATA[I&#8217;ve had some problems with SugarSync. My Leopard install died, and I also reformatted my Windows 7 machine to go from RC1 to the copy of RTM I received through MSDNAA. Now I can&#8217;t add my &#8220;new&#8221; machines to SugarSync because I&#8217;m at my two machine limit. Worse still, I can&#8217;t have my &#8220;new&#8221; machine [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had some problems with SugarSync. My Leopard install died, and I also reformatted my Windows 7 machine to go from RC1 to the copy of RTM I received through MSDNAA. Now I can&#8217;t add my &#8220;new&#8221; machines to SugarSync because I&#8217;m at my two machine limit. Worse still, I can&#8217;t have my &#8220;new&#8221; machine take over and restore from their synced folders automatically. If I want to get all that stuff back I have to download them one by one over the web front end. I&#8217;d be better off if I rsync&#8217;d everything to one of my servers.</p>
<p>I put in a support request on the forum but got no reply. I could put in a support ticket, but I won&#8217;t bother. I&#8217;m just going to <a  href="https://www.getdropbox.com/referrals/NTIxNzk4Mjg5">switch to dropbox</a>.</p>
<p>What&#8217;s that you say? &#8220;But dropbox doesn&#8217;t have Windows Mobile support!&#8221; Well, I&#8217;m not convinced that SugarSync has it either. I installed their client and it crashed on launch. No error message, it just dies. I put in a support request and I&#8217;m told to reinstall. Okay, I use Remove programs, delete the CAB file from my downloads, clear my browser cache, redownload and reinstall. The issue persists. I reply to the ticket, and I&#8217;m told to reinstall. I use Remove programs, dig through the registry with Resco Registry Editor, delete any key that looks related, delete the CAB file, clear my cache, redownload and reinstall. The issue persists. I reply to the ticket.</p>
<p><span id="more-582"></span></p>
<p>What do you think I&#8217;m told in response? Yeah, reinstall.</p>
<p>SugarSync now has no advantages to Dropbox for me. I can see how the Magic Briefcase is useful for recovering files after a crash, but not the machine specific folders, and I might want to keep backups of folders without sharing them over all computers. I&#8217;ve already seen that their support is poor, so it&#8217;s time to try the other guys.</p>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Ftechnology%2Fso-long-sugarsync-hello-dropbox%2F&#038;linkname=So%20long%20SugarSync%2C%20hello%20Dropbox"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=ubhND1NW0BQ:Ukl0DHu3m7o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=ubhND1NW0BQ:Ukl0DHu3m7o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=ubhND1NW0BQ:Ukl0DHu3m7o:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/ubhND1NW0BQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/technology/so-long-sugarsync-hello-dropbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/technology/so-long-sugarsync-hello-dropbox/</feedburner:origLink></item>
		<item>
		<title>What I did Friday night (or: I might be a geek)</title>
		<link>http://feedproxy.google.com/~r/imaddicted/~3/QzWyy08XsHQ/</link>
		<comments>http://imaddicted.ca/featured-articles/what-i-did-friday-night/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 21:34:43 +0000</pubDate>
		<dc:creator>lance_</dc:creator>
				<category><![CDATA[Featured Articles]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[Internet Relay Chat]]></category>
		<category><![CDATA[Internet Relay Chat bot]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[Microcontroller]]></category>

		<guid isPermaLink="false">http://imaddicted.ca/?p=566</guid>
		<description><![CDATA[I&#8217;ve recently picked up an Arduino with an ethernet shield. I didn&#8217;t have good reason to, and I probably shouldn&#8217;t have paid as much as I did, but it sure is a fun toy. I say that as someone who&#8217;s played around a little with AVRs too. I bought my kit on Friday night. I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently picked up an <a  class="zem_slink" title="Arduino" rel="homepage" href="http://www.arduino.cc">Arduino</a> with an ethernet shield. I didn&#8217;t have good reason to, and I probably shouldn&#8217;t have paid as much as I did, but it sure is a fun toy. I say that as someone who&#8217;s played around a little with AVRs too. I bought my kit on Friday night. I sat down, followed the install guide, and before I knew it the sun was rising and I had written an <a  class="zem_slink" title="Internet Relay Chat bot" rel="wikipedia" href="http://en.wikipedia.org/wiki/Internet_Relay_Chat_bot">IRC bot</a> that connects via ethernet and doesn&#8217;t need a computer at all.</p>
<p>I learned about AVRs in my Computer Organization course, CSC 258. It&#8217;s one of my favourites because we had a great instructor, Corey Manders. I won&#8217;t be able to forget the first day of class. He admitted that he already set the course grading scheme and couldn&#8217;t change the weighting of labs, but he still wanted us to do nine labs instead of the three or four our course usually contains. I&#8217;m glad we voted yes. He also pulled some strings to get us, the lowly computer science students, access to an engineering lab with FPGA development boards and awesome oscilloscopes. We wound up doing three labs in TTL gates, three labs in <a  class="zem_slink" title="Field-programmable gate array" rel="wikipedia" href="http://en.wikipedia.org/wiki/Field-programmable_gate_array">FPGAs</a>, and three labs in AVRs. We also had an assignment in gate logic and another <a  class="zem_slink" title="Atmel AVR" rel="wikipedia" href="http://en.wikipedia.org/wiki/Atmel_AVR">AVR</a> coding.<span id="more-566"></span></p>
<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 310px;">
<dt class="wp-caption-dt"><a  href="http://commons.wikipedia.org/wiki/Image:ATmega8_01_Pengo.jpg" class="thickbox no_icon" rel="gallery-566" title="Atmel AVR ATmega8 PDIP"><img title="Atmel AVR ATmega8 PDIP" src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/ATmega8_01_Pengo.jpg/300px-ATmega8_01_Pengo.jpg" alt="Atmel AVR ATmega8 PDIP" width="300" height="193" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a  href="http://commons.wikipedia.org/wiki/Image:ATmega8_01_Pengo.jpg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>I wound up coding a simple game, a security system, sophisticated blinkie and interrupt triggered serial communication; all in assembler on AVRs. It was good prep for working in C on my own later. I only dabbled in it. The summer after CSC 258 I decided that I wanted to get my AVR on the internet. There were plans out there that required you to build your own board using an ethernet controller with an SPI interface, but you had to load in your own TCP stack which took up most of your RAM. Maybe I could have a second AVR just for ethernet? There was another expensive box that I handle sockets for me, and maybe I could use wireless over SDIO, or any number of ideas that required circuit building skills that I didn&#8217;t have. Eventually I twisted my programming cable in the wrong way, the solder broke, and I forgot all about it.</p>
<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignleft" style="width: 310px;">
<dt class="wp-caption-dt"><a  href="http://commons.wikipedia.org/wiki/Image:Bloor_and_avenue.jpg" class="thickbox no_icon" rel="gallery-566" title="Nuit Blanche Toronto, in front of the Royal On..."><img title="Nuit Blanche Toronto, in front of the Royal On..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Bloor_and_avenue.jpg/300px-Bloor_and_avenue.jpg" alt="Nuit Blanche Toronto, in front of the Royal On..." width="300" height="225" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a  href="http://commons.wikipedia.org/wiki/Image:Bloor_and_avenue.jpg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>Fast forward to last Friday. I had volunteered to staff the desk at Hacklab.to to keep it open until 4am for Nuit Blanche. I wanted something to do so I hit Creatron to buy some LEDs, capacitors and transistors to make blinkies. Right below the glass on the checkout counter was an array of gadgetry from Arduino and Sparkfun. Temptation was too much this time. I broke down and bought the Arduino kit with an ethernet shield.</p>
<p>The Arduino itself was $31.75. It hurt to pay that much for what I knew contained a microcontroller that was, at most, worth two dollars. The premium I paid was for the board which contained a USB to serial adapter, software to program using it, several LEDs and a button. Pretty paltry for a development board, but it&#8217;s there. Okay, there&#8217;s one more thing that they add that makes the premium worth it: The headers for the shields. These shields mean I can skip all the work of building in extensions like ethernet support, or bluetooth, or any number of complicated addons. The ethernet shield cost $67, which stung a bit, but I knew that the ethernet controller on the board alone was probably worth $50. Plus, I wouldn&#8217;t be capable of building the thing myself.</p>
<p>On the same Friday night I got I&#8217;ve managed to write a very basic IRC bot that can maintain a connection and listen to commands. It differs from the other IRC bots out there because it reads line by line, not character by character, then tokenizes the string. Right now I have a very simple branching table which is good enough.</p>
<p>My plans are to first merge it with the hacklab.to toilet code so that we can revive the IRC bot. Previously it would connect, spit a message, and then disconnect. It got a little spammy. My version will maintain the connection and spit out a message and include rate limiting.</p>
<p>For the curious, here&#8217;s the blocking readclrf() function that I wrote, as well as the code that keeps the simple bot going. In its present form I think it&#8217;ll eventually crash, I need to properly allocate and free the memory when tokenizing. Readclrf() should be fine though.</p>
<div class="codecolorer-container cpp vibrant" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br /></div></td><td><div class="cpp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0000ff;">void</span> loop<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>client.<span style="color: #007788;">available</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">char</span> c<span style="color: #008000;">&#91;</span>256<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; readcrlf<span style="color: #008000;">&#40;</span>c, 256<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">//Serial.println(c); // debug</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// tokenize the string, enter FSM</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// maybe generate an interrupt on PING?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>msg_tok <span style="color: #000080;">=</span> <span style="color: #0000dd;">strtok</span><span style="color: #008000;">&#40;</span>c, <span style="color: #FF0000;">&quot; &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>msg_toks<span style="color: #008000;">&#91;</span>6<span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// TODO: allocate this properly later</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span>msg_tok <span style="color: #000040;">!</span><span style="color: #000080;">=</span> <span style="color: #0000ff;">NULL</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000dd;">strcpy</span><span style="color: #008000;">&#40;</span>msg_toks<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span>, msg_tok<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">++</span>i <span style="color: #000040;">&amp;</span>gt<span style="color: #008080;">;</span><span style="color: #000080;">=</span> 6<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">break</span><span style="color: #008080;">;</span> <span style="color: #666666;">// :nick!user@host #channel :command arg1 arg2</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;msg_tok <span style="color: #000080;">=</span> <span style="color: #0000dd;">strtok</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">NULL</span>, <span style="color: #FF0000;">&quot; &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>msg_toks<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>,<span style="color: #FF0000;">&quot;PING&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// it's a ping, PONG IT BACK</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;client.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;PONG &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;client.<span style="color: #007788;">println</span><span style="color: #008000;">&#40;</span>msg_toks<span style="color: #008000;">&#91;</span>1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Serial.<span style="color: #007788;">print</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;Ping? Pong! &quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Serial.<span style="color: #007788;">println</span><span style="color: #008000;">&#40;</span>msg_toks<span style="color: #008000;">&#91;</span>1<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666;">// Command loop checks all tokens</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> j<span style="color: #008080;">;</span> j <span style="color: #000040;">&amp;</span>lt<span style="color: #008080;">;</span> <span style="color: #0000dd;">6</span><span style="color: #008080;">;</span> j<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>msg_toks<span style="color: #008000;">&#91;</span>j<span style="color: #008000;">&#93;</span>, <span style="color: #FF0000;">&quot;:quit&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client.<span style="color: #007788;">println</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;QUIT&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// add verification</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666;">// add port reading and setting commands here</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>client.<span style="color: #007788;">connected</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Serial.<span style="color: #007788;">println</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Serial.<span style="color: #007788;">println</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;disconnecting.&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client.<span style="color: #007788;">stop</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #008080;">;;</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #008000;">&#125;</span><br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #0000ff;">int</span> readcrlf<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>buf, <span style="color: #0000ff;">int</span> max<span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000dd;">memset</span><span style="color: #008000;">&#40;</span>buf, 0, max<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">int</span> b<span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">int</span> i <span style="color: #000080;">=</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">while</span> <span style="color: #008000;">&#40;</span>client.<span style="color: #007788;">connected</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b <span style="color: #000080;">=</span> client.<span style="color: #007788;">read</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>b <span style="color: #000080;">==</span> <span style="color: #000040;">-</span>1<span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">continue</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>i <span style="color: #000040;">&amp;</span>gt<span style="color: #008080;">;</span><span style="color: #000080;">=</span> max<span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>b <span style="color: #000080;">==</span> <span style="color: #FF0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #008000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">continue</span><span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>b <span style="color: #000080;">==</span> <span style="color: #FF0000;">'<span style="color: #000099; font-weight: bold;">\r</span>'</span><span style="color: #008000;">&#41;</span> <span style="color: #000040;">||</span> <span style="color: #008000;">&#40;</span>b <span style="color: #000080;">==</span> 0<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">break</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; buf<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span> <span style="color: #000080;">=</span> b<span style="color: #008080;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i<span style="color: #000040;">++</span><span style="color: #008080;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">return</span> i<span style="color: #008080;">;</span><br />
<span style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a  class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/2c395a3b-f50b-4767-ac40-691768eb7c23/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_c.png?x-id=2c395a3b-f50b-4767-ac40-691768eb7c23" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<a  class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fimaddicted.ca%2Ffeatured-articles%2Fwhat-i-did-friday-night%2F&#038;linkname=What%20I%20did%20Friday%20night%20%28or%3A%20I%20might%20be%20a%20geek%29"><img src="http://imaddicted.ca/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/imaddicted?a=QzWyy08XsHQ:aDj_giJfa-w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/imaddicted?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/imaddicted?a=QzWyy08XsHQ:aDj_giJfa-w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/imaddicted?i=QzWyy08XsHQ:aDj_giJfa-w:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/imaddicted/~4/QzWyy08XsHQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://imaddicted.ca/featured-articles/what-i-did-friday-night/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://imaddicted.ca/featured-articles/what-i-did-friday-night/</feedburner:origLink></item>
	</channel>
</rss>
