<?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>Context Switch</title>
	<atom:link href="http://blogs.gnome.org/ebassi/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/ebassi</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Thu, 29 Sep 2011 19:13:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Days of Elaine</title>
		<link>http://blogs.gnome.org/ebassi/2011/09/29/days-of-elaine/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/09/29/days-of-elaine/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 17:22:12 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[backends]]></category>
		<category><![CDATA[clutter]]></category>
		<category><![CDATA[gdk]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=420</guid>
		<description><![CDATA[oh man, it&#8217;s getting harder to find blog post titles&#8230; clutter 1.8 — last Friday I rolled the first release of the new stable 1.8 cycle, and Rob rolled the first stable release of the now standalone Cogl. it&#8217;s been six months of intense development, with lots of contributions, and I&#8217;d like to thank everyone [...]]]></description>
			<content:encoded><![CDATA[<p><em>oh man, it&#8217;s getting harder to find blog post titles&#8230;</em></p>
<p><strong>clutter 1.8</strong> — last Friday I rolled <a href="http://www.clutter-project.org/blogs/archive/2011-09/clutter-1.8.0-stable-release">the first release</a> of the new stable 1.8 cycle, and Rob rolled the <a href="http://lists.clutter-project.org/pipermail/clutter-announce/2011-September/000056.html">first stable release</a> of the now standalone Cogl. it&#8217;s been six months of intense development, with lots of contributions, and I&#8217;d like to thank everyone who submitted patches, opened bugs, added a translation, or even dropped by in the <code>#clutter</code> IRC channel to tell us that they were using Clutter for their awesome project.</p>
<p><strong>clutter 1.9</strong> — instead of resting after pushing 1.8 out of the door, we&#8217;re already hard at work on what will become 1.10 in six months. while Cogl is getting more and more refactoring to make the code base more understandable and reliable, as well as preparing the way for new features, Clutter is also getting some refactoring. today, for instance, I worked on building Clutter with multiple backends in the same shared object. one of my first major contributions to Clutter, back in the OpenedHand days, was to provide the ability to have multiple backends — and it worked pretty well: after the GLX backend we got a Windows backend, then a framebuffer backend, then an OS X backend. during the years, the implementation was amended here and there to avoid leaking the backend implementation all over the place, and we always resisted the temptation (and the outside pressure) to provide a full abstraction library for the windowing system akin to GDK. this allowed us to maintain the backend code lean and lightweight, to the point that it took me literally an hour this morning to go from the current <code>HEAD</code> of master to a test running with either GDK or GLX (depending on an environment variable) — and most of my changes were in the build system, not in the code.</p>
<p>as an example, <a href="http://pastebin.com/vYwQG5C3">this is a simple test program</a> that checks the backend support at both compile and run time; using Clutter from <a href="http://git.gnome.org/browse/clutter/log/?h=multi-backend">the multi-backend branch</a>, compiled with <code>--enable-x11</code> and <code>--enable-gdk</code>, you can run the example on X11 using:</p>
<pre>$ CLUTTER_BACKEND=x11 ./test-backend &amp;
$ CLUTTER_BACKEND=gdk ./test-backend &amp;</pre>
<div id="attachment_424" class="wp-caption aligncenter" style="width: 461px"><a href="http://blogs.gnome.org/ebassi/files/2011/09/test-backend.png"><img class="size-full wp-image-424 " src="http://blogs.gnome.org/ebassi/files/2011/09/test-backend.png" alt="" width="451" height="358" /></a><p class="wp-caption-text">multiple backends, same great taste</p></div>
<p>and have two instances, one using the native X11 backend and the other using the GDK backend.</p>
<p>there&#8217;s still some work to do, namely <a href="http://git.gnome.org/browse/clutter-gtk/log/?h=multi-backend">fixing Clutter-GTK to work with a multi-backend Clutter</a>, and making it use the GDK backend by default, if found. there&#8217;s also the issue of being able to use the <code>GLX_EXT_texture_from_pixmap</code> extension under the GDK backend on X11, if available, so that we can efficiently embed GTK widgets rendered off-screen like we can already do when using the Clutter X11 backend.</p>
<p>all in all, this work will help towards the goal of using Clutter and GTK together in a more organic fashion, and with fewer blocks and hacks in the middle.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/09/29/days-of-elaine/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Down by the Water</title>
		<link>http://blogs.gnome.org/ebassi/2011/09/22/down-by-the-water/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/09/22/down-by-the-water/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 20:57:21 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=414</guid>
		<description><![CDATA[it&#8217;s been far too long since the last London GNOME Beer meetup, and we also have the excuse occasion of celebrating the imminent 3.2 release of GNOME. so if you are a GNOME user or developer, or if you just want to meet GNOME hackers here in Good Old London Town, go on the wiki page and [...]]]></description>
			<content:encoded><![CDATA[<p>it&#8217;s been far too long since the last London GNOME Beer meetup, and we also have the <del>excuse</del> occasion of celebrating the imminent 3.2 release of GNOME. so if you are a GNOME user or developer, or if you just want to meet GNOME hackers here in Good Old London Town, go on <a href="http://live.gnome.org/LondonBeer/Version3.2">the wiki page</a> and sign up for tomorrow evening London GNOME Beer, version 3.2.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/09/22/down-by-the-water/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Perfect Crime #2</title>
		<link>http://blogs.gnome.org/ebassi/2011/09/08/the-perfect-crime-2/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/09/08/the-perfect-crime-2/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 16:33:28 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[community management one plush toy at a time]]></category>
		<category><![CDATA[sisterhood of the travelling gnome]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=409</guid>
		<description><![CDATA[so, I found this little fella sitting on my desk: who was apparently reported as missing in action. let&#8217;s see if we can find a new home for it&#8230;]]></description>
			<content:encoded><![CDATA[<p>so, I found this little fella sitting on my desk:</p>
<div id="attachment_410" class="wp-caption aligncenter" style="width: 394px"><a href="http://blogs.gnome.org/ebassi/files/2011/09/travelling-gnome.jpg"><img src="http://blogs.gnome.org/ebassi/files/2011/09/travelling-gnome.jpg" alt="" width="384" height="576" class="size-full wp-image-410" /></a><p class="wp-caption-text">Have You Seen This Gnome?</p></div>
<p>who was apparently <a href="http://www.dgsiegel.net/news/2011_08_09-missing_in_action">reported as missing in action</a>.</p>
<p>let&#8217;s see if we can find a new home for it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/09/08/the-perfect-crime-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I was meant for the stage</title>
		<link>http://blogs.gnome.org/ebassi/2011/08/03/i-was-meant-for-the-stage/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/08/03/i-was-meant-for-the-stage/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 15:47:57 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=406</guid>
		<description><![CDATA[like a lot of Gnome developers, I&#8217;ll also be at the Desktop Summit 2011 in Berlin: I have a talk on Saturday at 11:20, and I&#8217;ll have the Board meetings contending for my presentation, hacking and meeting time during most of the conference &#8212; but every minute I can spare I&#8217;ll be available for chatting [...]]]></description>
			<content:encoded><![CDATA[<p>like a lot of Gnome developers, I&#8217;ll also be at the Desktop Summit 2011 in Berlin:</p>
<p><a href="http://www.desktopsummit.org"><img alt="I&#039;m going to the Desktop Summit!" src="https://www.desktopsummit.org/sites/www.desktopsummit.org/files/DS2011banner.png" class="aligncenter" width="333" height="110" /></a></p>
<p>I have <a href="https://desktopsummit.org/program/sessions/heart-blingness-clutter-and-gnome">a talk</a> on Saturday at 11:20, and I&#8217;ll have the Board meetings contending for my presentation, hacking and meeting time during most of the conference &mdash; but every minute I can spare I&#8217;ll be available for chatting about Gnome, Gnome OS, GTK+, and Clutter.</p>
<p>by the way, make sure to attend <a href="https://desktopsummit.org/program/sessions/clutter-everywhere">the talk</a> that Damien, Neil and Chris will present right after mine &mdash; it&#8217;s going to be awesome.</p>
<p>see you in Berlin!</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/08/03/i-was-meant-for-the-stage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>This is Why We Fight</title>
		<link>http://blogs.gnome.org/ebassi/2011/05/18/this-is-why-we-fight/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/05/18/this-is-why-we-fight/#comments</comments>
		<pubDate>Wed, 18 May 2011 00:33:04 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gobject]]></category>
		<category><![CDATA[oop]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=397</guid>
		<description><![CDATA[one thing that bugged me since the implementation of the Clutter animation framework in its current form was the property access API in GObject — especially the boxing/unboxing of GValues. since GLib 2.28 2.24 we had a new macro (G_VALUE_COLLECT_INIT) that avoided doing unnecessary work, but the end result of setting a property was still: [...]]]></description>
			<content:encoded><![CDATA[<p>one thing that bugged me since the implementation of the Clutter animation framework in its current form was the property access API in GObject — especially the boxing/unboxing of GValues. since GLib <del datetime="2011-05-18T11:26:41+00:00">2.28</del> <ins datetime="2011-05-18T11:26:41+00:00">2.24</ins> we had a new macro (<code>G_VALUE_COLLECT_INIT</code>) that avoided doing unnecessary work, but the end result of setting a property  was still:</p>
<ul>
<li>box it inside a GValue</li>
<li>call the <code>set_property</code> implementation of your class</li>
<li>unbox the GValue</li>
<li>call the public setter function</li>
<li>set the value inside the private data structure</li>
<li>free the GValue</li>
</ul>
<p>there are at least two unnecessary steps, there: the boxing inside GValue should only be necessary for transformation purposes — i.e. taking a GValue and running the transformation function from the passed value type to the property type — but that path should not be taken for variadic arguments functions like <code>g_object_set()</code> since the type used to read the value from the <code>va_list</code> is the property type itself and no transformation is necessary or possble; and calling the <code>set_property()</code> implementation, which is just a huge <code>switch</code> on the property id used when installing the property on a class, just to then call the public accessors. now, try modifying five or so properties at the same time on a hundred objects at 60 frames per second. you can probably get away with it — but only <strong>just</strong>.</p>
<p>last year, Rob Staudinger proposed <a href="http://gitorious.org/egg-gobject">some code</a> that provided property access through both accessor functions and direct structure member access through field offset. sadly, I felt that his API was still repeating the same issues of the GParamSpec API: constructors with different signatures (try remembering the arguments and their order between integer properties, enumeration properties, string and boxed properties); reliance on a big switch inside the class implementation; and a general lack of integration with GObject itself.</p>
<p>the last point is mostly what interested me; GParamSpec is meant to be used as a validation tool for a value; it describes the constraints, the default, the prerequisite type, etc.. it&#8217;s used to describe properties, but that&#8217;s almost a side-effect — a GParamSpec can exist in a vacuum, and can be used regardless of GObject itself. if we wanted to access an object property, the object class should be far more involved in this. we should be able to tie the property description to the structure field that backs it in the implementation; we should be able to define the functions that access it; and we should be able to even provide a default implementation of these accessor functions without requiring developers to actually write them.</p>
<p>another issue with the current state of affairs with GObject properties is the amount of code you have to write. let&#8217;s look at a simple class mapping a bunch of fields to properties. right now, you&#8217;d have to write every single accessor pair, with hand-written validation; you&#8217;d have to hard-code the defaults in three places (the GParamSpec, the instance init function and the accessors); and you&#8217;d have to write the <code>set_property()</code> and the <code>get_property()</code> implementation, which end up calling the public accessors anyway because you want to do validation and notification of changes in one place only.</p>
<p>almost all of this code could be autogenerated, even through the C pre-processor.</p>
<p>so, to make a long story short, during the past couple of weeks I started fleshing out the implementation of a new property API for GObject — <a href="https://bugzilla.gnome.org/show_bug.cgi?id=648526">GProperty</a>.</p>
<p>GProperty is still based on GParamSpec, but it hides all the nasty so you only get a bunch of constructors with the same signature (no more trips to devhelp to check out the &lt;code&gt;g_param_spec_enum()&lt;/code&gt; order of arguments) and a generic API for setting constraints like ranges, default values and prerequisite types. plus, you get to specify the field and/or the accessor functions:</p>
<pre>  test_object_property[PROP_FOO] =
    g_int8_property_new (<span style="color: red">"foo"</span>, G_PROPERTY_READWRITE,
                         G_STRUCT_OFFSET (TestObjectPrivate, foo),
                         <span style="color: purple">NULL</span>, <span style="color: blue">/* setter */</span>
                         <span style="color: purple">NULL</span>  <span style="color: blue">/* getter */</span>);

  test_object_property[PROP_BAR] =
    g_float_property_new (<span style="color: red">"bar"</span>, G_PROPERTY_READWRITE,
                          -1,
                          test_object_set_bar,
                          test_object_get_bar);

  g_object_class_install_properties (object_class,
                                     G_N_ELEMENTS (test_object_property),
                                     test_object_property);</pre>
<p>there are a bunch of other features (<a href="http://git.gnome.org/browse/glib/tree/gobject/gproperty.h?h=g-property#n57">automatic atomic properties</a>, <a href="http://git.gnome.org/browse/glib/tree/gobject/gproperty.h?h=g-property#n592">macros for auto-generating accessors</a>, <a href="http://git.gnome.org/browse/glib/tree/gobject/gproperty.c?h=g-property#n217">per-class default value overriding</a>) for which I&#8217;ll just point you again to <a href="https://bugzilla.gnome.org/show_bug.cgi?id=648526">the bug</a> and <a href="http://git.gnome.org/browse/glib/log/?h=g-property">the GLib branch</a>; today, though, I wanted to verify whether one of the reasons for working on this — making generic property access faster — actually benefited from these changes. it turns out that it really does: calling <code>g_object_set()</code> in a tight loop with simple values (integers and floating point) improved from the equivalent, GParamSpec-based classic implementation by 2.10x on my Core 2 Duo; if you throw a string into the mix, the improvement is by 1.5x. my initial ballpark figures were way smaller, so I was pleasantly surprised.</p>
<p>hopefully, this work will get more eyeballs during this cycle — and it&#8217;ll land in time for 2.32 (and Gnome 3.2).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/05/18/this-is-why-we-fight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All Arise</title>
		<link>http://blogs.gnome.org/ebassi/2011/04/06/all-arise/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/04/06/all-arise/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 20:48:39 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=393</guid>
		<description><![CDATA[congratulations to everyone who contributed &#8212; feature, widget, application, translation, one-liner, documentation, art, design. you all rock my world. today I&#8217;m immensely proud to be a GNOME developer and user.]]></description>
			<content:encoded><![CDATA[<p><a title="Help promote GNOME 3!" href="https://live.gnome.org/ThreePointZero/Promote"><img border="0" alt="I am GNOME" src="http://www.gnome.org/wp-content/uploads/2011/04/iamgnome.png" /></a></p>
<p>congratulations to everyone who contributed &mdash; feature, widget, application, translation, one-liner, documentation, art, design. you all rock my world.</p>
<p>today I&#8217;m immensely proud to be a GNOME developer and user.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/04/06/all-arise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m sticking with you</title>
		<link>http://blogs.gnome.org/ebassi/2011/03/09/im-sticking-with-you/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/03/09/im-sticking-with-you/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 00:15:27 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=391</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.gnome.org/ebassi/files/2011/03/haters-gonna-hate.gif"><img src="http://blogs.gnome.org/ebassi/files/2011/03/haters-gonna-hate.gif" alt="" title="haters gonna hate" width="480" height="320" class="aligncenter size-full wp-image-390" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/03/09/im-sticking-with-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>January Hymn</title>
		<link>http://blogs.gnome.org/ebassi/2011/01/31/january-hymn/</link>
		<comments>http://blogs.gnome.org/ebassi/2011/01/31/january-hymn/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 15:46:51 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=387</guid>
		<description><![CDATA[as usual, I&#8217;m pretty lame at blogging about what I do. I decided to break the silence ((on the blog; I barely shut up on Twitter)) because a couple of awesome things happened these final days of January. gnome-utils: after years of neglect, and due to a spectacular sugar rush on Saturday, I took again [...]]]></description>
			<content:encoded><![CDATA[<p>as usual, I&#8217;m pretty lame at blogging about what I do. I decided to break the silence ((on the blog; I barely shut up on Twitter)) because a couple of awesome things happened these final days of January.</p>
<p><strong>gnome-utils</strong>: after years of neglect, and due to a spectacular sugar rush on Saturday, I took again a look at gnome-utils &mdash; and in an afternoon I ported the Dictionary to both GSettings and GtkApplication. the APIs are a breeze to use, and the amount of crappy code I wrote years ago before getting a bigger clue about GObject and GTK+ development has been reduced. <em>kudos</em> Ryan, and everyone else who worked on GSettings and G(tk)Application. depending on time constraints, either I or Cosimo (maintainer <em>extraordinaire</em>) will do a release today.</p>
<p><strong>clutter</strong>: a bit earlier than expected, but today I just spun the first release of the stable cycle &mdash; 1.6.0. I&#8217;ll send you to <a href="http://www.clutter-project.org/blogs/archive/2011-01/clutter-1.6.0-stable-release">the announcement on the Clutter blog</a> for details &mdash; but I wanted to copy the &#8220;thanks&#8221; section on this blog, in order to give these people a token of my appreciation for their work in making this the best Clutter release as of yet:</p>
<p>Robert Bragg, Neil Roberts, Damien Lespiau, Elliot Smith, Chris Lord, Owen W. Taylor, Bastian Winkler, Tomeu Vizoso, Kristian Høgsberg, nobled, Lucas Rocha, Ole André Vadla Ravnås, Adel Gadllah, Alexandre Quessy, Andika Triwidada, Johan Bilien, Jussi Kukkonen, Piotr Drąg, Alejandro Piñeiro, Aron Xu, Colin Walters, Evan Nemerson, Giovanni Campagna, Maxim Ermilov, Mike Owens, Nguyễn Thái Ngọc Duy, Ray Strode, Rob Bradford, Roland Peffer, Stephen Kennedy, Viatcheslav Gachkaylo, muflone.</p>
<p>these guys rock my world, and if you use Clutter then they rock your world as well. so if you meet any of them, make sure you offer them a beer or a beverage of choice.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2011/01/31/january-hymn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GObject Hint/1</title>
		<link>http://blogs.gnome.org/ebassi/2010/09/29/gobject-hint1/</link>
		<comments>http://blogs.gnome.org/ebassi/2010/09/29/gobject-hint1/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 14:04:29 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/?p=382</guid>
		<description><![CDATA[if you need to store a Unix Time timestamp inside a GObject property, use an int64 as the property type. don&#8217;t use a GTimeVal, and above all: don&#8217;t even think about adding a GType for GTimeVal inside your own project. first of all, because all that you can do with GTimeVal you can also do [...]]]></description>
			<content:encoded><![CDATA[<p>if you need to store a Unix Time timestamp inside a GObject property, use an <code>int64</code> as the property type.</p>
<p>don&#8217;t use a <code>GTimeVal</code>, and above all: don&#8217;t even think about adding a GType for <code>GTimeVal</code> inside your own project.</p>
<p>first of all, because all that you can do with <code>GTimeVal</code> you can also do it with an <code>int64</code>; second of all, because if everyone starts defining boxed types for types in GLib, we&#8217;ll soon start to get collisions. and, no: adding a boxed type in GLib is <strong>not</strong> a good idea &mdash; see above, re: <code>int64</code>.</p>
<p>if you need second resolution (which is fine for most operations), just use <code>tv.tv_sec</code>; if you need millisecond resolution (which is fine for file operations), just use:</p>
<pre>
  gint64 msecs = tv.tv_sec * 1000 + tv.tv_usec / 1000;
</pre>
<p>and if you need microsecond resolution (which is fine if you&#8217;re bordering insanity), then use:</p>
<pre>
  gint64 usecs = tv.tv_sec * G_USEC_PER_SEC + tv.tv_usec;
</pre>
<p><em>this blog post has been brought to you by your friendly neighbour GObject and language binding developer.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2010/09/29/gobject-hint1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Quality</title>
		<link>http://blogs.gnome.org/ebassi/2010/08/31/code-quality/</link>
		<comments>http://blogs.gnome.org/ebassi/2010/08/31/code-quality/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 15:00:45 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bitching-and-moaning]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/ebassi/2010/08/31/code-quality/</guid>
		<description><![CDATA[Morten, it&#8217;s actually my fault. the patch that was submitted was the incorrect one; I&#8217;ve been fixing the implementation since then, mostly because the API is correct &#8212; and went through different eyeballs to ensure that &#8212; and we wanted to land it before the GLib freeze. the implementation, alas, has issues &#8212; and not [...]]]></description>
			<content:encoded><![CDATA[<p>Morten, it&#8217;s actually <a href="http://blogs.gnome.org/mortenw/2010/08/31/code-quality/">my fault</a>.</p>
<p>the patch that was submitted was the incorrect one; I&#8217;ve been fixing the implementation since then, mostly because the API is correct &mdash; and went through different eyeballs to ensure that &mdash; and we wanted to land it before the GLib freeze. the implementation, alas, has issues &mdash; and not just the ones you saw.</p>
<p>as I said, it&#8217;s definitely my fault: I reviewed the original in a way that was less than acceptable. I sincerely apologize for that.</p>
<p><strong>okay, having said that</strong>, and resuming my usual self: bitching on planet GNOME is not going to get anything fixed. insulting the maintainer when the issue lies mostly in a &#8220;patch lieutenant&#8221; (such as myself) is also not how polite people deal with errors.</p>
<p>finally, saying that the code <em>needs to be taken out back</em> is a lame cop-out and it is an untenable position for anyone contributing. the code went in, there were issues, so it needs to be fixed. if we waited for perfect code the amount of merged we&#8217;d get would be zero. that code has been in the bug for the past 6 months, and it&#8217;s been discussed in the past IRC meetings, with public minutes and logs.</p>
<p>so, please: file bugs. I&#8217;ll try to close them faster than you can open them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/ebassi/2010/08/31/code-quality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/ebassi/feed/ ) in 1.30329 seconds, on Feb 10th, 2012 at 3:34 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 10th, 2012 at 4:34 am UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  blogs.gnome.org/ebassi/feed/ ) in 0.00027 seconds, on Feb 10th, 2012 at 3:56 am UTC. -->
