<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.0.11" -->
<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/"
	>

<channel>
	<title>context switch</title>
	<link>http://log.emmanuelebassi.net</link>
	<description>Random babblings of a geek.</description>
	<pubDate>Fri, 10 Oct 2008 22:04:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.11</generator>
	<language>en</language>
			<item>
		<title>In the Mood</title>
		<link>http://log.emmanuelebassi.net/archives/2008/10/in-the-mood/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/10/in-the-mood/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:04:26 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>clutter</category>

		<category>conference</category>

		<category>hackfest</category>

		<category>boston</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/10/in-the-mood/</guid>
		<description><![CDATA[well, I failed at blagging each day of the User Experience hackfest, but mostly because of the sheer amount of discussions, designs and work done.
during the first common session on monday we all decided to split off into four groups:

file management
window and application management
widgets/gadgets/applets
effects and animations

I decided to work on effects and animations, along with [...]]]></description>
			<content:encoded><![CDATA[<p>well, I failed at blagging each day of the User Experience hackfest, but mostly because of the sheer amount of discussions, designs and work done.</p>
<p>during the first common session on monday we all decided to split off into four groups:</p>
<ul>
<li>file management</li>
<li>window and application management</li>
<li>widgets/gadgets/applets</li>
<li>effects and animations</li>
</ul>
<p>I decided to work on effects and animations, along with Eve, Neil, Matthew and Andreas<sup><a href="#footnote-1-287" id="footnote-link-1-287" class="footnote-link footnote-identifier-link" title="who&#8217;s totally getting married &mdash; just as vuntz is expecting a baby">1</a></sup>. the <a href="http://live.gnome.org/Boston2008/GUIHackfest/EffectsAndAnimations">wiki page</a> of our group lists most of the stuff that came up in the group discussions and brain storming<sup><a href="#footnote-2-287" id="footnote-link-2-287" class="footnote-link footnote-identifier-link" title="or idea showering">2</a></sup>. when not in the effects and animations group I was hanging around with the window and application management guys. since Tomas, Robert and Matthew have been working on a <a href="http://git.o-hand.com/?r=metacity-clutter">Clutter-based compositor for Metacity</a>, I decided to give it a spin and work on some of the &#8220;animation tenets&#8221; that came up during the hackfest &mdash; like showing the direction of the workspace switching and provide a visual cue to the user that the windows are not going away forever, and are just being moved in another area of the screen. I know that Compiz is probably going to have these kind of effects some ten levels deep in the configuration manager, but the configuration UI always makes me want to carve my eyes out with a melon spoon while being bludgeoned to death, and the defaults are usually so bad that I develop seasickness after 15 minutes of continuous use &mdash; hence, the usage of the Clutter-powered Metacity.</p>
<p>the other groups did an awesome job as well: a lot of the ideas floating around will require hard work and time in order to be implemented, but they all contain a refreshing view of the desktop and challenge some of the fundamental tenets of the user interaction, based on the feedback from users and designers &mdash; and especially without resorting to something completely new or alien that will require years to get right for developers and to adjust the workflow for users, or just announcing new frameworks with the usual jingoistic tones common to open and closed software projects alike.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-287" class="footnote">who&#8217;s <strong>totally</strong> getting married &mdash; just as vuntz is expecting a baby [<a href="#footnote-link-1-287" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-287" class="footnote">or <em>idea showering</em> [<a href="#footnote-link-2-287" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/10/in-the-mood/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flying Teapot</title>
		<link>http://log.emmanuelebassi.net/archives/2008/10/flying-teapot-2/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/10/flying-teapot-2/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 06:20:58 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>travel</category>

		<category>conference</category>

		<category>hackfest</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/10/flying-teapot-2/</guid>
		<description><![CDATA[final checks and the usual ohmygodwhycan&#8217;tIfindanything mode before I take the flight to Boston for the User Experience hackfest organized by Owen, Federico and Vincent. Neil and I will be talking about Clutter, what it does, and what it can do to enhance the user experience on a modern desktop.
then, it&#8217;s Boston Summit time! it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>final checks and the usual <em>ohmygodwhycan&#8217;tIfindanything</em> mode before I take the flight to Boston for the <a href="http://live.gnome.org/Boston2008/GUIHackfest">User Experience hackfest</a> organized by Owen, Federico and Vincent. <a href="http://www.busydoingnothing.co.uk/">Neil</a> and I will be talking about Clutter, what it does, and what it can do to enhance the user experience on a modern desktop.</p>
<p>then, it&#8217;s <a href="http://live.gnome.org/Boston2008">Boston Summit</a> time! it&#8217;s going to be my first summit, but given the past editions and <a href="http://live.gnome.org/Boston2008/Participants">the people attending</a> I just know it&#8217;s going to be awesome.</p>
<p>see you in Boston!
</p>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/10/flying-teapot-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sincerest Forms of Flattery</title>
		<link>http://log.emmanuelebassi.net/archives/2008/04/sincerest-forms-of-flattery/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/04/sincerest-forms-of-flattery/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 12:57:36 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>fun</category>

		<category>announce</category>

		<category>clutter</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/04/sincerest-forms-of-flattery/</guid>
		<description><![CDATA[tidy: they say that imitation is the sincerest form of flattery:



the actual amount of code is quite small, and it&#8217;s already available in Tidy.
challenges: Luca dared me into making a Clutter-based coverflow-like plugin for Rhythmbox, but it was Iain that picked the challenge up and wrote some basic code for it. I, on the other [...]]]></description>
			<content:encoded><![CDATA[<p><strong>tidy</strong>: they say that <em>imitation is the sincerest form of flattery</em>:</p>
<div style="text-align:center">
<a href="http://folks.o-hand.com/ebassi/tidy-boo-yah.ogg"><img id="image253" src="http://log.emmanuelebassi.net/wp-content/2008/03/tidy-boo-yah-thumb.png" alt="TidyFingerToggle" /></a>
</div>
<p>the actual amount of code is quite small, and it&#8217;s already available in <a href="http://svn.o-hand.com/view/tidy/trunk/tidy/tidy-finger-toggle.h">Tidy</a>.</p>
<p><strong>challenges</strong>: <a href="http://elleuca.blogspot.com/">Luca</a> <a href="http://mail.gnome.org/archives/desktop-devel-list/2008-April/msg00203.html">dared</a> me into making a Clutter-based coverflow-like plugin for Rhythmbox, but it was Iain that picked the challenge up and <a href="http://mail.gnome.org/archives/desktop-devel-list/2008-April/msg00209.html">wrote</a> some basic code for it. I, on the other hand, don&#8217;t like coverflow for browsing my music collection, so I finally decided to write something for the Eye of GNOME &mdash; a <a href="http://en.wikipedia.org/wiki/Ken_Burns_Effect">Ken Burns effect</a> slide show. it&#8217;s not at all finished, and if nobody <a href="http://mail.gnome.org/archives/desktop-devel-list/2008-April/msg00211.html">picks</a> it up, I&#8217;ll try and do my best to have it ready for GNOME 2.24, if <acronym title="Eye of GNOME">EOG</acronym> maintainers want it, of course. it&#8217;s not the best display of Clutter features &mdash; except the animation framework &mdash; but if you have hardware acceleration it will make slideshows look a lot nicer.</p>
<p><strong>json-glib</strong>: this weekend I <a href="http://mail.gnome.org/archives/gnome-announce-list/2008-April/msg00061.html">released</a> the first developers snapshot of JSON-GLib 0.6; the API is stable, the test suite is rocking and this release finally fixes the last bit needed for full RFC 4627 compliance (Unicode escaping). I&#8217;m probably going to release 0.6.0 in a couple of weeks.
</p>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/04/sincerest-forms-of-flattery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Good Intentions/2</title>
		<link>http://log.emmanuelebassi.net/archives/2008/04/good-intentions2/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/04/good-intentions2/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 21:30:50 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>C</category>

		<category>developer</category>

		<category>gtk</category>

		<category>clutter</category>

		<category>crack</category>

		<category>json-glib</category>

		<category>glib</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/04/good-intentions2/</guid>
		<description><![CDATA[gtk+: I&#8217;ve been working again on the RecentManager and in trunk you&#8217;ll see some new stuff, namely:

use GIO to determine the MIME type of a URI, on every platform supported
use the file monitoring API to avoid polling the storage file
add a GtkSettings property for clamping the recently used resources list to a 30 days limit

more [...]]]></description>
			<content:encoded><![CDATA[<p><strong>gtk+</strong>: I&#8217;ve been working again on the <a href="http://library.gnome.org/devel/gtk/stable/GtkRecentManager.html">RecentManager</a> and in <code>trunk</code> you&#8217;ll see some new stuff, namely:</p>
<ul>
<li>use GIO to determine the MIME type of a URI, on every platform supported</li>
<li>use the file monitoring API to avoid polling the storage file</li>
<li>add a GtkSettings property for clamping the recently used resources list to a 30 days limit</li>
</ul>
<p>more stuff I&#8217;d like to add is:</p>
<ul>
<li>small parser changes to <a href="http://library.gnome.org/devel/glib/stable/glib-Bookmark-file-parser.html">GBookmarkFile</a>, to reflect changes in the spec</li>
<li>bulk addition, for applications storing multiple items when quitting</li>
<li>new API needed to follow the usability review in bug <a href="http://bugzilla.gnome.org/show_bug.cgi?id=349541">349541</a></li>
<li>moving the RecentItem icon code to GIO, and add API to extract the thumbnail</li>
</ul>
<p><strong>twitter</strong>: I&#8217;ve been using <a href="http://twitter.com">Twitter</a> a lot in the past two weeks; it&#8217;s nice, it makes it easier to copy and paste a quote or a thought, and the 160 characters limit is an interesting challenge. As it&#8217;s been ages since I last wrote an application<sup><a href="#footnote-1-261" id="footnote-link-1-261" class="footnote-link footnote-identifier-link" title="lately all I&#8217;ve been doing was writing libraries">1</a></sup>, I decided to start writing a Twitter reader/writer &mdash; using <a href="http://www.gtk.org">GTK+</a>, <a href="http://www.clutter-project.org">Clutter</a> and Tidy; without much thinking, I opened gvim and started writing code in C<sup><a href="#footnote-2-261" id="footnote-link-2-261" class="footnote-link footnote-identifier-link" title="hey, that&#8217;s what I do for a living, it&#8217;s hard to switch off; plus, I could reuse some of the platform libraries">2</a></sup> &mdash; so, the obvious thing that happened was that I ended up writing a library <em>yet again</em> in order to use Twitter&#8217;s web API. luckily for me, libsoup has now a really nice API to work with; all you need is <code>GET</code> and <code>POST</code> to their RESTful API, retrieve the result, parse it through JSON-GLib, hide everything inside a new GObject and you have a wrapper around a web service. the application, you say? oh, I was sure I forgot something. well, it&#8217;s <a href="http://github.com/ebassi/tweet/tree/master">coming along</a> &mdash; it just needs some work still.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-261" class="footnote">lately all I&#8217;ve been doing was writing libraries [<a href="#footnote-link-1-261" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-261" class="footnote">hey, that&#8217;s what I do for a living, it&#8217;s hard to switch off; plus, I could reuse some of the platform libraries [<a href="#footnote-link-2-261" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/04/good-intentions2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Being Luis Villa</title>
		<link>http://log.emmanuelebassi.net/archives/2008/04/being-luis-villa/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/04/being-luis-villa/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 13:41:02 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>fun</category>

		<category>meme</category>

		<category>luis-villa-is-people</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/04/being-luis-villa/</guid>
		<description><![CDATA[


iain&#8217;s right: this is funnier than the history meme.

]]></description>
			<content:encoded><![CDATA[<div style="text-align:center">
<a id="p259" rel="attachment" class="imagelink" href="http://log.emmanuelebassi.net/archives/2008/04/being-luis-villa/i-am-luis/" title="I am Luis"><img id="image259" src="http://log.emmanuelebassi.net/wp-content/2008/04/i-am-luis.jpg" alt="I am Luis" /></a>
</div>
<p><a href="http://blogs.gnome.org/iain/2008/04/17/i-am-luis-villa/">iain</a>&#8217;s right: this is funnier than the history meme.
</p>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/04/being-luis-villa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rhyme the rhyme well</title>
		<link>http://log.emmanuelebassi.net/archives/2008/04/rhyme-the-rhyme-well/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/04/rhyme-the-rhyme-well/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 21:43:34 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>developer</category>

		<category>clutter</category>

		<category>crack</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/04/rhyme-the-rhyme-well/</guid>
		<description><![CDATA[Jason, it&#8217;s not just the canvas: writing a simple 2D canvas is trivial &#8212; that&#8217;s why a lot of applications end up writing their own homegrown one.
The hard bits are the animation framework, the event handling and down to the integration with the existing platform. A generic canvas is hard, and you probably don&#8217;t want [...]]]></description>
			<content:encoded><![CDATA[<p>Jason, it&#8217;s not just <a href="http://jasondclinton.livejournal.com/65125.html">the canvas</a>: writing a simple 2D canvas is trivial &mdash; that&#8217;s why a lot of applications end up writing their own homegrown one.</p>
<p>The hard bits are the animation framework, the event handling and down to the integration with the existing platform. A generic canvas is hard, and you probably don&#8217;t want it to be developed inside gtk+ (not even for 3.0) &mdash; just like Cairo is not developed inside gtk+ but supersedes part of gtk+&#8217;s API.</p>
<p>As for 3D acceleration &mdash; I&#8217;m obviously biased here, so everyone should take what I write with a <del datetime="2008-04-10T21:32:48+00:00">grain</del>truckload of salt &mdash; but I maintain my view that if GNOME (and Linux) started heavily pushing towards more support for OpenGL, then we could get more market share<sup><a href="#footnote-1-256" id="footnote-link-1-256" class="footnote-link footnote-identifier-link" title="think Compiz, and how many more users it brought home just with a spinning cube">1</a></sup>, more visibility and thus more leverage to make the currently closed source drivers more open. Intel understood this; AMD is now getting it; I&#8217;m pretty sure nVidia will &mdash; or they will be simply pushed into irrelevance by the open drivers developed by the community<sup><a href="#footnote-2-256" id="footnote-link-2-256" class="footnote-link footnote-identifier-link" title="unless you are a gamer, and need the very best card as soon as it&#8217;s out just to play Crisis">2</a></sup>. Let&#8217;s face it: other platforms and toolkits are pushing heavily on hardware accelerated 3D effects.</p>
<p>Let&#8217;s start aggressively work to get the platform into the XXI century.</p>
<p><strong>update@2008-10-11T12:21+0100</strong> &mdash; just as a sidenote: if you have a good CPU, Mesa and software rendering, Clutter <em>will work</em>. It won&#8217;t be fast for some operations (like scaling and, possibly, rotating), but in that case you should probably start contributing to Mesa to make it fast (there&#8217;s a lot of room for improvement).
</p>
<ol start="1" class="footnotes"><li id="footnote-1-256" class="footnote">think Compiz, and how many more users it brought home just with a spinning cube [<a href="#footnote-link-1-256" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-256" class="footnote">unless you are a gamer, and need the very best card as soon as it&#8217;s out just to play Crisis [<a href="#footnote-link-2-256" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/04/rhyme-the-rhyme-well/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Time to Build</title>
		<link>http://log.emmanuelebassi.net/archives/2008/03/time-to-build/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/03/time-to-build/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 21:42:11 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>recent-files</category>

		<category>gtk</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/03/time-to-build/</guid>
		<description><![CDATA[Claudio did some interesting profiling (and patching) of the BookmarkFile implementation in GLib &#8212; so kudos to him and Felix.
one thing that he noted is:
However, I still have the feeling that letting ~\.recently-used.xbel grow without control is very, very wrong. In my laptop, this file is about 5MB, which accounts for ca. 9000 files(!).
this is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.gnome.org/~csaavedra/news-2008-03.html#D22">Claudio</a> did some interesting profiling (and patching) of the BookmarkFile implementation in GLib &mdash; so <em>kudos</em> to him and Felix.</p>
<p>one thing that he noted is:</p>
<blockquote><p>However, I still have the feeling that letting ~\.recently-used.xbel grow without control is very, very wrong. In my laptop, this file is about 5MB, which accounts for ca. 9000 files(!).</p></blockquote>
<p>this is very true, but I feel it needs some context. when I first wrote the RecentManager code I only had the EggRecent implementation as a comparison; the old EggRecentModel had an hardcoded limit of 500 items stored per file. limiting on the number, instead of the <em>age</em> of an item inside a <em>recently used</em> file list did not feel right, so I thought about hardcoding a limit of 30 days &mdash; but stopped short of doing it because I realized that hardcoding limits at the toolkit level was not a good idea:</p>
<ul>
<li>application developers will not be able to change it in any way</li>
<li>users will not be able to change it in any way</li>
<li>system administrators will not be able to change it in any way</li>
</ul>
<p>just to give a few examples: while I was still writing the RecentManager inside libegg, Alex Graveley was writing Gimmie. Gimmie had<sup><a href="#footnote-1-255" id="footnote-link-1-255" class="footnote-link footnote-identifier-link" title="and might still have &mdash; I haven&#8217;t checked it for a while now">1</a></sup> a local document and application history that could allow you to go back in time of months; had I hardcoded a limit, the Gimmie developers would have needed a new implementation, defeating the purpose of shipping the RecentManager inside GTK+ to cut down the amount of code replication.</p>
<p>hardcoding limits is also something that makes it hard, or even impossible, for users and administrators to control; I might want a 30 days limit, but other might want a 90 days, or a 7 days &mdash; or even a 1 day limit. some might not even want to save the recently used files at all (think kiosks).</p>
<p>I don&#8217;t believe in strictly hardcoding policies in the toolkit; providing fallbacks is perfectly fine, but preventing people from actually having different settings is akin to convince everyone that you&#8217;re right and they&#8217;re wrong.</p>
<p>still, this doesn&#8217;t solve the problem at hand, that is the current <em>lack of policy</em>.</p>
<p>what I&#8217;d like to see is some process taking care of purging the old entries, using some key inside gconf, at the end of the session; gnome-settings-daemon would fit the role for GNOME, and other desktop environments using GTK+ could provide the same functionality<sup><a href="#footnote-2-255" id="footnote-link-2-255" class="footnote-link footnote-identifier-link" title="if you&#8217;re not using a GTK+ based desktop environment you&#8217;re either using the same spec used by GTK+ so you can provide your own way of purging the cache, or you&#8217;re using another way to store the recently used files, so the size of the file saved/read by the RecentManager will not bubble out of control so easily &mdash; and you can still flush it yourself">2</a></sup>. after all, gnome-settings-daemon should already <a href="http://bugzilla.gnome.org/show_bug.cgi?id=523159">flush the thumbnails cache</a> &mdash; it wouldn&#8217;t be much of a complication.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-255" class="footnote">and might still have &mdash; I haven&#8217;t checked it for a while now [<a href="#footnote-link-1-255" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-255" class="footnote">if you&#8217;re not using a GTK+ based desktop environment you&#8217;re either using the same spec used by GTK+ so you can provide your own way of purging the cache, or you&#8217;re using another way to store the recently used files, so the size of the file saved/read by the RecentManager will not bubble out of control so easily &mdash; and you can still flush it yourself [<a href="#footnote-link-2-255" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/03/time-to-build/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Berlin/5</title>
		<link>http://log.emmanuelebassi.net/archives/2008/03/berlin5/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/03/berlin5/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 00:35:03 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>C</category>

		<category>gtk</category>

		<category>conference</category>

		<category>hackfest</category>

		<category>berlin</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/03/berlin5/</guid>
		<description><![CDATA[last post of the Berlin Hackfest series, written on the last minutes of day 5
today was &#8220;wrap up&#8221; day. we got together in the room used for the presentations and summed up all our work during the various sessions of the week. it turned out that the amount of work, even though not reflected by [...]]]></description>
			<content:encoded><![CDATA[<p><em>last post of the Berlin Hackfest series, written on the last minutes of day 5</em></p>
<p>today was &#8220;wrap up&#8221; day. we got together in the room used for the presentations and summed up all our work during the various sessions of the week. it turned out that the amount of work, even though not reflected by the wiki page, was really enormous; the introspection guys worked a lot and now that they have received a lot of input, they are going to rework things and kick ass even more. apparently, Behdad decided that I would tackle the GL integration inside GDK &mdash; which, of course, I&#8217;d really like to do; the GL integration, and a GDK wrapper for the GLX_texture_from_pixmap (and the equivalent call for the other platforms) would obviously be the primary way to integrate Cairo 2D high quality drawing and GL 3D and hardware acceleration in a simple way. and this is a step forward the implementation of a scene graph inside GTK+.</p>
<p>in the meantime, I&#8217;m &mdash; as Ryan would put it &mdash; deeply recursing. it all started on tuesday, when I decided to start hacking on a <em>real</em> application with Vala using all the bits and pieces a modern GTK+ application requires: GtkUIManager, about dialogs, command-line switches. the application was supposedly going to read the new GTest framework reports, and allow comparing of multiple runs in a fast way. this, in turn, led to <a href="http://bugzilla.gnome.org/show_bug.cgi?id=522059">some</a> <a href="http://bugzilla.gnome.org/show_bug.cgi?id=522060">bugs</a> <a href="http://bugzilla.gnome.org/show_bug.cgi?id=522061">filed</a> against Vala GTK+ bindings. working around these issues, I also found out that the libxml-2.0 bindings in Vala &mdash; which I need to parse the GTest report XML &mdash; require a lot of pointers usage and are, in general, quite sub-obtimal, due to the very C oriented API. while investigating on a substitute, I found out XmlReader &mdash; the cursor-based XML traversal API that .Net and other high-level languages implement<sup><a href="#footnote-1-250" id="footnote-link-1-250" class="footnote-link footnote-identifier-link" title="Even libxml-2.0 implements it, even though it suffers from the same issues of its DOM API, and it&#8217;s still not GObject-based">1</a></sup>. Thus, today at a coffe shop<sup><a href="#footnote-2-250" id="footnote-link-2-250" class="footnote-link footnote-identifier-link" title="Behdad is right: a coffee shop without any Internet connectivity makes wonders with your productivity levels">2</a></sup> I started hacking very quickly on a rough implementation of a XmlReader GObject class which, as of at this moment works quite nicely:</p>
<pre>
  XmlReader *reader = xml_reader_new ();
  GError *error = <span style="color:purple">NULL</span>;

  if (xml_reader_load_from_file (reader, <span style="color:red">&#8220;book.xml&#8221;</span>, &#038;error))
    g_error (<span style="color:red">&#8220;Unable to parse book.xml: <span style="color:purple">%s</span>&#8220;</span>, error-&gt;message);

  xml_reader_read_start_element (reader, <span style="color:red">&#8220;book-info&#8221;</span>);

  xml_reader_read_start_element (reader, <span style="color:red">&#8220;author&#8221;</span>);
  author = g_strdup (xml_reader_get_element_value (reader));
  xml_reader_read_end_element (reader);

  xml_reader_read_start_element (reader, <span style="color:red">&#8220;title&#8221;</span>);
  title = g_strdup (xml_reader_get_element_value (reader));
  xml_reader_read_end_element (reader);

  xml_reader_read_end_element (reader);

  g_print (<span style="color:red">&#8220;The author of <span style="color:purple">%s</span> is <span style="color:purple">%s\n</span>&#8220;</span>, title, author);

  g_free (title);
  g_free (author);
  g_object_unref (reader);
</pre>
<p>and you&#8217;re done. at this moment, I&#8217;m cleaning it up and adding the gtk-doc API reference to the build<sup><a href="#footnote-3-250" id="footnote-link-3-250" class="footnote-link footnote-identifier-link" title="When I write new libraries, I usually stub out the API and document it at the same time; now I started to add the GTest units before I even implement the API">3</a></sup>. I&#8217;m probably going to add the generic <code>read()</code> method, so that:</p>
<pre>
  <span style="color:orange">while</span> (xml_reader_read (reader))
    {
    &#8230;
    }
</pre>
<p>will work as expected. it&#8217;s, as usual, code replication &mdash; but I&#8217;m going to need it anyway, so it&#8217;s good code replication.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-250" class="footnote">Even libxml-2.0 implements it, even though it suffers from the same issues of its DOM API, and it&#8217;s still not GObject-based [<a href="#footnote-link-1-250" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-250" class="footnote">Behdad is right: a coffee shop without any Internet connectivity makes wonders with your productivity levels [<a href="#footnote-link-2-250" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-3-250" class="footnote">When I write new libraries, I usually stub out the API and document it at the same time; now I started to add the GTest units before I even implement the API [<a href="#footnote-link-3-250" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/03/berlin5/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Berlin/3</title>
		<link>http://log.emmanuelebassi.net/archives/2008/03/berlin3/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/03/berlin3/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 00:35:00 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>gtk</category>

		<category>clutter</category>

		<category>conference</category>

		<category>hackfest</category>

		<category>berlin</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/03/berlin3/</guid>
		<description><![CDATA[second and third day of the hackfest, edited on day five
on tuesday, Behdad and I started working on OpenGL integration inside GTK+. as stated multiple times on the Bugzilla entry, what we both would like is a Cairo-like integration of GL inside the available drawing systems in GTK+. in short: not a specialized widget like [...]]]></description>
			<content:encoded><![CDATA[<p><em>second and third day of the hackfest, edited on day five</em></p>
<p>on tuesday, Behdad and I started working on OpenGL integration inside GTK+. as stated multiple times on the Bugzilla entry, what we both would like is a Cairo-like integration of GL inside the available drawing systems in GTK+. in short: not a specialized widget like GtkGLArea, which would make it difficult &mdash; or plainly impossible without jumping through a long series of hoops. in flames. tied. and blindfolded &mdash; to integrate GL inside existsing projects; and not the incredible API dump that GtkGLExt is.</p>
<p>the design we mostly agreed on was a shared object inside GTK+, containing the GL context abstraction object, and two simple calls to delimit the drawing code, wait for vblank and swap the GL buffers. plus, an easy to use wrapper around the <code>texture_from_pixmap</code> extension, to allow drawing with cairo on a Pixmap and then have it pushed into the GL pipeline.</p>
<p>Carl arrived on wednesday, and partecipated at the scene graph BoF we held. the BoF itself was pretty straightforward: we read the slides that Havoc sent on the mailing list and discussed the various points. we all agreed on a lot of points &mdash; and we tried to define the problem space more deeply<sup><a href="#footnote-1-252" id="footnote-link-1-252" class="footnote-link footnote-identifier-link" title="We did not always succeed in this, but the issue at hand is quite large and it&#8217;s understandable">1</a></sup>. being there, I could bring to the table my experience in the past two years<sup><a href="#footnote-2-252" id="footnote-link-2-252" class="footnote-link footnote-identifier-link" title="It&#8217;s really two years? holy crap! The time really flew&#8230;">2</a></sup> with the design and implementation of Clutter. some of the attendees were already familiar with it &mdash; something very satisfying &mdash; and I could expand some points in Havoc&#8217;s slides about Clutter that have been recently fixed or are going to be fixed in this cycle. the biggest point is that the scene graph should integrate with Cairo, in order to allow applications and people to gently merge both the 2D drawing of surfaces into a full 3D environment; I&#8217;ll leave to Carl to explain the Cairo side, because he&#8217;s obviously better at this than I am. <img src='http://log.emmanuelebassi.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>the operative result of the scene graph discussion was that Clutter emerged as an already powerful and established solution for this problem space, and given that it already nicely integrates with GTK+, we can work towards the common goal of making it &#8220;the GTK+ canvas&#8221;, outside the actual library so that it can grow unrestrained and experiment in new directions.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-252" class="footnote">We did not always succeed in this, but the issue at hand is quite large and it&#8217;s understandable [<a href="#footnote-link-1-252" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-252" class="footnote">It&#8217;s really two years? holy crap! The time really flew&#8230; [<a href="#footnote-link-2-252" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/03/berlin3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Helm, set a course&#8230; for love</title>
		<link>http://log.emmanuelebassi.net/archives/2008/02/helm-set-a-course-for-love/</link>
		<comments>http://log.emmanuelebassi.net/archives/2008/02/helm-set-a-course-for-love/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 15:32:05 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>fun</category>

		<category>crack</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2008/02/helm-set-a-course-for-love/</guid>
		<description><![CDATA[a GNOME cruise? I already have the theme song&#8230;

GNOME-Love Boat, love exciting and new,
Come aboard, we're expecting you.

The GNOME-Love Boat soon will be making another release,
The GNOME-Love Boat promises something for everyone.

Set a course for adventure,
Your box's on a new romance.

And GNOME-Love
Won't hurt anymore,
It's an open source,
On a userfriendly shore.

it's GNOME-Love
Welcome aboard it's GNOME-love

]]></description>
			<content:encoded><![CDATA[<p>a <a href="http://wayofthemonkey.com/?date=2008-02-19">GNOME cruise</a>? I already have the theme song&#8230;</p>
<pre>
GNOME-Love Boat, love exciting and new,
Come aboard, we're expecting you.

The GNOME-Love Boat soon will be making another release,
The GNOME-Love Boat promises something for everyone.

Set a course for adventure,
Your box's on a new romance.

And GNOME-Love
Won't hurt anymore,
It's an open source,
On a userfriendly shore.

it's GNOME-Love
Welcome aboard it's GNOME-love
</pre>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2008/02/helm-set-a-course-for-love/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stinging Velvet</title>
		<link>http://log.emmanuelebassi.net/archives/2007/10/stinging-velvet/</link>
		<comments>http://log.emmanuelebassi.net/archives/2007/10/stinging-velvet/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 19:21:48 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>C</category>

		<category>announce</category>

		<category>clutter</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2007/10/stinging-velvet/</guid>
		<description><![CDATA[Clutter - If release 0.4 rocked hard, release 0.6 of Clutter will blow your mind away. Just to list some features landed in the past couple of weeks after ClutterScript got in:

new event handling, borrowing from the W3C DOM event - that is, two event phases: capture, which traverses the scene from the stage to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Clutter</strong> - If release 0.4 rocked hard, release 0.6 of <a href="http://www.clutter-project.org">Clutter</a> will blow your mind away. Just to list some features landed in the past couple of weeks after <code>ClutterScript</code> got in:</p>
<ul>
<li><strong>new event handling</strong>, borrowing from the W3C DOM event - that is, two event phases: <em>capture</em>, which traverses the scene from the stage to the actor that received the event, and <em>bubble</em> which traverses the scene from the actor to the stage. You can block the event chain in any point of both phases by simply returning <code>TRUE</code> in the signal handlers (like GTK+); <em>kudos</em> to <a href="http://butterfeet.org/">mallum</a> and Pippin</li>
<li><strong>improved text scaling</strong>, at least for downscaling at ~50%; <em>kudos</em> to <a href="http://codecave.org/">Pippin</a></li>
<li><strong>build and test on win32</strong> using the SDL backend, complete with VS2005 build files; <em>kudos</em> to <a href="http://www.qoheleth.uklinux.net/blog/">tf</a></li>
<li><strong>time-based timelines</strong>, so you can define a <code>ClutterTimeline</code> by giving its length in milliseconds; and without even breaking the API.</li>
</ul>
<p>Still, there&#8217;s plenty more coming - so keep looking at <code>trunk</code>.</p>
<p><strong>JSON-GLib</strong> - The <a href="http://folks.o-hand.com/~ebassi/docs/json-glib/">code base</a> has been consolidated a lot while working on <code>ClutterScript</code>, so I feel confident about making a release of the out-of-tree repository. The release is bagged, tagged and signed as <code>json-glib-0.2.1</code> in the git repository<sup><a href="#footnote-1-233" id="footnote-link-1-233" class="footnote-link footnote-identifier-link" title="As usual, at http://folks.o-hand.com/~ebassi/git/json-glib.git">1</a></sup>. You can grab the tarball <a href="http://folks.o-hand.com/~ebassi/sources/json-glib-0.2.1.tar.gz">here</a>. Work on seamless <code>GObject</code>-JSON (de)serialization will continue in the master branch towards a 0.4.0 release. <strong>Update@2007-10-16T23:30+0100</strong>: obviously, as soon as I got back home and checked the repository I found two bugs in the generator code; hence, <em>brown paper bag release</em> 0.2.1. Tarball, documentation and tag updated.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-233" class="footnote">As usual, at http://folks.o-hand.com/~ebassi/git/json-glib.git [<a href="#footnote-link-1-233" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2007/10/stinging-velvet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Porcelain</title>
		<link>http://log.emmanuelebassi.net/archives/2007/10/porcelain/</link>
		<comments>http://log.emmanuelebassi.net/archives/2007/10/porcelain/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 22:19:45 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>C</category>

		<category>developer</category>

		<category>clutter</category>

		<category>git</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2007/10/porcelain/</guid>
		<description><![CDATA[Today I committed to Clutter trunk ClutterScript, the initial support for defining the scenegraph using external files. You can think of it as the GtkBuilder equivalent for Clutter.
During the 0.3 development cycle we considered using XML and JSON, and opted for the latter because while XML is quite easy for applications to write, JSON is [...]]]></description>
			<content:encoded><![CDATA[<p>Today I <a href="http://svn.o-hand.com/view/clutter?rev=1477&#038;view=rev">committed</a> to <a href="http://www.clutter-project.org">Clutter</a> trunk <code>ClutterScript</code>, the initial support for <a href="http://bugzilla.openedhand.com/show_bug.cgi?id=424">defining the scenegraph using external files</a>. You can think of it as the <code>GtkBuilder</code> equivalent for Clutter.</p>
<p>During the 0.3 development cycle we considered using XML and JSON, and opted for the latter because while XML is quite easy for applications to write, <acronym title="JavaScript Object NotatioN"><a href="http://json.org">JSON</a></acronym> is more geared towards human to read<sup><a href="#footnote-1-231" id="footnote-link-1-231" class="footnote-link footnote-identifier-link" title="obviously nothing prevents adding an XML parser, and use both">1</a></sup>. Also, JSON syntax is really parser-friendly, with only three barewords and six symbols.</p>
<p>Another nice thing about JSON is that many high-level languages already have some JSON module, so manipulating data streams would be quite easy for, let&#8217;s say, Perl or Python before feeding those streams to Clutter.</p>
<p>Defining a simple scene with JSON and <code>ClutterScript</code> is quite easy:</p>
<pre>
{
  <span style="color:red">&#8220;id&#8221;</span> : <span style="color:red">&#8220;main-stage&#8221;</span>,
  <span style="color:red">&#8220;type&#8221;</span> : <span style="color:red">&#8220;ClutterStage&#8221;</span>,
  <span style="color:red">&#8220;fullscreen&#8221;</span> : <span style="color:purple">true</span>,
  <span style="color:red">&#8220;children&#8221;</span> : [
    {
      <span style="color:red">&#8220;id&#8221;</span> : <span style="color:red">&#8220;red-button&#8221;</span>,
      <span style="color:red">&#8220;type&#8221;</span> : <span style="color:red">&#8220;ClutterRectangle&#8221;</span>,
      <span style="color:red">&#8220;x&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;y&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;width&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;height&#8221;</span> : <span style="color:purple">100</span>
      <span style="color:red">&#8220;color&#8221;</span> : <span style="color:red">&#8220;#ff0000ff&#8221;</span>
    },
    {
      <span style="color:red">&#8220;id&#8221;</span> : <span style="color:red">&#8220;green-button&#8221;</span>,
      <span style="color:red">&#8220;type&#8221;</span> : <span style="color:red">&#8220;ClutterRectangle&#8221;</span>,
      <span style="color:red">&#8220;x&#8221;</span> : <span style="color:purple">300</span>,
      <span style="color:red">&#8220;y&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;width&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;height&#8221;</span> : <span style="color:purple">100</span>
      <span style="color:red">&#8220;color&#8221;</span> : <span style="color:red">&#8220;#00ff00ff&#8221;</span>
    },
    {
      <span style="color:red">&#8220;id&#8221;</span> : <span style="color:red">&#8220;blue-button&#8221;</span>,
      <span style="color:red">&#8220;type&#8221;</span> : <span style="color:red">&#8220;ClutterRectangle&#8221;</span>,
      <span style="color:red">&#8220;x&#8221;</span> : <span style="color:purple">600</span>,
      <span style="color:red">&#8220;y&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;width&#8221;</span> : <span style="color:purple">100</span>,
      <span style="color:red">&#8220;height&#8221;</span> : <span style="color:purple">100</span>
      <span style="color:red">&#8220;color&#8221;</span> : <span style="color:red">&#8220;#0000ffff&#8221;</span>
    }
  ]
}
</pre>
<p>This will draw a red, a green and a blue square, 100&#215;100 pixels of size, inside a full screen stage.<br />
You can then retrieve the <code>"main-stage"</code> object (as well as any other object using its id) and connect signals and manipulate them with the usual Clutter API.</p>
<p>At the moment <code>ClutterScript</code> is not 100% complete - I still need to add support for defining behaviours (mostly a matter of defining an object syntax); complex properties parsing; merging (and, possibly, unmerging) of &#8220;snippets&#8221; of objects. Plus, obviously, more sanity checks in the scene building code.</p>
<p>To parse JSON there are a few C libraries, but I opted for writing a GObject-based one - which, in one of my usual moments of <em>lack</em> of originality, I called <a href="http://folks.o-hand.com/~ebassi/docs/json-glib/">JSON-GLib</a>. Clutter uses an in-tree copy because I might need API changes to make Clutter parsing code easier, but the library is already auto-tooled, tested and 100% documented (it is missing GObject deserialization, but that will have to wait). JSON-GLib is released under the terms of the LGPL and it&#8217;s available in my personal git repository, which you can clone with the usual:</p>
<pre>
  git clone http://folks.o-hand.com/~ebassi/git/json-glib.git
</pre>
<p><strong>Update@2007-10-09T15:07+0100</strong>: Just landed in <code>trunk</code>: defining behaviours (not every type, complex types like the path-based ones are still to be implemented), merging tests and more sanity checks. Defining a rotate behaviour boils down to:</p>
<pre>
{
  <span style="color:red">&#8220;id&#8221;</span>          : <span style="color:red">&#8220;rotate-behaviour&#8221;</span>,
  <span style="color:red">&#8220;type&#8221;</span>        : <span style="color:red">&#8220;ClutterBehaviourRotate&#8221;</span>,
  <span style="color:red">&#8220;angle-begin&#8221;</span> : <span style="color:purple">0.0</span>,
  <span style="color:red">&#8220;angle-end&#8221;</span>   : <span style="color:purple">360.0</span>,
  <span style="color:red">&#8220;axis&#8221;</span>        : <span style="color:red">&#8220;z-axis&#8221;</span>,
  <span style="color:red">&#8220;direction&#8221;</span>   : <span style="color:red">&#8220;cw&#8221;</span>,
  <span style="color:red">&#8220;alpha&#8221;</span>       : {
    <span style="color:red">&#8220;timeline&#8221;</span> : { <span style="color:red">&#8220;loop&#8221;</span> : <span style="color:purple">true</span>, <span style="color:red">&#8220;num-frames&#8221;</span> : <span style="color:purple">300</span>, <span style="color:red">&#8220;fps&#8221;</span> : <span style="color:purple">60</span> },
    <span style="color:red">&#8220;function&#8221;</span> : <span style="color:red">&#8220;sine&#8221;</span>
  }
}
</pre>
<p>Really soon now: all behaviours, complex properties and more.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-231" class="footnote">obviously nothing prevents adding an XML parser, and use both [<a href="#footnote-link-1-231" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2007/10/porcelain/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Wandering Days Are Over</title>
		<link>http://log.emmanuelebassi.net/archives/2007/09/my-wandering-days-are-over/</link>
		<comments>http://log.emmanuelebassi.net/archives/2007/09/my-wandering-days-are-over/#comments</comments>
		<pubDate>Mon, 03 Sep 2007 09:14:29 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2007/09/my-wandering-days-are-over/</guid>
		<description><![CDATA[This weekend I&#8217;ve finally tried Vala, something I wanted to do for a while now. Vala is, for those of you that never tried it, like GOB, but on PCP and steroids and with a syntax that doesn&#8217;t make using it feel like you&#8217;re being skull-raped through your eye sockets. It&#8217;s, actually, quite a pleasant [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend I&#8217;ve finally tried <a href="http://live.gnome.org/Vala">Vala</a>, something I wanted to do for a while now. Vala is, for those of you that never tried it, like <a href="http://www.5z.com/jirka/gob.html">GOB</a>, but on PCP and steroids and with a syntax that doesn&#8217;t make using it feel like you&#8217;re being skull-raped through your eye sockets. It&#8217;s, actually, quite a pleasant experience - if you ignore the utter brain damage of connecting signals by overloading the plus operator<sup><a href="#footnote-1-229" id="footnote-link-1-229" class="footnote-link footnote-identifier-link" title="which is more a fault of C# than anything, and one of the reasons operator overloading should be banished using necromancy. Come on: signal = signal + handler? Really?">1</a></sup>.</p>
<p>Surely, there are a couple of issues with the underlying C translation layer:</p>
<ul>
<li>connecting signals passes the class instance pointer, but if your class does not have any property then an empty struct will be generated, which doesn&#8217;t create valid C code;</li>
<li>if you then add a dummy int, the passed pointer is still called &#8220;self&#8221; but it&#8217;s never allocated, because the Vala compiler still expects for the class to inherit from GLib.Object  in this case, while it really shouldn&#8217;t;</li>
<li>so, if you want to connect to signals, you have to make your class inherit from Object, create an instance and connect to the signals in the constructor or inside a method;</li>
</ul>
<p>The last point is a perfectly legitimate choice to be made by language designers: but, then, this snippet:</p>
<pre>
using GLib;
using Gdict;

class TestSource {
  void on_definition_found (Gdict.Context context, Gdict.Definition definition) {
    stdout.printf ("*definition for `%s' found:n%sn",
                   definition.get_word(),
                   definition.get_text());
  }
  static void main (string[] args) {
    var loop = new GLib.MainLoop (null, false);
    var context = new Gdict.ClientContext ("dict.org", 2628);

    context.definition_found += on_definition_found;
    try {
      context.define_word ("*", "dictionary");
   } catch (Glib.Error e) { warning (e.message); }

    loop.run ();
  }
}
</pre>
<p>should fail to compile in Vala, and not in produce invalid C code<sup><a href="#footnote-2-229" id="footnote-link-2-229" class="footnote-link footnote-identifier-link" title="I think this stems from the fact that Vala, like C#, allows a mixed OO-procedural approach, like Perl and Python; but those languages usually get it right">2</a></sup>.</p>
<p>Anyway, Vala is an interesting project. If it had a better integration with the rest of the toolchain (gdb, valgrind, autotools, profilers, etc.) it should definitely become one of the first class citizens of GNOME<sup><a href="#footnote-3-229" id="footnote-link-3-229" class="footnote-link footnote-identifier-link" title="for instance, Apple has native Objective-C support, and that is a layer above C like Vala">3</a></sup>.</p>
<p>By the way, just to try out Vala I wrote the bindings for the <a href="http://library.gnome.org/devel/gdict/unstable/">Gdict API</a>. They are mostly working, so if you want to check them out, you can clone the repository here:</p>
<pre>
  git clone http://www.gnome.org/~ebassi/git/gdict-vala.git
</pre>
<p>Those are the bindings for the unstable version of Gdict, which will be released for GNOME 2.20.
</p>
<ol start="1" class="footnotes"><li id="footnote-1-229" class="footnote">which is more a fault of C# than anything, and one of the reasons operator overloading should be banished using necromancy. Come on: <code>signal = signal + handler</code>? Really? [<a href="#footnote-link-1-229" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-2-229" class="footnote">I think this stems from the fact that Vala, like C#, allows a mixed <acronym title="Object Oriented">OO</acronym>-procedural approach, like Perl and Python; but those languages usually get it right [<a href="#footnote-link-2-229" class="footnote-link footnote-back-link">&#8617;</a>]</li><li id="footnote-3-229" class="footnote">for instance, Apple has native Objective-C support, and that is a layer above C like Vala [<a href="#footnote-link-3-229" class="footnote-link footnote-back-link">&#8617;</a>]</li></ol>]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2007/09/my-wandering-days-are-over/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GUADEC/recap</title>
		<link>http://log.emmanuelebassi.net/archives/2007/07/guadecrecap/</link>
		<comments>http://log.emmanuelebassi.net/archives/2007/07/guadecrecap/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 12:14:57 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>GNOME</category>

		<category>guadec</category>

		<category>conference</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2007/07/guadecrecap/</guid>
		<description><![CDATA[This year&#8217;s GUADEC has been really great - it seemed hard to top last year&#8217;s but paul, thos, robster and the rest of the GUADEC team really rocked hard to make everything work at its best. Kudos to all of them.
Unfortunately, my GUADEC was cut short on Wednesday for a small medical emergency, as my [...]]]></description>
			<content:encoded><![CDATA[<p>This year&#8217;s <a href="http://guadec.org">GUADEC</a> has been really great - it seemed hard to top last year&#8217;s but <a href="http://www.devel.co.uk/">paul</a>, <a href="http://blogs.gnome.org/thos">thos</a>, <a href="http://www.robster.org.uk/blog">robster</a> and the rest of the GUADEC team really rocked hard to make everything work at its best. <em>Kudos</em> to all of them.</p>
<p>Unfortunately, my GUADEC was cut short on Wednesday for a small medical emergency, as my wife had some health problems on Tuesday night that got worse on Wednesday. Now it seems everything&#8217;s back to normal, but as we&#8217;re still expecting some of the lab analysis to come through, we had to postpone our holidays and the trip back to Italy.</p>
<p>I could only stay in Birmingham for the GTK+ &#8220;state of the union&#8221; (awesome) talk by Kris and the <del datetime="2007-07-24T10:51:33+00:00">3.x</del>4.x workshop and see the wonderful presentation Fer and Xan did - really funny but also straight to the point. The following discussion was a bit hijacked towards the ABI/API break issue, which I believe is neither interesting nor really important. I also missed the Clutter talk on Thursday, but I was told Matthew rocked. It&#8217;s fun to see people picking up Clutter and finding it API-friendly: it&#8217;s hard, being very near to it, to judge whether some of the choices you make are the right ones.</p>
<p>I had to cancel my tutorial on Perl and GTK+, as well as the GConf workshop. I&#8217;m very sorry if this has caused you some trouble; I heard that Ryan did an interesting talk on his dconf project, though.</p>
<p>I missed Havoc&#8217;s keynote on the online desktop, but went to Alex&#8217;s keynote; it was intriguing, even though I disagree on some of his points - especially the bit about Firefox being an interesting platform to develop towards or with, after the utter disregard that the Mozilla developers have had in the past for Linux and GTK+ (two issues spring to mind: borked clipboard usage and UTF-8 drag and drop); oh, and I don&#8217;t think I&#8217;ve ever seen the words &#8220;good engineering practises&#8221; and &#8220;small extensible core&#8221; anywhere near &#8220;mozilla&#8221;, unless &#8220;the Fox&#8221; that Alex mentioned was a new web browser I&#8217;ve yet to see. What I completely agree is that we need to tap into the resources of the non-C, non-hardcore programmers: we need tools to make possible for Flash developers, for Javascript developers, for designers to use our platform, and provide new ideas; in short, make the platform interesting and usable for developers, like the desktop should be interesting and usable for the users.</p>
<p>Let&#8217;s take Plasma, the new environment KDE provides for writing their version of desktlets-dash-widgets-dash-applets-dash-somethingets. Obviously, right now, it&#8217;s just an exciting new way to write not really useful stuff, like the uptenth variant of a clock, or a weather applet, or a note taking applet; but you get an HTML canvas widget, and you can write ${FOO}ets in Javascript. This way, KDE will get a truckload of useless stuff lying on a desktop which will be covered in windows anyway - but they will also get the attention of web developers writing small apps integrating with web services in a transparent way, using their own strengths and knowledge, without forcing them to learn the intricacies of a complete platform; and in time they&#8217;ll get those developers to know this platform and gain new workforce to work with it, and on it. Compare to GNOME: if I want to write something as simple as a desklet, right now, I&#8217;d need to know GTK+, Cairo, GConf and possibly gnome-vfs, libsoup, or third party modules for talking to web services through their API. The curve for contributing to the platform is still too steep; and you don&#8217;t even get to use your own knowledges: you have to learn everything from scratch. KDE core developers understood this before we did, and their move might keep KDE from falling into the irrelevancy of geek-only usage. It&#8217;s up to us find a way for making the GNOME platform interesting again for developers, as well as users.
</p>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2007/07/guadecrecap/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Take it or leave it</title>
		<link>http://log.emmanuelebassi.net/archives/2007/07/take-it-or-leave-it/</link>
		<comments>http://log.emmanuelebassi.net/archives/2007/07/take-it-or-leave-it/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 16:33:47 +0000</pubDate>
		<dc:creator>ebassi</dc:creator>
		
		<category>Hacking</category>

		<category>GNOME</category>

		<category>C</category>

		<category>announce</category>

		<guid isPermaLink="false">http://log.emmanuelebassi.net/archives/2007/07/take-it-or-leave-it/</guid>
		<description><![CDATA[After the comments on my latest blog post, I got back at Unique and did some rearrangements in the code base. Now the backends are all compiled in (obviously, depending on whether you have the dependencies to compile them) and the backend to be used can be defined at runtime. The default backend is chosen [...]]]></description>
			<content:encoded><![CDATA[<p>After the comments on my latest blog post, I got back at Unique and did some rearrangements in the code base. Now the backends are all compiled in (obviously, depending on whether you have the dependencies to compile them) and the backend to be used can be defined at runtime. The default backend is chosen at compile time and can be overridden by setting the <code>UNIQUE_BACKEND</code> environment variable. Obviously, if you launch an instance with <code>UNIQUE_BACKEND=dbus</code> and another one with <code>UNIQUE_BACKEND=bacon</code> you will have two instances running - but that&#8217;s only to be expected.</p>
<p>I&#8217;ve also updated the API to something I can probably call &#8220;semi-frozen&#8221; (small API additions notwithstanding); the constructor changed to always accept a startup notification id (it will try to be clever and find it for you if you pass <code>NULL</code>, though) and allows you to define custom commands with a single call.</p>
<p>As usual, you can clone the Git repository from here:</p>
<pre>
  git clone http://www.gnome.org/~ebassi/git/unique.git
</pre>
<p>or grab the tarball for <del datetime="2007-07-12T11:52:05+00:00">0.9.2</del>0.9.3 from <a href="http://www.gnome.org/~ebassi/source/unique-0.9.3.tar.gz">here</a>.</p>
<p>I&#8217;ll keep working on making a 1.0.0 release at GUADEC (probably it&#8217;ll happen <em>right at</em> GUADEC), API/ABI stable and with the Xlibs backend. Then I&#8217;ll resume working on the <code>GtkApplication</code> class, which will have the Unique features but will (hopefully) be integrated in GTK+.</p>
<p><strong>Update@2007-07-12T12:54+0100</strong>: New release, with full API reference documentation, a couple of stupid bugs squashed and workspace support.
</p>
]]></content:encoded>
			<wfw:commentRss>http://log.emmanuelebassi.net/archives/2007/07/take-it-or-leave-it/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
