<?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>Blog of Tim Janik &#187; Gtk+</title>
	<atom:link href="http://blogs.gnome.org/timj/category/gtk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/timj</link>
	<description>Technical ramblings by Tim Janik</description>
	<lastBuildDate>Tue, 15 Sep 2009 07:59:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>16.07.2008 GUADEC 2008 Wrapup</title>
		<link>http://blogs.gnome.org/timj/2008/07/16/16072008-guadec-2008-wrapup/</link>
		<comments>http://blogs.gnome.org/timj/2008/07/16/16072008-guadec-2008-wrapup/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 08:45:10 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2008/07/16/16072008-guadec-2008-wrapup/</guid>
		<description><![CDATA[
 Guadec has been in interesting conference, particularly because it took place in Istanbul this year. I tried to keep a few notes throughout the days to wrap up the experience and discussions here. 
 
 Sunday 
 
 Headed off for Istanbul, partial Imendio meet-up at the airport in Vienna, gathered remaining Imendians at [...]]]></description>
			<content:encoded><![CDATA[<p><!--- paragraph break -->
<p align="left"> Guadec has been in interesting conference, particularly because it took place in Istanbul this year. I tried to keep a few notes throughout the days to wrap up the experience and discussions here. </p>
<p> <!--- paragraph break -->
<p align="left"> <strong>Sunday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> Headed off for Istanbul, partial Imendio meet-up at the airport in Vienna, gathered remaining Imendians at the airport in Istanbul. Like many others, we stayed at the Golden Long Hotel near the seaside. </p>
<div align="center"><a> <img src="http://testbit.eu/~timj/blogstuff/sundown_bosporus.png" border="1" class="doxercss-frame"/> </a></div>
<p> <!--- paragraph break -->
<p align="left"> <strong>Monday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> Kris and I met up with the Gnome release team where we summarized the Gtk+-3.0 ideas that have been cooked up during and after the Berlin Gtk+ Hackfest. </p>
<p> <!--- paragraph break -->
<p align="left"> <strong>Tuesday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> I was planning to attend the Maemo BOF in the morning, but shortly after arriving at the conference venue, <a href="http://www.gnome.org/~federico/news.html">Federico</a> literally dragged me into the DVCS BOF. Still, I only managed to attend the second half of it which was almost exclusively about <a href="http://bazaar-vcs.org/"> Bazaar</a> features. People told me the first hour had been quite the contrary and focused mostly on <a href="http://git.or.cz/"> Git</a> hyping. Clearly, there was no consensus after the meeting on what the future versioning system in Gnome will be. <br /> I&#8217;m not surprised that is the case. As things currently stand, <a href="http://subversion.tigris.org/"> SVN</a> has very active development and user communities, Git is very actively developed, Bazaar is as well, as are a couple other <a href="http://en.wikipedia.org/wiki/Version_control_system"> VCS</a>es. Active developer and user communities are generally a good sign for a healthy project and also an indicator for future relevance. Thus, in any larger community such as the Gnome community, it&#8217;s easy to find lots of critics and lots of supporters for each of the bigger versioning systems and that&#8217;s unlikely to change much. Consequently, there&#8217;ll not be an easy consensus on switching to a single versioning system any time soon, so I think the most productive approach for Gnome to take is to prepare the hosting of multiple VCSes, certainly SVN, Git and Bazaar. Needless to say that cross-VCS integration will also become increasingly important in the future, so focus on maturing and extending git-svn, bzr-svn, bzr-git and the like makes a lot of sense. </p>
<p> <!--- paragraph break -->
<p align="left"> Later that day, we had a Gtk+ Developers meeting in the medium sized presentation room. The place was a bit too large to have the planned face to face discussions so we&#8217;ve had to sacrifice some of the spontaneity to microphone resource sharing. Kris took minutes during the meeting and will probably post those to gtk-devel-list once he&#8217;s found a minute to process them. The meeting was quite productive nevertheless, we discussed the upcoming Gtk+ 2.14, features and schedule for 2.16 and 3.0 and a bit of the post-3.0 road map. <br /> Right after that discussion, Kris and I attended the advisory board meeting where we briefly wrapped up the developers meeting, the Gtk+ Hackfest in Berlin and the improvements the Gtk+ project has seen since the <a href="http://mail.gnome.org/archives/gtk-devel-list/2006-December/msg00074.html"> State of the Gtk+ Maintenance</a> email. In particular, we stressed that we now have the <a href="http://live.gnome.org/GtkTasks"> GtkTasks</a> and <a href="http://live.gnome.org/GTK+/3.0/Tasks"> Gtk+ 3.0 Tasks</a> wiki pages which can serve as an entry point for contributors and assistants to the project at various experience levels, in particular for companies that want to sponsor developer resources. Also for people that have an interest in long term Gtk+ project involvement, feel free to read up on <a href="http://blogs.gnome.org/timj/2008/05/16/16052008-becoming-a-gtk-maintainer/">how to become a Gtk+ maintainer</a>. </p>
<p> <!--- paragraph break -->
<p align="left"> Pizza looks weird in Istanbul BTW: </p>
<div align="center"><a> <img src="http://testbit.eu/~timj/blogstuff/pizza_istanbul.png" border="1" class="doxercss-frame"/> </a></div>
<p> <!--- paragraph break -->
<p align="left"> <strong>Wednesday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> Almost by accident (I was mostly looking for an air conditioned hall in the afternoon), I happened to be watching &#8220;Gnome Documentation: A year in review&#8221; by <a href="http://donscorgie.livejournal.com/">Don Scorgie</a> where he described the new user documentation tool <a href="http://live.gnome.org/ProjectMallard">Mallard</a>. For some time now, I&#8217;ve been working on a <a href="http://en.wikipedia.org/wiki/Wiki_syntax"> Wiki syntax parser</a> for <a href="http://git.testbit.eu/Doxer/"> Doxer</a> to unify the markup I have to use for my blog, inline documentation and CMS content <a href="http://testbit.eu/filter/tips">markup at testbit.eu</a>. (I have a blog entry in the queue on this for another day.) In this context, implementing a Doxer markup backend that generates Mallard&#8217;s XML input could be an attractive markup alternative for future Gnome documentation &#8211; it at least ended up on my ever growing TODO list. ;) </p>
<p> <!--- paragraph break -->
<p align="left"> Lots of people approached me throughout this and the following days for a chat about Gtk+-3.0 and what comes after that. With the <a href="http://mail.gnome.org/archives/gtk-devel-list/2008-June/msg00204.html"> merging of the GSEAL branch</a> into upstream trunk recently, there&#8217;s been a lot of focus on the technical preparative work we&#8217;re doing for the actual 3.0 release which is planned as an ABI break to Gtk+-2.16 without adding any new features (it&#8217;s basically just a re-release with all deprecated code removed and current &#8220;private&#8221; API really made private by moving it to non-installed source files). </p>
<p> <!--- paragraph break -->
<p align="left"> What has been lacking emphasis in this course is that 3.0 is going to be the necessary <em>enabler</em>, needed to work on implementing future visions of Gtk+ and to refactor the code base back to a healthy state where it becomes maintainable again. Quite expectedly, the need for the sealing and accompanied ABI break has been questioned several times, so I&#8217;ll reiterate the reasoning here: </p>
<ul type="disc">
<li> <em><a href="http://en.wikiquote.org/wiki/The_Matrix">Everybody falls the first time.</a></em> <br /> Code development in open source projects is very evolutionary, especially for projects that don&#8217;t clone or reimplement existing specified APIs like Libc. A whole chapter is spent on prototypes in <a href="http://en.wikipedia.org/wiki/The_Mythical_Man-Month">The Mythical Man-Month</a>: <br /> <em>&#8220;Plan to throw one away; you will, anyhow.&#8221;</em> <br /> So newly added components and APIs are almost certain to need fixups or revamps in future iterations (likely <a href="http://en.wikipedia.org/wiki/Second-system_effect">more than once</a>). If critical internals are being exposed and eternal ABI stability has been promised, this however becomes impossible. Given the development history of Gtk+ and the variety of interests in this project, it is vital for its future success to prepare for future changes and allow iterative improvements. After all, progressive improvements, appreciation of contributions and adaptions to changing circumstances is where the free software development model shows its strength. The <a href="http://en.wikipedia.org/wiki/Waterfall_model">waterfall design model</a> is not it. </li>
<li> <em>Gtk+-2.x is essentially a dead end.</em> <br /> Everybody agrees that Gtk+-2.x is pretty much dead in a few revisions because of the huge work involved in its maintenance and no relief in sight with its current ABI maintenance policy. This is at least true for all current and past core team members (i.e. everyone who actively tried maintaining 2.x over a significant period). The question is whether we move to an entirely new toolkit (Clutter, Rapicorn, Qt, HippoCanvas, etc) or whether that &#8220;new&#8221; toolkit is Gtk+-3.0 which may be largely API compatible with Gtk+-2.x. In either case, applications and libraries will need to migrate to a new toolkit base with a different ABI, the main difference is the involved porting effort. </li>
<li> <em>GLib and Gtk+ do have a means to deal with API changes:</em> <br /> 1) We provide new alternative interfaces (functions). <br /> 2) We deprecate old interfaces (functions) or provide compatibility code in old interfaces. <br /> Notably, this does only work for API that is exported via function symbols. Structure fields that are directly accessed from application code can&#8217;t be deprecated and removed without breaking ABI, and there is no compatibility code upstream could provide for these kind of accesses either. That&#8217;s why we want to move away from exposing any structure internals in 3.0 and beyond. </li>
<li> <em>3.0 will ABI-incompatibly remove all deprecated and private APIs.</em> <br /> Of course, the above described deprecation scheme only scales well if deprecated APIs are <em>really removed</em> from the code base at some point. Technically, this is an ABI break which is why GLib/Gtk+ have not been doing this since 2.0. However, lots of other vendors do this to keep a healthy code base, e.g. Qt does break ABI between major releases, Python 3.0 will be incompatible with 2.5, Apple does remove long deprecated APIs in newer releases of Mac OS X, Symbian broke API and ABI in 9.x, Microsoft broke behavior from .NET 1.1 to 2.0, and the list goes on&#8230; <br /> By exposing only function symbols as future public interfaces, we&#8217;ll be able to provide arbitrary compatibility functionality for old interfaces on top of new components, add helpful runtime warnings for iterative migration and constrain future ABI breaks to removal of properly deprecated interfaces. </li>
<li> <em>User visible gains are post-3.0 features:</em> <br /> Since GLib and Gtk+ are largely volunteer contribution based projects, it&#8217;s close to impossible to plan exact arrival of future features. However the following is a list of things that have (partially) been discussed as post-3.0 work during the Gtk+ Hackfest already:
<ul type="square">
<li> Full support of alpha transparency for all widgets; </li>
<li> Support for (partial) stacking of widgets (needs transparency); </li>
<li> Offering easier layouting facilities; </li>
<li> Support for animated visible transitions between widget states; </li>
<li> Providing new UI metaphors based on simulation of physical effects like acceleration, 3D browsing of image collections, 3D skimming through notebook pages, and more; </li>
<li> Using IDL based type data generators and code generators to improve the way widgets are implemented; </li>
<li> Implementing a new theming system for the toolkit; </li>
<li> Moving towards exposing widget features only via interfaces that have their own handle (asymmetric query_interface). </li>
</ul>
</li>
</ul>
<p> <!--- paragraph break -->
<p align="left"> This is how GSEAL, the Gtk+-3.0 release and a couple <a href="http://live.gnome.org/GTK+/3.0/Tasks">remaining outstanding tasks</a> are going to enable development of exciting future user visible features. The next step for Gtk+ to get work in visionary areas off the ground is to start consideration of feature feasibility and implementations, required resources and tentative schedules. </p>
<p> <!--- paragraph break -->
<p align="left"> At the end of the day, we had the Opening Cocktails Party, during which I managed to catch Hallski tattooing J5: </p>
<div align="center"><a> <img src="http://testbit.eu/~timj/blogstuff/gnometagging.png" border="1" class="doxercss-frame"/> </a></div>
<p> <!--- paragraph break -->
<p align="left"> <strong>Thursday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> Thursdays most interesting event was of course the keynote by Kris which got hijacked by the Gnome release team for the announcement of Gnome 3.0 which is essentially Gnome 2.30 cleaned up and based on Gtk+-3.x. Kris&#8217; slides are available online: </p>
<pre>	<a href="http://people.imendio.com/kris/gtk-state-of-the-union-2008.pdf">http://people.imendio.com/kris/gtk-state-of-the-union-2008.pdf</a>
</pre>
<p align="left"> The slides provide a good overview of what Gtk+-2.14 will bring, prospects for 2.16 and visions/requests from the community for Gtk+&#8217;s future. As previously described, Gtk+-3.0 is about enabling refactorings and development of new features, and the plan is to do our best to make the transition away from old deprecated code as easy as possible. Other than properly porting an existing Gtk+-2.x application to work with the G_DISABLE_DEPRECATED, GTK_DISABLE_DEPRECATED, GSEAL_ENABLE switches, no additional changes will be required to build and run an application on Gtk+-3.0. </p>
<p> <!--- paragraph break -->
<p align="left"> At the end of the day, there was the boat trip through the Bosporous which provided a beautiful sight along the coast line. </p>
<p> <!--- paragraph break -->
<div align="center"><a> <img src="http://testbit.eu/~timj/blogstuff/guadec2008boat.png" border="1" class="doxercss-frame"/> </a></div>
<p> <!--- paragraph break -->
<p align="left"> <strong>Friday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> I managed to attend the latter half of the lightning talks which was as always quite interesting. I should probably ignore my laziness and actually prepare short lightning talks for next year about Rapicorn and possibly Doxer&#8230; ;) </p>
<p> <!--- paragraph break -->
<p align="left"> I took particular interest in Transifex, an online translation platform that can work together with multiple VCSes and that we&#8217;d ideally move all Gnome translations to in the future. There are two things I&#8217;d like to see fixed in a future translation workflow from a developer perspective: </p>
<ul type="square">
<li> The .po templates should really be generated by the developers of the upstream project by automatic means, e.g.: <br /> <code>make update-po -C po/</code> <br /> So the upstream version of intltool and po/Makefile.* are used instead of possibly broken or outdated intltool/gettext versions on the translators system. </li>
<li> Developers should be able to determine merge points for translations, and also review related non-po file changes, rather than having translators wildly commit into upstream repositories (which may conflict with other VCS workflows like branch merges or commits around release phases). </li>
</ul>
<p> <!--- paragraph break -->
<p align="left"> Later on, Federico presented his ideas for timeline tabs for the desktop. This should make it rather easy to find documents or URLs from previous days or weeks, because out of natural necessity, humans generally have good chronological associations. So the new and nice part about this approach is that it can provide good visual access to the chronologic dimension, something a file system doesn&#8217;t usually reveal easily, and that&#8217;s not easily made accessible by the most prominent desktop metaphors either. </p>
<p> <!--- paragraph break -->
<p align="left"> I feel very tempted to start an implementation of the desktop tabs with Rapicorn, however with a few refinements of Federico&#8217;s proposal: </p>
<ul type="square">
<li> The view should provide a &#8220;chronological zoom&#8221; slider to switch the view between years/months/weeks/days/hours. </li>
<li> To be most useful, we&#8217;ll need a crawler that tries to (re-)construct past file modification history without relying on programs pushing journal entries about file edits. This will be needed anyway unless every program on this planet provides file editing journal information. </li>
<li> I think the journaling hooks need to be implemented via DBus and not rely on Nautilus, so they&#8217;re usable by all cross-desktop applications and non-GUI programs. </li>
<li> Various filters by file extensions, magic and possibly more will also be needed in the tab view (this was partly raised during the discussion phase at the end of the presentation). </li>
</ul>
<p> <!--- paragraph break -->
<p align="left"> <strong>Saturday</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> About half of the Imendians headed home on Saturday, we had some early leaves on Friday already and left some others in Istanbul for additional vacations. </p>
<p> <!--- paragraph break -->
<p align="left"> Oh, and since I&#8217;ve been asked about my nickname here and there, I decided to add tabs to my hackergotchi for clarification: </p>
<div align="center"><a> <img src="http://testbit.eu/~timj/blogstuff/gotchitabs.png" border="1" class="doxercss-frame"/> </a></div>
<p> <!--- paragraph break -->
<p align="left"> <strong>Aftermath</strong> </p>
<p> <!--- paragraph break -->
<p align="left"> There have been quite some discussions on the Gtk+-3.0 plan after Kris&#8217; keynote. One thing that was brought up is that releasing an ABI incompatible but featureless new version of Gtk+ and calling it 3.0 is rather unconventional. An alternative scheme could involve releasing the ABI incompatible cleaned up version as 2.99.0, make 2.99.x the new development branch and release 3.0 with cleaned up ABI and new features (would have been 3.2 in the original plan). </p>
<p> <!--- paragraph break --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2008/07/16/16072008-guadec-2008-wrapup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>23.06.2008 Writing Unit Tests with GLib</title>
		<link>http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/</link>
		<comments>http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 15:14:04 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[GLib]]></category>
		<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/</guid>
		<description><![CDATA[
 Every other week, someone asks how to use the new unit testing framework in GLib (released with GLib-2.16.0) and Gtk+ (to be released with the next stable). First, here is a write-up from last December that summarizes all important aspects:  Test Framework Mini Tutorial.
 
 For people building packages that use the new [...]]]></description>
			<content:encoded><![CDATA[<p><!--- paragraph break --></p>
<p align="left"> Every other week, someone asks how to use the new <a href="http://library.gnome.org/devel/glib/stable/glib-Testing.html">unit testing framework in GLib</a> (released with <a href="http://mail.gnome.org/archives/gtk-devel-list/2008-March/msg00022.html">GLib-2.16.0</a>) and <a href="http://www.gtk.org">Gtk+</a> (to be released with the next stable). First, here is a write-up from last December that summarizes all important aspects: <a href="http://mail.gnome.org/archives/gtk-devel-list/2007-December/msg00181.html"> Test Framework Mini Tutorial</a>.</p>
<p> <!--- paragraph break --></p>
<p align="left"> For people building packages that use the new framework, the following new Makefile rules will be of interest:</p>
<ul type="square">
<li> <strong><code>make test</code></strong><br />
Run all tests recursively from $(TEST_PROGS), abort on first error.</li>
<li> <strong><code>make test-report</code></strong><br />
Run all tests recursively, continue on errors and generate <code>test-report.xml</code>.</li>
<li> <strong><code>make perf-report</code></strong><br />
Run all tests recursively, enable performance tests (this usually takes significantly longer), continue on errors, generate <code>perf-report.xml</code>.</li>
<li> <strong><code>make full-report</code></strong><br />
Run all tests recursively, enable performance tests, enable slow (thorough) tests, continue on errors, generate <code><a href="http://people.imendio.com/timj/examples/gtk+-full-report.html"> full-report.xml</a></code>.</li>
<li> <strong><code>make check</code></strong><br />
Run make test in addition to automake checks.</li>
</ul>
<p><!--- paragraph break --></p>
<p align="left"> After GUADEC, we will be looking into getting build machines setup that&#8217;ll regularly build GLib, Gtk+ and friends, run the unit testing suites and provide reports online.</p>
<p> <!--- paragraph break --></p>
<p align="left"> For those pondering to write unit tests, but too lazy to look at the tutorial:</p>
<ul type="square">
<li> Implementing a test program is very easy, the only things needed are:
<pre>  // initialize test program
  gtk_test_init (&amp;argc, &amp;argv);
  // hook up your test functions
  g_test_add_func ("/Simple Test Case", simple_test_case);
  // run tests from the suite
  return g_test_run();</pre>
</li>
<li> In most cases, a test function can be as simple as:
<pre>  static void
  simple_test_case (void)
  {
    // a suitable test
    g_assert (g_bit_storage (1) == 1);
    // a test with verbose error message
    g_assert_cmpint (g_bit_storage (1), ==, 1);
  }</pre>
<p>Tests that abort, e.g. via <a href="http://library.gnome.org/devel/glib/unstable/glib-Testing.html#g-assert">g_assert()</a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-error">g_error()</a>, are registered as failing tests with the framework. Also, the <a href="http://library.gnome.org/devel/glib/unstable/gtester.html">gtester</a> utility used to implement the above Makefile rules will restart a test binary after a test function failed and continue to run remaining tests if <a href="http://library.gnome.org/devel/glib/stable/glib-Testing.html#g-test-add-func">g_test_add_func()</a> has been used multiple times.</li>
<li> Checks in tests can be written with if() and g_error() or exit(1), or simply by using variants of g_assert(). For unit tests in particular, an extended set of assertions has been added, the benefit of using these are the printouts of the involved values when an assertion doesn&#8217;t hold:
<pre>  g_assert_cmpstr   (stringa, cmpop, stringb);
  g_assert_cmpint   (int64a,  cmpop, int64b);
  g_assert_cmpuint  (uint64a, cmpop, uint64b);
  g_assert_cmphex   (uint64a, cmpop, uint64b);
  g_assert_cmpfloat (doublea, cmpop, doubleb);</pre>
<p>For instance:<br />
<strong><code>char *string = "foo"; g_assert_cmpstr (string, ==, "bar");</code></strong><br />
yields:<br />
<strong><code>ERROR: assertion failed (string == "bar"): ("foo" == "bar")</code></strong></li>
<li> The framework makes it easy to test program output in unit tests:
<pre>  static void
  test_program_output (void)
  {
    if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT |
                             G_TEST_TRAP_SILENCE_STDERR))
      {
        g_print ("some stdout text: somagic17\n");
        g_printerr ("some stderr text: semagic43\n");
        exit (0);
      }
    g_test_trap_assert_passed();
    g_test_trap_assert_stdout ("*somagic17*");
    g_test_trap_assert_stderr ("*semagic43*");
  }</pre>
