<?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>Lee Braiden&#039;s Blog &#187; IT</title>
	<atom:link href="http://irukado.org/category/it/feed" rel="self" type="application/rss+xml" />
	<link>http://irukado.org</link>
	<description>Peace, Love, Tech, and random life stuff.</description>
	<lastBuildDate>Thu, 08 Oct 2009 00:10:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Chrome Frame</title>
		<link>http://irukado.org/2009/09/25/google-chrome-frame</link>
		<comments>http://irukado.org/2009/09/25/google-chrome-frame#comments</comments>
		<pubDate>Fri, 25 Sep 2009 00:32:04 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1549</guid>
		<description><![CDATA[In a move right out of The Art of War, Google have announced Google Chrome Frame, which turns IE into Google Chrome.  Obviously great for web developers (django or otherwise) who want an up to date, standardised web platform on major browsers.
It seems Google haven&#8217;t really studied the book though, as they&#8217;re not making [...]]]></description>
			<content:encoded><![CDATA[<p>In a move right out of <a href="">The Art of War</a>, Google have announced <a href="http://blog.chromium.org/2009/09/introducing-google-chrome-frame.html">Google Chrome Frame, which turns IE into Google Chrome</a>.  Obviously great for web developers (django or otherwise) who want an up to date, standardised web platform on major browsers.</p>
<p>It seems Google haven&#8217;t really studied the book though, as they&#8217;re not making this happen naturally or with minimum effort &#8212; virally, in modern business speak.  If Google Chrome Frame installed in IE for some site as readily as flash installs, this would be a hugely significant release.  Seems they&#8217;ve missed a trick here.</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/09/25/google-chrome-frame/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blitzen: Django app installation, only faster</title>
		<link>http://irukado.org/2009/09/16/blitzen-django-app-installation-only-faster</link>
		<comments>http://irukado.org/2009/09/16/blitzen-django-app-installation-only-faster#comments</comments>
		<pubDate>Wed, 16 Sep 2009 11:32:03 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[automatic]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[secret keys]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1544</guid>
		<description><![CDATA[I just noticed a <a target="_blank" href="http://opensource.washingtontimes.com/blog/post/coordt/2009/09/request-comments-auto-installation-apps-django/">Request for Comments: Auto-Installation of Apps in Django</a> by Corey Oordt, which ties in with something I've been meaning to finish up and publish.  Some time ago, I blogged about <a target="_blank" href="http://irukado.org/2009/01/12/pluggable-django-git-templates-for-turnkey-projects-and-apps/">Pluggable Django</a> and <a href="http://irukado.org/page/3/">How I hate repetiting myself</a>.  Since then, I've been re-working this code a little.  It hasn't been high priority, since django is not a tool I've needed on current projects, but I did manage to get something up on github a few days back:]]></description>
			<content:encoded><![CDATA[<p>I just noticed a <a href="http://opensource.washingtontimes.com/blog/post/coordt/2009/09/request-comments-auto-installation-apps-django/">Request for Comments: Auto-Installation of Apps in Django</a> by Corey Oordt, which ties in with something I&#8217;ve been meaning to finish up and publish.</p>
<p>Some time ago, I blogged about <a href="http://irukado.org/2009/01/12/pluggable-django-git-templates-for-turnkey-projects-and-apps/">Pluggable Django</a> and <a href="http://irukado.org/page/3/">How I hate repetiting myself</a>.  That was mostly about current but messy code I was using, which allowed me to automatically add decoupled apps to a django project without having modify the rest of my django project each time.  Apps were auto-detected, and loaded, including templates etc.</p>
<p>Since then, I&#8217;ve been re-working this code a little.  It hasn&#8217;t been high priority, since django is not a tool I&#8217;ve needed on current projects, but I did manage to get something up on github a few days back:</p>
<ul>
<li><a href="http://github.com/jel/blitzen_project">Blitzen Project</a></li>
<li><a href="http://github.com/jel/blitzen_app">Blitzen App</a></li>
</ul>
<p>So basically, these are git repositories for &#8220;django-admin startproject&#8221; and &#8220;./manage.py startapp&#8221; replacements.  To start a project, just clone the Blitzen project url, and to create an app within that, clone the Blitzen app url.  Note that most of the new code here is in a directory called quickening, which was a previous working title for this stuff.</p>
<p>So what does it do?  Well, currently, not as much as my old code, in that it doesn&#8217;t really handle templates etc. just yet (the code might be there for that, but it&#8217;s untested).  Things you&#8217;ll notice:</p>
<ul>
<li>settings.py is a <em>lot</em> more manageable.  Most of the complex config is moved into the library code and called</li>
<li>Load order of middleware is worked out automatically, by specifying dependencies.  Code for this is very straightforward, in quickening/deps.py, with the dependencies currently in quickening/apps.py</li>
<li>If I recall correctly, app dependencies aren&#8217;t handled yet, but the middleware dependency code was written to also support automatic dependency resolution for apps, including specifying dependencies within an app itself, rather than in the project that hosts an app.  More work on this is probably required.</li>
<li>there is no default SECRET_KEY any more.  Instead, secret keys are auto-generated and kept in files which are ignored by git, meaning that when you checkout the code, or push the code to a webserver, each new instance gets its own key automatically.</li>
<li>sqlite is configured by default</li>
</ul>
<p>Ideas, suggestions, flames, code, etc. welcome <img src='http://irukado.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/09/16/blitzen-django-app-installation-only-faster/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PySide &#8211; Nokia releases official Python-Qt bindings</title>
		<link>http://irukado.org/2009/08/19/pyside-nokia-releases-official-python-qt-bindings</link>
		<comments>http://irukado.org/2009/08/19/pyside-nokia-releases-official-python-qt-bindings#comments</comments>
		<pubDate>Wed, 19 Aug 2009 16:40:25 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[bindings]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[lgpl]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[pyqt]]></category>
		<category><![CDATA[pyside]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[qt4]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[user interface]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://irukado.org/archives/2009/08/pyside-nokia-releases-official-python-qt-bindings/</guid>
		<description><![CDATA[Seems Nokia have released official Python-Qt bindings, called PySide, which are LGPL&#8217;d.
Apparently they tried to talk Riverbank Computing into releasing the PyQt bindings as LGPL, but Riverbank wouldn&#8217;t cooperate.  Presumably Riverbank wanted Nokia to pay them a stack of money, forgetting that Nokia, owning Qt, could undercut them by just rewriting the thing themselves.
Either [...]]]></description>
			<content:encoded><![CDATA[<p>Seems Nokia have released official Python-Qt bindings, called <a href="http://www.pyside.org/">PySide</a>, which are LGPL&#8217;d.</p>
<p>Apparently they tried to talk Riverbank Computing into releasing the PyQt bindings as LGPL, but Riverbank wouldn&#8217;t cooperate.  Presumably Riverbank wanted Nokia to pay them a stack of money, forgetting that Nokia, owning Qt, could undercut them by just rewriting the thing themselves.</p>
<p>Either way&#8230; this is nothing but good news for Python+Qt fans I think.  Not only do we get new, LGPL bindings, but they&#8217;re official, and will probably be better synced with official Qt releases.  Who knows?  They might even be documented <img src='http://irukado.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/08/19/pyside-nokia-releases-official-python-qt-bindings/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Launchpad now Open Source</title>
		<link>http://irukado.org/2009/07/21/launchpad-now-open-source</link>
		<comments>http://irukado.org/2009/07/21/launchpad-now-open-source#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:16:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[business models]]></category>
		<category><![CDATA[commercial]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[mark shuttleworth]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[proprietary]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1520</guid>
		<description><![CDATA[Canonical have now released Launchpad as open source. This is really good news, considering Shuttleworth&#8217;s previous stance, which I found quite wrong-headed.  Just having Launchpad alone as an Open Source project is great, as it&#8217;s a very powerful tool.  It&#8217;ll be interesting to see if they follow suit with the rest of Ubuntu&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Canonical have now <a href="http://blog.canonical.com/?p=192">released Launchpad as open source</a>. This is really good news, considering <a href="/archives/2009/05/shuttleworth-nails-his-colors-to-the-mast/">Shuttleworth&#8217;s previous stance</a>, which I found quite wrong-headed.  Just having Launchpad alone as an Open Source project is great, as it&#8217;s a very powerful tool.  It&#8217;ll be interesting to see if they follow suit with the rest of Ubuntu&#8217;s proprietary offerings.</p>
<p>Oh, and it&#8217;s written in python <img src='http://irukado.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/07/21/launchpad-now-open-source/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello, Lifeforms!</title>
		<link>http://irukado.org/2009/07/12/hello-lifeforms</link>
		<comments>http://irukado.org/2009/07/12/hello-lifeforms#comments</comments>
		<pubDate>Sun, 12 Jul 2009 16:42:01 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Adaptation]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[craigslist]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[evolve]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[genetic]]></category>
		<category><![CDATA[genetic algorithm]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[growth]]></category>
		<category><![CDATA[hello]]></category>
		<category><![CDATA[hello world]]></category>
		<category><![CDATA[lifeforms]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sf bay]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1467</guid>
		<description><![CDATA[Wherein I create a python program to evolve beasties that can say hello.]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s start with the results, so everyone&#8217;s clear what this is about.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">UmS6D0aW62+q!'%S2 (perfection:   0%) Evolving        2nd generation.
aUKahChc.5,e&amp;8:?1 (perfection:   0%) Evolving        3rd generation.
bYJo$F?O2;aTV'q'? (perfection:   0%) Evolving        4th generation.
P]N0+dC=p-GVh&lt;p1E (perfection:   0%) Evolving        5th generation.
P]N0+dC=p-GPQ&gt;+6b (perfection:   0%) Evolving        6th generation.
Q?T1LHOp=LSj*VUr0 (perfection:   0%) Evolving        7th generation.
ob3&lt;2Ih=p-CO^f#`5 (perfection:   0%) Evolving        8th generation.
dK8:SCn^omSj*VO ` (perfection:   0%) Evolving        9th generation.
X@Z'H&lt;f.)T?f&amp;(i6. (perfection:   6%) Evolving       10th generation.
g&amp;H0+)DG^J%GV(\(l (perfection:   0%) Evolving       11th generation.
dK9K3Vf.)T?f&amp;`Kfq (perfection:   6%) Evolving       12th generation.
8@Zm`,jZ-*jf38&quot;:; (perfection:  12%) Evolving       13th generation.
g&amp;l:7O^q0jGA2r2,&amp; (perfection:  12%) Evolving       14th generation.
j^4'N.:L0fV.9_Psi (perfection:  18%) Evolving       15th generation.
co2sL:BLffGA2((Y! (perfection:  18%) Evolving       16th generation.
MHX&lt;oUL$EP`&lt;o(\si (perfection:  18%) Evolving       17th generation.
g9l#bkrL$+e &amp;&gt;Tsr (perfection:  24%) Evolving       18th generation.
Pibho,MYilkEo(.sj (perfection:  29%) Evolving       19th generation.
cel/opLRP2aEerTs! (perfection:  35%) Evolving       20th generation.
HR(so ELrfef/\-s&amp; (perfection:  41%) Evolving       21st generation.
ce&gt;l9dr3iPef?r2sc (perfection:  41%) Evolving       22nd generation.
HRl#) EaibkforTs! (perfection:  47%) Evolving       23rd generation.
Ho9ho, LJ-?fY&gt;ms! (perfection:  53%) Evolving       24th generation.
He^j`,YLrfeHFlms! (perfection:  53%) Evolving       25th generation.
HRli*/ Lrfe &amp;rms! (perfection:  59%) Evolving       26th generation.
HelBNd Lrfe &amp;rms! (perfection:  65%) Evolving       27th generation.
HeGlo,jLifGf&amp;rm]! (perfection:  71%) Evolving       28th generation.
ce4lod &gt;iWeforms! (perfection:  71%) Evolving       29th generation.
H&amp;lho, Lif@forms! (perfection:  82%) Evolving       30th generation.
HRllo, &gt;ifeforms! (perfection:  88%) Evolving       31st generation.
Hello,:Lif@forms! (perfection:  88%) Evolving       32nd generation.
He9lo, Lifeforms! (perfection:  94%) Evolving       33rd generation.
Hello, LifeformN! (perfection:  94%) Evolving       34th generation.
HelloV Lifeforms! (perfection:  94%) Evolving       35th generation.
Hello, LifefKrms! (perfection:  94%) Evolving       36th generation.
Evolved to 100% perfection. Concluding.
&nbsp;
35,000 individuals sacrificed their lives
so that their species could eventually say:
&nbsp;
        Hello, Lifeforms!</pre></div></div>

<h2>The Challenge</h2>
<p>So&#8230; the other day, <a href="http://www.daikaiju.org.uk/~steve/cnot/">Steve</a> drew my attention to this <a href="http://sfbay.craigslist.org/sfc/eng/1246353621.html">craigslist &#8220;to all those who think themselves a programmer&#8221; challenge</a>.  To cut a long story short, the advert included a programming challenge, and mentioned that a genetic algorithm that could say Hello World using the sacrificial efforts of billions of evolving entities would be one of the winners.</p>
<p>Now, it just so happens that I wrote a pretty fun Genetic Programming app as my first foray into linux C++ programming back in the mid 90&#8217;s, and had lost the code for it.  So, last night, I rewrote a cut-down version of it in Python.</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python2.6</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Copyright (c) 2009 Lee Braiden &lt;lee.b@irukado.org&gt;</span>
<span style="color: #808080; font-style: italic;"># Released under the GNU General Public License, version 3.</span>
<span style="color: #808080; font-style: italic;"># http://www.gnu.org/licenses/gpl.html for details.</span>
<span style="color: #808080; font-style: italic;">#</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">random</span> <span style="color: #ff7700;font-weight:bold;">import</span> randint, sample
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Mirror:
	<span style="color: #483d8b;">&quot;&quot;&quot;Stores certain details that individuals must analyse
	and evolve themselves against.  Named after the
	psychology concept of being a mirror for an individual's
	own thoughts.&quot;&quot;&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, destiny<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Takes a string, 'destiny', which creatures must
		evolve to say.&quot;&quot;&quot;</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">UPPER</span> = <span style="color: #008000;">max</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span> <span style="color: #008000;">ord</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> destiny <span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">LOWER</span> = <span style="color: #008000;">min</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span> <span style="color: #008000;">ord</span><span style="color: black;">&#40;</span>x<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> destiny <span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">destiny</span> = destiny
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> chromosome_len<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Returns the number of chromosomes in an individual's
		genes.  In other words, this is the length of the message
		characters should evolve to say.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">destiny</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;A quick (readability-)helper function, which allows looping
		over each gene.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">self</span>.<span style="color: black;">chromosome_len</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> Individual:
	<span style="color: #483d8b;">&quot;&quot;&quot;Represents an individual beastie which will be created, can
	breed, can mutate, can attempt to solve the problem at hand,
	and can be tested for fitness, among other things.&quot;&quot;&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, chromosome_len, mutation_rarity<span style="color: black;">&#41;</span>:
		<span style="color: #008000;">self</span>._genes =  <span style="color: #483d8b;">&quot; &quot;</span> <span style="color: #66cc66;">*</span> chromosome_len
		<span style="color: #008000;">self</span>.<span style="color: black;">fitness</span> = <span style="color: #ff4500;">0</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">mutation_rarity</span> = mutation_rarity
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _gene_val<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Create a random gene value&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">chr</span><span style="color: black;">&#40;</span>randint<span style="color: black;">&#40;</span>mirror.<span style="color: black;">LOWER</span>, mirror.<span style="color: black;">UPPER</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _randomise_genes<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Initialise all of the individual's genes randomly.  Used
		during creation, rather than breeding&quot;&quot;&quot;</span>
		<span style="color: #008000;">self</span>._genes = <span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span> <span style="color: #008000;">self</span>._gene_val<span style="color: black;">&#40;</span>mirror<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> idx <span style="color: #ff7700;font-weight:bold;">in</span> mirror.<span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> <span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _choose_gene<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Choose an individual gene to target.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> randint<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._genes<span style="color: black;">&#41;</span>-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _freaky<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Roll a dice, and see if this individual is (un)lucky enough
		to gain a mutation.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> randint<span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">self</span>.<span style="color: black;">mutation_rarity</span><span style="color: black;">&#41;</span> == <span style="color: #ff4500;">0</span>
&nbsp;
	@<span style="color: #008000;">classmethod</span>
	<span style="color: #ff7700;font-weight:bold;">def</span> conjure<span style="color: black;">&#40;</span>cls, mirror, mutation_rarity<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Create an individual from scratch.&quot;&quot;&quot;</span>
		i = cls<span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>mirror.<span style="color: black;">destiny</span><span style="color: black;">&#41;</span>, mutation_rarity<span style="color: black;">&#41;</span>
		i._randomise_genes<span style="color: black;">&#40;</span>mirror<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> i
&nbsp;
	@<span style="color: #008000;">classmethod</span>
	<span style="color: #ff7700;font-weight:bold;">def</span> breed<span style="color: black;">&#40;</span>cls, mirror, mom, dad<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Breed an individual from two parents.&quot;&quot;&quot;</span>
		mutation_rarity = <span style="color: #008000;">float</span><span style="color: black;">&#40;</span>mom.<span style="color: black;">mutation_rarity</span> + dad.<span style="color: black;">mutation_rarity</span><span style="color: black;">&#41;</span> / <span style="color: #ff4500;">2.0</span>
		kid = cls<span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span>mirror.<span style="color: black;">destiny</span><span style="color: black;">&#41;</span>, mutation_rarity<span style="color: black;">&#41;</span>
		x = kid._choose_gene<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
		kid._genes = <span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>mom._genes<span style="color: black;">&#91;</span>:x<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>dad._genes<span style="color: black;">&#91;</span>x:<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span> kid._freaky<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
			kid._mutate<span style="color: black;">&#40;</span>mirror<span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">return</span> kid
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _mutate<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Mutate a random gene&quot;&quot;&quot;</span>
		orig_genes = <span style="color: #008000;">self</span>._genes
		idx = <span style="color: #008000;">self</span>._choose_gene<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
		els = <span style="color: black;">&#91;</span> x <span style="color: #ff7700;font-weight:bold;">for</span> x <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">self</span>._genes <span style="color: black;">&#93;</span>
		els<span style="color: black;">&#91;</span>idx<span style="color: black;">&#93;</span> = <span style="color: #008000;">self</span>._gene_val<span style="color: black;">&#40;</span>mirror<span style="color: black;">&#41;</span>
		<span style="color: #008000;">self</span>._genes = <span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span>els<span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> self_evaluate<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Evaluate 'fitness', or the ability to solve the given
		problem.  In other words, measure how close the individual
		is to the correct message text, and assign a score
		accordingly.&quot;&quot;&quot;</span>
		fitness = max_fitness = <span style="color: #008000;">float</span><span style="color: black;">&#40;</span><span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._genes<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
		<span style="color: #ff7700;font-weight:bold;">for</span> idx <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._genes<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>:
			<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>._genes<span style="color: black;">&#91;</span>idx<span style="color: black;">&#93;</span> == mirror.<span style="color: black;">destiny</span><span style="color: black;">&#91;</span>idx<span style="color: black;">&#93;</span>:
				<span style="color: #ff7700;font-weight:bold;">continue</span>
			<span style="color: #ff7700;font-weight:bold;">else</span>:
				fitness -= <span style="color: #ff4500;">1</span>
&nbsp;
		<span style="color: #008000;">self</span>.<span style="color: black;">fitness</span> = <span style="color: #ff4500;">100.0</span> <span style="color: #66cc66;">*</span> <span style="color: black;">&#40;</span>fitness / max_fitness<span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__cmp__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, competitor<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Comparison function, used for sorting populations to find
		the fittest.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">self</span>.<span style="color: black;">fitness</span> <span style="color: #66cc66;">&gt;</span> competitor.<span style="color: black;">fitness</span>:
			<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">1</span>
		<span style="color: #ff7700;font-weight:bold;">elif</span> <span style="color: #008000;">self</span>.<span style="color: black;">fitness</span> == competitor.<span style="color: black;">fitness</span>:
			<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #ff4500;">0</span>
		<span style="color: #ff7700;font-weight:bold;">else</span>:
			<span style="color: #ff7700;font-weight:bold;">return</span> -<span style="color: #ff4500;">1</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> World:
	<span style="color: #483d8b;">&quot;&quot;&quot;Represents a world populated by Individuals, which breed
	together, subject to natural selection, to reach an evolutionary
	goal.&quot;&quot;&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror, population_size=<span style="color: #ff4500;">1000</span>, mutation_rarity=<span style="color: #ff4500;">1000</span>, fitness_required=<span style="color: #ff4500;">100.0</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Initialise a population of population_size members, mutating
		one in every mutation_rarity breeds.  Evolution will stop when
		fitness reaches fitness_required percent.&quot;&quot;&quot;</span>
		<span style="color: #008000;">self</span>._mirror = mirror
		<span style="color: #008000;">self</span>._population = <span style="color: black;">&#91;</span> Individual.<span style="color: black;">conjure</span><span style="color: black;">&#40;</span>mirror, mutation_rarity<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, population_size<span style="color: black;">&#41;</span> <span style="color: black;">&#93;</span>
		<span style="color: #008000;">self</span>.<span style="color: black;">sacrifice_count</span> = <span style="color: #ff4500;">0</span>
		<span style="color: #008000;">self</span>._fitness_required = <span style="color: #ff4500;">100.0</span>
		<span style="color: #008000;">self</span>._mutation_rarity = mutation_rarity
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _natural_select<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, exclusion_list=<span style="color: black;">&#91;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Select two individuals from a population, choosing the most
		'fit' for breeding.&quot;&quot;&quot;</span>
		a,b = sample<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._population, <span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>a <span style="color: #66cc66;">&gt;</span> b<span style="color: black;">&#41;</span>:
			<span style="color: #ff7700;font-weight:bold;">return</span> a
		<span style="color: #ff7700;font-weight:bold;">else</span>:
			<span style="color: #ff7700;font-weight:bold;">return</span> b
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _breeding_pairs<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Select enough breeding pairs from a population to create a
		new population of equal size, assuming one child per couple.&quot;&quot;&quot;</span>
		bp = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
		pop_size = <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._population<span style="color: black;">&#41;</span>
&nbsp;
		<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span>, pop_size<span style="color: black;">&#41;</span>:
			mom = <span style="color: #008000;">self</span>._natural_select<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
			dad = <span style="color: #008000;">self</span>._natural_select<span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>mom<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
			bp.<span style="color: black;">append</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>mom,dad<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
		<span style="color: #ff7700;font-weight:bold;">return</span> bp
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _breed_new_generation<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, mirror<span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Create a new generation, breeding it from the older
		generation using natural selection.&quot;&quot;&quot;</span>
		new_gen = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
		bp = <span style="color: #008000;">self</span>._breeding_pairs<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
		<span style="color: #ff7700;font-weight:bold;">for</span> mom,dad <span style="color: #ff7700;font-weight:bold;">in</span> bp:
			kid = Individual.<span style="color: black;">breed</span><span style="color: black;">&#40;</span>mirror, mom,dad<span style="color: black;">&#41;</span>
			new_gen.<span style="color: black;">append</span><span style="color: black;">&#40;</span>kid<span style="color: black;">&#41;</span>
&nbsp;
		<span style="color: #008000;">self</span>.<span style="color: black;">sacrifice_count</span> += <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._population<span style="color: black;">&#41;</span>
		<span style="color: #008000;">self</span>._population = new_gen
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> _analyse_population<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Evaluate the genetic fitness of the entire population.&quot;&quot;&quot;</span>
		<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">self</span>._population:
			i.<span style="color: black;">self_evaluate</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._mirror<span style="color: black;">&#41;</span>
&nbsp;
		<span style="color: #008000;">self</span>._population.<span style="color: black;">sort</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
		most_civilised = <span style="color: #008000;">self</span>._population<span style="color: black;">&#91;</span><span style="color: #ff4500;">0</span><span style="color: black;">&#93;</span>
&nbsp;
		<span style="color: #ff7700;font-weight:bold;">return</span> most_civilised
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">def</span> evolve_civilisation<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
		<span style="color: #483d8b;">&quot;&quot;&quot;Evolve this civilisation until the required fitness_level
		is reached.&quot;&quot;&quot;</span>
		generation_count = <span style="color: #ff4500;">1</span>
		last_str_len = <span style="color: #ff4500;">0</span>
		<span style="color: #ff7700;font-weight:bold;">while</span><span style="color: black;">&#40;</span>generation_count<span style="color: black;">&#41;</span>:
			most_civilised = <span style="color: #008000;">self</span>._analyse_population<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
			gen_ord = ordinal<span style="color: black;">&#40;</span>generation_count + <span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
			<span style="color: #ff7700;font-weight:bold;">if</span> most_civilised.<span style="color: black;">fitness</span> <span style="color: #66cc66;">&gt;</span>= <span style="color: #008000;">self</span>._fitness_required:
				<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Evolved to %3.0f%% perfection. Concluding.&quot;</span> <span style="color: #66cc66;">%</span> most_civilised.<span style="color: black;">fitness</span>
				<span style="color: #ff7700;font-weight:bold;">return</span> most_civilised
			<span style="color: #ff7700;font-weight:bold;">else</span>:
				<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;%s (perfection: %3.0f%%) Evolving % 10s generation.&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>most_civilised._genes, most_civilised.<span style="color: black;">fitness</span>, gen_ord<span style="color: black;">&#41;</span>
				<span style="color: #008000;">self</span>._breed_new_generation<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._mirror<span style="color: black;">&#41;</span>
&nbsp;
			generation_count += <span style="color: #ff4500;">1</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># a couple of helper functions #############</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> ordinal<span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>:
	<span style="color: #483d8b;">&quot;&quot;&quot;borrowed from John Machin's python-list post.  Appends an
	ordinal suffix to a number.  For example, 1 becomes 1st,
	2 becomes 2nd, etc.&quot;&quot;&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff4500;">10</span> <span style="color: #66cc66;">&lt;</span>= n <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">100</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff4500;">20</span>:
		<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span> + <span style="color: #483d8b;">'th'</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>:
		<span style="color: #ff7700;font-weight:bold;">return</span>  <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span> + <span style="color: black;">&#123;</span><span style="color: #ff4500;">1</span> : <span style="color: #483d8b;">'st'</span>, <span style="color: #ff4500;">2</span> : <span style="color: #483d8b;">'nd'</span>, <span style="color: #ff4500;">3</span> : <span style="color: #483d8b;">'rd'</span><span style="color: black;">&#125;</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span>n <span style="color: #66cc66;">%</span> <span style="color: #ff4500;">10</span>, <span style="color: #483d8b;">&quot;th&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> PrintLargeNumber<span style="color: black;">&#40;</span>n,width=<span style="color: #ff4500;">2</span>,delim=<span style="color: #483d8b;">','</span>,<span style="color: #dc143c;">decimal</span>=<span style="color: #483d8b;">'.'</span><span style="color: black;">&#41;</span>:
	<span style="color: #483d8b;">&quot;&quot;&quot;Converts a float to a string with appropriately placed commas.
&nbsp;
	Floats will be shown with 'width' digits right of the decimal.
	'delim' specifies the thousands delimiter.
	'decimal' specifies the decimal character.
&nbsp;
	Copyright 2007 Regents of the University of California
	Written by David Isaacson at the University of California,
	Davis BSD License&quot;&quot;&quot;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> width <span style="color: #66cc66;">&gt;</span>= <span style="color: #ff4500;">0</span>: s = <span style="color: #483d8b;">&quot;%.*f&quot;</span> <span style="color: #66cc66;">%</span><span style="color: black;">&#40;</span>width,n<span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">else</span>: s = <span style="color: #008000;">str</span><span style="color: black;">&#40;</span>n<span style="color: black;">&#41;</span>
	dec = s.<span style="color: black;">find</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">decimal</span><span style="color: black;">&#41;</span>
	<span style="color: #ff7700;font-weight:bold;">if</span> dec == -<span style="color: #ff4500;">1</span>: dec = <span style="color: #008000;">len</span><span style="color: black;">&#40;</span>s<span style="color: black;">&#41;</span>
	threes = <span style="color: #008000;">int</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>dec-<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>/<span style="color: #ff4500;">3</span><span style="color: black;">&#41;</span> <span style="color: #808080; font-style: italic;"># we don't need a comma at the start</span>
	<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span>threes<span style="color: black;">&#41;</span>:
		loc = dec-<span style="color: #ff4500;">3</span><span style="color: #66cc66;">*</span><span style="color: black;">&#40;</span>i+<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
		s = s<span style="color: black;">&#91;</span>:loc<span style="color: black;">&#93;</span> + delim + s<span style="color: black;">&#91;</span>loc:<span style="color: black;">&#93;</span>
	<span style="color: #ff7700;font-weight:bold;">return</span> s
&nbsp;
<span style="color: #808080; font-style: italic;">############################################</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> evolve_from_nothingness<span style="color: black;">&#40;</span>msg<span style="color: black;">&#41;</span>:
	<span style="color: #483d8b;">&quot;&quot;&quot;Evolve an individual capable of saying the given msg.&quot;&quot;&quot;</span>
	world = World<span style="color: black;">&#40;</span>Mirror<span style="color: black;">&#40;</span>msg<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
	greeter = world.<span style="color: black;">evolve_civilisation</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
	large_num_str = PrintLargeNumber<span style="color: black;">&#40;</span>world.<span style="color: black;">sacrifice_count</span>, width=<span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>%s individuals sacrificed their lives<span style="color: #000099; font-weight: bold;">\n</span>so that their species could eventually say:<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>%s<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>large_num_str, greeter._genes<span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ == <span style="color: #483d8b;">&quot;__main__&quot;</span>:
	evolve_from_nothingness<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Hello, Lifeforms!&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
	<span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;Press return: &quot;</span><span style="color: black;">&#41;</span>
	<span style="color: #dc143c;">sys</span>.<span style="color: black;">stdout</span>.<span style="color: black;">flush</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
	<span style="color: #dc143c;">sys</span>.<span style="color: black;">stdin</span>.<span style="color: #dc143c;">readline</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>All in all, it&#8217;s pretty sweet.  It evolves fairly constantly, straight to the answer, in less than 40 generations.  Completes in a few seconds as well.</p>
<p>I&#8217;ve no doubt the SF Bay guys would find problems with this.  They&#8217;re into pointlessly obfuscated code, FP, and lambdas, for instance.  I&#8217;m into pointedly unobfuscated code, and using FP only when it makes things much clearer.  And optimisation is for compilers long after your algorithms and portability have done their thing.  That said, most of this IS off the top of my head, and I&#8217;m sure there are better ways to do it, so let me know if there are obvious (or not so obvious) improvements that can be made.</p>
<p>Anyway&#8230; for me, this is what programming&#8217;s all about.  In what other fields can you create worlds, create lifeforms, prove that evolution works, test yourself, frustrate yourself, and enjoy seeing your project finally work, all in the space of a few hours?</p>
<p>I should probably thank the python guys for a lot of that rapid development; the C++ version took much longer.  Then again, it had a virtual CPU and datatyped I/O etc.  I think it was threaded, too, if I remember correctly.  It also took hours to work out that the way to get 4 out of two 2s was to add them.  I might try that again someday, with a tweaked CPU/instruction set/program model.</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/07/12/hello-lifeforms/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Blender 2.5&#8217;s Python UI/Plugin API &#8211; A Huge Leap Forward</title>
		<link>http://irukado.org/2009/05/28/blender-25s-python-uiplugin-api-a-huge-leap-forward</link>
		<comments>http://irukado.org/2009/05/28/blender-25s-python-uiplugin-api-a-huge-leap-forward#comments</comments>
		<pubDate>Thu, 28 May 2009 12:25:21 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[Digital Art]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[positional audio]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1446</guid>
		<description><![CDATA[I&#8217;ve just been watching this Blender 2.5 tour.  It starts off pretty tamely, showing just a few variations on what blender has been able to do for ages.  There are some nice things, like better UI, visual tips (color coding for animated values, etc.)
However, the real gems are hidden away towards the end [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been watching this <a href="http://www.blendernation.com/2009/05/28/blender25-tour-vi/">Blender 2.5 tour</a>.  It starts off pretty tamely, showing just a few variations on what blender has been able to do for ages.  There are some nice things, like better UI, visual tips (color coding for animated values, etc.)</p>
<p>However, the real gems are hidden away towards the end of the tour: blender&#8217;s UI options are now implemented in pure Python, and you can code, press a refresh key, and have new options appear in the UI straight away.  This is <em>the</em> feature I&#8217;ve been hoping for in blender for ages now.  2.4&#8217;s roadmap included an updated UI, and I proposed something like this, so I was pretty disappointed to see that nothing much happened on the UI front.  For a while there, it looked like 2.5 would be equally intransigent.</p>
<p>That has NOT been the case though.  Now, it&#8217;s possible to write python plugins for blender, and have them be fully integrated, as if they were part of the core code.  They&#8217;ve even gone a step further, and made it very nice and standardised to use; you don&#8217;t need to specify buttons for the UI, so much as specify variables and their types.  The rest is done for you, via Blender&#8217;s RNA type system.  Seems they&#8217;ve setup fairly rich datatypes/widgets, too.</p>
<p>The upshot of all this?  The whole thing seems nice enough now that I&#8217;m a lot more tempted to write blender plugins.  It&#8217;s occured to me now and then that blender would be much cooler with 3D audio objects &#8212; speakers, dampeners, echoers/reflectors, and microphones in the scene used to produce animated positional audio, just like it currently has lights, materials, reflectors, and cameras to produce animated video.</p>
<p>I expect too, that, since plugins are much more integrated now, there&#8217;ll be an exponential increase in their use and development by others.</p>
<p>Congrats to everyone who&#8217;s worked on 2.5.  It&#8217;s been a while coming now, but 2.5 looks amazing.</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/05/28/blender-25s-python-uiplugin-api-a-huge-leap-forward/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Turbogears 2.0 released</title>
		<link>http://irukado.org/2009/05/27/turbogears-20-released</link>
		<comments>http://irukado.org/2009/05/27/turbogears-20-released#comments</comments>
		<pubDate>Wed, 27 May 2009 22:12:58 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[turbogears]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1444</guid>
		<description><![CDATA[Turbogears 2.0 has finally been released!.  Read the TG2 release announcement, the changelog, or just dive in with the tutorials.
I&#8217;ve been holding off on playing with TG2 too much, since it wasn&#8217;t final, but now I&#8217;m gonna have a good play.  It&#8217;ll be interesting to compare this with django, cherrypy 3, etc.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://turbogears.org/2.0/">Turbogears 2.0 has finally been released!</a>.  Read the <a href="http://compoundthinking.com/blog/index.php/2009/05/27/639/">TG2 release announcement</a>, the <a href="http://trac.turbogears.org/wiki/2.0/changelog">changelog</a>, or just dive in with the <a href="http://www.turbogears.org/2.0/docs/main/Wiki20/wiki20.html">tutorials</a>.</p>
<p>I&#8217;ve been holding off on playing with TG2 too much, since it wasn&#8217;t final, but now I&#8217;m gonna have a good play.  It&#8217;ll be interesting to compare this with django, cherrypy 3, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/05/27/turbogears-20-released/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shuttleworth nails his colors to the mast</title>
		<link>http://irukado.org/2009/05/16/shuttleworth-nails-his-colors-to-the-mast</link>
		<comments>http://irukado.org/2009/05/16/shuttleworth-nails-his-colors-to-the-mast#comments</comments>
		<pubDate>Sat, 16 May 2009 15:18:37 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[canonical]]></category>
		<category><![CDATA[commercialisation]]></category>
		<category><![CDATA[floss]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[guidelines]]></category>
		<category><![CDATA[libre.fm]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mark shuttleworth]]></category>
		<category><![CDATA[Matt Lee]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[proprietary]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[trademark]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu one]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1285</guid>
		<description><![CDATA[A bug has been filed over on launchpad, regarding the Commercialisation of Ubuntu by Canonical.  It seems Shuttleworth has nailed his colors to the mast, and they&#8217;re clearly not the pretty colors we&#8217;d all hoped for.
The original bug report, by Matt Lee, founder of libre.fm, reads:
With the release of &#8220;Ubuntu One&#8221; and the news [...]]]></description>
			<content:encoded><![CDATA[<p>A bug has been filed over on launchpad, regarding the <a href="https://bugs.launchpad.net/ubuntu/+bug/377005">Commercialisation of Ubuntu by Canonical</a>.  It seems Shuttleworth has nailed his colors to the mast, and they&#8217;re clearly not the pretty colors we&#8217;d all hoped for.</p>
<p>The original bug report, by <a href="http://matt.lee.name/">Matt Lee</a>, founder of <a href="http://libre.fm/">libre.fm</a>, reads:</p>
<blockquote type="cite"><p>With the release of &#8220;Ubuntu One&#8221; and the news that Launchpad will not be released as free software, Canonical&#8217;s message: &#8220;Canonical is committed to the development, distribution and promotion of open source software products, and to providing tools and support to the open source community.&#8221; is no longer true, and its continued association with Ubuntu is damaging to free software.</p>
<p>Canonical should decide if it wants to be committed to the development of free software or not.</p>
<p>Canonical employees should decide if they want to be seen to work for a proprietary software developer, whilst talking about free software.</p>
<p>Canonical should either release publically, all the source code for Launchpad and Ubunet, or it should update its mission statement to state their commitment to the development of proprietary software.</p>
<p>The Ubuntu community should decide if they want to be associated, governed and ruled by a proprietary software company, and should appoint non-Canonical people to all the key positions.</p></blockquote>
<p><a href="http://www.markshuttleworth.com/">Mark Shuttleworth</a> (founder of <a href="http://www.canonical.com/">Canonical</a>), has responded to it with:</p>
<blockquote type="cite"><p>Ubuntu was founded together with Canonical, they have always been (and I hope they always will be) intertwined and interdependent. There are thousands of projects and hundreds of distributions, which have various degrees of involvement between themselves and companies. Contributors already align themselves with the projects that reflect the things they are most interested in.</p>
<p>Personally, I think the company/project interface and interaction makes the landscape interesting. We&#8217;re all trying to figure out the future of software, and perhaps the future of the software business at the same time.</p>
<p>I understand the passion behind this bug report, but I don&#8217;t think it can be addressed. The people who make up the Ubuntu community are entirely free to devote their energy to whatever path they think will serve their interests best &#8211; and that has always been the case. I suspect most people in this community are drawn here precisely because of the interdependency between project and company. And those who don&#8217;t may well be drawn to something which flows as a direct consequence of that.</p>
<p>There are several distributions which make a point of having no corporate backer. The people who want that, specifically, are probably already there, happily doing good work. People who want something else are wherever they think they can find that, happily doing good work. Some people may change their mind and move in either direction. But Ubuntu and Canonical were born together, with a shared mission. If that&#8217;s interesting to you, then participate in Ubuntu. If it&#8217;s not, then don&#8217;t.</p></blockquote>
<p>Personally I think the bug report is entirely correct.  Ubuntu was always a commercial venture to me; it&#8217;s always been clear that shuttleworth intended to make Ubuntu big, then profit from it.  But the way he&#8217;s doing it &#8212; by going against free software while claiming to be a spokeperson in favor of it &#8212; is not only incoherent, but damaging to the community.  It affects people involved in Ubuntu even more so, since (as the bug report suggests) they&#8217;re now involved with a company of questionable ethics, beliefs and practices which may not align with their own.</p>
<p>The most worrying parts for me were Shuttleworth&#8217;s comment that <em>&#8220;[he] understand[s] the passion behind this bug report, but [doesn't] think it can be addressed&#8221;</em>, his change of the bug status to <em>&#8220;won&#8217;t fix&#8221;</em>, and the comment that <em>&#8220;The people who make up the Ubuntu community are entirely free to devote their energy to whatever path they think will serve their interests best &#8211; and that has always been the case&#8221;</em>.  This last is patently false, since <em>Ubunteros</em> have to commit to an ethical policy.  I haven&#8217;t re-read it in light of this development, but I&#8217;d be surprised if that ethical policy for Ubuntu contributors allows the kind of commercial actions that Shuttleworth himself is attempting.  What I think Mark means is that he owns the company, so everyone else can either like it, or get stuffed.  Hell, that&#8217;s pretty much his exact wording.  Which is precisely the OPPOSITE of the ideal spirit of FOSS community participation.</p>
<p>I really don&#8217;t get why he&#8217;s doing it this way.  It seems pretty clear that if Ubuntu creates a proprietary product good enough that Linux users want it, then FOSS developers will simply bypass his underhanded attempts at control by creating a free clone.  Surely selling high-end tech support, on-site/remote admin, printed documentation, etc. would be a much more natural model for them?  Then again&#8230; you can&#8217;t get quite so rich selling physical services, as you can selling automated, virtual ones, and Shuttleworth&#8217;s previous success was built on that virtual model.</p>
<p>Anyway&#8230; I for one am glad to say that I&#8217;ve gone back to Debian before this came out, simply because I find Debian better, for many reasons.  Basically, it&#8217;s the original and best, which Ubuntu adds very little on top of, and when it does, Debian soon adds those features back.  If you&#8217;re still with Ubuntu, and value free software, or don&#8217;t want to be associated with this sort of anti-community behavior, you might want to consider a switch.  Certainly, I think it&#8217;s time to stop recommending Ubuntu when other distros provide equally viable but more principled alternatives.</p>
<h2>Update:</h2>
<p>It seems there&#8217;s also a related bug about <a href="https://bugs.launchpad.net/ubunet/+bug/375345">Ubuntu One violating Ubuntu&#8217;s trademark usage guidelines</a>:</p>
<blockquote type="cite"><p>The usage of the word Ubuntu in the context of &#8220;Ubuntu One&#8221; is inconsistent with the Trademark Policy outlined at http://www.ubuntu.com/aboutus/trademarkpolicy</p>
<p>Specifically of note are the following:</p>
<blockquote type="cite"><p>The objective of the Ubuntu trademark policy is to encourage widespread use of the Ubuntu trademarks by the Ubuntu community while controlling that use in order to avoid confusion on the part of Ubuntu users and the general public, to maintain the value of the image and reputation of the trademarks and to protect them from inappropriate or unauthorised use.</p></blockquote>
<p>The danger of confusion among users and the general public about whether this new service is part of or associated with Ubuntu is extremely high.</p>
<blockquote type="cite"><p>there is no commercial intent behind the use</p></blockquote>
<p>The service has clear and stated commercial intent.</p>
<blockquote type="cite"><p>what you are referring to is in fact Ubuntu. If someone is confused into thinking that what isn&#8217;t Ubuntu is in fact Ubuntu, you are probably doing something wrong</p></blockquote>
<p>The service is not Ubuntu and has no association with Ubuntu as a product or community. It merely runs on and works with Ubuntu, on equal footing with other applications like Apache, Firefox, or an Ubuntu user&#8217;s blog.</p>
<blockquote type="cite"><p>there is no suggestion (through words or appearance) that your project is approved, sponsored, or affiliated with Ubuntu or its related projects unless it actually has been approved by and is accountable to the Ubuntu Community Council</p></blockquote>
<p>I am not aware of any such approval or even discussion by the Community Council at this time.</p>
<blockquote type="cite"><p>If you are producing new software which is intended for use with or on Ubuntu, you may use the Trademark in a way which indicates the intent of your product. For example, if you are developing a system management tool for Ubuntu, acceptable project titles would be &#8220;System Management for Ubuntu&#8221; or &#8220;Ubuntu Based Systems Management&#8221;. We would strongly discourage, and likely would consider to be problematic, a name such as UbuntuMan, Ubuntu Management, ManBuntu, etc. Furthermore, you may not use the Trademarks in a way which implies an endorsement where that doesn&#8217;t exist, or which attempts to unfairly or confusingly capitalise on the goodwill or brand of the project.</p></blockquote>
<p>The service clearly falls under the latter list of examples similar to UbuntuMan, and as such is named unacceptably. Furthermore it appears to be attempting to capitalize on the brand, which is similarly explicitly prohibited.</p>
<p><strong>Proposed fix</strong><br />
Rename the service to not include the words &#8220;UBUNTU, KUBUNTU, EDUBUNTU, and XUBUNTU&#8221; nor &#8220;any mark ending with the letters UBUNTU or BUNTU&#8221;, or in an acceptably non-ambiguous manner such as &#8220;Cloud Storage Solution for Ubuntu&#8221;.</p></blockquote>
<p>This all seems like a clear case of Canonical violating the core principles of Ubuntu for commercial gain, which saddens me.</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/05/16/shuttleworth-nails-his-colors-to-the-mast/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On the Future of Copyright</title>
		<link>http://irukado.org/2009/03/17/on-the-future-of-copyright</link>
		<comments>http://irukado.org/2009/03/17/on-the-future-of-copyright#comments</comments>
		<pubDate>Tue, 17 Mar 2009 17:20:29 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Society]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[drm]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[ipo]]></category>
		<category><![CDATA[law]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1255</guid>
		<description><![CDATA[The UK Intellectual Property Organisation (being one of those governmental organisations which I&#8217;m ashamed to have associated with my country), is conducting a so-called consultation on the future of IP, and the forming of a new so-called Digital Rights Agency.  This seems to be a further step based on Digital Britain Report.
What they seem [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.ipo.gov.uk/">UK Intellectual Property Organisation</a> (being one of those governmental organisations which I&#8217;m ashamed to have associated with my country), is conducting a so-called consultation on the future of IP, and the forming of a new <a href="http://www.zeropaid.com/news/10052/UK+Govt+Asks+for+Input+on+Proposed+Copyright+Agency">so-called Digital Rights Agency</a>.  This seems to be a further step based on <a href="http://www.culture.gov.uk/what_we_do/broadcasting/5631.aspx">Digital Britain Report</a>.</p>
<p>What they seem to mean, sadly, is &#8220;how to make citizens comply with the illegitimate mess that is modern Copyright law&#8221;.  I have a few thoughts on this, which I wanted to &#8220;get down on paper&#8221;.</p>
<h2>Questions</h2>
<p>The questions which the IPO is asking are as follows:</p>
<ol>
<li>How to educate and change consumer behavior towards copyright material</li>
<li>How to support industry efforts in developing new and attractive legal ways for consumers to access content</li>
<li>How to support legislation to address consumer activity that breaches civil copyright law and how to tackle persistent infringement</li>
<li>How to enable technical copyright-support solutions that work for both consumers and content creators</li>
<li>Whether or not the Agency should be an independent industry body with back-up legal powers held by Ofcom</li>
<li>How such an agency can be funded</li>
</ol>
<p>One respresentative, namely Steven Carter (Minister for Technology, Communications and Broadcasting), also stated that:</p>
<blockquote type="cite"><p>“In the new digital age, copyright infringement has become easier and more socially acceptable, so it’s clear we need some form of legislative backstop for the protection of rights as well as new and innovative ways to access legal content. Today we have published proposals in the form of a Straw Man on digital rights. That Straw Man could be torched, tolerated or a touchstone for the start point of constructive debate and design.</p></blockquote>
<p>Interesting that they admit the use of a <a href="http://en.wikipedia.org/wiki/Straw_man">Straw Man</a> (a <a href="http://en.wikipedia.org/wiki/Fallacy">fallacy</a>) as their starting point, yet do not shrink from moving forward on enforcement and &#8220;educating&#8221; the public with such fallacies.</p>
<p>Education of consumers and modification of their behavior is a false (and dangerously presumptive) premise, and <em>not at all</em> the issue.  The issue is that organisations generally known as &#8220;big media&#8221; have, over the course of many years, perverted the Copyright system to their own ends.  It is the corporations, and the government that have allowed this perversion and enforced it, which need to be re-educated.</p>
<h2>The Fundamental premise of Copyright</h2>
<p>Copyright was created, (ostensibly, that is) as a way to encourage creative contributions to society.  The idea was that, by preventing others from copying an idea for a short time, those who spent the time to come up with the initial idea would be rewarded.  The fear (ostensibly), was that without rewards, people would not create.  That fundamental premise alone, I would very much contest, given that people have created since the dawn of time.  I believe it is in peoples&#8217; nature to create, and that true creation is done for the love of the idea inspiring it.  Whenever I&#8217;ve been possessed of a creative idea, it was just that &#8212; a possession by the idea, to the point where I could not wait to bring it to life, to enjoy its realisation, to share the benefits with others, and to enjoying seeing their joy in return.  I also tend to take time to thank those that inspired me, thereby completing a cycle.  Likewise, people have thanked me for my work and built on it in their own ways, adding just a little more joy to my creations.  In fact, I&#8217;ve met many more artists (including painters, musicians, writers, etc.) working for the love of their art than for monetary rewards.</p>
<h2>Holding back society</h2>
<p>Today, it is more and more the case that big media is holding back society by controlling the creativity and communication between citizens due to ever extended copyright terms (in fact, copyright terms should be shrinking, due to faster distribution methods), DRM, the application of copyright law to private use (rather than commercial ventures), etc.</p>
<p>Creativity, and creative works, are a fundamental form of expression and communication between human beings.  Invariably, this creativity is nothing more than each person standing on the shoulders of those who came before, and invariably, no creator is unique, when other potential creators also have access to the same pre-existing works.  For instance, Albert Einstein, one of the greatest, most innovative minds of our era, was certainly not alone, with at least two others working on very similar ideas at the same time in history.  His creative genius was but a small leap, based on the leaps made before**.  Likewise, musicians have often acknowledged their influences as hugely affecting their work, and often directly take (sample) and remix the works of others, creating interesting new works with only the most minor modifications to pre-existing work.  As each idea builds on the one before, each and every access to existing knowledge, art, music, film, or other media is more important than any individual right to control such access.</p>
<p>The obvious conclusion then, is that all individual creativity is minor, but that, where possible, ensuring all individuals (ANY and ALL of whom may go on to create even greater works) receive unfettered access to creative works is of utmost importance.  This clearly shifts the natural bias towards individual&#8217;s rights to access content online, regardless of </p>
<p>The current system of copyright is so perversely biased towards commercial interests, despite its original intent, that it no longer represents natural rights of citizens, and no longer reflects the modern realities of distribution ease.  As a result, citizens, en masse, intuitively recognise its failure to match reality in any way, and consequently reject it as invalid.</p>
<h2>How to support industry efforts in developing new and attractive legal ways for consumers to access content</h2>
<p>Again, the premise &#8212; that industry is making efforts, and that these efforts must be supported despite citizens wishes &#8212; is false.  It is the consumers&#8217; natural rights which are being abused, and must be reinforced, and it is citizens who must be assisted to take back those rights from the results of many years of overzealous corporate lobbying, if not downright corruption.  The burden of achieving legality lies with those who have abused the legal system for years, to the point where the majority of citizens, from to the youngest child without legal knowledge to the most eminent copyright lawyers, intuitively know that the current system is broken, and therefore ignore it.</p>
<p>Consumers can easily access content by simply downloading a file, with by far the vast majority of costs being bandwidth costs which ARE already, entirely validly, shouldered by those same consumers.  Yes &#8212; these costs, the true costs, they pay for, often at high rates, happily and legitimately.  What consumers are failing to pay for is false costs and false scarcity, which they see for what it is, namely a perverse attempt to hold back society&#8217;s technological, social, and cultural progress.  They reject such things accordingly, and I believe no one should expect a more fitting response to such perverse, cynical attempts.</p>
<p>3. How to enable technical copyright-support solutions that work for both consumers and content creators; </p>
<p>First of all, honesty is required on the part of government, copyright holders, and artists.  The fact is that the market is flooded with musicians and media makers, and media like music is simply not scarce enough (nor such a skill these days, given software assistance) to command high prices.  More importantly, creativity is not the domain the elite, but the domain of every human being with access to appropriate tools which allow them to express their creativity.  Those tools are available more widely every day in the digital world, and so the day is coming when &#8220;artists&#8221; will simply be &#8220;people&#8221;. Creativity is becoming commoditised by this process, and the fact is that distribution of media is now effortless, and &#8220;big media&#8221; is simply obsolete.</p>
<p>IF and WHEN that realisation has been made and fully accepted by both &#8220;big media&#8221; and artists, then fair prices will be set according to supply and demand.  Consumers will happily pay.  But make no mistake: this will absolutely NOT resemble the mass transit of money from many poor, equally creative citizens to a few wealthy, controlling corporations controlling access to a few &#8220;successful&#8221; creatives.  That situation has plagued society and copyright for the last few centuries (and ONLY the last few centuries, during which corporations have been assisted by government to abuse their power).  To attempt to enforce this unfair and illegitimate status quo will serve only to create a consumer backlash which will ultimately be the undoing of the current system, rather than its savior.</p>
<p>4. Whether or not the Agency should be an independent industry body with back-up legal powers held by Ofcom</p>
<p>Absolutely not.  The world is changing too quickly for law makers to keep up with.  Until the situation has settled down, until the vast majority of citizens understand this brave new world fully, and are largely in agreement about the way forward, neither government nor corporations have a mandate to enforce anything.  Laws represent the will of the people, not vice versa.  If the law does NOT reflect the will of the people, then it cannot truly be considered valid law.</p>
<p>5. How such an agency can be funded</p>
<p>Until the current, very fundamental misunderstandings of corporations and government have been resolved, no such agency should exist, as it cannot hope to spend money on a valid goal, therefore it should not be funded.  Of course, studies seeking true understanding and resolution should not be funded by any such biased organisations either.</p>
<p>** &#8220;Einstein did not achieve this revolution by means of a single stroke of genius—rather, he stood on the shoulders of dwarves and giants&#8221; &#8212; Science Daily, http://www.sciencedaily.com/releases/2006/07/060731113951.htm</p>
<p>&#8211;<br />
Lee</p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/03/17/on-the-future-of-copyright/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mathemagical</title>
		<link>http://irukado.org/2009/03/16/mathemagical</link>
		<comments>http://irukado.org/2009/03/16/mathemagical#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:20:04 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://irukado.org/?p=1246</guid>
		<description><![CDATA[I&#8217;ve been slowly upgrading my understanding of complex math lately, by working (in python) through stuff on Project Euler and betterexplained, etc.  I just discovered the derivations package in Debian.  It&#8217;s a book of applied math proofs, styled after K&#038;R&#8217;s The C Programming Language&#8217;s logical progression and easy reference (K&#038;R&#8217;s TCPL is a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been slowly upgrading my understanding of complex math lately, by working (in python) through stuff on <a href="http://projecteuler.net/">Project Euler</a> and <a href="http://www.betterexplained.com/">betterexplained</a>, etc.  I just discovered <a href="http://packages.debian.org/unstable/doc/derivations">the derivations package</a> in <a href="http://www.debian.org/">Debian</a>.  It&#8217;s a book of applied math proofs, styled after K&#038;R&#8217;s The C Programming Language&#8217;s logical progression and easy reference (K&#038;R&#8217;s TCPL is a book that I really enjoyed, and it opened a lot of (conceptual) doors for me as a kid).</p>
<p>Working through this in python is a very useful exercise; it&#8217;s teaching me lots about the most efficient ways of doing things in that language, and with the standard library tools, some of which I rarely find use for otherwise.</p>
<p>Anyway, together with some other things mentioned in the preface, Derivations seems like a very promising book.  Except for one thing:</p>
<blockquote type="cite"><p>One particular respect in which the book departs requires some defense here, I think: the book employs hexadecimal numerals.</p></blockquote>
<p>So it&#8217;s going to explain complex math, but it&#8217;s going to do it&#8230; in hexadecimal.</p>
<p>Not sure whether to laugh or cry.  But I&#8217;ll see how it goes.  I don&#8217;t entirely disagree with the idea that, &#8220;If one wishes to reach hexadecimal ground, one must leap.&#8221;  It&#8217;s just that I don&#8217;t really see the point of becoming THAT fluent in hex, when understanding the basic concept of bases, and knowing how to convert from dec<>hex<>oct<>bin, that 2<sup>5</sup> is 32, and that 2<sup>32</sup> is roughly ~4 billion is almost certainly enough.  Is this book really suggesting I learn to do all my math in hex?  And if so, is there any real benefit?  It does seem to suggest that math is more beautiful in hex, but I&#8217;ve never heard of anything special about base-16, in relation to laws of physics, for instance.</p>
<p>Well, find out next time, same bat-time, same bat-channel, I guess <img src='http://irukado.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://irukado.org/2009/03/16/mathemagical/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
