Something on my back

dear, all-knowing and all-powerful lazyweb;

what’s the reason why python segfaults ((yes, python segfaults — and it does inside pygobject)) with this error message:

TypeError: Cannot create a consistent method resolution
order (MRO) for bases Container, Scriptable

when I’m trying to instantiate a python class inheriting from a C class that implements those two interfaces? just for the record:

  • the interfaces have no colliding methods
  • the python class is registering a GObject type
  • the python class has no colliding method with either interfaces

I can point at the code or, if python-gobject/gtk maintainers are at GUADEC, I can show them right away. you can easily find me: I’m the one swearing at python.

Odalisque/2

so, it turns out that the plans of releasing Clutter 0.8 right after GUADEC were a little bit on the conservative side, since

thanks to all the contributors for bugs opened, patches written, tests performed — you all rock my world.

now you’ll just have to wait a tiiiiny little bit for the integration libraries ((they all work with the new API, they just need to be distchecked)), for the bindings ((this will take some more time but they’ll be there)) and for Tidy ((will demo something tomorrow at my lightning talk around 14:30 if you’re at GUADEC)).

Odalisque

this GUADEC has been quite a ride, and we’re just halfway through.

gtk+: the gtk+ team meeting on tuesday went really well — and part of the discussion was incorporated in Kris always excellent State of the union talk. the team went over and over this issue since last GUADEC and during the hackfest, and even though something at some point will probably go wrong the plan is good and allows leeway to reduce the overall effort for moving the entire platform. I think that given the circumstances this is the best plan that can be realistically implemented.

gnome: everyone will be discussing the release team plan as well. I can only say: let’s do it!

clutter: the Clutter Guts talk went really smoothly; we tried to fill Matthew shoes — and had to be in three to do it — but I think people came out of the talk with more knowledge about the deep magic and the pixie fairies dust that power Clutter and make it as awesome as it is. as I said during the talk, Clutter 0.8 is really in the final stages now, and it’s going to be released as soon as we finish testing some of the backends. people will just have to wait a little bit, but by the time everyone gets back home from GUADEC they will be able to get the tarball from the server.

Constantinople

the song from the Decemberists, not the city

finally arrived at Istanbul with the rest of the OH gang. it has been quite a trip, with a massive delay at Heathrow caused by bad weather ((I know, I know: shocker)). we landed around 2am local time and went straight to the hotel. hopefully, I’ll be able to wake up at a reasonable time and not feel rubbish the whole day.

see you around. :-)

Shiny

Tweet!

courtesy of Ulisse Perusin, Tweet now has a rocking icon.

since 0.2 has been released, I’ve also added:

  • a status icon to show error messages and the number of new statuses inside a tooltip; when clicking on it, it will bring up the Tweet window and, more importantly, it will disappear until the next update.
  • key navigation, which required a new release of Clutter-GTK
  • better word wrapping and dimensioning of the cells in the ListView
  • open up the browser when clicking on the user’s icon in the status information overlay

there are still features I’d like to work on before 0.4.0, but all in all current HEAD of master looks fairly stable and useful. if everything goes according to plan, I’ll spin 0.4.0 before GUADEC, and 0.6.0 after I port Tweet to the new shiny Clutter 0.8 API.

Finally Woken

the first, alpha quality release of Tweet is available here.

Tweet 0.2.0

I’d like to stress out that this is an alpha quality release; I’ve been using it for a while, now, and nothing serious like the destruction of my hard drive happened but I cannot guarantee that it won’t happen to you. you’ve been warned.

from the new-and-shiny department:

  • use NetworkManager to detect a connection change
  • scroll wheel support
  • nice gradients on the speech bubble
  • more readable datetime stamps on each status
  • update the status view with just the new statuses instead of reloading everything

from the stuff-still-missing department:

  • an icon — can I have an icon? please, pretty please with sugar on top?
  • follow/unfollow users
  • direct messages
  • show a particular user
  • show followers and following
  • add a control to open a browser on the current status
  • show error messages instead of silently failing

and finally, from the would-be-nice department:

  • use Gypsy to update the location
  • exporting the status archive

if you want to give a hand, just clone the repository:

  git clone git://github.com/ebassi/tweet.git

and hack away! :-)

Apocalypse Please

if you need to create a string holding a datestamp, please — for the love of everything that’s holy and just and pure in this universe — stop abusing the patience of everyone on this planet, and use the ISO 8601 format.

formats not to use:

  • seconds from the epoch – oh please. I mean: come on ((okay, I’m guilty of this insanity as well, but I’m in the process of fixing it)).
  • HTTP date – which is defined in two RFCs but it still sucks for small things like sorting or, you know, non-human parsing.
  • ctime() output – now, give me a flipping break

and please, don’t even think that people can rely on strptime() if they want to parse your datestamps — because they might care about something called “timezone” ((a huge FAIL should be photoshopped on top of strptime(3) man page, right near the “Glibc Notes” section, where it says that in most cases the corresponding fields are parsed, but no field in tm is changed; WTF? what does in most cases mean? you have to tell me in which cases, you fscking idiot!)).

any reference to running web services and their utter lack of clue in this matter is purely coincidental. not.

