<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="http://www.principiaprogramatica.com/wp-content/themes/aquafluid-10/style.css" ?><!-- generator="wordpress/2.0.4" -->
<rss version="0.92">
<channel>
	<title>Principia Programatica - Greg Miller's Blog</title>
	<link>http://www.principiaprogramatica.com</link>
	<description>Just programming</description>
	<lastBuildDate>Thu, 26 Aug 2010 07:05:25 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Running multiple instances of mysql on the same machine</title>
		<description>There are a lot of ways to run two instances of mysqld on one machine.  Generally all you need to do is specify different ports and data directories.  The method I describe below is basically to copy the default configuration shipped with Ubuntu Server into a different directory ...</description>
		<link>http://www.principiaprogramatica.com/?p=59</link>
			</item>
	<item>
		<title>Simple encryption and decryption of a string in c#</title>
		<description>Here are some routines which are designed for simple use of Rijndael in C#.  I've combined a test function in the class for simplicity of showing it's use.


        private static byte[] salt = Encoding.ASCII.GetBytes("somerandomstuff");

        public ...</description>
		<link>http://www.principiaprogramatica.com/?p=58</link>
			</item>
	<item>
		<title>The Towers of Hanoi in Erlang</title>
		<description>I'm just playing with Erlang, below is my attempt at solving the Towers of Hanoi puzzle using it.  Call it using hanoi:hanoi([1,2,3,4,5,6],[],[]) (a valid starting position is assumed).


-module(hanoi).
-export([hanoi/3]).

hanoi(A,B,C) ->
	Disk=lists:max(A),
	move(Disk,A,B,C).
	
move(Disk,[Disk&#124;Source],Dest,Temp)->
	[Source,[Disk&#124;Dest],Temp];
	
move(Disk, Source, Dest, Temp) ->
	[S1,T1,D1]=move(Disk-1,Source,Temp,Dest),
	[S2,D2,T2]=move(Disk,S1,D1,T1),
	[T3,D3,S3]=move(Disk-1,T2,D2,S2),
	[S3,D3,T3].
 </description>
		<link>http://www.principiaprogramatica.com/?p=55</link>
			</item>
	<item>
		<title>Solving the Towers of Hanoi puzzle in C#</title>
		<description>I thought this would be a fun little exercise to try.  This puzzle is generally used to teach recursion in CS classes, but I have never actually tried to implement it.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TowersOfHanoiCs
{
    class Program
    {
     ...</description>
		<link>http://www.principiaprogramatica.com/?p=53</link>
			</item>
	<item>
		<title>Sending an email with syntax hightlighting for your source code</title>
		<description>I resisted the switch to HTML e-mail for as long as I could, I know there are some who have managed to succeed in not switching to an HTML enabled email reader.  But I just couldn't hold out due to the fact that there were so many non-computer savvy ...</description>
		<link>http://www.principiaprogramatica.com/?p=52</link>
			</item>
	<item>
		<title>Turbo Pascal 5.5 is available for download for free</title>
		<description>Firing up ole' TP7 for the last post put me in a nostalgic mood, and I went looking to see where Turbo Pascal stands today.  It doesn't look like you can still buy it, and the only version available is Turbo Pascal 5.5 which you can download for free ...</description>
		<link>http://www.principiaprogramatica.com/?p=49</link>
			</item>
	<item>
		<title>Statements in most languages can be empty</title>
		<description>I was looking through some code that was posted for review when someone had pointed out a statement like the following:

int x=5;;

Note the two semi-colons.  I initially thought "Great, someone has us reviewing code they didn't even try to compile."  But to my amazement, it does compile, and ...</description>
		<link>http://www.principiaprogramatica.com/?p=48</link>
			</item>
	<item>
		<title>A really tough puzzle</title>
		<description>100 prisoners are each locked in a room with three pirates, one of whom will walk the plank in the morning.  Each prisoner has 10 bottles of wine, one of which has been poisoned.  And each pirate has twelve coins, one of which is counterfeit and weighs either ...</description>
		<link>http://www.principiaprogramatica.com/?p=47</link>
			</item>
	<item>
		<title>Getting confused between closures and eval()</title>
		<description>I just saw a question regarding closures in JavaScript regarding code similar to the following:

for (i=0;i&#60;n;i++){
     foo.bind( function() { bar(i); } );
}


The question was why does every closure execute bar(i) with i as the value of n for every instance, rather than whatever the value of ...</description>
		<link>http://www.principiaprogramatica.com/?p=44</link>
			</item>
	<item>
		<title>Copy a Linux system over the network, with no intermediate files</title>
		<description>I had an old Red Had Linux system I wanted to convert to a Virtual Machine.  The typical method recommended by most people is to back up the system, then restore it inside the VM.  The problem I had with that is that you end up wasting a ...</description>
		<link>http://www.principiaprogramatica.com/?p=39</link>
			</item>
</channel>
</rss>
