<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Geek Shall Inherit The Earth</title>
	<atom:link href="http://majewsky.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://majewsky.wordpress.com</link>
	<description>Thoughts on KDE games hacking and everything</description>
	<lastBuildDate>Thu, 30 Aug 2012 18:43:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='majewsky.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Geek Shall Inherit The Earth</title>
		<link>http://majewsky.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://majewsky.wordpress.com/osd.xml" title="The Geek Shall Inherit The Earth" />
	<atom:link rel='hub' href='http://majewsky.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Qt Quick hates me</title>
		<link>http://majewsky.wordpress.com/2012/08/17/qt-quick-hates-me/</link>
		<comments>http://majewsky.wordpress.com/2012/08/17/qt-quick-hates-me/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 19:46:16 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=795</guid>
		<description><![CDATA[I haven&#8217;t blogged since a while, because I do not do much KDE hacking lately, but today I&#8217;ve got around to playing with QML again. The goal was to build something like a breadcrumb navigation widget, where the current directory is indicated by its name being written in a larger font. Here&#8217;s what I arrived [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=795&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I haven&#8217;t blogged since a while, because I do not do much KDE hacking lately, but today I&#8217;ve got around to playing with QML again.</p>
<p>The goal was to build something like a breadcrumb navigation widget, where the current directory is indicated by its name being written in a larger font. Here&#8217;s what I arrived at after a few minutes:</p>
<pre>import QtQuick 1.1

Rectangle {
    width: 800
    height: 100
    color: "black"

    Row {
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top
        spacing: 10

        Repeater {
            id: repeater
            property int currentIndex: 4
            model: ["/home", "/username", "/some", "/pseudo", "/path"]

            Text {
                text: modelData
                font.pixelSize: index == repeater.currentIndex ? 40 : 20
                color: "white"
            }
        }
    }
}</pre>
<p><a href="http://majewsky.files.wordpress.com/2012/08/keks1.png"><img class="aligncenter size-full wp-image-796" title="QML hacking 1" src="http://majewsky.files.wordpress.com/2012/08/keks1.png?w=480&h=69" alt="" width="480" height="69" /></a></p>
<p>Close enough. Just adjust that alignment:</p>
<pre>...
Text {
    ...
    height: 60
    verticalAlignment: Text.AlignBottom
}
...</pre>
<p><a href="http://majewsky.files.wordpress.com/2012/08/keks11.png"><img class="aligncenter size-full wp-image-797" title="QML hacking 2" src="http://majewsky.files.wordpress.com/2012/08/keks11.png?w=480&h=68" alt="" width="480" height="68" /></a></p>
<p>Gah! Can you see it? The baselines are misaligned. Usually, you lay out text such that all letters &#8220;sit&#8221; on an even line (the baseline).</p>
<p>The documentation does not mention any type baseline alignment in a <tt>Row</tt> element (or <b>any</b> type of vertical alignment in a <tt>Row</tt> element, for that matter).</p>
<p>I then tried to hack around this problem by dropping the <tt>Row</tt> element and laying out the <tt>Text</tt> elements manually, but the elements in the repeater won&#8217;t anchor to each other. That&#8217;s probably a problem with the elements not being fully initialized when the anchor property is evaluated, but at this point I give up.</p>
<p>This has been my second experience with Quick. When I tried it for the first time, my goal was a Quick version of <a href="http://www.planarity.net">the Planarity game</a>. I got stuck when I noticed that Qt Quick 1 does not have any kind of line or ellipse primitive (only rectangles and images). Really?!?</p>
<p>So, while I understand very well and appreciate the idea behind Qt Quick, I have come to the conclusion that Qt Quick hates me. Or I have a talent of hitting a roadblock within ten minutes, regardless of the general direction.</p>
<p>P. S. Turns out the WordPress WYSIWYG editor hates me, too. (Well, either me or the combination of &lt;pre&gt; and images.)</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/kde/'>KDE</a>, <a href='http://majewsky.wordpress.com/category/geek-stuff/programming/'>Programming</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/795/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/795/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=795&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2012/08/17/qt-quick-hates-me/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>

		<media:content url="http://majewsky.files.wordpress.com/2012/08/keks1.png" medium="image">
			<media:title type="html">QML hacking 1</media:title>
		</media:content>

		<media:content url="http://majewsky.files.wordpress.com/2012/08/keks11.png" medium="image">
			<media:title type="html">QML hacking 2</media:title>
		</media:content>
	</item>
		<item>
		<title>Trick question</title>
		<link>http://majewsky.wordpress.com/2012/05/15/trick-question/</link>
		<comments>http://majewsky.wordpress.com/2012/05/15/trick-question/#comments</comments>
		<pubDate>Tue, 15 May 2012 13:28:11 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=790</guid>
		<description><![CDATA[I just came up with a trick question. Let&#8217;s see if you can solve it. Why will 20 become smaller when you add another zero? Update: Commenters have been very creative. My original solution was to add the zero at the front, yielding &#8220;020&#8243;, which is 16 in many programming languages. Other solutions are &#8220;20^0 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=790&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I just came up with a trick question. Let&#8217;s see if you can solve it.</p>
<p>Why will 20 become smaller when you add another zero?</p>
<p><strong>Update:</strong> Commenters have been very creative. My original solution was to add the zero at the front, yielding &#8220;020&#8243;, which is 16 in <a title="Wikipedia: Octal - Usage in computers" href="http://en.wikipedia.org/wiki/Octal#In_computers">many programming languages</a>. Other solutions are &#8220;20^0 = 1&#8243; include &#8220;0.20&#8243;.</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/790/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/790/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=790&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2012/05/15/trick-question/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>Is anyone using custom mouse actions in Palapeli?</title>
		<link>http://majewsky.wordpress.com/2012/02/13/is-anyone-using-custom-mouse-actions-in-palapeli/</link>
		<comments>http://majewsky.wordpress.com/2012/02/13/is-anyone-using-custom-mouse-actions-in-palapeli/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 12:55:19 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[kdegames]]></category>
		<category><![CDATA[Palapeli]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=784</guid>
		<description><![CDATA[Another inquiry post. I&#8217;m thinking about removing the custom mouse interaction code in Palapeli. The situation is that whereas most applications hardcode what certain mouse buttons do (e.g. left button = click, right button = context menu), Palapeli allows the user to configure which mouse button (or wheel) does what. For reference, this is the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=784&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Another inquiry post. I&#8217;m thinking about removing the custom mouse interaction code in Palapeli. The situation is that whereas most applications hardcode what certain mouse buttons do (e.g. left button = click, right button = context menu), Palapeli allows the user to configure which mouse button (or wheel) does what. For reference, this is the default configuration:</p>
<p><a href="http://majewsky.files.wordpress.com/2012/02/keks3.png"><img src="http://majewsky.files.wordpress.com/2012/02/keks3.png?w=480&h=161" alt="" title="Palapeli Mouse Interaction default configuration" width="480" height="161" class="alignnone size-full wp-image-785" /></a></p>
<p>Problem is that the code behind these mouse button associations is awkwardly complex.¹ I plan to remove this mess and replace it with a sane default configuration because I feel it&#8217;s just adding clutter without providing much added value.</p>
<p>So if you want me to keep this code, please write back. Besides that, I also accept recommendations for a better default configuration.</p>
<p>¹ In numbers: 1127 LOC where the whole application is about 6000 LOC.</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/kde/kdegames/'>kdegames</a>, <a href='http://majewsky.wordpress.com/category/kde/kdegames/palapeli/'>Palapeli</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/784/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/784/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=784&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2012/02/13/is-anyone-using-custom-mouse-actions-in-palapeli/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>

		<media:content url="http://majewsky.files.wordpress.com/2012/02/keks3.png" medium="image">
			<media:title type="html">Palapeli Mouse Interaction default configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>Any users of libkdegames?</title>
		<link>http://majewsky.wordpress.com/2012/01/31/any-users-of-libkdegames/</link>
		<comments>http://majewsky.wordpress.com/2012/01/31/any-users-of-libkdegames/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 09:14:23 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[kdegames]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=780</guid>
		<description><![CDATA[Since we&#8217;re thinking about updating libkdegames, I was just wondering if any developer outside kdegames uses libkdegames. If you are or know such a developer, please write a comment. Filed under: KDE, kdegames<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=780&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Since we&#8217;re thinking about updating libkdegames, I was just wondering if any developer outside kdegames uses libkdegames. If you are or know such a developer, please write a comment.</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/kde/'>KDE</a>, <a href='http://majewsky.wordpress.com/category/kde/kdegames/'>kdegames</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/780/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=780&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2012/01/31/any-users-of-libkdegames/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing obs-tools: Doing away with ugly repository URLs on openSUSE</title>
		<link>http://majewsky.wordpress.com/2012/01/22/introducing-obs-tools-doing-away-with-ugly-repository-urls-on-opensuse/</link>
		<comments>http://majewsky.wordpress.com/2012/01/22/introducing-obs-tools-doing-away-with-ugly-repository-urls-on-opensuse/#comments</comments>
		<pubDate>Sun, 22 Jan 2012 21:46:16 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[The command line and I]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=778</guid>
		<description><![CDATA[While I like openSUSE&#8217;s approach of ordering extra packages into addon repositories on their Build Service, I hate those ugly repository URLs. GUI users may just use the one-click install links on the package search, but command-line enthusiasts are out of luck. To solve the problem, I&#8217;ve written two small Python scripts. obs-addrepo wraps zypper [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=778&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While I like openSUSE&#8217;s approach of ordering extra packages into addon repositories on their <a href="http://build.opensuse.org">Build Service</a>, I hate those ugly repository URLs. GUI users may just use the one-click install links on the <a href="http://software.opensuse.org/search">package search</a>, but command-line enthusiasts are out of luck.</p>
<p>To solve the problem, I&#8217;ve written two small Python scripts. <b>obs-addrepo</b> wraps <tt>zypper addrepo</tt> for Build Service repos:</p>
<pre>
# before
$ sudo zypper addrepo http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.1/ Application:Geo
# after
$ sudo obs-addrepo Application:Geo
</pre>
<p><b>obs-quickinstall</b> is the 1-click installer for command-line users:</p>
<pre>
# before
$ sudo zypper addrepo http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.1/ temp
$ sudo zypper refresh temp
$ sudo zypper install --from temp josm
$ sudo zypper removerepo temp
# after
$ sudo obs-quickinstall Application:Geo josm
</pre>
<p>Both tools are now available as the <a href="http://www.bethselamin.de/obs-tools/">obs-tools</a> package (<a href="//git.bethselamin.de/obs-tools.git">Git repo</a>). Packages are currently building on the Build Service, the <a href="http://www.bethselamin.de/obs-tools/">project page</a> has installation instructions.</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/geek-stuff/the-command-line-and-i/'>The command line and I</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/778/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/778/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=778&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2012/01/22/introducing-obs-tools-doing-away-with-ugly-repository-urls-on-opensuse/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>Bug of the day: How ConfigParser ruined my calculations</title>
		<link>http://majewsky.wordpress.com/2011/12/07/bug-of-the-day-how-configparser-ruined-my-calculations/</link>
		<comments>http://majewsky.wordpress.com/2011/12/07/bug-of-the-day-how-configparser-ruined-my-calculations/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 13:37:51 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=774</guid>
		<description><![CDATA[For my thesis, I have implemented a series of numerical applications. The core application (written in C++) uses simple INI-like configuration files for reading system parameters. For example: [system] name=example2 r1=1.0 r2=1.5 V1=-0.05 V2=0.1 [...] Nothing exciting there, reading this is a breeze with QSettings. Now I needed to do some symbolic calculations, for which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=774&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For my thesis, I have implemented a series of numerical applications. The core application (written in C++) uses simple INI-like configuration files for reading system parameters. For example:</p>
<p><code><br />
[system]<br />
name=example2<br />
r1=1.0<br />
r2=1.5<br />
V1=-0.05<br />
V2=0.1<br />
[...]<br />
</code></p>
<p>Nothing exciting there, reading this is a breeze with QSettings. Now I needed to do some symbolic calculations, for which I chose Python and the excellent <a href="http://www.sympy.org">SymPy</a> module. To read the system configuration, I chose the standard <a href="http://docs.python.org/library/configparser.html">ConfigParser</a> module.</p>
<p><code><br />
parser = ConfigParser.RawConfigParser()<br />
parser.read("scatttd.conf")<br />
sysType = parser.get("system", "name")<br />
# read system parameters<br />
sysParams = dict()<br />
for key, value in parser.items("system"):<br />
&nbsp;&nbsp;&nbsp;&nbsp;if value != "name":<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sysParams[key] = float(value)<br />
</code></p>
<p>That reads the &#8220;system/name&#8221; key, and puts all other keys (which are assumed to be floats) into a dictionary, so the system-specific code does not need to deal with the ConfigParser object.</p>
<p><code><br />
r1, r2 = params.get("r1", 1.0), params.get("r2", 1.0)<br />
V1, V2 = params.get("V1", -0.1), params.get("V2", +0.1)<br />
</code></p>
<p>This code gets the parameters in the system-specific code. Nothing exciting here. Except, stuff doesn&#8217;t work. The results of the following calculations suddenly don&#8217;t match my expectations (or the predictions made by my other programs).</p>
<p>Since the code after the snippet above is about 30 lines of SymPy magic (accumulating expressions that print dozens of lines onto my terminal), I suspected that some error occurred there. After about two days of searching for the problem there, and calculating everything by hand, something occurred to me when I looked at the debug output:</p>
<p><code><br />
DEBUG V1 = -0.1<br />
</code></p>
<p>Didn&#8217;t the configuration file say &#8220;V1=-0.05&#8243;? Let&#8217;s have a look at the parameter dict:</p>
<p><code><br />
{'v1': -0.05, 'v2': 0.1, 'r1': 1.0, 'r2': 1.5}<br />
</code></p>
<p>See the problem? &#8220;v1&#8243; has a lower-case &#8220;v&#8221;, so <tt>params.get("V1", -0.1)</tt> fails and returns the default value (-0.1). One glimpse at the documentation says that</p>
<p><code><br />
parser.optionxform = str<br />
</code></p>
<p>solves the problem. Gah!</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/geek-stuff/programming/'>Programming</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/774/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/774/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=774&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2011/12/07/bug-of-the-day-how-configparser-ruined-my-calculations/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>Lost for words</title>
		<link>http://majewsky.wordpress.com/2011/11/04/lost-for-words/</link>
		<comments>http://majewsky.wordpress.com/2011/11/04/lost-for-words/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 23:26:37 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=768</guid>
		<description><![CDATA[commit 740673c11aee9762987e3a205443ce1dec11aee8 Author: Stefan Majewsky &#60;majewsky@gmx.net&#62; Date: Sat Nov 5 00:11:37 2011 +0100 lolwut? diff --git a/tagaro/interface/board.cpp b/tagaro/interface/board.cpp index 199c007..17dbdfc 100644 --- a/tagaro/interface/board.cpp +++ b/tagaro/interface/board.cpp @@ -42,7 +42,6 @@ Tagaro::Board::~Board() Tagaro::Board::Private::~Private() { - QList&#60;Tagaro::SpriteObjectItem*&#62; m_items; for(QList&#60;Tagaro::SpriteObjectItem*&#62;::const_iterator a = m_items.constBegin(); a != m_items.constEnd(); ++a) (*a)-&#62;d-&#62;unsetBoard(); } Filed under: Programming<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=768&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<pre>
<span style="color:#826818;">commit 740673c11aee9762987e3a205443ce1dec11aee8</span>
Author: Stefan Majewsky &lt;majewsky@gmx.net&gt;
Date:   Sat Nov 5 00:11:37 2011 +0100

    lolwut?

diff --git a/tagaro/interface/board.cpp b/tagaro/interface/board.cpp
index 199c007..17dbdfc 100644
--- a/tagaro/interface/board.cpp
+++ b/tagaro/interface/board.cpp
<span style="color:#18B2B2;">@@ -42,7 +42,6 @@</span> Tagaro::Board::~Board()
 
 Tagaro::Board::Private::~Private()
 {
<span style="color:red;">-       QList&lt;Tagaro::SpriteObjectItem*&gt; m_items;</span>
        for(QList&lt;Tagaro::SpriteObjectItem*&gt;::const_iterator a = m_items.constBegin(); a != m_items.constEnd(); ++a)
                (*a)-&gt;d-&gt;unsetBoard();
 }

</pre>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/geek-stuff/programming/'>Programming</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/768/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=768&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2011/11/04/lost-for-words/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing the Raven Music Server</title>
		<link>http://majewsky.wordpress.com/2011/10/10/introducing-the-raven-music-server-2/</link>
		<comments>http://majewsky.wordpress.com/2011/10/10/introducing-the-raven-music-server-2/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 21:22:57 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[The command line and I]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=756</guid>
		<description><![CDATA[While I was on my quest of reducing the memory footprint of a freshly launched KDE session, I found that the process which uses most memory just after startup is Amarok, which contributes over 80 MiB to 300 MiB total RAM usage. Now of course, Amarok has its reasons for a high memory usage: For [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=756&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While I was on my quest of <a href="http://majewsky.wordpress.com/2011/10/10/reducing-the-memory-footprint-of-akonadi/">reducing the memory footprint</a> of a freshly launched KDE session, I found that the process which uses most memory just after startup is Amarok, which contributes over 80 MiB to 300 MiB total RAM usage. Now of course, Amarok has its reasons for a high memory usage: For example, its collection is backed by a MySQL/Embedded database. This memory footprint is justified by the plethora of features Amarok offers. But still, 80 MiB RAM usage is quite a lot when all I want to do (99% of the time) is to listen to some music files on the local disk. (My collection has 818 tracks at this very moment.)</p>
<p>Can we improve on that?</p>
<p>Looking at my desktop, I see the &#8220;Now Playing&#8221; applet. It shows the current track from Amarok, and has the basic media player controls (pause/stop/previous/next + seek slider + volume slider). Again, this is about all I need for an user interface while my playlist is filled. I remember that the nowplaying applet communicates with Amarok via DBus using the <a href="http://www.mpris.org">MPRIS</a> (Media Player Remote Interface Specification) standard.</p>
<p>With all these impressions in mind, my target is clear: I want a headless media player which runs in the background and offers an MPRIS-compliant control interface on DBus. Something with a smaller memory footprint.<br />
<a href="http://majewsky.files.wordpress.com/2011/10/ravend-resource-usage.png"><img src="http://majewsky.files.wordpress.com/2011/10/ravend-resource-usage.png?w=480&h=267" alt="" title="ravend-resource-usage" width="480" height="267" class="alignnone size-full wp-image-757" /></a></p>
<p>Intensive searches on the internet did not turn up anything of interest. Of course there are command-line music players (e.g. MPlayer), but those expect to be connected to a terminal for control. They cannot be run in the background, and there&#8217;s no nice GUI for them (like with the nowplaying applet). It looks like I need to do it myself yet again.</p>
<p>So here is the Raven Music Server (called ravend for short, as it is a daemon), which is now publicly available at <a href="http://quickgit.kde.org/?p=scratch%2Fmajewsky%2Fraven.git&amp;a=summary">git://anongit.kde.org/scratch/majewsky/raven</a>. It currently implements the basic interfaces mandated by MPRIS version 2 (unfortunately the &#8220;Now Playing&#8221; applet supports MPRIS 1 only). The biggest missing piece is support for editing the track list, so at the moment you need to restart the process to change the playlist.</p>
<p>I have been productively using ravend for two weeks now, since one day after its inception, and I&#8217;m quite satisfied with it. And now that it is in a public Git repo, you can, too! Provided that you find pleasure in controlling your mediaplayer with commands like</p>
<pre>
qdbus org.mpris.MediaPlayer2.ravend /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
</pre>
<p>Convenient user interfaces will become available, eventually. Even then, the Raven Music Server will probably not be interesting for end users. Power users may find this project interesting if they like to keep an eye on their system&#8217;s memory footprint, or want to have their playback continue even when the X server is terminated, or want to run a full-fledged media player on a headless system.</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/kde/'>KDE</a>, <a href='http://majewsky.wordpress.com/category/geek-stuff/the-command-line-and-i/'>The command line and I</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/756/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/756/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=756&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2011/10/10/introducing-the-raven-music-server-2/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>

		<media:content url="http://majewsky.files.wordpress.com/2011/10/ravend-resource-usage.png" medium="image">
			<media:title type="html">ravend-resource-usage</media:title>
		</media:content>
	</item>
		<item>
		<title>Reducing the memory footprint of Akonadi</title>
		<link>http://majewsky.wordpress.com/2011/10/10/reducing-the-memory-footprint-of-akonadi/</link>
		<comments>http://majewsky.wordpress.com/2011/10/10/reducing-the-memory-footprint-of-akonadi/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 20:09:59 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[KDE]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=754</guid>
		<description><![CDATA[I have some systems where I don&#8217;t use Kontact or anything else that makes use of Akonadi, so my Akonadi database is empty. Still I find the Akonadi server and its numerous agents running when I have just started my session. The Akonadi server is only started when some application needs it. So who wants [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=754&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I have some systems where I don&#8217;t use Kontact or anything else that makes use of <a href="http://userbase.kde.org/Akonadi">Akonadi</a>, so my Akonadi database is empty. Still I find the Akonadi server and its numerous agents running when I have just started my session.</p>
<p>The Akonadi server is only started when some application needs it. So who wants to communicate with Akonadi? After some search, I found that <b>the clock applet</b> on the Plasma panel is the culprit. It has a feature to display events from the Akonadi calendar which is enabled by default (and I don&#8217;t want to oppose this choice; it&#8217;s a very nice integration feature for people using KOrganizer).</p>
<p>So if you want to prevent the Akonadi server from starting on systems where you don&#8217;t use Akonadi, or just want to speed up the startup of your KDE session by delaying Akonadi&#8217;s startup until it&#8217;s actually needed, do the following: Go to the configuration of the clock applet, and disable &#8220;Display Events&#8221; in the &#8220;Calendar&#8221; section.</p>
<p>To check whether Akonadi is running, open the &#8220;System Activity&#8221; monitor with Ctrl+Esc (or by clicking on the second icon from the left in KRunner). Look for a process called &#8220;akonadiserver&#8221;. (There will also be multiple processes with names like &#8220;akonadi_agent_launcher&#8221; or &#8220;akonadi_whatever_resource&#8221;.) You can also manually start and stop Akonadi with the commands &#8220;akonadictl start&#8221; and &#8220;akonadictl stop&#8221; (from either the command line or KRunner).</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/kde/'>KDE</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=754&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2011/10/10/reducing-the-memory-footprint-of-akonadi/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
		<item>
		<title>$ echo &#8220;A clear sign of madness&#8221;</title>
		<link>http://majewsky.wordpress.com/2011/09/13/a-clear-sign-of-madness/</link>
		<comments>http://majewsky.wordpress.com/2011/09/13/a-clear-sign-of-madness/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 22:32:57 +0000</pubDate>
		<dc:creator>Stefan Majewsky</dc:creator>
				<category><![CDATA[The command line and I]]></category>

		<guid isPermaLink="false">http://majewsky.wordpress.com/?p=748</guid>
		<description><![CDATA[What&#8217;s a clear sign that I&#8217;m a command-line addict? Not only do I have a custom prompt. My prompt is generated by a Python program, which has already grown to over 200 lines. My prompt detects Git and SVN repos, my custom build directory hierarchy, deleted directories at or above $PWD, common usernames and hostnames, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=748&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>What&#8217;s a clear sign that I&#8217;m a command-line addict? Not only do I have a custom prompt. My prompt is generated by a Python program, which has already grown to <a href="http://quickgit.kde.org/?p=scratch%2Fmajewsky%2Fdevenv.git&amp;a=blob&amp;h=2405b0531653d9b833a785a135e68eaf658caebf&amp;hb=841eb992e6c8adae5e831f6d43b8d5f373d15338&amp;f=bin/prettyprompt.py">over 200 lines</a>. My prompt detects Git and SVN repos, my custom build directory hierarchy, deleted directories at or above $PWD, common usernames and hostnames, shell type and shell level; and it&#8217;s still missing some features. What do you think: Is this madness? Does anyone else here use fully custom prompts?</p>
<br />Filed under: <a href='http://majewsky.wordpress.com/category/geek-stuff/the-command-line-and-i/'>The command line and I</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/majewsky.wordpress.com/748/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/majewsky.wordpress.com/748/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=majewsky.wordpress.com&#038;blog=3158478&#038;post=748&#038;subd=majewsky&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://majewsky.wordpress.com/2011/09/13/a-clear-sign-of-madness/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a990c810b2ac5c9f1d1d246a41d18219?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">majewsky</media:title>
		</media:content>
	</item>
	</channel>
</rss>