<?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>Arek Bochinski</title>
	<atom:link href="http://arekzb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://arekzb.wordpress.com</link>
	<description>Aspicio.meum by Arek Bochinski</description>
	<lastBuildDate>Tue, 08 Nov 2011 17:09:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='arekzb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Arek Bochinski</title>
		<link>http://arekzb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://arekzb.wordpress.com/osd.xml" title="Arek Bochinski" />
	<atom:link rel='hub' href='http://arekzb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Corona SDK &#8211; build automation</title>
		<link>http://arekzb.wordpress.com/2011/10/03/corona-sdk-build-automation/</link>
		<comments>http://arekzb.wordpress.com/2011/10/03/corona-sdk-build-automation/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 12:45:53 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[corona]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://arekzb.wordpress.com/?p=47</guid>
		<description><![CDATA[In my experience, Corona SDK build process has been a source of pain. It feels like it has been an afterthought thrown in on top of the authorization and remote build system. For those that don&#8217;t know, building the code takes place on Ansca&#8217;s servers and the process follows something along the lines of: Edit and save [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=47&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my experience, <a title="http://www.anscamobile.com/corona/" href="http://www.anscamobile.com/corona/" target="_blank">Corona</a> SDK build process has been a source of pain. It feels like it has been an afterthought thrown in on top of the authorization and remote build system. For those that don&#8217;t know, building the code takes place on Ansca&#8217;s servers and the process follows something along the lines of:</p>
<ol>
<li>Edit and save the source files</li>
<li>Launch or keep the Corona simulator open</li>
<li>Go to File -&gt; Build -&gt; Android (or press , Cmd + shift + b)</li>
<li>Fill in Application name, Version, Package, Keystore, Key alias and save path settings</li>
<li>Press build button</li>
</ol>
<p>Repeat builds do save some time by remembering typed in values, but it&#8217;s a far cry from a one click build I would like have. Ideally, the application should be launched on the device at the end of the sequence.</p>
<p>To achieve this, I had to resort to using <a title="http://sikuli.org/" href="http://sikuli.org/" target="_blank">Sikuli</a>GUI automation and little bit of Python scripting. Following gist contains the code: <a title="https://gist.github.com/1257755" href="https://gist.github.com/1257755" target="_blank">https://gist.github.com/1257755</a> . Variables in the beginning point to the location of your project, terminal application and so on. Application specific data like name and version should be set there as well. The script will use Android adb tool to install and run the application at the end.</p>
<p>Paths inside the script are OSX specific, but changing them to work on Windows should be very easy.</p>
<p>What you will need: Python, Sikuli and the above gist. Here is a ready zip archive of the script and screen captures required to make it work: <a title="http://bayfiles.com/file/1613/LFNkUY/corona.skl" href="http://bayfiles.com/file/1613/LFNkUY/corona.skl" target="_blank">http://bayfiles.com/file/1613/LFNkUY/corona.skl</a></p>
<p>Here it is in action building the sample Clock application:</p>
<p>&nbsp;<br />
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/29936594' width='450' height='276' frameborder='0'></iframe></div>
<p><a href="http://vimeo.com/29936594">Corona SDK &#8211; build automation</a> from <a href="http://vimeo.com/user4149984">Arek Bochinski</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=47&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2011/10/03/corona-sdk-build-automation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>DropFuse &#8211; a Dropbox.com file-system</title>
		<link>http://arekzb.wordpress.com/2010/06/26/dropfuse-a-dropbox-com-filesystem/</link>
		<comments>http://arekzb.wordpress.com/2010/06/26/dropfuse-a-dropbox-com-filesystem/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 03:56:54 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=41</guid>
		<description><![CDATA[DropFuse is a FUSE based file-system for Dropbox.com linked folders. Once you have a link to a shared folder, use it with this software to grab the files to your local storage by using a regular file browser. Source code is located here http://github.com/arekzb/dropfuse How-to video: DropFuse How-to from Arek Bochinski on Vimeo.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=41&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>DropFuse is a FUSE based file-system for Dropbox.com linked folders.</p>
<p>Once you have a link to a shared folder, use it with this software to grab the files to your local</p>
<p>storage by using a regular file browser.</p>
<p>Source code is located here <a href="http://github.com/arekzb/dropfuse" target="_self">http://github.com/arekzb/dropfuse</a></p>
<p>How-to video:</p>
<p><div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/12915805' width='450' height='326' frameborder='0'></iframe></div>
<p><a href="http://vimeo.com/12915805">DropFuse How-to</a> from <a href="http://vimeo.com/user4149984">Arek Bochinski</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=41&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2010/06/26/dropfuse-a-dropbox-com-filesystem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>Return of the Banff Squirrel</title>
		<link>http://arekzb.wordpress.com/2009/08/14/return-of-the-banff-squirrel/</link>
		<comments>http://arekzb.wordpress.com/2009/08/14/return-of-the-banff-squirrel/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 14:56:02 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[Free time]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=32</guid>
		<description><![CDATA[A Photo Bomber&#8217;s joyride, Located at http://zenebo.com/sq.php is a small script I created to copy and paste the famous by now Banff Squirrel. You can view a test for overlaying the squirrel on Google by clicking here: http://zenebo.com/sq.php?http://google.com The initial news broke out on http://reddit.com with us making the script for overlaying The Squirrel on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=32&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A Photo Bomber&#8217;s joyride,</p>
<p>Located at <a title="http://zenebo.com/sq.php" href="http://zenebo.com/sq.php" target="_blank">http://zenebo.com/sq.php</a> is a small script I created to copy and paste the famous by now Banff Squirrel.</p>
<p>You can view a test for overlaying the squirrel on Google by clicking here: <a title="http://zenebo.com/sq.php?http://google.com" href="http://zenebo.com/sq.php?http://google.com" target="_blank">http://zenebo.com/sq.php?http://google.com</a></p>
<p>The initial news broke out on <a title="http://reddit.com" href="http://reddit.com" target="_blank">http://reddit.com</a> with us making the script for overlaying The Squirrel on any website by the end of the day. What happened next was a rollercoaster of traffic and squirrel buzz. We had a 4,000 % traffic spike as a result of increased demand for Squirrel LOLs . Other websites have used our image crop, located here <a title="http://zenebo.com/images/squirrel.png" href="http://zenebo.com/images/squirrel.png" target="_blank">http://zenebo.com/images/squirrel.png</a> or simply followed suit in joining this fun activity of Photo Bombing a website.</p>
<p>Overall, we are happy to provide a few laughs and please remember to watch out for squirrels when you set that photo camera on a timer and strike a pose.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=32&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2009/08/14/return-of-the-banff-squirrel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>Esenthel Engine</title>
		<link>http://arekzb.wordpress.com/2009/07/13/esenthel-engine/</link>
		<comments>http://arekzb.wordpress.com/2009/07/13/esenthel-engine/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 03:37:42 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[3D and Game Development]]></category>
		<category><![CDATA[C and C++]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[Demo]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[OpenGL]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=19</guid>
		<description><![CDATA[Esenthel is an overachieving project that delivers a punch with minor developer effort. After trying out many game engines and rendering engines, I have learned to approach each with a certain grain of skepticism. Not because of the lackluster quality of most cheap, err. free engines. It&#8217;s a defense mechanism we engage in when learning [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=19&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Esenthel is an overachieving project that delivers a punch with minor developer effort. After trying out many game engines and rendering engines, I have learned to approach each with a certain grain of skepticism. Not because of the lackluster quality of most cheap, err. free engines. It&#8217;s a defense mechanism we engage in when learning principles of 3D, game development and overall story boarding is paramount to propping up a limping or incomplete development environment.</p>
<p>I have to say , with utmost respect , that it is by far one of my favorite pieces of software I have tried this year.</p>
<p>It delivers on most promises, encourages code centric, instead of drag-and-drop development and does it with ease.</p>
<p>I am getting ready to deliver a small demonstration game and post the code live.</p>
<p>Until then, check out more of the <a title="Esenthel Engine" href="http://www.esenthel.com" target="_blank">Esenthel Engine here</a>.</p>
<p>Other mentions go out to <a title="http://www.ogre3d.org/" href="http://www.ogre3d.org/" target="_blank">OGRE Graphics Engine</a> , <a title="http://www.terathon.com/c4engine/index.php" href="http://www.terathon.com/c4engine/index.php" target="_blank">C4 Engine</a> , <a title="http://irrlicht.sourceforge.net/" href="http://irrlicht.sourceforge.net/" target="_blank">Irrlicht Engine</a> , <a title="http://unity3d.com/" href="http://unity3d.com/" target="_blank">Unity 3D</a> as some of many tried and tested , very good alternatives that almost suit my development style.</p>
<p>I would like to add that Valve Software&#8217;s <a title="http://source.valvesoftware.com/" href="http://source.valvesoftware.com/" target="_blank">Source Engine</a> is still my favorite despite having only modded with it.</p>
<p>Overall, I feel very comfortable thinking grande for the first time when writing a non-mod . <a title="http://www.esenthel.com" href="http://www.esenthel.com" target="_blank">Esenthel</a> might bring my mini-game idea to fruition.</p>
<p>Cheers,</p>
<p>Arek Bochinski</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=19&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2009/07/13/esenthel-engine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>Reverse complement FASTA benchmark</title>
		<link>http://arekzb.wordpress.com/2008/05/08/reverse-complement-of-fasta-bechmark/</link>
		<comments>http://arekzb.wordpress.com/2008/05/08/reverse-complement-of-fasta-bechmark/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:31:40 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[FASTA]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=17</guid>
		<description><![CDATA[FASTA format is used in bioinformatics to describe peptide sequences or nucleic acid sequences. One of the benchmarks at the computer languages game requires that a program parse a &#8216;stdin&#8217; redirected input of these FASTA formated sequences and print the content of the sequence in reverse order. Each character in the sequence should also be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=17&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>FASTA </strong>format is used in bioinformatics to describe peptide sequences or nucleic acid sequences.</p>
<p>One of the benchmarks at the computer languages game requires that a program parse a &#8216;stdin&#8217; redirected input of these <strong>FASTA </strong>formated sequences and print the content of the sequence in reverse order. Each character in the sequence should also be complemented according to this translation table:</p>
<pre>code  meaning   complement

A    A                   T
C    C                   G
G    G                   C
T/U  T                   A
M    A or C              K
R    A or G              Y
W    A or T              W
S    C or G              S
Y    C or T              R
K    G or T              M
V    A or C or G         B
H    A or C or T         D
D    A or G or T         H
B    C or G or T         V
N    G or A or T or C    N</pre>
<p><strong>Headers</strong></p>
<p>Each sequence contains a header with an id and description. These lines are printed &#8216;as is&#8217; .</p>
<p><strong>Challenges</strong></p>
<ul>
<li>String reversal</li>
<li>Translation table substitution</li>
<li>Input handling and memory allocation</li>
</ul>
<p><strong>String Reversal</strong></p>
<p>Sequences are reversed using a bitwise XOR and without using a temporary character or string buffers.</p>
<p>Operations are performed in a loop where <em>forward</em> is the first index and <em>end</em> is the last index in the sequence.</p>
<p>buffer[forward]^=buffer[end];<br />
buffer[end]^=buffer[forward];<br />
buffer[forward]^=buffer[end];</p>
<p><strong>Translation table substitution</strong></p>
<p>A small character array of complement values is created and accessed with the integer value of the source character matching to arrays index. For example:</p>
<p>buffer[end]=FtoCOMP[buffer[end]];</p>
<p>Buffer at index <em><strong>end</strong></em> will receive a character at index <em><strong>&#8216;buffer[end]</strong></em>&#8216; from translation table array <em><strong>FtoCOMP</strong></em>. Index &#8216;buffer[end]&#8216; translated to an integer , will point to a desired complement . This speeds up the process of substitution and allows for very fast array index notation.</p>
<p><strong>Input handling</strong></p>
<p>The requirement to handle input one line at a time corresponds quite well to the translation procedure. In pseudo-code,</p>
<ul>
<li>process one line at a time</li>
<li>for each sequence , print header line, reverse the sequence, translate it into its complement and print it out</li>
</ul>
<p>Only one buffer is used as a destination for reading input. Beginning pointer where each line is placed is dictated by moving a pointer through a character array. Once a line is read in, we check if it is the last line in a sequence by peeking into the input stream. If it is , it is processed according to above instructions and beginning pointer where the next line is placed is reset to 0.</p>
<p><strong>These functions are called for each line N in the input stream:</strong></p>
<p>fgets_unlocked, fgetc_unlocked.</p>
<p>These functions are called for each line that&#8217;s not a header line:</p>
<p>ungetc, strlen.</p>
<p>Other functions are called only at the end of a sequence and do not approach N runtime. This version written in C language has been compiled and tested using kernel 2.6.24 with GCC 4.2.3 .</p>
<p><strong>Compile command:</strong></p>
<p>gcc -Wall -O3 -fomit-frame-pointer revc.c -o revc.gcc_run</p>
<p>Source code is located here: <a title="http://zenebo.com/revc.c.tar.gz" href="http://zenebo.com/revc.c.tar.gz" target="_blank">http://zenebo.com/revc.c.tar.gz</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=17&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/05/08/reverse-complement-of-fasta-bechmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>Atoi() or not to Atoi()</title>
		<link>http://arekzb.wordpress.com/2008/05/04/atoi-or-not-to-atoi/</link>
		<comments>http://arekzb.wordpress.com/2008/05/04/atoi-or-not-to-atoi/#comments</comments>
		<pubDate>Mon, 05 May 2008 03:14:06 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=14</guid>
		<description><![CDATA[Update: May 13th, 2008 My solution has been accepted and placed in the interesting alternative category. A bitter-sweet victory considering my program as tested by their standards is the fastest C language entry . It is still a small honor to be recognized and to know that my entry shaved off almost 30% off the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=15&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update: May 13th, 2008</strong></p>
<p><em>My solution has been accepted and placed in the interesting alternative category. A bitter-sweet victory considering my program as tested by their standards is the fastest C language entry . It is still a small honor to be recognized and to know that my entry shaved off almost 30% off the next fastest C program.</em></p>
<p><em>Let&#8217;s see how the FASTA benchmark program stacks up in the next few days.</em></p>
<p><em>Cheers.</em></p>
<p>see it here: <a title="http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&amp;lang=all" href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&amp;lang=all" target="_blank">http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&amp;lang=all</a></p>
<p>The computer language benchmarks game at <a title="http://shootout.alioth.debian.org/gp4/index.php" href="http://shootout.alioth.debian.org/gp4/index.php" target="_blank">http://shootout.alioth.debian.org/gp4/index.php</a> matches up a fundamental processing task or algorithm in a variety of programming languages. One benchmark called &#8216;sumfile&#8217; has the following requirements:</p>
<ul>
<li>read integers from stdin, one line at a time</li>
<li>print the sum of those integers</li>
</ul>
<p>It is based on this icon program:</p>
<pre><strong>procedure main(argv)</strong></pre>
<pre><strong> sum:=0</strong></pre>
<pre><strong> while(sum+:=read())</strong></pre>
<pre><strong> write (sum)</strong></pre>
<pre><strong>end
</strong></pre>
<p>The C language entry topped at 6th and 7th place. Surprising as it was, a Java 6 version came in second with more than a second shaved off the total CPU running time.</p>
<p>The task for all of these is to read a flat file containing one integer per line, add the integer to the total and print out the sum at the end. Three versions of test files containing 1,000, 11,000 and 21,000 lines are used. While there could be more interesting ways to tackle this task, it&#8217;s trivial and simple demands warranted a quick look.</p>
<p>The fastest C program used these function calls per each line in the file:</p>
<p>fgets_unlocked() , atoi() and a += operator to sum up the total. It seems that either one of these functions could be improved on, but since line-by-line reading is a strict requirement thus leaving the atoi function open to critique.</p>
<p>This following function will return an integer given a string. It handles positive and negative number strings.</p>
<pre><strong>int matoi(char *c) {</strong></pre>
<pre><strong>int res = 0,n=1;</strong></pre>
<pre><strong>if(*c=='-'){n=-1;*c++;}</strong></pre>
<pre><strong>while (*c &gt;= '0' &amp;&amp; *c &lt;= '9')</strong></pre>
<pre><strong>res = res * 10 + *c++ - '0';</strong></pre>
<pre><strong>return res*n;</strong></pre>
<p><strong>}</strong></p>
<p>When compared to the standard atoi() function and parsing 500,000 lines of integers, this version on a 2.4 GHz Core2Duo performed 60% better . It&#8217;s simplicity is also it&#8217;s weakness as the matoi() function is designed to handle proper input. Perfect for a situation where input is controlled.</p>
<p>Original benchmark entry was modified with timing capture and the addition of matoi() function. Header contains any previous entry owners and information.</p>
<p>Archive with source code : <a title="http://zenebo.com/sum1.c.tar.gz" href="http://zenebo.com/sum1.c.tar.gz" target="_blank">http://zenebo.com/sum1.c.tar.gz </a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=15&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/05/04/atoi-or-not-to-atoi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>Lighttz &#8211; a simple and fast web server</title>
		<link>http://arekzb.wordpress.com/2008/04/27/lighttz-a-simple-and-fast-web-server/</link>
		<comments>http://arekzb.wordpress.com/2008/04/27/lighttz-a-simple-and-fast-web-server/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 23:59:15 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[Asynchronous Programming]]></category>
		<category><![CDATA[Lighttz Web Server]]></category>
		<category><![CDATA[epoll]]></category>
		<category><![CDATA[libev]]></category>
		<category><![CDATA[lighttz]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=10</guid>
		<description><![CDATA[Update : A naive implementation of using Lua 5.1 to generate a dynamic response has been added. This loads Lua, loads a Lua script and executes it. Retrieves the string response and returns it to the browser. Take a look below for a new additional download link. Cheers There are many well written , fast [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=13&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em><strong>U</strong></em><em><strong>pdate </strong></em>: A naive implementation of using Lua 5.1 to generate a dynamic response has been added. This loads Lua, loads a Lua script and executes it. Retrieves the string response and returns it to the browser. Take a look below for a new additional download link.</p>
<p><em>Cheers</em></p>
<p>There are many well written , fast web servers around with full features for CGI , FastCGI , proxying and dynamic language support such as Ruby, PHP and Python. So what is Lighttz ? It&#8217;s a small HTTP server written in C , benchmarked against the big guns. It is by no means a replacement for the big four, and is mainly a testing showcase. For the sake of brevity, the comparison of the first benchmarks will compare the following web servers:</p>
<ul>
<li><strong>Apache/2.2.8-mpm-prefork</strong></li>
<li><strong>lighttpd/1.4.19</strong></li>
<li><strong>nginx/0.5.33</strong></li>
<li><strong>userver-0.6.0 &#8211; compiled and run with epoll support<br />
</strong></li>
<li><strong>lighttz/0.1 &#8211; libev epoll event model<br />
</strong></li>
</ul>
<p><strong>Short summary and the configuration as tested is below. Please note that other event models such as select and poll are available under each server , but these were picked for the performance or wide use ( in case of Apache ) .<br />
</strong></p>
<p><strong>Apache &#8211; <a title="http://httpd.apache.org/" href="http://httpd.apache.org/" target="_blank">http://httpd.apache.org/</a><br />
</strong></p>
<p>The usual pre-forking server most, widely used to power many websites.</p>
<p><strong>Lighttpd &#8211; <a title="http://www.lighttpd.net/" href="http://www.lighttpd.net/" target="_blank">http://www.lighttpd.net/</a><br />
</strong></p>
<p>Also a very popular server. Instead of a forking model, it utilizes a fast a very well performing epoll mechanism.</p>
<p><strong>Nginx &#8211; <a title="http://sysoev.ru/en/" href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br />
</strong></p>
<p>A little younger but equally fast server , which also utilizes epoll event model.</p>
<p><strong>Userver &#8211; <a title="http://userver.uwaterloo.ca/index.php" href="http://userver.uwaterloo.ca/index.php" target="_blank">http://userver.uwaterloo.ca/index.php</a><br />
</strong></p>
<p>A small, microwebserver that&#8217;s mostly used for tests and benchmarks. Project is maintained at University of Waterloo.</p>
<p><strong>Lighttz -<br />
</strong></p>
<p>A short C program that simulates an HTTP server and handles the requests using Libev and epoll.</p>
<p><strong>Test platform</strong></p>
<p>Ubuntu 8.04 , Kernel 2.6.24-16 SMP , 2GB RAM, Core2Duo 2.4GHz</p>
<p><strong>Benchmarking Client Program</strong></p>
<p>ApacheBench . Command used:</p>
<p>ab -c1000 -n1000000 &lt;host:port&gt; . The test document <em>index.html </em>is a 357 byte static file. Lighttz did not use the static file, it sent out the exact same contents as <em>index.html </em>contained in a char array.</p>
<p>The above simulated 1000 concurrent clients making 1000000 requests .</p>
<h3><strong>Results</strong></h3>
<p>Each result is an average of three runs with one pre-warming run to let each server utilize the cache.</p>
<p><strong>Requests per second. Listed in order of fastest to slowest.<br />
</strong></p>
<ol>
<li>Lighttz &#8211; 14,719 ( Cpu usage: 40-50% , Memory: 188 KB , 1 process )</li>
<li>Lighttpd &#8211; 14,701 ( Cpu usage: 65-85%, Memory: 6.6 MB , 1 process )</li>
<li>Nginx &#8211; 14,378 (Cpu usage: 65-80%,  Memory: 2.1 MB , 2 processes )</li>
<li>Userver &#8211; 13,221 ( Cpu usage: 75-90%, Memory: 1.2 MB, 1 process )</li>
<li>Apache &#8211; 9,512 ( Cpu Usage: 60-80%, Memory: 3.5 MB x 147 processes ,  514 MB total )</li>
</ol>
<p>Hardware used, other running servers and operating systems will reflect different results. The tests were not run to define maximum performance for all solutions. Each application will apply a different level of stress on the server.</p>
<p>Source code for Lighttz : <a title="http://zenebo.com/lighttz.c.tar.gz" href="http://zenebo.com/lighttz.c.tar.gz" target="_blank">http://zenebo.com/lighttz.c.tar.gz</a></p>
<p>Lua version: <a title="http://zenebo.com/lighttz_lua.tar.gz" href="http://zenebo.com/lighttz_lua.tar.gz" target="_blank">http://zenebo.com/lighttz_lua.tar.gz</a></p>
<p>Libev : <a title="http://software.schmorp.de/pkg/libev.html" href="http://software.schmorp.de/pkg/libev.html" target="_blank">http://software.schmorp.de/pkg/libev.html</a></p>
<p>Index.html file was taken from SuperJared.com article located here: <a title="http://superjared.com/entry/benching-lighttpd-vs-nginx-static-files/" href="http://superjared.com/entry/benching-lighttpd-vs-nginx-static-files/" target="_blank">http://superjared.com/entry/benching-lighttpd-vs-nginx-static-files/</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=13&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/04/27/lighttz-a-simple-and-fast-web-server/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>GUI546 &#8211; Pong &#124;. &#124;</title>
		<link>http://arekzb.wordpress.com/2008/04/22/gui546-pong/</link>
		<comments>http://arekzb.wordpress.com/2008/04/22/gui546-pong/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 00:33:31 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[C and C++]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=9</guid>
		<description><![CDATA[Assignment 2 for GUI546 at Seneca College in Graphical User Interface (GUI) Programming Who doesn&#8217;t like Pong ? A breakout hit of epic proportions, Pong has traversed a long and arduous path into our hearts. The program is written in C++.Net and utilizes basic Windows GDI features to simulate a game of Pong. Login Once [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=12&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Assignment 2 for GUI546 at Seneca College in Graphical User Interface (GUI) Programming</p>
<p>Who doesn&#8217;t like Pong ? A breakout hit of epic proportions, Pong has traversed a long and arduous path into our hearts.</p>
<p>The program is written in C++.Net and utilizes basic Windows GDI features to simulate a game of Pong.</p>
<p><strong>Login</strong></p>
<p>Once the program runs, it requires the user to login. Login process creates a flat binary file in the same directory as the executable.</p>
<p>The archive below has one pre-registered user:</p>
<p>Login:demo</p>
<p>Password:demo1!</p>
<p><strong>Implementation</strong></p>
<p>Core of the program is based around learning graphical user interface programming using C++.Net , expanding concepts of threading and communicating a managed application with an unmanaged dynamic link library file. The program loads a previously created unmanaged Win32 .dll file from the ReleaseDll directory.</p>
<p>The program does not attempt to adhere to actual rules of Pong nor does it try to play with intelligence. I like to win , what can I say <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Zip archive is located here: <a title="GUI546 Assignment 2" href="http://zenebo.com/gui546a2.zip" target="_blank">http://zenebo.com/gui546a2.zip</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=12&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/04/22/gui546-pong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>CSC209 &#8211; Location Server</title>
		<link>http://arekzb.wordpress.com/2008/04/22/csc209-location-server/</link>
		<comments>http://arekzb.wordpress.com/2008/04/22/csc209-location-server/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 21:36:51 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[C and C++]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[csc209]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=8</guid>
		<description><![CDATA[Assignment 4 for CSC209 at University of Toronto in Software Tools and Systems Programming Introduction One of the interesting features of MSN Messenger is that you can see if a person is online and be able to look up their personal status . Some fields can be used to indicate a status such as : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=11&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Assignment 4 for CSC209 at University of Toronto in Software Tools      and Systems Programming</p>
<p><strong>Introduction</strong></p>
<p>One of the interesting features of MSN Messenger is that you can see if a person is online and be able to look up their personal status . Some fields can be used to indicate a status such as : <em>at work or at home</em></p>
<p>The task in this assignment is to write a server and a client that allows user to register with the server and see which other registered users are on .</p>
<p><strong>Specification</strong></p>
<p>A user will run the <em>heythere </em>client and connect to a <em>heythere-server</em> . Every N seconds, the server will send to the client a list of users that are currently registered and their status.</p>
<p><strong>Client</strong></p>
<p>The <em>client </em>first sends the user name to the server. The second message the client sends to the server is the location of the client . Other messages can be sent to the server. User can change their user name, the location and it may add a <em>message </em>tag .</p>
<p>Every <em>time interval </em>in seconds, the server will send a complete list of the currently logged on users. The client will print these out to <em>stdout</em> .</p>
<p>Each message has a strict format described as following:</p>
<p>First 3 characters describe the type of message the client is sending followed by a space and then the content of the message .</p>
<p><em>Location: <strong>usr</strong></em></p>
<p><em>Hostname: <strong>loc</strong></em></p>
<p><em>Message:<strong> tag</strong></em></p>
<p><strong>Server</strong></p>
<p>Server is written to support up to 30 clients at a time. It uses <em>select </em>to multiplex between different clients. If the command-line arguments <em>-t &lt;time interval&gt; </em>are not given, the default value for the number of seconds between printing to the clients is 10 seconds . Information will be written on line per client in the following format:</p>
<p><em>&lt;user name&gt; &lt;location&gt; &lt;message tag&gt;</em></p>
<p>To handle client data, the server collects the information from all connected clients.</p>
<p>Zip archive is located here: <a title="CSC209 Assignment 4" href="http://zenebo.com/csc209a4.zip" target="_blank">http://zenebo.com/csc209a4.zip</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=11&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/04/22/csc209-location-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
		<item>
		<title>CSC209 &#8211; build . a simple make-like tool</title>
		<link>http://arekzb.wordpress.com/2008/04/22/csc209-build-a-simple-make-like-tool/</link>
		<comments>http://arekzb.wordpress.com/2008/04/22/csc209-build-a-simple-make-like-tool/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 21:05:17 +0000</pubDate>
		<dc:creator>arekzb</dc:creator>
				<category><![CDATA[Shell Prorgamming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[bourne]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[csc209]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[Shell Programming]]></category>

		<guid isPermaLink="false">http://www.zenebo.com/word/?p=7</guid>
		<description><![CDATA[Assignment 1 for CSC209 course at University of Toronto in Software Tools and Systems Programming Build In this assignment a student is required to write a program in Bourne shell that performs some of the same operations that make does . A simpler file format for a build file is specified , which does not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=10&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Assignment 1 for CSC209 course at University of Toronto in Software Tools      and Systems Programming</p>
<p><strong>Build</strong></p>
<p>In this assignment a student is required to write a program in Bourne shell that performs some of the same operations that <strong><em>make</em></strong> does . A simpler file format for a build file is specified , which does not follow all rules of the <strong><em>make </em></strong>program .</p>
<p><strong>Build file format</strong></p>
<p>There are 4 types of valid lines in a build file:</p>
<ol>
<li>A blank line. I.e., a line containing nothing but whitespace.</li>
<li>A line whose first character is # which indicates that the remainder  of the line is a comment.</li>
<li>A line whose first character is an @ followed by a space, and then  followed by one or more words separated by a single space. This type of 		line marks the beginning of a build rule.  The @ is ignored. 		The first word in the sequence is the target of the rule, and the 		remaining words, if any, are the prerequisites for the rule.</li>
<li>Other lines are considered action lines which should be executable  statements.</li>
</ol>
<p>In example:<br />
<code>#Comment line<br />
@target prerequisite1 prerequisite2<br />
action<br />
action with arguments<br />
</code></p>
<p><strong>Functionality and Implementation</strong></p>
<p><code>build</code> program will take one or two arguments.  The first argument is the target that you want to build. The second argument is the name of the build file to the program will read.  If the second argument is not present, the program will try to read a file in the current working directory called <code>buildfile</code>.</p>
<p>Steps:</p>
<ol>
<li>Read the build file looking for the appropriate rule.  If found:</li>
<li>Update prerequisites. (as with <code>make</code>, each 		prerequisite corresponds to a target in the buildfile, so we might 		need to execute another rule to ensure that a prerequisite is up to 		date.)</li>
<li>If the target is a file and has been modified more 	  recently than all of its prerequisites, then the actions are not 	  executed.</li>
<li>If the target is not a file, or any of the prerequisites 	  are newer than the target, then the rule&#8217;s actions are executed.</li>
</ol>
<p>Exceptions:</p>
<ul>
<li>If a rule has no prerequisites, then the rule will always be executed 		when it is encountered.  Note that this differs from 		<code>make</code> where a rule with no prerequisites is only 		executed if it is called explicitly.</li>
<li>You don&#8217;t need to handle recursive targets and prerequisites.</li>
</ul>
<p>The build process will likely want to call the <code>build</code> program from within the <code>build</code> program.  (Recursion comes in many forms.) 	  The best way to do this is to make sure that <code>build</code> is in 	  a directory in the <code>PATH</code> variable.</p>
<p><strong>Testing</strong></p>
<p>Another obvious use for shell scripts is to automate testing programs. We will also write a shell script called <code>testbuild</code> that 	  will run several tests of the <code>build</code> program.</p>
<p>The <code>testbuild</code> program will run at least 3 different test cases that test different parts of the program. We will also need to include one or more build files and possibly some other files. The <code>touch</code> (see &#8220;man touch&#8221;) command will come in quite handy when we want to change a file&#8217;s modification time automatically.</p>
<p>Zip archive can be obtained here: <a title="CSC209 Assignment 1" href="http://zenebo.com/csc209a1.zip" target="_blank">http://zenebo.com/csc209a1.zip</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/arekzb.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/arekzb.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/arekzb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/arekzb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/arekzb.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=arekzb.wordpress.com&amp;blog=14655925&amp;post=10&amp;subd=arekzb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://arekzb.wordpress.com/2008/04/22/csc209-build-a-simple-make-like-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a3cc68df00c518f0fe1fa7884b0de049?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">arekzb</media:title>
		</media:content>
	</item>
	</channel>
</rss>
