<?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>Intrepid Blog &#187; Computer Science</title>
	<atom:link href="http://blog.affien.com/archives/category/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 23 Jan 2012 08:47:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GStreamer: accurate duration</title>
		<link>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/</link>
		<comments>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:26:01 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.affien.com/?p=371</guid>
		<description><![CDATA[When decoding, for instance, a variable-bitrate MP3, gs [...]]]></description>
			<content:encoded><![CDATA[<p>When decoding, for instance, a variable-bitrate MP3, gstreamer reported durations are, to say the least, estimates.  I&#8217;ve tried to get a better result in a few ways.  First off, some files yield a <code>duration</code> tag, but even if you&#8217;re lucky and it is there, there are no guaranties about precision.  After that I tried seeking to the end (<code>GST_SEEK_END</code>) of the stream and querying the position, which gstreamer didn&#8217;t like.  Finally, routing the audio into a <code>fakesink</code>, waiting for the end of stream and then querying for the position gives the right result.  It&#8217;s not the prettiest method, but it works.</p>
<p><a href='http://blog.affien.com/wp-content/uploads/2009/04/gst-duration.py'>This</a> is a Python script that prints the duration of a media to stdout.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2009/04/19/gstreamer-accurate-duration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Cuckoo Hashtable</title>
		<link>http://blog.affien.com/archives/2008/12/21/the-cuckoo-hashtable/</link>
		<comments>http://blog.affien.com/archives/2008/12/21/the-cuckoo-hashtable/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 22:22:41 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[cuckoo]]></category>
		<category><![CDATA[hash]]></category>

		<guid isPermaLink="false">http://blog.affien.com/?p=349</guid>
		<description><![CDATA[A Hashtable algorithm is a specific algorithm to implem [...]]]></description>
			<content:encoded><![CDATA[<p>A Hashtable algorithm is a specific algorithm to implement key-value pair datastructure with efficient by-key look-ups using hashing of the keys.  A hashtable contains a list of buckets.  In a simple implementation, the i-th bucket, contains the key-value pairs in a list of which the key has a hash that is i modulo the amount of buckets.  The hash-table would increase the amount of buckets if any bucket contains more than a fixed amount of pairs.  This results in a constant-time look-up, but an insertion might invoke a expensive rebuild.</p>
<p>There are a few variations on Hash Tables.  I&#8217;d like to share a really smart one:  <strong>the Cuckoo Hashtable</strong>.</p>
<p>The <a href='http://en.wikipedia.org/wiki/Cuckoo_hashing'>Cuckoo hashtable</a> expects two different hash-functions for the keys. Instead of storing a list of pairs in each bucket, the Cuckoo Hash table stores a single pair in each bucket.  When inserting a pair, it is inserted in one of the two possible locations.  If it happens to be occupied, the old pair is replaced.  Then the replaced pair is inserted at its other possible location, potentially kicking out another pair.  This step is repeated, until there is no displaced pair or a loop is detected.  When a loop is detected, the hash-functions can be changed, if the buckets are for the most part empty -or- when the table is almost full, the amount of buckets can be increased.  It can be shown that an insertion has a amortized constant time.  (The buckets can be resized in-place, and each entry is repositioned as if it was displaced by another.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/12/21/the-cuckoo-hashtable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If I&#8217;d own a botnet&#8230; (1)</title>
		<link>http://blog.affien.com/archives/2008/11/26/if-id-own-a-botnet-1/</link>
		<comments>http://blog.affien.com/archives/2008/11/26/if-id-own-a-botnet-1/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 21:36:47 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[botnet]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://blog.affien.com/?p=345</guid>
		<description><![CDATA[...and didn't want to loose it if my control servers go [...]]]></description>
			<content:encoded><![CDATA[<p>&#8230;and didn&#8217;t want to loose it if my control servers got shut down, I&#8217;d let every orphaned zombie randomly connect to hosts in a given IP range, and challenge them to give a preimage of a hardcoded hash.  [ detail: add a salt to prevent replay attacks ].  With a sufficiently safe casu quo large range, it also might be helpfull to allow zombies to forward still orphan zombies.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/11/26/if-id-own-a-botnet-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>git&#8216;s versus svn&#8216;s storage efficiency</title>
		<link>http://blog.affien.com/archives/2008/07/08/gits-versus-svns-storage-efficiency/</link>
		<comments>http://blog.affien.com/archives/2008/07/08/gits-versus-svns-storage-efficiency/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 00:43:47 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[codeyard]]></category>
		<category><![CDATA[cyv]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/?p=319</guid>
		<description><![CDATA[At Codeyard we maintain a git and a subversion reposito [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://codeyard.net/">Codeyard</a> we maintain a git and a subversion repository (which <a href="http://blog.w-nz.com/archives/2008/05/26/cyv-syncing-git-and-svn/">are synced</a> with each other) for each of the >115 projects. The following graph shows the repositories plotted logarithmically according to the size of their whole server side subversion repository horizontally and their git repository size vertically:<br />
<a href='http://blog.w-nz.com/wp-content/uploads/2008/07/git-vs-svn.png'><img src="http://blog.w-nz.com/wp-content/uploads/2008/07/git-vs-svn.png" alt="" title="Git versus SVN storage efficiency" width="428" height="285" class="aligncenter size-full wp-image-320" /></a></p>
<p>To make more sense of the logarithmic nature of the graph, I&#8217;ve added three lines.  The first (solid black) indicates the points of which both sizes are equal.  The second course dashed line indicates the points of which the subversion repository is twice as large as the git repository.  And lastly, the third finely dashed line indicates the points of which the subversion repository is five times as large as the git repository.</p>
<p>All projects for which git is less storage efficient, are smaller than 100Kb.  The projects for which git is most storage efficient (up to even 6 times for a certain C# project), are all of medium size (10&#8211;100MB) and code-heavy.  For the other projects, which are blob heavy (eg. images), git and subversion are close (git beats svn by ~20%).</p>
<p>One notable disadvantage of <em>huge</em> (someone committed a livecd image) git repositories, is an apparent <img src='/wp-latexrender/pictures/f3bca1459595f95e1a28e1176fe9343f.png' title='\geq2N' alt='\geq2N' align=absmiddle> memory usage of <code>git repack</code> even if I tell it not to with <code>--window-memory</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/07/08/gits-versus-svns-storage-efficiency/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssmtp segfault in sendmail on Gentoo</title>
		<link>http://blog.affien.com/archives/2008/02/26/ssmtp-segfault-in-sendmail-on-gentoo/</link>
		<comments>http://blog.affien.com/archives/2008/02/26/ssmtp-segfault-in-sendmail-on-gentoo/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 20:39:52 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[segfault]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[ssmtp]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2008/02/26/ssmtp-segfault-in-sendmail-on-gentoo/</guid>
		<description><![CDATA[Disabling the md5sum useflag might fix it.

Thanks to [...]]]></description>
			<content:encoded><![CDATA[<p>Disabling the <code>md5sum</code> useflag might fix it.</p>
<p>Thanks to Bram for the tip.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/02/26/ssmtp-segfault-in-sendmail-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Evolving the Object Paradigm</title>
		<link>http://blog.affien.com/archives/2008/01/31/evolving-the-object-paradigm/</link>
		<comments>http://blog.affien.com/archives/2008/01/31/evolving-the-object-paradigm/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 12:39:02 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[kaja fumei]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2008/01/31/evolving-the-object-paradigm/</guid>
		<description><![CDATA[Kaja is writing a series of articles on the shortcoming [...]]]></description>
			<content:encoded><![CDATA[<p>Kaja is writing <a href="http://kajafumei.blogspot.com/2008/01/evolving-object-oriented-paradigm-part.html">a series of articles</a> on the shortcomings and solutions to the current object paradigm.  Very interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/01/31/evolving-the-object-paradigm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux 2.6.24-bw-r34</title>
		<link>http://blog.affien.com/archives/2008/01/20/linux-2624-bw-r3/</link>
		<comments>http://blog.affien.com/archives/2008/01/20/linux-2624-bw-r3/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 00:24:50 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[The Linux kernel]]></category>
		<category><![CDATA[linux-bw]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2008/01/20/linux-2624-bw-r3/</guid>
		<description><![CDATA[Again an update for my bw-tree.  There isn't a tree tha [...]]]></description>
			<content:encoded><![CDATA[<p>Again an update for my bw-tree.  There isn&#8217;t a tree that includes <a href="http://en.wikipedia.org/wiki/Reiser4">reiser4</a> and <a href="http://tuxonice.net/">TuxOnIce</a> without a lot of other bloat, so I created one myself.</p>
<p>Download the <a href="http://w-nz.com/~bas/projects/bw-r4-for-2.6.24.diff.bz2">big diff</a> or the seperate patches <a href="http://w-nz.com/~bas/projects/bw-r4-for-2.6.24.tar.bz2">broken out</a>.</p>
<p><ins>Note</ins> I pulled in new patches for reiser4 from the -mm tree against -rc8 which <em>should</em> fix the Reiser4 flush problem a bit.</p>
<p><ins>Update</ins> Patched against 2.6.24 stable.  New TuxOnIce patched added and the genpatches.  Please note that I haven&#8217;t tested Reiser4 <a href="http://blog.w-nz.com/archives/2008/01/23/bye-bye-reiser4/">thoroughly enough</a> on this version.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2008/01/20/linux-2624-bw-r3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux 2.6.24-bw-r12</title>
		<link>http://blog.affien.com/archives/2007/12/20/linux-2624-bw/</link>
		<comments>http://blog.affien.com/archives/2007/12/20/linux-2624-bw/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 22:07:05 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[The Linux kernel]]></category>
		<category><![CDATA[linux-bw]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2007/12/20/linux-2624-bw/</guid>
		<description><![CDATA[There isn't a (stable-ish) tree that includes reiser4 a [...]]]></description>
			<content:encoded><![CDATA[<p>There isn&#8217;t a (stable-ish) tree that includes reiser4 and TuxOnIce (suspend2), so I made one myself, based on 2.6.24<del>-rc5</del><ins>-rc<del>6</del>7</ins>.</p>
<p>You can grab it as one big patch, <a href="http://w-nz.com/~darkshines/projects/bw-r2-for-2.6.24-rc7.diff.bz2">bw<ins>-r<del>1</del>2</ins>-for-2.6.24<del>-rc5</del><ins>-rc<del>6</del>7</ins>.diff.bz2</a>, or broken out: <a href="http://w-nz.com/~darkshines/projects/bw-r2-for-2.6.24-rc7.tar.bz2">bw<ins>-r<del>1</del>2</ins>-for-2.6.24<del>-rc5</del><ins>-rc<del>6</del>7</ins>.tar.bz2</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2007/12/20/linux-2624-bw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rebuild-scm-ebuilds</title>
		<link>http://blog.affien.com/archives/2007/12/08/rebuild-scm-ebuilds/</link>
		<comments>http://blog.affien.com/archives/2007/12/08/rebuild-scm-ebuilds/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 18:51:37 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[portage]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[scm]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2007/12/08/rebuild-scm-ebuilds/</guid>
		<description><![CDATA[Two very simple ruby scripts (I love ruby!) and a littl [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://w-nz.com/~darkshines/projects/rebuild-scm-ebuilds.tar.bz2">Two very simple ruby scripts (I love ruby!) and a little bash script</a> that searches all ebuilds with 9999 in the name, orders them by dependencies and then emerge -a them.  Very useful when you got a lot of 9999 ebuilds.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2007/12/08/rebuild-scm-ebuilds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CaCert.org</title>
		<link>http://blog.affien.com/archives/2007/12/08/cacertorg/</link>
		<comments>http://blog.affien.com/archives/2007/12/08/cacertorg/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 12:20:46 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Web development]]></category>
		<category><![CDATA[ca]]></category>
		<category><![CDATA[cacert]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[web of trust]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2007/12/08/cacertorg/</guid>
		<description><![CDATA[CaCert is a Certification Authority that works with a w [...]]]></description>
			<content:encoded><![CDATA[<p>CaCert is a Certification Authority that works with a web of trust: people meet and assure (similar to keysigning) eachother.  If you&#8217;ve been assured by enough people you&#8217;ll be able to let your ssl server key be certified by cacert.  It&#8217;s a lot more secure than other CA&#8217;s who just give anyone a certificate who pays enough.</p>
<p>Still a hierarchical system with a CA is flawed.  When the CA is compromised, the whole system fails. PGP&#8217;s web of trust hasn&#8217;t got this weakness.</p>
<p>(Got a nice shiny cacert certified ssl certificate on my webserver now)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2007/12/08/cacertorg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