this blog post should go in the overall discussion about how web services clearly showed me how the bar for writing them has been placed so low that not even “Eleven Inches” Hermes could limbo beneath it. if even a simple, clearly defined data exchange format like JSON has been abused that much ((and I’m looking at you, Tumblr)) then there’s really little hope for the rest of us that care about interoperability and third party application development.

Pogo Stick

apparently, some people — and I’m looking at you, Pippin — said that the Tweet repository is hard to find: you actually have to search in my blog.

well, not anymore: Tweet on GNOME Live

complete with a screenshot of the new UI, as suggested by Matthew Allum:

Tweet - Pogo style

Road to Somewhere

well, after eating my dog food for a while, it seems that Tweet is starting to get more useful.

first of all, now Tweet has an authentication dialog which allows you to enter your username and password the first time you run it:

Authentication/1

and even verify them beforehand:

Authentication/2
Authentication/3

then you get the list of statuses from the people you’re following:

Loading

you can scroll around using your mouse, and tap a row to get more informations about the status and the user:

Navigation

click on the screenshot…

as you can see, the UI is geared towards the touchscreen usage, but I plan to add key navigation soon.

still, there’s a lot to add: support for viewing your own statuses, direct messages, the list of people you’re following and the people following you — even the error messages are just printed to the console, even though I’m working on that.

the bits I’m most proud of:

  • the GTK+ integration: I’m retrieving the style information straight from the GtkWindow embedding the Clutter stage, and even if I had to fight with the utter mess that is the themeing code, I was able to gather enough to make Clutter play nice with a GTK+ environment ((in the screencast the scrollbar handle color, for instance, comes from the theme as well as the font));
  • the small animation API I implemented on top of the Clutter animation framework, requiring a single function (plus two completely generic classes) to tween an actor between two states; for instance:
    tweet_actor_animate (info, TWEET_LINEAR, 250,
                         "y", tweet_interval_new (G_TYPE_INT, y + padding, 100 + padding),
                         "height", tweet_interval_new (G_TYPE_INT, 10, (height - (100 * 2))),
                         "opacity", tweet_interval_new (G_TYPE_UCHAR, 0, 196),
                         NULL);
    

    this is the code that animates the status information actor that appears overlayed on top of the status view ((this kind of utility API is easy to achieve given the power and flexibility of the underlying framework — but it obviously limits what you can and cannot do, and if you ty to coerce it into being more generic you start losing bits and pieces and a simple API starts getting in your way instead of helping you; that’s why Clutter‘s animation framework might seem complicated at first: it’s trying very hard to allow you to build whatever animation you have in mind instead of limiting you)); I’d like to thank pippin for the idea about the API behaviour;

  • Twitter-GLib, the generic API for accessing Twitter throught its RESTful API, which thanks to LibSoup has been a breeze to write even in a clunky and not-at-all-web-two-point-oh-buzzword-compliant language like C;
  • the fact that Tweet is written in a very reusable manner (apart from the base scrollable list which comes from Tidy), with every piece neatly abstracted into its own class.
  • finally, the fact that after almost a year of basically working on libraries only I can still sit down and get an application from scratch to a usable state in a couple of weeks in my spare time — even if I have to write a library to get it done. :-)

by the way: is any artist out there interested in making an icon for Tweet? I really would like to avoid using Twitter’s own icon.

Some Things Come From Nothing

json-glib: 0.6 is out! please: download it, test it, use it. as far as I know, it has been packaged for Debian unstable, and has entered the NEW queue (kudos to Rob Bradford, esquire and fine gentleman).

debian: with the release of Hardy I decided to switch back to Debian after three years of Ubuntu. even though there are still some rough edges in Lenny, the support for laptops has definitely improved a lot and so I got back to my old love. starting from Gutsy, I found myself increasingly at odds with Ubuntu decisions and even though I upgraded my wife’s laptop to Hardy, I’m really glad I got back to Debian.

clutter/1: apparently, I’ll give a lightning talk about our reference toolkit for Clutter at this year’s GUADEC, in Istanbul. Øyvind proposed it for me because, regardless of being on the paper committee, I actually forgot the deadline for the CFPwhoops, maybe I shouldn’t have said that. :-) with the Tidy lightning talk and the Clutter guts talk given by Matthew, we decided for a high-level/low-level approach, instead of going for the usual this is teh Clutter, look at teh bling kind of talk. if you want to understand Clutter, Matthew’s talk is definitely where you want to be; as we all know:

Clutter = Clean and nice API + Performance + Portability + Integration = ♥

from my Clutter talk at FOSDEM

so, if you want to know how Clutter creates love, get to Istanbul this July. :-)

tweet: I started eating my own dogfood. Tweet is by no means complete or even guaranteed not to turn you into a goat and eat your breakfast — but now it works well enough for reading your own timeline and sending new statuses; and it doesn’t require trunk of anything any more, thanks to a Tidy transplant. I’m using Tweet as a way to see what kind of API is needed to properly integrate a Clutter canvas into a GTK+ application: colors, fonts, etc. if you want to try it out, contribute or just mock my insanity:

  git clone git://github.com/ebassi/tweet.git

clutter/2: we’re really close to a 0.7 release, which will mark the beginning of the slushy phase of the API; as far as documentation goes, we’re in pretty good shape already, at 93% for the Clutter namespace, and another 80% for the Cogl namespace. bindings will need to be updated — but the amount of new API is not that big, so it’s not going to be a long wait. I’m making a note here: huge success.