Archive

Author Archive

Follow me on Twitter

March 21, 2010 4 comments

fatal: protocol error: expected sha/ref

February 25, 2009 4 comments

Dear Lennart,

You should probably know that typing the correct URL would work better for cloning a bzr branch (yes a branch, not a repository).

This is what I get when I try to feed git a random invalid URL:

$ git clone git://github.com/idontexist
Initialized empty Git repository in /home/asabil/Desktop/idontexist/.git/
fatal: protocol error: expected sha/ref, got ‘
*********’

No matching repositories found.

*********’

Now is probably the time to stop this non constructive “my DVCS is better than yours”, and focus on writing code and fixing bugs.

Categories: Uncategorized

Git rename tracking

February 17, 2009 1 comment
Categories: Uncategorized Tags: ,

Vala and unit testing

January 23, 2009 6 comments

During the past year, I have been writing most of my code in Vala, an awesome, simple and beautiful language. When I started using it, the implementation was still in its infancy, and had a pretty high number of bugs, and the only way to make sure that the code produced by the compiler was good, was to write unit tests. The first attempt was made by Johann Prieur, in the form of vunit, a mostly direct port of junit 3.x, which turned into vtest later, and also got forked into another vunit :D In the end I wrote a very simplistic unit testing framework that serves my need: test-it.

But that wasn’t really enough for me. Few days ago I cooked a small patch that would help simplifying the process of writing unit tests in Vala. The patch allows writing unit test suites like this:

[Test (path = "/vala/foo/bar")]
class FooBarTest {
	private StringBuilder buffer;

	public void set_up () {
		buffer = new StringBuilder ();
	}

	public void tear_down () {
		buffer = null;
	}

	public void test_1 () {
		buffer.append ("hello");
		assert (buffer.str == "hello");
	}

	public void test_2 () {
		assert (buffer.str == "");
	}
}

int main (string[] args) {
	Test.init (ref args);

	var o = new FooBarTest ();

	Test.run ();
	return 0;
}

Vala, would then notice the [Test] attribute for the FooBarTest class, and produce a set of test cases that get registered with GTest when the class is instanciated. When compiled and ran the previous code produces the following output:

$ ./testing
/vala/foo/bar/1: OK
/vala/foo/bar/2: OK

The patch is still far from perfect, and personally I don’t really appreciate GTest, but if you feel like improving it, feel free to grab the code from here:

bzr branch lp:~asabil/+junk/vala-gtest-module

Categories: People Framework, Tools, Vala

People GUADEC talk

July 11, 2008 3 comments

Wednesday, Johann and me, we presented People at the GUADEC in Istanbul. We were slightly disappointed by the number of attendants, especially that there was a considerable number of people attending the Soylent talk. However, we managed to get the attention of the Online Desktop people, as well as the Telepathy crew, and we had a quite positive feedback about our ideas and goals.

The demo during the talk went pretty well, and the phone backend for people (the one using Bluetooth to access your contacts directly from the phone) also worked flawlessly, but it seems like I went too quick during the demo, and most people didn’t really get what was happening in there :/

If you missed the talk, and are looking for the slides, they are available now, and you can find them here.

After the talk, we started a quick ad-hock BoF session about People, with Owen Taylor and Marina Zhurakhinskaya, as well as Robert McQueen and Travis Reitter which led to this:

People blackboard

BoF Blackboard

We are now planning to quickly hack together an Online Desktop backend, and a Telepathy backend, and improve the DBus daemon before the 0.0.5 release.

Happening in the Vala world

May 19, 2008 Leave a comment

Recently I have been working on an initial DBus based service for People, and as many already know the “reference implementation” of People is written in that new awesome great language: Vala. Until very recently Vala had no service side DBus support at all, the 0.3.1 release was the first to introduce a “barely usable” support for service side DBus, the 0.3.2 had a better DBus support, and today I have been able to produce an initial DBus service for People with a slightly patched version of Vala. This is just a start, but it is also a great news for everyone who finds that writing DBus services using dbus-glib involves too much boilerplate.

I have also been trying the use Vala for writing GStreamer elements, this is actually possible and the proof is here: http://bugzilla.gnome.org/show_bug.cgi?id=510693#c7. However the GStreamer bindings for Vala still need to be improved to be fully functional.

Kudos to the Vala developers.

Categories: Free Software, GNOME Tags: , , , ,

People … again

April 1, 2008 1 comment

 

A few days ago Johann wrote a nice blog post about the People Framework, explaining what People is and what is the scope of the project. Unfortunately he didn’t include any kind of graphic, so here is one:

People basic architecture

This diagram is based on icons from the Tango project and is licensed under CC Attribution Share Alike 3.0.

Follow

Get every new post delivered to your Inbox.