<?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>dead fish &#187; Coding</title>
	<atom:link href="http://www.thomaskeller.biz/blog/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thomaskeller.biz/blog</link>
	<description>only dead fish swim with the stream</description>
	<lastBuildDate>Tue, 27 Sep 2011 22:59:51 +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>Debugging with MacPorts PHP binaries and Eclipse PDT 3.0</title>
		<link>http://www.thomaskeller.biz/blog/2011/09/27/debugging-with-macports-php-binaries-and-eclipse-pdt-3-0/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/09/27/debugging-with-macports-php-binaries-and-eclipse-pdt-3-0/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 23:55:10 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[MacPorts]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1087</guid>
		<description><![CDATA[You know the times, when things should really go fast and easy, but you fall from one nightmare into another? Tonight was such a night&#8230; but lets start from the beginning. To debug PHP you usually install the excellent XDebug and so did I with the port command sudo port install php5-xdebug. After that php [...]]]></description>
			<content:encoded><![CDATA[<p>You know the times, when things should really go fast and easy, but you fall from one nightmare into another? Tonight was such a night&#8230; but lets start from the beginning.</p>

<p>To debug PHP you usually install the excellent <a href="http://xdebug.org/">XDebug</a> and so did I with the port command <code>sudo port install php5-xdebug</code>. After that <code>php -v</code> greeted me friendly on the command line already:</p>

<pre><code>PHP 5.3.8 (cli) (built: Sep 22 2011 11:42:56) 
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
  with Xdebug v2.1.1, Copyright (c) 2002-2011, by Derick Rethans
</code></pre>

<p>Eclipse Indigo and Eclipse PDT 3 was already installed, so I thought it should be easy to set up the XDebug debugging option in Eclipse. Under &#8220;PHP > PHP Executables&#8221; I therefor selected <code>/opt/local/bin/php</code> as my CLI version and selected &#8220;xdebug&#8221; as debugging option.</p>

<p>A first test however showed me that the execution of a test script did not load any module into the PHP interpreter beforehand (for reasons I could only guess, because Eclipse error log kept quite). Looking at the output of <code>phpinfo()</code> from my test script and <code>php -i</code> from command line showed me the difference: The PHP option &#8220;Scan this dir for additional .ini files&#8221; was empty when PHP ran inside Eclipse, but was properly set when PHP ran from command line (or in an Apache context).</p>

<p>Asking aunt Google brought up <a href="https://bugs.php.net/bug.php?id=45114">this issue</a> that shed some light into my darkness: The directory where additional modules reside is configured as a compile time option in PHP and defaults to <code>/opt/local/var/db/php5</code> on MacPorts and exactly this can be overridden by either calling PHP with <code>-n -c</code> options or by setting the <code>PHP_INI_SCAN_DIR</code> environment variable.</p>

<p>Having no access to the actual PHP call from inside Eclipse I tried to go down the environment route, but that did not lead to any success. While the variable was recognized as it should on the normal command line (e.g. <code>PHP_INI_SCAN_DIR= php -i</code> disabled the load of additional modules), in Eclipse&#8217; run configuration dialog, in the section environment variables, this was not recognized at all. I tried a little harder and configured the variable inside <code>~/.MacOSX/environment.plist</code>, logged out and in again, restarted Eclipse obviously, but had no luck either.</p>

<p>The only viable solution I came up with was to place all the single <code>extension=</code> and <code>zend_extension=</code> entries directly into my <code>php.ini</code> and disable the individual <code>module.ini</code> files altogether. At least I can now run and debug properly, but this solution is of course far from being ideal &#8211; as soon as I add a new PHP module or want to remove an existing, I have to remember to edit the <code>php.ini</code> myself.</p>

<p>By the way, I also tried to use Zend&#8217;s debugger (and PDT plugin) as an alternative. <a href="http://www.85qm.de/archives/727-Zend-Debugger-for-PHP-5.3.html">While somebody else</a> already ranted about that the Zend guys have been unable to provide the Zend Debugger for PHP 5.3 as a standalone download (which hasn&#8217;t changed to date), PHP 5.2 debugging worked nicely with <a href="http://www.zend.com/en/community/pdt">the old Zend PDT plugin</a>.</p>

<p>Of course, none of my needed PHP modules were loaded and I really needed PHP 5.3 support, so I had to follow the same route the other guy did and downloaded all of the ZendServer glory (a 137MB download, yay) just to get the right <code>ZendDebugger.so</code>. After extracting the <code>.pax.gz</code> archive from the installer package I quickly found it underneath <code>usr/local/zend/lib/debugger/php-5.3.x/</code>, copied it to my extension directory and added an ini file to load that one instead, just to find out shortly afterwards that the Zend binary was <code>i386</code> only and MacPorts of course compiled everything nicely as <code>x86_64</code> &#8211; php was of course unable to load such a module.</p>

<p>Well, the moral of the story is &#8211; go for Xdebug and don&#8217;t loose the track. And, let us all hope that Eclipse PDT is developed further, so the remaining glitches like the one above are fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/09/27/debugging-with-macports-php-binaries-and-eclipse-pdt-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception chaining in Java</title>
		<link>http://www.thomaskeller.biz/blog/2011/07/25/exception-chaining-in-java/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/07/25/exception-chaining-in-java/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 10:58:31 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1078</guid>
		<description><![CDATA[If you catch and rethrow exceptions in Java, you probably know about exception chaining already: You simply give the exception you &#8220;wrap&#8221; as second argument to your Exception like this try { ... } catch (Exception e) { throw new CustomException("something went wrong", e); } and if you look at the stack trace of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you catch and rethrow exceptions in Java, you probably know about exception chaining already: You simply give the exception you &#8220;wrap&#8221; as second argument to your Exception like this</p>

<pre><code>try { ... }
catch (Exception e) {
  throw new CustomException("something went wrong", e);
}
</code></pre>

<p>and if you look at the stack trace of the newly thrown exception, the original one is listed as &#8220;Caused by:&#8221;. Now today I had the rather &#8220;usual&#8221; use case of cleanup up a failing action and the cleanup itself was able to throw as well. So I had two causing exceptions and I wanted to conserve both of them, including their complete cause chain, in a new exception. Consider the following example:</p>

<pre><code>try { ... }
catch (Exception e1) {
  try { ... }
  catch (Exception e2) {
     // how to transport e1 and e2 in a new exception here?!
  }
  throw e1;
}
</code></pre>

<p>My idea here was to somehow tack the exception chain of <code>e1</code> onto the exception chain of <code>e2</code>, but Java offered no solution for this. So I hunted for my own one:</p>

<pre><code>public static class ChainedException extends Exception {
  public ChainedException(String msg, Throwable cause) {
    super(msg, cause);
  }
  public void appendRootCause(Throwable cause) {
    Throwable parent = this;
    while (parent.getCause() != null) {
      parent = parent.getCause();
    }
    parent.initCause(cause);
  }
}
</code></pre>

<p>Now I only had to base the exceptions I actually want to chain on <code>ChainedException</code> and was able to do this (in fact I based all of them on this class):</p>

<pre><code>try { ... }
catch (ChainedException e1) {
  try { ... }
  catch (ChainedException e2) {
    e2.appendRootCause(e1);
    throw new ChainedException("cleanup failed", e2);
  }
  throw e1;
}
</code></pre>

<p>Try it out yourself &#8211; you&#8217;ll see the trace of <code>e1</code> at the bottom of the cause chain of <code>e2</code>. Quite nice, eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/07/25/exception-chaining-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>guitone license change</title>
		<link>http://www.thomaskeller.biz/blog/2011/07/17/guitone-license-change/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/07/17/guitone-license-change/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 20:33:10 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[guitone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1075</guid>
		<description><![CDATA[Guitone, my little GUI frontend for the monotone SCM, is currently licensed according to the terms of the GPLv3+ and was previously &#8211; before version 0.8 &#8211; licensed under GPLv2+. Newer development however forces me to re-license it again, this time under slightly less restrictive &#8220;copyleft&#8221; terms, under LGPLv3. The reason for this is my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://guitone.thomaskeller.biz">Guitone</a>, my little GUI frontend for the <a href="http://www.monotone.ca">monotone SCM</a>, is currently licensed according to the terms of the GPLv3+ and was previously &#8211; before version 0.8 &#8211; licensed under GPLv2+. Newer development however forces me to re-license it again, this time under slightly less restrictive &#8220;copyleft&#8221; terms, under LGPLv3.</p>

<p>The reason for this is my usage of the <a href="http://www.graphviz.org">Graphviz library</a> to render monotone revision trees. Graphviz is released under EPL (older versions under CPL even), and this license is strictly incompatible to any pure GPL version. I contacted the Graphviz guys and I also contacted the legal affairs support of the FSF and checked the options I had and the result is now that I have to adapt, one way or another. I could either use the &#8220;command line interface&#8221; of Graphviz or choose another license for guitone. I didn&#8217;t want to go the first route, simply because I have a working implementation and because I didn&#8217;t want to make slow calls into external binaries, so a new license had to be chosen on my side.</p>

<p>So, starting with the upcoming version 1.0 guitone is licensed under LGPLv3. I contacted the previous contributors of guitone and all parties are ok with the license change, so the actual license change will pop up in the <a href="https://code.monotone.ca/p/guitone/source/tree/h:net.venge.monotone.guitone/">current development&#8217;s head shortly</a>.</p>

<p>Thanks for your interest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/07/17/guitone-license-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access the Android menu in VirtualBox on a Mac host</title>
		<link>http://www.thomaskeller.biz/blog/2011/07/13/access-the-android-menu-in-virtualbox-on-a-mac-host/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/07/13/access-the-android-menu-in-virtualbox-on-a-mac-host/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 14:56:47 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1067</guid>
		<description><![CDATA[If you&#8217;re desperately trying to get the Menu button in an Android x86 installation working under VirtualBox on a Mac OS X host &#8211; whose keyboard of course doesn&#8217;t have this &#8220;context&#8221; / &#8220;menu&#8221; key Windows keyboards have on the right &#8211; you might find the touch-only-device mode in Android x86 handy: Click on the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re desperately trying to get the <code>Menu</code> button in an <a href="http://www.android-x86.org">Android x86</a> installation working under <a href="http://www.virtualbox.org">VirtualBox</a> on a Mac OS X host &#8211; whose keyboard of course doesn&#8217;t have this &#8220;context&#8221; / &#8220;menu&#8221; key Windows keyboards have on the right &#8211; you might find the touch-only-device mode in Android x86 handy:</p>

<ol>
<li>Click on the clock in the status bar to enable / disable this mode altogether</li>
<li>A swipe from the left to the right emulates the <code>Menu</code> button function</li>
<li>A swipe from right to left emulates the <code>Back</code> button function</li>
<li>Simply clicking on the status bar brings you to the <code>Home</code> screen</li>
</ol>

<p>(<a href="http://www.android-x86.org/documents/touch-only-device-howto">Source</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/07/13/access-the-android-menu-in-virtualbox-on-a-mac-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Einführung die Versionsverwaltung mit monotone</title>
		<link>http://www.thomaskeller.biz/blog/2011/07/02/einfuhrung-die-versionsverwaltung-mit-monotone/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/07/02/einfuhrung-die-versionsverwaltung-mit-monotone/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 21:05:00 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1057</guid>
		<description><![CDATA[Mathias Weidner hat eine deutschsprachige Einführung in die Versionverwaltung mit monotone veröffentlicht. Er behandelt darin die Grundlagen der verteilten Versionsverwaltung, die ersten Schritte mit monotone, sowie die täglich anfallende Arbeitspraxis mit einem Versionskontrollsystem. In späteren Kapiteln widmet sich Mathias auch erweiterten Themen, etwa wie monotone auf die individuellen Bedürfnisse des Nutzers angepasst werden kann und [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://weidner.in-bad-schmiedeberg.de/">Mathias Weidner</a> hat eine deutschsprachige Einführung in die Versionverwaltung mit monotone <a href="http://www.lulu.com/product/paperback/-/16177790">veröffentlicht</a>. Er behandelt darin die Grundlagen der verteilten Versionsverwaltung, die ersten Schritte mit monotone, sowie die täglich anfallende Arbeitspraxis mit einem Versionskontrollsystem. In späteren Kapiteln widmet sich Mathias auch erweiterten Themen, etwa wie monotone auf die individuellen Bedürfnisse des Nutzers angepasst werden kann und liefert weitere nützliche Hinweise für Ein- und Umsteiger von anderen Versionskontrollsystemen.</p>

<p>Das Buch ist <a href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC BY-SA 3.0</a> lizensiert und kann als <a href="http://www.lulu.com/product/paperback/-/16177790">Paperback über lulu</a> bezogen werden. Eine <a href="http://weidner.in-bad-schmiedeberg.de/computer/rcs/monotone/drcs-monotone-brevier.html">Vorversion in PDF-Format</a> ist ebenfalls verfügbar; da der Autor die Quellen selbst in monotone verwaltet, sollten auch diese demnächst verfügbar sein.</p>

<p>Vielen Dank an Mathias für seine Bemühungen!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/07/02/einfuhrung-die-versionsverwaltung-mit-monotone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jazzlib &#8211; an alternative for reading ZIP files in Java</title>
		<link>http://www.thomaskeller.biz/blog/2011/05/03/jazzliban-alternative-for-reading-zip-files-in-java/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/05/03/jazzliban-alternative-for-reading-zip-files-in-java/#comments</comments>
		<pubDate>Tue, 03 May 2011 14:24:17 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=1023</guid>
		<description><![CDATA[Java had zip-reading capabilities for a long time, naturally because jar files are simply compressed zip files with some meta data. The needed classes reside in the java.util.zip namespace and are ZipInputStream and ZipEntry. Recently, however, ZipInputStream gave me a huge headache. My use case was as simple as read the zip entries of a [...]]]></description>
			<content:encoded><![CDATA[<p>Java had zip-reading capabilities for a long time, naturally because <code>jar</code> files are simply compressed zip files with some meta data. The needed classes reside in the <code>java.util.zip</code> namespace and are <code>ZipInputStream</code> and <code>ZipEntry</code>.</p>

<p>Recently, however, <code>ZipInputStream</code> gave me a huge headache. My use case was as simple as</p>

<ul>
<li>read the zip entries of a list of zip files (each varying in size, but usually around 20MB)</li>
<li>skip to the zip entry that has a certain name (a single text file with only two bytes of contents)</li>
<li>read the contents of this zip entry and close the zip</li>
</ul>

<p>Doing this for about 25 files took my Pentium D (2GHz) with 3GB of RAM roughly <strong>20 seconds</strong>. Wow, 20 seconds really? I created a test case and profiled the code in question separately with <a href="http://www.yourkit.com">YourKit</a> (which is a really great tool, by the way!):</p>

<p><a href="http://www.thomaskeller.biz/blog/wp-content/uploads/2011/05/yourkit.png"><img src="http://www.thomaskeller.biz/blog/wp-content/uploads/2011/05/yourkit-450x114.png" alt="" title="yourkit" width="450" height="114" class="alignright size-medium wp-image-1024" /></a></p>

<p>It got stuck quite a bit in <code>java.util.zip.Inflater.inflateBytes</code> &#8211; but that seemed to use native code, so I couldn&#8217;t profile any further.</p>

<p>So I went on and searched for an alternative of <code>java.util.zip</code> &#8211; and luckily I found one with <a href="http://jazzlib.sourceforge.net">jazzlib</a>, which provides a pure Java implementation for ZIP compression and decompression. This library is GPL-licensed (with a small exception clause to prevent the pervasiveness of the GPL) and comes in two versions, one that duplicates the single library classes underknees <code>java.util.zip</code> (as a drop-in replacement for JDK versions where this is missing) and one that comes in its own namespace, <code>net.sf.jazzlib</code>.</p>

<p>After I went for the second version, I restarted my test and it only took about <strong>7 seconds</strong> this time. At first I thought that there must be some downside to this approach, so I checked the timings for a complete decompression of the archive, but the timings here were on par with the ones from <code>java.util.zip</code> (roughly 5 seconds for a single 20MB file).</p>

<p>I haven&#8217;t tested compression speed, because it doesn&#8217;t matter much for my use case, but the decompression speed alone is astonishing. I wonder why nobody else stumbled upon these performance problems before&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/05/03/jazzliban-alternative-for-reading-zip-files-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indefero 1.1 released</title>
		<link>http://www.thomaskeller.biz/blog/2011/03/20/indefero-1-1-released/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/03/20/indefero-1-1-released/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 13:04:47 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[indefero]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=999</guid>
		<description><![CDATA[I&#8217;m pleased to announce the immediate release of Indefero 1.1. This release features support for another version control system, monotone, and comes with tons of smaller improvements and bug fixes. A full list of changes can be found in the News document. Many thanks to all the contributors!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pleased to announce the immediate release of <a href="http://projects.ceondo.com/p/indefero">Indefero 1.1</a>. This release features support for another version control system, <a href="http://www.monotone.ca">monotone</a>, and comes with tons of smaller improvements and bug fixes.</p>

<p>A full list of changes can be found in the <a href="http://projects.ceondo.com/p/indefero/page/News/">News</a> document.</p>

<p>Many thanks to all the contributors!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/03/20/indefero-1-1-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mtn-browse 0.72 and accompanying Perl library released</title>
		<link>http://www.thomaskeller.biz/blog/2011/03/06/mtn-browse-0-72-and-accompanying-perl-library-released/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/03/06/mtn-browse-0-72-and-accompanying-perl-library-released/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 23:34:30 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=994</guid>
		<description><![CDATA[Tony Cooper announced a new release of his Monotone Browser software and also a new version of the underlying Monotone::AutomateStdio Perl library. Both packages are now compatible with the most recent version of monotone, 0.99.1. Additionally, mtn-browse also supports all the new selector functions introduced in monotone 0.99 and is able to restrict revision and [...]]]></description>
			<content:encoded><![CDATA[<p>Tony Cooper announced a new release of his <a href="http://www.coosoft.plus.com/software.html">Monotone Browser</a> software and also a new version of the underlying <a href="http://search.cpan.org/~aecooper/Monotone-AutomateStdio-0.12/lib/Monotone/AutomateStdio.pod">Monotone::AutomateStdio</a> Perl library.</p>

<p>Both packages are now compatible with the most recent version of monotone, 0.99.1. Additionally, mtn-browse also supports all the new selector functions introduced in monotone 0.99 and is able to restrict revision and file histories to specific branches.</p>

<p>Many thanks to Tony for his outstanding work! I&#8217;ll update the MacPorts packages in a few&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/03/06/mtn-browse-0-72-and-accompanying-perl-library-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One framework to rule them all</title>
		<link>http://www.thomaskeller.biz/blog/2011/02/25/one-framework-to-rule-them-all/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/02/25/one-framework-to-rule-them-all/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 14:05:47 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[indefero]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=986</guid>
		<description><![CDATA[I have a love/hate relationship with PHP; while I have talked in great length about all the badness that comes with it, I still find myself quite often writing and / or contributing to PHP applications. Most of this work was done with Symfony and, to a smaller degree, recently also with a relatively unknown [...]]]></description>
			<content:encoded><![CDATA[<p>I have a love/hate relationship with PHP; while I have <a href="http://www.thomaskeller.biz/blog/2010/03/23/fuck-php/">talked in great length about all the badness</a> that comes with it, I still find myself quite often writing and / or contributing to PHP applications. Most of this work was done with <a href="http://www.symfony-project.org">Symfony</a> and, to a smaller degree, recently also with a relatively unknown framework called <a href="http://www.pluf.org">Pluf</a>, which is the main building block for <a href="http://www.indefero.net">Indefero</a>, the project and source code management tool I&#8217;m contributing to.</p>

<p>The author of Pluf, Loic d&#8217;Anterroches, has released a new framework to the wild today and its called <a href="http://www.photon-project.com"><strong>Photon</strong></a>. It got its name from the particle, so naturally the tag line is <em>&#8220;&#8230;because nothing is faster than a photon&#8221;</em>.</p>

<p>So you are by now probably asking &#8220;Ok, but <strong>why should I care</strong> about that? There are dozens if not hundreds of PHP frameworks out there, they all claim to be fast, so this is probably just a complete waste of time&#8230;&#8221;</p>

<p>Well, Photon is very different, because it achieves its performance with a break of the traditionally known request-response model: Much like a real <strong>application server</strong> you know from other languages you can process requests asynchronously now in pure PHP, i.e. start and stop processes on request and delegate long-running work for later execution!</p>

<p>PHP developers did all kinds of bad tricks to emulate this stuff in the past. Most of these tricks employ a cache table and a cron entry that regularily executes some PHP script. This is buggy, doesn&#8217;t scale well and is of course plain ugly.</p>

<p>I won&#8217;t go into more details &#8211; just hop over to <a href="http://www.photon-project.com">www.photon-project.com</a>, read the docs and grab the pre-release while its hot!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/02/25/one-framework-to-rule-them-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moments of love</title>
		<link>http://www.thomaskeller.biz/blog/2011/01/22/moments-of-love/</link>
		<comments>http://www.thomaskeller.biz/blog/2011/01/22/moments-of-love/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 14:17:22 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=970</guid>
		<description><![CDATA[There are certain moments in my life where I feel this love. Love and satisfaction. In these moments I do not regret at all to still work for an &#8220;underdog&#8221; version control system like monotone and have not converted to the dark side of the moon (read: git). One of these moments was today, when [...]]]></description>
			<content:encoded><![CDATA[<p>There are certain moments in my life where I feel this love. Love and satisfaction. In these moments I do not regret at all to still work for an &#8220;underdog&#8221; version control system like <a href="http://www.monotone.ca">monotone</a> and have not converted to the dark side of the moon (read: git). One of these moments was today, when I did a merge between two branches.</p>

<p>See, many people working with Subversion or even git are annoyed of its merge behaviour. Sometimes they even fear to merge because hell breaks loose if the source branch moved files or even directories (yikes!) around. I cannot tell how often I had to resolve tree conflicts by hand in Subversion and I also cannot tell how often git forced me to clean my workspace from uncommitted or stashed changes before I was able to pull new stuff in.</p>

<p>Today now with monotone, I propagated the latest changes from the <a href="https://code.monotone.ca/p/monotone/source/tree/h:net.venge.monotone/">main branch</a> to my little <a href="https://code.monotone.ca/p/monotone/source/tree/h:net.venge.monotone.source-tree-cleanup/">source-tree-cleanup branch</a>. The latter moves many files and even whole directories around, so one would expect merge chaos in an ordinary version control system if files inside these moved directories would have been changed, or even new files would have been added, in the main branch in the meantime, right?</p>

<p>Not so with monotone. It not only tracks the file identity and rename history for files, but also for directories, so the merge went flawlessly without manual intervention:</p>

<p><pre>
$ mtn propagate net.venge.monotone net.venge.monotone.source-tree-cleanup
mtn: propagating net.venge.monotone -> net.venge.monotone.source-tree-cleanup
mtn: [left] 4f505ed0817cef6a34e1cc404b0511426a15fef9
mtn: [right] ec9269fa9ddd7b7e2d4716610241a7577159ba9d
mtn: [merged] 1b5c865085537cebd09b5e8481fba1eebfd63a03
</pre></p>

<p>And the update afterwards was no exception:</p>

<p><pre>
$ mtn update
mtn: updating along branch 'net.venge.monotone.source-tree-cleanup'
...
mtn: adding test/func/diff_order hinzu
mtn: adding test/func/diff_order/<strong>driver</strong>.lua hinzu
...
mtn: updating NEWS
...
mtn: updating src/cmd_diff_log.cc
mtn: updating src/cmd_list.cc
...
</pre>
<small>(some context: <code>./test/func</code> was <code>./tests</code> before and <code>./src</code> was <code>./</code>)</small></p>

<p>Call me fanboy, but I <em>love</em> this version control system!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2011/01/22/moments-of-love/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

