<?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/"
	>

<channel>
	<title>Nomad's Land &#187; Programming</title>
	<atom:link href="http://psichron.za.net/wordpress/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://psichron.za.net/wordpress</link>
	<description>This is Nomad's Land</description>
	<lastBuildDate>Thu, 26 Aug 2010 08:19:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Started coding a game (isometric view, low res, retro style RPG)</title>
		<link>http://psichron.za.net/wordpress/2010-04-05/started-coding-a-game-isometric-view-low-res-retro-style-rpg/</link>
		<comments>http://psichron.za.net/wordpress/2010-04-05/started-coding-a-game-isometric-view-low-res-retro-style-rpg/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 11:10:05 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[2.5D]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=252</guid>
		<description><![CDATA[Against my better judgement I started working on a game called &#8220;Durune&#8221;: http://bitbucket.org/carel/durune-dev/wiki/Home The idea is to create an Ultima 8 2.5D clone but with today&#8217;s awesome shader and other graphics effects. Of course the storyline will rock]]></description>
			<content:encoded><![CDATA[<p>Against my better judgement I started working on a game called &#8220;Durune&#8221;: <a href="http://bitbucket.org/carel/durune-dev/wiki/Home">http://bitbucket.org/carel/durune-dev/wiki/Home</a></p>
<p>The idea is to create an Ultima 8 2.5D clone but with today&#8217;s awesome shader and other graphics effects. Of course the storyline will rock <img src='http://psichron.za.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://psichron.za.net/wordpress/wp-content/uploads/2010/04/ninja.jpg"><img src="http://psichron.za.net/wordpress/wp-content/uploads/2010/04/ninja-300x231.jpg" alt="" title="ninja" width="300" height="231" class="alignleft size-medium wp-image-253" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2010-04-05/started-coding-a-game-isometric-view-low-res-retro-style-rpg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhone Blog</title>
		<link>http://psichron.za.net/wordpress/2009-06-05/iphone-blog/</link>
		<comments>http://psichron.za.net/wordpress/2009-06-05/iphone-blog/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 15:13:37 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Cellphone]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=181</guid>
		<description><![CDATA[Since I will probably be spending a lot of time playing around with the iPhone in the near future, I started an iphone blog to share some tips and tricks on how to get the most out of your iPhone in South Africa. I will be writing about things like setting up a development environment [...]]]></description>
			<content:encoded><![CDATA[<p>Since I will probably be spending a lot of time playing around with the iPhone in the near future, I started an <a href="http://iphone.iblog.co.za">iphone blog</a> to share some tips and tricks on how to get the most out of your iPhone in South Africa. I will be writing about things like setting up a development environment on a non-MAC PC, how to get free and payed apps from the US iTunes store and jailbreaking the phone the way  god intended. Link: <a href="http://iphone.iblog.co.za">iphone.iblog.co.za</a></p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2009-06-05/iphone-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Gen Web Dev: Playing with Python Twisted/Nevow/Athena</title>
		<link>http://psichron.za.net/wordpress/2008-07-02/next-gen-web-dev-playing-with-python-twistednevowathena/</link>
		<comments>http://psichron.za.net/wordpress/2008-07-02/next-gen-web-dev-playing-with-python-twistednevowathena/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 00:17:02 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[athena]]></category>
		<category><![CDATA[comet]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[nevow]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twisted]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=83</guid>
		<description><![CDATA[I had the privilege of being introduced to the next generation of bleeding edge web development tools this weekend. This post is mainly about DivMod&#8216;s &#8220;Nevow&#8221; which is a web templating framework, running on Twisted Matrix&#8216;s Twisted Webserver and using DivMod&#8217;s &#8220;Athena&#8221; for asynchronous AJAX- and COMET-style browser communications. If you are familiar with web [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://psichron.za.net/wordpress/wp-content/uploads/2008/07/athena.jpg"><img class="alignleft size-full wp-image-84" style="float:left; margin:5px;" title="athena" src="http://psichron.za.net/wordpress/wp-content/uploads/2008/07/athena.jpg" alt="Athena" width="218" height="350" /></a>I had the privilege of being introduced to the next generation of bleeding edge web development tools this weekend. This post is mainly about <a title="DivMod" href="http://www.divmod.org/" target="_blank">DivMod</a>&#8216;s &#8220;<a title="Nevow" href="http://divmod.org/trac/wiki/DivmodNevow" target="_blank">Nevow</a>&#8221; which is a web templating framework, running on <a title="Twisted Matrix" href="http://twistedmatrix.com/trac/">Twisted Matrix</a>&#8216;s Twisted Webserver and using DivMod&#8217;s &#8220;<a title="Athena" href="http://divmod.org/trac/wiki/DivmodNevow/Athena" target="_blank">Athena</a>&#8221; for asynchronous AJAX- and COMET-style browser communications.</p>
<p>If you are familiar with web dev, you may immediately develop a headache on the mentioning of AJAX, but believe me if I say that not only does Nevow not induce migraines, it gets you more and more excited as you realise its potential.</p>
<p>I really cannot properly express how nice it is to work with these tools here, so please take a moment to skim through this (very) short tutorial on creating an AJAX style chat server/client using Athena: <a href="http://divmod.org/users/oubiwann/howto/chattutorial/part01/index.html" target="_blank">http://divmod.org/users/oubiwann/howto/chattutorial/part01/index.html</a></p>
<p>As a first attempt, I created an AJAX style event notification system:  A site is provided with two children: /alerts and /event . When an arbitrary child page of /event is visited, such as /event/anyrandomword, a new event is created with the name &#8220;anyrandomword&#8221;. Visiting /alerts will display a list of events as they are created IN REAL TIME (without a page refresh) by anybody visiting /event/NewEventName from anywhere.</p>
<p>I recommend you <strong>read the source from the bottom up</strong>, most of it should be self-explanatory. The python source is available here: <a href="http://pastebin.com/f79d87c11">myelement.tac.py</a> (About 100 lines without comments). Also required is the javascript source for adding table rows and the nice background fade-in effect: <a href="http://pastebin.com/f42ddd617">mymodule.js</a> and an xhtml template for the alert form: <a href="http://pastebin.com/f56082fbc">tabletemplate.html</a></p>
<p>Here is the complete package, better named, better structured, but without comments: <a href="http://psichron.za.net/wordpress/wp-content/uploads/2008/07/firstattempttar.bz2">firstattempt.tar</a></p>
<p><strong>Further Reading</strong>:<strong><br />
</strong><a href="http://divmod.org/trac/wiki/DivmodNevow/Tutorial " target="_blank">http://divmod.org/trac/wiki/DivmodNevow/Tutorial</a><strong><br />
</strong><a href="http://divmod.org/trac/wiki/DivmodNevow/Athena/Tutorials/LiveElement" target="_blank">http://divmod.org/trac/wiki/DivmodNevow/Athena/Tutorials/LiveElement</a><br />
<a href="http://open.thusa.co.za/enamel" target="_blank">http://open.thusa.co.za/enamel</a></p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2008-07-02/next-gen-web-dev-playing-with-python-twistednevowathena/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>pyXAOP: xchat auto-op script</title>
		<link>http://psichron.za.net/wordpress/2007-01-06/xchat-auto-op-script/</link>
		<comments>http://psichron.za.net/wordpress/2007-01-06/xchat-auto-op-script/#comments</comments>
		<pubDate>Sat, 06 Jan 2007 14:20:22 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=24</guid>
		<description><![CDATA[I coded a configurable xchat auto-op script in python, it is available here: xhat auto-op script. Please leave bug reports and feature requests on the script&#8217;s page. If there is enough interest, I will port it to C and create a native xchat plugin, so also leave a message if you are looking for a [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img width="63" height="60" alt="xchat" id="image26" src="http://psichron.za.net/wordpress/wp-content/uploads/2007/01/xchat-logo.gif" /></td>
<td>I coded a configurable xchat auto-op script in python, it is available here: <a title="xchat auto-op script" target="_blank" href="http://xaop.psichron.za.net">xhat auto-op script</a>. Please leave bug reports and feature requests on the script&#8217;s page. If there is enough interest, I will port it to C and create a native xchat plugin, so also leave a message if you are looking for a native plugin.</td>
</tr>
</table>
<p>The script is pretty straight-forward. The biggest issue was figuring out the regular expressions to use for hostmask matching.</p>
<p>As a matter of interest, I determine a valid hostmask with this regex:<br />
<strong>IRC_HOSTMASK_REGEX = r&#8217;^([a-zA-Z0-9\[\]\\^_-{|}*]+)!([a-zA-Z0-9\[\]\\^_-{|}~*]+)@([a-zA-Z0-9*.-]+)$&#8217;<br />
</strong>Valid nick characters are: <strong>a-z A-Z 0-9 [ \ ] ^ _ &#8211; { | } </strong>[<a title="UnrealIRCD Documentation" href="http://www.vulnscan.org/UnrealIrcd/unreal32docs.html">UnrealIRCD documentation</a>]<br />
Channel prefixes are: ["#","&#038;","!"]<br />
Operator prefixes are: ["~","&#038;","@"]<br />
The biggest issue porting this to C would be regex matching, since there are no standard regex libraries included with distributions of C compilers for windows. I will have to use <a title="MinGW" target="_blank" href="http://www.mingw.org/">MinGW</a> ,using the GNU regex library in linux and compile the source to a dll.</p>
<p>Please leave a comment or a message on the site so I can determine the level of interest.</p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2007-01-06/xchat-auto-op-script/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Random code: Super efficient binary counter</title>
		<link>http://psichron.za.net/wordpress/2006-12-21/random-code/</link>
		<comments>http://psichron.za.net/wordpress/2006-12-21/random-code/#comments</comments>
		<pubDate>Thu, 21 Dec 2006 20:47:49 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=19</guid>
		<description><![CDATA[For some mad reason I decided to try and see how efficient I could code a binary counter. Assume you have n LEDs, which are represented as ints: 0 = off, 1 = on. You also have a counter variable: int counter; I ended up with a few bitshifts, addition and logic ANDs. Here is [...]]]></description>
			<content:encoded><![CDATA[<p>For some mad reason I decided to try and see how efficient I could code a binary counter. Assume you have n LEDs, which are represented as ints: 0 = off, 1 = on. You also have a counter variable: int counter; I ended up with a few bitshifts, addition and logic ANDs. Here is my code:</p>
<blockquote><p><strong>LED1 = (counter >> 0) & 1;<br />
LED2 = (counter >> 1) & 1;<br />
&#8230;<br />
LEDn = (counter >> (n-1)) & 1;</strong></p>
<p><strong>/* Equivalent to:  counter = (counter+1) % pow(2,n) */<br />
counter = (++counter) &#038; ((1 < < n)-1)<br />
</strong></strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2006-12-21/random-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Labyrinth</title>
		<link>http://psichron.za.net/wordpress/2006-10-15/labyrinth/</link>
		<comments>http://psichron.za.net/wordpress/2006-10-15/labyrinth/#comments</comments>
		<pubDate>Sun, 15 Oct 2006 15:02:56 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=11</guid>
		<description><![CDATA[I am currently working on Labyrinth (http://labyrinth.za.net), a program that tunnels data via DNS queries and replies. It is being coded in python, and at time of writing I have a working proof of concept that can only transmit about 32 characters at a time. (Update: labyrinth uses openVPN&#8217;s tap-win32 driver for packet tunneling.) Why [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img width="108" height="96" alt="labyrinth" id="image18" src="http://psichron.za.net/wordpress/wp-content/uploads/2006/12/labyrinth.jpg" /></td>
<td>I am currently working on Labyrinth (<a title="labyrinth.za.net" target="_blank" href="http://labyrinth.za.net">http://labyrinth.za.net</a>), a program that tunnels data via DNS queries and replies. It is being coded in python, and at time of writing I have a working proof of concept that can only transmit about 32 characters at a time. (Update: labyrinth uses openVPN&#8217;s tap-win32 driver for packet tunneling.)</td>
</tr>
</table>
<p><span id="more-11"></span></p>
<p>Why am I doing something that seems so fundamentally useless? Mainly because I actually have an application for it: DNS queries is the only kind of free internet traffic allowed on our varsity network. Apart from that, I see it as a chance to increase my knowledge of python,DNS and the <a href="http://en.wikipedia.org/wiki/Internet_protocol_suite">internet protocol suite</a> in general.</p>
<p>And as I said, it works! I still have much optimization planned. The biggest problem is finding somebody outside the firewall to run the proxy for me&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2006-10-15/labyrinth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Servant Salamander 2.5 &#8220;crack&#8221;</title>
		<link>http://psichron.za.net/wordpress/2005-11-25/servant-salamander-25/</link>
		<comments>http://psichron.za.net/wordpress/2005-11-25/servant-salamander-25/#comments</comments>
		<pubDate>Fri, 25 Nov 2005 20:38:57 +0000</pubDate>
		<dc:creator>psichron</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://psichron.za.net/wordpress/?p=4</guid>
		<description><![CDATA[One of my favorite tools under windows OS is Servant Salamander &#8211; a two-pane file manager, network client, archive manager, etc, etc. I definitely recommend you have a look, it is like the swiss army knife of file handling. The closest linux alternative I&#8217;ve seen so far is krusader. However, the latest version at time [...]]]></description>
			<content:encoded><![CDATA[<p>One of my favorite tools under windows OS is <a href="http://www.altap.cz/">Servant Salamander</a> &#8211; a two-pane file manager, network client, archive manager, etc, etc. I definitely recommend you have a look, it is like the swiss army knife of file handling. The closest linux alternative I&#8217;ve seen so far is <a href="http://www.krusader.org">krusader</a>.</p>
<p>However, the latest version at time of writing is 2.5 beta10a, which includes an annoying 3-second splash screen on startup, as well as an even more annoying 30-second splash screen once it has expired.</p>
<p>So, armed with my knowledge from the <a href="http://hackr.org/users.php?user=psichron">hackr.org</a> challenges I did in an obsessive haze after seeing the link on <a href="http://karnaugh.za.net">karnaugh.za.net</a> and getting hooked, I tried my hand at removing the splash screens.</p>
<p>The end result is available here: <a href="http://psichron.za.net/downloads/SALAMAND.b10af-nosplash.rar">Servant Salamander 2.5 beta10a no-splash exe</a></p>
<p>(edit)<br />
I decided against sharing the &#8220;cracking&#8221; method, since I don&#8217;t want it to be distributed on a large scale. Basicly, I used a debugger to skip the function that creates the annoying splash-screen dialogues.<br />
Also, in my opinion it is much better than total commander (as krusader is better than midnight commander). Almost not comparable.</p>
<p>And in case you were wondering, I have a legally licensed version of Servant Salamander.</p>
]]></content:encoded>
			<wfw:commentRss>http://psichron.za.net/wordpress/2005-11-25/servant-salamander-25/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
