<?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>porges &#187; Work</title>
	<atom:link href="http://porg.es/blog/tag/work/feed" rel="self" type="application/rss+xml" />
	<link>http://porg.es/blog</link>
	<description>... master of none</description>
	<lastBuildDate>Sun, 22 Aug 2010 21:36:08 +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>Presenting Meteoroids</title>
		<link>http://porg.es/blog/presenting-meteoroids</link>
		<comments>http://porg.es/blog/presenting-meteoroids#comments</comments>
		<pubDate>Wed, 19 Nov 2008 23:23:37 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[self]]></category>
		<category><![CDATA[university]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[massey]]></category>
		<category><![CDATA[meteoroids]]></category>
		<category><![CDATA[uni]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://porg.es/blog/?p=244</guid>
		<description><![CDATA[This post brought to you as part of fulfilling the requirements for Massey University’s 143.362. I thought I had posted this earlier, but it turns out I hadn&#8217;t. So, it&#8217;s here now Meteoroids Meteoroids is a simple game (the premise being an homage to the classic Asteroids-based titles), programmed in Processing. Audio is provided via [...]]]></description>
			<content:encoded><![CDATA[<p><i>This post brought to you as part of fulfilling the requirements for Massey University’s <a href="http://www.massey.ac.nz/massey/study/programme-course-and-paper-search/paper.cfm?paper_code=143.362">143.362</a>.</i></p>
<p>I thought I had posted this earlier, but it turns out I hadn&#8217;t. So, it&#8217;s here now <img src="http://porg.es/blog/wp-content/plugins/wp-smiley-switcher/noktahhitam/icon_razz.gif" alt="" /></p>
<h3>Meteoroids</h3>
<p>Meteoroids is a simple game (the premise being an homage to the classic Asteroids-based titles), programmed in <a href="http://processing.org/">Processing</a>. Audio is provided via <a href="http://chuck.cs.princeton.edu/">ChucK</a>, and input is provided by a Nintendo Wiimote via <a href="http://en.wikipedia.org/wiki/OpenSound_Control">OSC</a> commands generated from <a href="http://code.google.com/p/darwiinosc/">an extension</a> of <a href="http://sourceforge.net/projects/darwiin-remote/">Darwiin Remote</a>.</p>
<p>To explain more, here&#8217;s a short video <img src="http://porg.es/blog/wp-content/plugins/wp-smiley-switcher/noktahhitam/icon_smile.gif" alt="" /></p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/_NdgujV3z5c&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_NdgujV3z5c&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/presenting-meteoroids/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple BigNum library for .NET</title>
		<link>http://porg.es/blog/a-simple-bignum-library-for-dot-net</link>
		<comments>http://porg.es/blog/a-simple-bignum-library-for-dot-net#comments</comments>
		<pubDate>Sat, 13 Oct 2007 08:05:51 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://porg.es/blog/a-simple-bignum-library-for-net</guid>
		<description><![CDATA[Update Due to minor demand, the code is also available: BigNum source. Please note that I haven’t actually touched the code since it was first written. I’m sure there’s some things that don’t work properly. If you’re doing anything big with this you probably want to write some ‘destructive’ update functions for adding, etc. At [...]]]></description>
			<content:encoded><![CDATA[<h4>Update</h4>
<p>Due to minor demand, the code is also available: <a href='http://porg.es/blog/wp-content/uploads/2008/04/bignum.zip'>BigNum source</a>.</p>
<p>Please note that I haven’t actually touched the code since it was first written. I’m sure there’s some things that don’t work properly. If you’re doing anything big with this you probably want to write some ‘destructive’ update functions for adding, etc. At the moment every time you add, subtract, etc, a completely new BigInt is returned. To make it faster you’d want to just update the number in-place.</p>
<h4>Original content&#8230;</h4>
<p>I’ve created a simple wrapper for <a href="http://www.gmplib.org">GMP</a>. At the moment only BigInts are implemented, but I expect to have BigRationals and BigFloats coming along soon enough. (<i>Edit: this never happened.</i>)</p>
<h4>Usage</h4>
<p>I think this is very close to as-you’d-expect. The only minor thing that might come as a surprise is that BigInts aren’t value types; since they need destructors, they can’t be. The rest is fairly straightforward:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> Main<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> args<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
    BigInt n<span style="color: #008000;">;</span>
    <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">ulong</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">100</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&lt;=</span> <span style="color: #FF0000;">999</span><span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
        n <span style="color: #008000;">=</span> BigInt.<span style="color: #0000FF;">Factorial</span><span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>n<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #000000;">&#125;</span>
    Console.<span style="color: #0000FF;">ReadLine</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This code executes with sub 5-second times, which I’m pretty pleased with. I’m not sure what kind of performance decrease you get through using GMP under managed code.</p>
<h4>Caveats</h4>
<ul>
<li>Consider this alpha software <img src="http://porg.es/blog/wp-content/plugins/wp-smiley-switcher/noktahhitam/icon_smile.gif" alt="" /></li>
<li>The included GMP DLL is compiled with none of the magical assembly they provide. If you want to, you can compile it yourself with all this enabled, and you should be able to just use it as a drop-in replacement.</li>
</ul>
<h4>Download</h4>
<p>Available here: <a href='http://porg.es/blog/wp-content/uploads/2007/10/bignum.zip' title='BigNum library'>BigNum library</a>. Documentation <a href="http://porg.es/Help/Index.html">is available</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/a-simple-bignum-library-for-dot-net/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Wanted: Summer of Code [2.auckland]</title>
		<link>http://porg.es/blog/wanted-summer-of-code-2auckland</link>
		<comments>http://porg.es/blog/wanted-summer-of-code-2auckland#comments</comments>
		<pubDate>Thu, 27 Sep 2007 05:20:17 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[self]]></category>
		<category><![CDATA[Default]]></category>
		<category><![CDATA[Me]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://porg.es/blog/wanted-summer-of-code-2auckland</guid>
		<description><![CDATA[I really (really) want to participate in the Wellington &#8220;Summer of Code 2.0&#8221; (blog), but it is Wellington-only&#8230; and I doubt any of the companies involved want to take on an unproven second-year student to work remotely on their software. Argh!]]></description>
			<content:encoded><![CDATA[<p>I really (<em>really</em>) want to participate in the Wellington &#8220;<a href="http://www.summerofcode.co.nz/">Summer of Code 2.0</a>&#8221; (<a href="http://blog.summerofcode.co.nz/">blog</a>), but it is Wellington-only&#8230; and I doubt any of <a href="http://www.summerofcode.co.nz/companies">the companies involved</a> want to take on an <a href="http://porg.es/blog/about-me">unproven second-year student</a> to work remotely on their software. Argh!</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/wanted-summer-of-code-2auckland/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