</li>
<li> And it is similarly easy to test and verify intentional program abortion:
<pre>  static void
  test_fork_fail (void)
  {
    if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR))
      {
        g_assert_not_reached();
      }
    g_test_trap_assert_failed();
    g_test_trap_assert_stderr ("*ERROR*test_fork_fail*not*reached*");
  }</pre>
</li>
<li> The above and more tests are showcased in GLib: <a href="http://svn.gnome.org/viewvc/glib/trunk/glib/tests/testing.c?revision=6955&amp;view=markup">glib/tests/testing.c</a>.</li>
</ul>
<p><!--- paragraph break --></p>
<p align="left"> There&#8217;s of course lots of room left to improve GLib and Gtk+ unit tests, and also to improve the current framework. For a speculative, non-comprehensive list, here are some ideas from the unit testing section of my personal TODO:</p>
<p> <!--- paragraph break --></p>
<ul type="square">
<li> Introduce 2D marker recognition for graphical unit testing of Gtk+ layouts (prototyped in <a href="http://rapicorn.org">Rapicorn</a>).</li>
<li> Provide functionality to determine image similarities to allow for pixel image based unit tests (port this from Rapicorn).</li>
<li> Implement state dumps to automate result specification and verification in unit tests. (This will allow us to avoid adding lots of abusable testing hooks to our API.)</li>
<li> Integrate performance statistics (like <a href="http://bugzilla.gnome.org/show_bug.cgi?id=354457">#354457</a>) and other related information into test reports.</li>
<li> Publically install a variant of the <a href="http://svn.gnome.org/viewvc/gtk%2B/trunk/Makefile.decl?view=markup">Makefile.decl</a> file used in Gtk+ to implement the test framework rules and <a href="http://en.wikipedia.org/wiki/Xvfb">Xvfb</a> swallowing of test programs. This is needed by other projects to run unit tests the way Gtk+ does.</li>
<li> Implement the unit test ideas that are outlined at the end of this email: <a href="http://mail.gnome.org/archives/gtk-devel-list/2006-October/msg00093.html">Gtk+ unit tests (brainstorming)</a>.</li>
</ul>
<p><!--- paragraph break --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2008/06/24/23062008-writing-unit-tests-with-glib/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>16.05.2008 Becoming a Gtk+ maintainer</title>
		<link>http://blogs.gnome.org/timj/2008/05/16/16052008-becoming-a-gtk-maintainer/</link>
		<comments>http://blogs.gnome.org/timj/2008/05/16/16052008-becoming-a-gtk-maintainer/#comments</comments>
		<pubDate>Fri, 16 May 2008 11:50:19 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[GLib]]></category>
		<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2008/05/16/16052008-becoming-a-gtk-maintainer/</guid>
		<description><![CDATA[
 Amongst many other things during the  Gtk+ Hackfest 2008, it was brought to my attention that Gtk+ maintainership is sometimes perceived as some kind of  leet circle, hard to join for newcomers. I can&#8217;t really imagine how &#8220;hard&#8221; it is for newcomers to join Gtk+ maintenance these days. The learning curve probably [...]]]></description>
			<content:encoded><![CDATA[<p><!--- paragraph break --></p>
<p align="left"> Amongst many other things during the <a href="http://live.gnome.org/GTK%2B/Hackfest2008"> Gtk+ Hackfest 2008</a>, it was brought to my attention that Gtk+ maintainership is sometimes perceived as some kind of <a href="http://en.wikipedia.org/wiki/Leet"> leet</a> circle, hard to join for newcomers. I can&#8217;t really imagine how &#8220;<em>hard</em>&#8221; it is for newcomers to join Gtk+ maintenance these days. The learning curve probably is steeper now than it was in the last decade, but then, we do have documentation now and didn&#8217;t have any back then&#8230; ;-)</p>
<p> <!--- paragraph break --></p>
<p align="left"> In any case, I think that definitely none of the Gtk+/GLib core maintainers would want to bar someone else from contributions or helping out with maintenance tasks. So to aid that process, I&#8217;ve written down what I keep telling people who approach me about this in person. A lot of it might seem overly obvious to veterans, but for newcomers or contributors looking into extending their activities on the project I hope to provide helpful starting points.</p>
<p> <!--- paragraph break --></p>
<p align="left"> Much of Gtk+ is still maintained as a huge monolithic whole. That is, a very few people are taking care of a wide variety of components. I think ultimately we would all be much better off, if we had more people being responsible for individual components like particular widgets (e.g. <a href="http://library.gnome.org/devel/gtk/unstable/GtkNotebook.html"> GtkNotebook</a>) or widget families (e.g. <a href="http://library.gnome.org/devel/gtk/unstable/GtkBox.html">GtkBox</a>, <a href="http://library.gnome.org/devel/gtk/unstable/GtkHBox.html">GtkHBox</a>, <a href="http://library.gnome.org/devel/gtk/unstable/GtkVBox.html">GtkVBox</a>). So the following are steps and tasks useful for anyone wanting to get into Gtk+ component maintenance.</p>
<p> <!--- paragraph break --></p>
<p align="left"> First of all, we have the <a href="http://live.gnome.org/GtkTasks">GtkTasks wiki page</a>, a task list with various ways in which people can contribute to the Gtk+ project and start getting involved. In particular for the following positions, no one has signed up so far to volunteer on a regular basis:</p>
<p> <!--- paragraph break --></p>
<ul type="disc">
<li> <strong>Patch/Bug Monitoring &amp; Filing</strong> &#8211; collect bugs from mailing lists and IRC to make sure they are being filed.</li>
<li> <strong>FAQ Maintainer</strong> &#8211; this involves monitoring the mailing list(s), taking CC:-mails from other people on possible FAQ material and regularly updating the FAQ accordingly.</li>
<li> <strong>Build Monitoring</strong> &#8211; run and maintain Gtk+ tool-chain builds on various platforms.</li>
<li> <strong>Making Releases</strong> &#8211; we are looking for someone assisting in the release process and to take over release building during some periods in the future.</li>
<li> <strong>Implementing Test Programs</strong> &#8211; there&#8217;s much work needed in our unit test coverage, so we&#8217;re always looking for people willing to implement more unit tests.</li>
</ul>
<p><!--- paragraph break --></p>
<p align="left"> For general information about the maintenance situation, the <a href="http://mail.gnome.org/archives/gtk-devel-list/2006-December/msg00074.html">State of the Gtk+ Maintenance</a> write-up is still fairly valid. However many good things have been suggested by the community since, such as the GtkTasks page and the Hackfest. At the end, the write-up addresses how occasional contributors or developers at different experience levels can help out the project. For instance with activities such as: <em>Bug triage and verification</em>, <em>Review and clarify documentation</em>, <em>Revision hunting for regressions</em>, <em>Refactor code areas</em>, <em>Work on optimizations</em>, and the list goes on.</p>
<p> <!--- paragraph break --></p>
<p align="left"> If none of this sounds interesting to potential new maintainers, be warned that regular maintenance means having to put up with pretty much all of these at some point. ;-)<br />
However, probably the most straight forward way to take on maintenance for a particular code portion (usually a particular widget) is to start becoming familiar with it and work on improving it right away:</p>
<p><!--- paragraph break --></p>
<ul type="disc">
<li> <strong>Cleanup indentation</strong> &#8211; lots of contributions to Gtk+ in the past have weakened coding style in various areas. In general we use <a href="http://www.gnu.org/prep/standards/standards.html"> GNU coding style</a> plus a few extra rules similar to the <a href="http://developer.gimp.org/faq.html#id2467385"> Gimp coding style</a>.</li>
<li> <strong>Perform code cleanups</strong> &#8211; look for outstanding migrations/refactorings in the code or if the implementation could be simplified/streamlined in areas.</li>
<li> <strong>Check documentation and examples</strong> &#8211; contributing by improving the existing documentation, testing existing examples and providing new ones is a very straight forward way to learn about a new component. Also, documentation patches are usually easily and quickly approved.</li>
<li> <strong>Provide unit tests</strong> &#8211; writing new unit tests for existing component APIs is even better than providing documentation examples. You get immediate feedback and they should in general be easy to approve to go into upstream. Also, it is definitely an area where Gtk+ and GLib still need lots of work.</li>
<li> <strong>Review bug reports and patches</strong> &#8211; go through the <a href="http://bugzilla.gnome.org/browse.cgi?product=gtk+"> Gtk+ bug load</a> of a particular component, see what issues could be closed or need info. Find patches that could be applied or need work and provide/fix patches along the way. Also, feel free to provide review for existing patches where you feel confident to provide reasonable input. For existing maintainers, looking at other people&#8217;s review is one of the best ways to figure if another person is up to the task of taking over component maintenance.</li>
<li> <strong>Actively nag existing maintainers</strong> or people with SVN accounts for trivial patches (like Cody and Mathias who signed up for <a href="http://live.gnome.org/GtkTasks#P2">Patch testing &amp; committing</a>) to review, approve and apply your changes.</li>
<li> <strong>Participate in the project forums</strong> like <a href="http://mail.gnome.org/archives/gtk-devel-list/">gtk-devel-list</a> and #gtk+ (needed to nag people from the <a href="http://www.gtk.org/development.html#Team">core team</a> and other developers), and read and reply in other <a href="http://www.gtk.org/mailing-lists.html">related mailing lists</a>.</li>
</ul>
<p><!--- paragraph break --></p>
<p align="left"> The first few points actually mean working with the code by providing patches, and filing new bug reports with those patches attached. While this may at first increase our bug load, if someone shows sincere interest in taking over component maintenance, sticks to the coding style and provides useful patches, there&#8217;s nothing stopping us from granting new SVN accounts so contributors can commit their own patches after approval.</p>
<p> <!--- paragraph break --></p>
<p align="left"> Finally, the project is welcoming every new contributor. But be reminded that no approval is needed from anyone to start your work. In actuality, asking for it will most probably get you a reserved or negative answer, because improving the project is all about working on it, not making or requesting promises. So, everyone is invited to read through the task lists/descriptions and get their hands dirty immediately. A fair bit of self incentive is needed to take on maintenance of a component anyway, so you&#8217;ll have to get yourself motivated on your own there won&#8217;t be anyone else doing it for you.</p>
<p> <!--- paragraph break --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2008/05/16/16052008-becoming-a-gtk-maintainer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>07.04.2008 On Moving Gtk+ to Git</title>
		<link>http://blogs.gnome.org/timj/2008/04/07/07042008-on-moving-gtk-to-git/</link>
		<comments>http://blogs.gnome.org/timj/2008/04/07/07042008-on-moving-gtk-to-git/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 22:20:46 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[GLib]]></category>
		<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2008/04/07/07042008-on-moving-gtk-to-git/</guid>
		<description><![CDATA[
 There have been several requests about hosting Gtk+ (and GLib) as a  Git repository recently and since that topic has come up more and more often, I meant to write about this for quite some time. 
 
 Let&#8217;s first take a look at the actual motivation for such a move. There are [...]]]></description>
			<content:encoded><![CDATA[<p><!--- paragraph break -->
<p align="left"> There have been several requests about hosting Gtk+ (and GLib) as a <a href="http://git.or.cz/"> Git</a> repository recently and since that topic has come up more and more often, I meant to write about this for quite some time. </p>
<p> <!--- paragraph break -->
<p align="left"> Let&#8217;s first take a look at the actual motivation for such a move. There are a good number of advantages we would get out of using Git as a source code repository for Gtk+ and GLib: </p>
<p> <!--- paragraph break -->
<ul type="disc">
<li> We can work offline with the Gtk+ history and source code. </li>
<li> We can work much faster on Gtk+ even when online with tools such as <a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html"> git-log</a> and <a href="http://www.kernel.org/pub/software/scm/git/docs/git-blame.html"> git-blame</a>. </li>
<li> It will be much easier for people to branch off and do development on their own local branches for a while, exchange their code easily with pulling branches between private repositories, etc. I.e. get all the advantages of a truly distributed versioning system. </li>
<li> With Git it&#8217;s much easier to carry along <a href="http://bugzilla.gnome.org/show_bug.cgi?id=318807"> big Gtk+ changes</a> including history by using <a href="http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html"> cherry picking</a> and <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html"> (interactive) rebasing</a>. </li>
<li> We can make proper <strong>public</strong> backups of the source code repositories. This ought to be possible already via <a href="http://svnbook.red-bean.com/en/1.4/svn.ref.svnsync.html"> svnsync</a>, but isn&#8217;t for <a href="http://svn.gnome.org/viewvc/"> svn.gnome.org</a> because we run an svn 1.3.x server instead of an svn 1.4.x server that is required by svnsync. (Yes, this issue has been raised with the sysadmins already.) </li>
</ul>
<p> <!--- paragraph break -->
<p align="left"> A quick poll on IRC has shown that all affected core maintainers are pretty much favoring Git over SVN as a source code repository for GLib/Gtk+. </p>
<p> <!--- paragraph break -->
<p align="left"> However, here are the points to be considered for not moving the repositories to Git (just yet): </p>
<p> <!--- paragraph break -->
<ul type="disc">
<li> Complexity; Git is often perceived to be harder to use than SVN, there are several attempts to mitigate this problem though: <a href="http://www.gnome.org/~newren/eg/"> Easy Git</a> <a href="http://developer.imendio.com/projects/giggle/"> Giggle</a> <a href="http://blogs.gnome.org/timj/2007/10/30/30102007-yummyyummysourcecontrol-version-09/"> yyhelp</a>. <br /> With some of the above, Git is as easy to use as SVN is, so Git complexity doesn&#8217;t need to be holding anyone off at this point. </li>
<li> Git may be stable and mature these days, but <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html"> git-svn</a> is not there yet. It is generally good enough to create local Git mirrors of SVN repositories and work from those to have most of the Git convenience on top of an SVN project. <br /> But git-svn has seen structural changes recently, quite some rewriting and bug fixing that indicate it&#8217;s still too much in flux for the one-and-only SVN->Git migration for projects at the scale of Gtk+. This is not meant as criticism on git-svn, fairly the opposite actually. It&#8217;s good to see such an important component be alive and vivid. All issues I&#8217;ve raised with the maintainer so far have been addressed, but it seems advisable to wait for some stabilization before trusting all the Gtk+ history to it. </li>
<li> <a href="http://git.or.cz/gitwiki/Gitweb"> Gitweb</a> interfaces already exist for GLib/Gtk+ mirrors, for example on testbit: <a href="http://git.testbit.eu"> Testbit Git Browser</a>. <br /> These can be used for cloning which is much faster than a full git-svn import. Alternatively, shallow git-svn imports can be created like this:
<pre>  git-svn clone -T trunk -b branches -t tags -r 19001 svn://svn.gnome.org/svn/gtk+
</pre>
<p> This will create a repository with a mere ~1000 revisions, including all changes since we branched for 2.12. We&#8217;re using such a shallow repository for faster cloning of our <a href="http://micke.hallendal.net/blog/gtk-30-enabling-incrementalism/"> GSEAL()</a> development at Imendio: <a href="http://git.imendio.com/?p=projects/gtk%2B.git"> view gtk+.git</a>. </li>
<li> In summer 2006, we&#8217;ve had the first test migration of all of GNOME CVS to SVN, in December 2006 we&#8217;ve had the final migration. During that period, the <a href="http://beast.gtk.org"> Beast</a> project stayed migrated to SVN to work out the quirks from the CVS->SVN migration before we migrate all other GNOME modules and have to fix up everyones converted modules. There were quite some issues that needed fixing after the initial test migration and in the end we had to <a href="http://mail.gnome.org/archives/beast/2007-January/msg00001.html"> rebuild the Beast development history from pieces</a>. Preventing the other GNOME modules from such hassle was the entire point in migrating Beast early on, so I&#8217;m not complaining. <br /> However, given the size and importance of GLib/Gtk+, the development history of those projects shouldn&#8217;t be put at a similar risk. That is, GLib/Gtk+ shouldn&#8217;t be pioneering our next source repository migration, let some other small project do this and work out the quirks first. </li>
<li> git-svn already provides a good part of the Git advantages to developers while Gtk+ stays hosted in SVN. Albeit due to mismatching hashes, syncing branches between distinct git-svn checkouts of different people is tedious. Setting up an &#8220;official&#8221; git-svn mirror on <a href="http://gtk.org"> git.gtk.org</a> could probably help here. Also, to ease integration, <a href="http://www.gnome.org/~jamesh/jhbuild.html"> jhbuild</a> could be extended to use git-svn instead of svn commandos to update SVN modules, if the current module has a .git/ subdirectory instead of a .svn/ subdirectory. </li>
</ul>
<p> <!--- paragraph break -->
<p align="left"> The bottom line is, there&#8217;s a good number of advantages that Git already can (or <em>could</em>) provide for our development even without migrating the repositories to Git right away. When exactly will be a good point for migrating GLib/Gtk+ and possibly other GNOME modules might not be an easy call, but right now is definitely too early. </p>
<p> <!--- paragraph break --></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2008/04/07/07042008-on-moving-gtk-to-git/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>17.08.2007 What are ELF libraries good for anyway?</title>
		<link>http://blogs.gnome.org/timj/2007/08/17/17082007-what-are-elf-libraries-good-for-anyway/</link>
		<comments>http://blogs.gnome.org/timj/2007/08/17/17082007-what-are-elf-libraries-good-for-anyway/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 20:11:22 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[GLib]]></category>
		<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/08/17/17082007-what-are-elf-libraries-good-for-anyway/</guid>
		<description><![CDATA[ Or: Who in the world is actually linking against GLib without Gtk+? 
 I&#8217;m currently in the process of building some general purpose infrastructure for Rapicorn and because a good portion of the C++ utilities used in Beast and Rapicorn are factored out into an extra library called Birnet. I&#8217;m running into similar complexity [...]]]></description>
			<content:encoded><![CDATA[<p> Or: Who in the world is actually linking against GLib without Gtk+? </p>
<p> I&#8217;m currently in the process of building some general purpose infrastructure for <a href="http://rapicorn.org">Rapicorn</a> and because a good portion of the C++ utilities used in <a href="http://beast.gtk.org">Beast</a> and Rapicorn are factored out into an extra library called <a href="http://beast.gtk.org/rdocu-birnet/">Birnet</a>. I&#8217;m running into similar complexity issues here that we encountered with <a href="http://svn.gnome.org/viewcvs/glib/trunk/glib-2.0.pc.in?view=markup">libglib</a> vs. <a href="http://svn.gnome.org/viewcvs/glib/trunk/gobject-2.0.pc.in?view=markup">libgobject</a> vs. <a href="http://svn.gnome.org/viewcvs/gtk%2B/trunk/gdk-2.0.pc.in?view=markup">libgdk</a> already. I.e. lower level modules cannot reference or use mechanisms provided at a higher level (for instance <a href="http://mail.gnome.org/archives/gtk-devel-list/2005-November/msg00093.html">deriving GHashTable from GObject</a>). This becomes even worse with C++ which lacks support for <a href="http://en.wikipedia.org/wiki/Partial_class">partial classes</a> (a class definition spanning multiple source files, like implementing gtk_widget_foo() outside of libgtk). </p>
<p> One remedy would be to actually merge libbirnet and librapicorn into a single project and let Beast depend on librapicorn. However, that&#8217;s essentially like we started out with GLib and Gtk+ in late 1996 when it got split out of the <a href="http://gimp.org">Gimp</a> package. In June 1998 we <a href="http://mail.gnome.org/archives/gtk-list/1998-February/msg00173.html">split off libglib into a separate package</a> for programs needing C utilities but not <a href="http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk+-2.0.pc.in?view=markup">libgtk</a>. So now, I&#8217;m reconsidering this separation after almost a decade. Reflecting on the move is probably not a bad idea before attempting the opposite with Rapicorn: </p>
<p> <em>How many programs are actually linking against libglib but not libgdk, and is there any real benefit from separation?</em> <br /> If your machine has libglib and a few spare minutes, you can use this command line to find out on your own: <code>
<pre>	find `echo $PATH | sed 's/:/ /g'` -type f -perm +111 | xargs ldd 2&gt;/dev/null |
	  awk '/&#92;&lt;libglib-2&#92;&gt;/{ lg+=1 } /&#92;&lt;libgobject&#92;&gt;/{ lo+=1 } /&#92;&lt;libgdk_pixbuf&#92;&gt;/{ lp+=1 }
               END { print "glib=" lg " gobject=" lo " gdk=" lp ;
                     print "glib-only:    " 100*(lg-lo)/lg "%";
                     print "gobject-only: " 100*(lo-lp)/lg "%";
                     print "gdk-lot:      " 100*lp/lg "%"; }'</pre>
<p></code> Here are results from a couple machines I had quick access to: <code>
<pre>	Site                       Gdk  GObject     GLib  #Apps
	gimp.org:                50.0%    12.5%    37.5%     16
	gtk.org:                 47.1%    17.6%    35.3%     17
	developer.gnome.org:     19.5%    53.7%    26.8%     41
	my server (sarge):       66.7%    14.1%    19.3%    192
	my laptop (etch):        72.7%    14.8%    12.4%    209
	my desktop (feisty):     72.2%    17.1%    10.7%    252
	64bit KDE desktop (sid): 53.0%    16.7%    30.2%    338</pre>
<p></code> That is, the servers have a quite limited set of GUI applications installed, but across a full fledged desktop the vast majority of applications is linked against libgdk anyway. I found Stefan Westerfelds Amd64 <a href="http://kde.org">KDE desktop</a> particularly interesting: It actually has the most applications linking against GLib, prolly because it has <a href="http://de.wikipedia.org/wiki/Mono-Projekt">Mono</a> and <a href="http://doc.trolltech.com/4.3/qtcore.html">libQtCore.so</a> installed which both link against GLib these days. Does anyone actually have a system with libglib installed but <strong>not</strong> libgdk? </p>
<p> Next, let&#8217;s take a look at the actual &#8220;savings&#8221;: <code>
<pre>	ls -l libglib-2.0.so.0.1200.4 libgmodule-2.0.so.0.1200.4 &#92;
              libgobject-2.0.so.0.1200.4 libgthread-2.0.so.0.1200.4
	-rw-r--r-- 1 root root 596608 2006-11-16 10:26 libglib-2.0.so.0.1200.4
	-rw-r--r-- 1 root root   9784 2006-11-16 10:26 libgmodule-2.0.so.0.1200.4
	-rw-r--r-- 1 root root 237156 2006-11-16 10:26 libgobject-2.0.so.0.1200.4
	-rw-r--r-- 1 root root  14028 2006-11-16 10:26 libgthread-2.0.so.0.1200.4
	=====================================
	                       857576 = 837KB

	ls -l libatk-1.0.so.0.1214.0 libcairo.so.2.9.2 libpango-1.0.so.0.1400.8 &#92;
	      libgtk-x11-2.0.so.0.800.20 libgdk_pixbuf-2.0.so.0.800.20 &#92;
              libgdk-x11-2.0.so.0.800.20
	-rw-r--r-- 1 root root  102504 2007-03-14 13:44 libatk-1.0.so.0.1214.0
	-rw-r--r-- 1 root root  395836 2006-10-20 07:44 libcairo.so.2.9.2
	-rw-r--r-- 1 root root  235464 2007-01-14 22:27 libpango-1.0.so.0.1400.8
	-rw-r--r-- 1 root root   88604 2007-03-04 22:21 libgdk_pixbuf-2.0.so.0.800.20
	-rw-r--r-- 1 root root  528580 2007-03-04 22:21 libgdk-x11-2.0.so.0.800.20
	-rw-r--r-- 1 root root 3043524 2007-03-04 22:21 libgtk-x11-2.0.so.0.800.20
	=======================================
	                       4394512 = 4292KB</pre>
<p></code> GtkGdkPangoAtkCairoGlib / GLib ratio: (4394512 + 857576) / 857576 = 6.12. <br /> So the &#8220;savings&#8221; turn out to be splitting off 5/6th of the GUI stack size. At best, a GLib-only program is saving 4.2MB that way. But then again, those are likely to be in memory already anyway. And most definitely, they reside in a library, available as const .text on the harddisk. To put that into perspective: We&#8217;re talking about only a handful megabytes here. In physical size actually less than a hires desktop background image, smaller than some icon themes, or roughly 10% of a full linux-2.6.8 kernel + modules binary footprint (41MB). Also <a href="http://people.redhat.com/drepper/dsohowto.pdf">symbol resolution performance</a> doesn&#8217;t necessarily improve through splits, <a href="http://udrepper.livejournal.com/">Ulrich Drepper</a> has a few words on <a href="http://people.redhat.com/drepper/no_static_linking.html">multiple DSOs during deployment</a>. </p>
<p> Given that selecting Gtk+ subcomponents to allow selective shrinkage for size constrained embedded devices via configure.in options is on our TODO list anyway; for this set of libraries: <strong>Size is not worth a split</strong>! </p>
<p> Of course, other aspects not reflected in library size weigh in much more strongly. Such as the ability to build different user communities around projects (e.g. for Cairo vs. Glib) or the reduced dependency chain (<a href="http://de.wikipedia.org/wiki/SSHFS">sshfs</a> and Qt wouldn&#8217;t depend on GLib if it drew in Pango or Gtk+). <br /> So while for the vast majority of applications the GLib split off doesn&#8217;t make a huge difference technically, software evolution arguments make all the difference, definitely justifying a separation. The GLib internal splits are definitely not worth the hassle and conceptual boundaries though, if we ever break binary compatibility again, merging the GLib internal libraries and respective <a href="http://pkg-config.freedesktop.org">pkg-config</a> packages would be a good idea. </p>
<p> Back to my original problem&#8230; I&#8217;m now pretty convinced that merging Rapicorn with the Birnet utility library will most likely not pose a problem anytime soon. And <a href="http://doc.trolltech.com/4.1/qt4-intro.html#build-system">Qt 4 kindly demonstrates</a> that splits can also be carried out successfully later on during the game. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/08/17/17082007-what-are-elf-libraries-good-for-anyway/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>17.07.2007 OpenGL for Gdk/Gtk+</title>
		<link>http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/</link>
		<comments>http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 19:22:33 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/</guid>
		<description><![CDATA[ The idea of using OpenGL as a future core rendering architecture for Gtk+ has been brought up a couple times at GUADEC (and then some variations thereof). However there are good reasons to avoid that and major issues with the suggested approaches, in particular these need to be considered: 
 1) A dependency on [...]]]></description>
			<content:encoded><![CDATA[<p> The idea of using OpenGL as a future core rendering architecture for Gtk+ has been brought up a couple times at GUADEC (and then some variations thereof). However there are good reasons to avoid that and major issues with the suggested approaches, in particular these need to be considered: </p>
<p> 1) A dependency on OpenGL for a library as portable and as widely used as Gtk+ these days, could only ever be a weak one. That is, OpenGL features may or may not be used, depending on whether the current platform a Gtk+ application runs on actually has OpenGL available or not (e.g. by animating widgets conditionally to only be carried out when acceleration support is present). </p>
<p> 2) The OpenGL 2D drawing API is effectively unusable for Gdk/Gtk+ drawing primitives. The main problem here is that OpenGL doesn&#8217;t provide pixel-perfect 2D drawing operations which are necessary for accurate input event processing and a coherent visual presentation (it also doesn&#8217;t always provide anti-aliasing in the 2D drawing API either). Here is a very good web page with nice screenshots summarizing the problems with OpenGL pixel-perfectness: <a href="http://homepage.mac.com/arekkusu/bugs/invariance/index.html">OpenGL: &#8220;not pixel exact&#8221;</a>, <a href="http://homepage.mac.com/arekkusu/bugs/invariance/HWAA.html">Hardware AntiAliasing</a>. </p>
<p> 3) By using <a href="http://en.wikipedia.org/wiki/XRender">XRENDER</a> and hardware-accelerated X drivers, Cairo is already being performance optimized to utilize hardware acceleration. Trying to use a portable OpenGL subset instead (pixel shaders / triangle rendering) would be fairly pointless, it&#8217;d effectively be using the available portable hardware acceleration facilities through another indirection. So with more and more Gtk+-based platforms/applications moving to Cairo-based drawing, there is no additional infrastructure or support code needed to make use of available hardware acceleration facilities. Essentially, the portably usable hardware acceleration subset is brought to you <a href="http://cworth.org/exa/i965/emulating_speedups/">automatically through Cairo and X</a>. </p>
<p> For the lazy, here&#8217;s a quick overview of the artifacts presented on the <a href="http://homepage.mac.com/arekkusu/bugs/invariance/HWAA.html">OpenGL comparison page</a>:
<div align="center"><img src="http://testbit.eu/~timj/blogstuff/gl_thumbs.png"></div>
<p>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/07/17/17072007-opengl-for-gdkgtk/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>28.06.2007 Searchable API Docs</title>
		<link>http://blogs.gnome.org/timj/2007/06/29/28062007-searchable-api-docs/</link>
		<comments>http://blogs.gnome.org/timj/2007/06/29/28062007-searchable-api-docs/#comments</comments>
		<pubDate>Fri, 29 Jun 2007 14:33:38 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/06/29/28062007-searchable-api-docs/</guid>
		<description><![CDATA[ Newly built GLib &#38; Gtk+ API docs are online now. In the process, i fixed a long standing documentation feature request: searchable API docs. This turned out to be the most requested documentation feature at the GNOME booth LinuxTag 2007. 
 The documentation updates cover Gtk+-2.11.4, so they contain new features like: GtkBuildable, GtkBuilder, [...]]]></description>
			<content:encoded><![CDATA[<p> Newly built <a href="http://developer.gnome.org/doc/API/">GLib &amp; Gtk+ API docs</a> are online now. In the process, i fixed a long standing documentation feature request: <a href="http://www.google.com/custom?domains=developer.gnome.org&amp;sitesearch=developer.gnome.org&amp;q=API">searchable API docs</a>. This turned out to be the most requested documentation feature at the <a href="http://blogs.gnome.org/timj/2007/06/04/04062007-linuxtag/">GNOME booth LinuxTag 2007</a>. </p>
<p> The documentation updates cover <a href="http://mail.gnome.org/archives/gtk-devel-list/2007-June/msg00253.html">Gtk+-2.11.4</a>, so they contain new features like: <a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-gtkbuildable.html">GtkBuildable</a>, <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkBuilder.html">GtkBuilder</a>, <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkScaleButton.html">GtkScaleButton</a>, <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkVolumeButton.html">GtkVolumeButton</a> and <a href="http://developer.gnome.org/doc/API/2.0/gtk/GtkTooltip.html">GtkTooltip</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/06/29/28062007-searchable-api-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>25.04.2007 Call For Help</title>
		<link>http://blogs.gnome.org/timj/2007/04/25/25042007-call-for-help/</link>
		<comments>http://blogs.gnome.org/timj/2007/04/25/25042007-call-for-help/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 00:09:36 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/04/25/25042007-call-for-help/</guid>
		<description><![CDATA[ Gtk+ Patch Testing &#38; Committing:  Recently i was caught on IRC and asked to look into a few outstanding Gtk+ bug reports. Some of them easy, some of them not so easy, e.g. one required a lengthy in-depth evaluation of interacting code while some of the others already had patches applied. That particular [...]]]></description>
			<content:encoded><![CDATA[<p> <strong>Gtk+ Patch Testing &amp; Committing:</strong> <br /> Recently i was caught on IRC and asked to look into a few outstanding Gtk+ bug reports. Some of them easy, some of them not so easy, e.g. one required a lengthy in-depth evaluation of interacting code while some of the others already had patches applied. That particular moment, I barely had any spare time to look into Gtk+ bugs and was actually on my way to the shower and then head downtown. We still managed to squeeze in and close the bunch of 3 or 4 bug reports in less than an hour however, because people actually helped me in <strong>applying, compiling, testing and committing</strong> the changes. While core maintainer approval was a necessity for some resolutions, there was much more work to be put into each report beyond giving the OK to the final patch versions. In particular the patch applying, adaptions to recent trunk, compiling it, running the test suite or test cases and committing is something that many developers who are not overly familiar with the code base can still do. This is a great way to learn and get into a project, and to help out an understaffed core team. It is a great way to contribute to your pet project and will help to make your visions and ideas about it come true. </p>
<p> <strong> You can do this for Gtk+: <a href="http://live.gnome.org/GtkTasks#P2">Patch testing &amp; committing</a></strong> </p>
<p> Gtk+ has a <a href="http://live.gnome.org/GtkTasks">volunteer task list</a> up on the wiki. One of the open positions is the one i just described, and it&#8217;d much help the project if people signed up for it. Note that having SVN access can help but is not a requirement for all tasks, <a href="http://live.gnome.org/GtkTasks#Access">access rights can be granted</a> for active contributors. </p>
<p> Next time you wonder why your Gtk+ bug report seems stalled, don&#8217;t ask why it&#8217;s being processed so slowly, <em>ask yourself why you&#8217;re not <a href="http://live.gnome.org/GtkTasks">helping the project</a> already</em>, so all submissions can be processed faster, including yours. ;-) </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/04/25/25042007-call-for-help/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>13.04.2007 Gtk+ Volunteers</title>
		<link>http://blogs.gnome.org/timj/2007/04/13/13042007-gtk-volunteers/</link>
		<comments>http://blogs.gnome.org/timj/2007/04/13/13042007-gtk-volunteers/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 16:58:21 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2007/04/13/13042007-gtk-volunteers/</guid>
		<description><![CDATA[ The Gtk+ project finally gets a structured way to absorb voluntary efforts. Here is my proposal for a Volunteer Task List on gtk-devel-list. The task list is currently being constructed in the Gnome Wiki: GTK+ Volunteer Tasks. 
 In other news, there&#8217;s been some discussion on width-for-height and height-for-width management around Gtk+ recently. So [...]]]></description>
			<content:encoded><![CDATA[<p> The Gtk+ project finally gets a structured way to absorb voluntary efforts. Here is my <a href="http://mail.gnome.org/archives/gtk-devel-list/2007-April/msg00058.html">proposal for a Volunteer Task List</a> on gtk-devel-list. The task list is currently being constructed in the Gnome Wiki: <a href="http://live.gnome.org/GtkTasks">GTK+ Volunteer Tasks</a>. </p>
<p> In other news, there&#8217;s been some discussion on width-for-height and height-for-width management around Gtk+ recently. So I summarized the approach taken by Rapicorn, which in a nutshell allows arbitrary constrains with multiple resizing iterations and employs dedicated strategies to stabilize the resizing process: <a href="http://rapicorn.org/cmpgtk.html#resizing-hysteresis">Hysteresis problems in Gtk+</a> &#8211; <a href="http://rapicorn.org/techbits.html#size-negotiation">Rapicorn size negotiation</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2007/04/13/13042007-gtk-volunteers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>20.12.2006 Gtk+ Core Maintainer Shortage</title>
		<link>http://blogs.gnome.org/timj/2006/12/20/20122006-gtk-core-maintainer-shortage/</link>
		<comments>http://blogs.gnome.org/timj/2006/12/20/20122006-gtk-core-maintainer-shortage/#comments</comments>
		<pubDate>Wed, 20 Dec 2006 21:49:01 +0000</pubDate>
		<dc:creator>Tim Janik</dc:creator>
				<category><![CDATA[Gtk+]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/timj/2006/12/20/20122006-gtk-core-maintainer-shortage/</guid>
		<description><![CDATA[ Recently there have been complaints about a lack of quality assurance in the Gtk+ project and introduction of regressions with releases. Also the pace at which bugs and feature requests are being addressed may not be to everyones liking.  The reasons for these issues are manifold, some are persisting for a long time [...]]]></description>
			<content:encoded><![CDATA[<p> Recently there have been complaints about a lack of quality assurance in the Gtk+ project and introduction of regressions with releases. Also the pace at which bugs and feature requests are being addressed may not be to everyones liking. <br /> The reasons for these issues are manifold, some are persisting for a long time and aggravated, others emerged only recently. Some stem from the code structure, others from the variety of interests different parties have in Gtk+, and the list goes on&#8230; I think in a nutshell, it can all be boiled down to a single concise fact: </p>
<p> <strong>Gtk+ has an alarming shortage on core maintainer resources.</strong> </p>
<p> That being said, let me make one thing crystal clear here: this can <em>not</em> be blamed on the core maintainers themselves, they are doing their best to cope with the situation as it is. By a large ratio, there simply isn&#8217;t enough man power available to handle all the incoming requests, to review all contributed patches, debug all the bugs filed and to do important nurturing and maintenance work needed by an ever growing code base (like refactoring). <br /> This situation has been persisting for a longer time now, and has led to significant aging in the code base and affected the overall quality of the project. As time passes, it&#8217;ll just become worse if we&#8217;re not going to put more resources at the project as a community. I figured that in order for this to happen, a sense for the problematic nature of the current maintenance situation has to first be developed in the community, which is why i posted to gtk-devel and related lists yesterday: </p>
<p> <a href="http://mail.gnome.org/archives/gtk-devel-list/2006-December/msg00074.html">State of the Gtk+ Maintenance</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/timj/2006/12/20/20122006-gtk-core-maintainer-shortage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
