Planet Linux-to-go

May 12, 2008

Philip Van Hoof

Implementing your Vala interfaces in GObject/C

In Vala you can define interfaces just like in C# and Java. Interfaces imply that you can have class types that implement one or more such interfaces. Vala does not force you to implement its interfaces in Vala. You can also implement them in good-old GObject C.

Here’s a detailed example how you implement a type that implements two Vala interfaces in GObject/C:

by pvanhoof at May 12, 2008 01:57 PM

May 10, 2008

Marcin 'Hrw' Juszkiewicz

Links for 2008-05-09 [del.icio.us]

May 10, 2008 05:00 AM

May 09, 2008

Philip Van Hoof

Switching to multiple threads, with a non-thread-safe resource

Your application used to be single threaded and is consuming a resource that is not thread-safe. You’re splitting your application up into two or more threads. Both threads want to consume the non-thread-safe resource.

In this GNOME-Live item I explain how to use GThreadPool for this.

It’s a wiki so if you find any discrepancies in the sample and or text, just correct them. I’m subscribed so I’ll review it that way.

The GNOME-Live item is done in a similar way to the item about using asynchronous DBus bindings and the AsyncWorker item.

by pvanhoof at May 09, 2008 10:17 AM

May 08, 2008

Koen Kooi

Minor Oops


If you are in a hurry and want to insert a 3.5mm jack into the socket, take a bit of care. The jack I used had a long base and thick pull-protection, so it acted as a giant lever and pulled the ground pad right of the PCB :(
Luckily it was the ground pad, so I could connect it to the other sockets ground pad without much problems.

This is the 5th time this week I had to solder stuff (back) onto dev boards, but for once it was my own fault :)

by koen at May 08, 2008 04:14 PM

Close-up of a tulip through a pinhole


Close-up of a tulip through a pinhole. This wasn't cropped in post-processing, but it did require a lot of tweaking. Ilford Pan F+ isn't going into this camera any more, HP5+ or Neopan Acros is just so much easier to use

by koen at May 08, 2008 10:02 AM

May 07, 2008

Philip 'crofton' Balister

Travel Plans

I'll be in Ireland next attending the First Collaborative International Software-defined Radio Workshop.

We received a small grant from the National Science Foundation to cover our travel expenses for the workshop. Internally, the group working on the proposal called this the "Ireland Pub Crawl" project. In spite of this, we have a good program and it looks like it will be well attended.

Hopefully, I can get my Beagle Board running with a couple of simple SDR demonstrations and attract some people interested in using this board for SDR.

by Philip at May 07, 2008 04:52 PM

Confession

Yes, I play GTA IV. It is awesome.

by Philip at May 07, 2008 04:47 PM

Rolf 'Laibsch' Leggewie

Openembedded bug and task list

We are glad to have our bug tracker back and the database now fully under our control (with several people with root privileges for admin and backup).  I think that is a great opportunity to highlight some of the good information we have in there.

You see, there is a bug for everyone, don’t be shy ;-)

by Rolf at May 07, 2008 02:06 PM

Philip Van Hoof

On the act of subverting the British nation

A few days ago I made a completely correct analysis of how the Schuko standard for power sockets and plugs, used on the continent of Europe, is superior to the British BS1363 standard.

Today I noticed the fruits of our hard work of trying to convert the British people to the fine uses and traditions of the people who live on the European continent. I saw a carton “Gezeefde Tomaten / Purée de Tomates” at a supermarket in Durham UK.

Just like how politics in Belgium work we have started applying the principle of divide and conqueror: instead of using their native language English, we are now sending them products with dual language branding and descriptions. Just like in our own country. This introduces doubt about their English identity. To divide you first need to generate fear and doubt (Am I really English? I’m not Welsh either? Maybe I’m Dutch? Maybe French!! Wouh!). Then you conqueror them by telling them, with a soft voice:

No no, you are Europe.

Works great! Just make them believe those Belgian “Purée de Tomates or Gezeefde Tomaten” are good. Once they grasped that, tell them: “but the tomatoes and the brand itself (Valfrutta) actually comes from Italy”. That’ll completely confuse them! Then relax them by softly putting your hand on their forehead and say: you are European, don’t be afraid child.

ps. Dear people who don’t live in Europe: this post is sarcasm, irony, a joke.

by pvanhoof at May 07, 2008 01:18 PM

Rolf 'Laibsch' Leggewie

apt-get’able Openembedded

I heard there were rumours floating around that Openembedded was difficult to install and configure for first time users.  I never thought it was, but then again maybe I am not a first time user anymore.  At any rate, I think it cannot get easier than this: apt-get’able Openembedded for you!  Here are the easy steps:

  • “sudo echo deb http://oss.leggewie.org/oe/deb ./ >> /etc/apt/sources.list”
  • “sudo aptitude update”
  • “sudo aptitude install openembedded-sonkei”
  • “oe-setup-sonkei dev” or “oe-setup-sonkei stable”
  • “MACHINE=spitz bitbake nano”

The packages take care of installing the necessary dependencies for cross-compilation, pulling the OE data as well as regularly updating it.  Thus, from now on, all you need to do is call oe-setup-sonkei to initialize your OE environment, followed by bitbake’ing whatever package or image you want to create.  Pick from one of the packages to compile against the distribution of your choice.  You can install more than one or even all of those packages.  The packages should be fit to install on any computer with deb-based packages.  Let me know if you run into trouble.  BTW, I do use those packages myself for my work in Openembedded.

  • openembedded-sonkei (done)
  • openembedded-sharprom (done)
  • openembedded-angstrom (maybe)
  • openembedded-poky (todo)
  • openembedded-openmoko (todo)

This can be easily extended to other OE-derived embedded distributions.  The ones listed above are the ones I know about and which I think are relevant.  Let me know if you think there is one missing.

by Rolf at May 07, 2008 10:55 AM

Marcin 'Hrw' Juszkiewicz

May 06, 2008

Koen Kooi

Tulip Close-up


A 4x crop of a picture of tulips. The Adox CHS 25 ISO has way more resolution than the lens of the yashica can deliver, but it has a really nasty curl, which leads to newton rings :(

by koen at May 06, 2008 07:06 PM

Marcin 'Hrw' Juszkiewicz

Links for 2008-05-05 [del.icio.us]

  • The Hello World Collection
    This collection includes 366 Hello World programs in many more-or-less well known programming languages, plus 58 human languages.

May 06, 2008 05:00 AM

May 05, 2008

Michael 'Mickey' Lauer

Openmoko Framework Initiative

I have not been posting about my work for Openmoko for quite a while. There are multiple reasons for that, ask me privately if you want to know… Today though, I want to post about a high-priority project inside Openmoko, Inc. — the new framework and middleware initiative which me and some guys will be working on.

I have been talking privatly about this to people on conferences, but now it’s going to be an official project. It’s something we attempted to do when we started back in 2006, but for some reason, we did it the wrong way. We tried taking existing components to make them fulfill our usecases and to fit our needs, which in some cases turned out to be impossible. This time we’re moving the other way round. We will take our usecases as the goal and create the necessary infrastructure to make it happen. If — while we’re on the way — can integrate existing efforts, even better. If not, we will eventually see how to merge with existing efforts. The goal is to get things done — now!.

Basically all this is about two components, which are independent, but closely related.

  1. The framework.
  2. A bread-and-butter application.

The Framework

Openmoko 2008

The purpose here is:

  • Give people the infrastructure to create solid and exciting software products based on the Openmoko platform,
  • Support competing UIs while collaborating on developing services, and
  • Encourage framework users (e.g. application developers) to also contribute to the framework.

With this in mind, we define the following requirements:

  • Make it simple,
  • Concentrate on core services,
  • Be programming language agnostic,
  • Be UI toolkit agnostic, and
  • Try to reuse existing technologies as much as possible, but not at the cost of a bad API.

Our way to achieve this on a technical level is through dbus:

  • Chose dbus as the collaboration line. Below dbus, we can work together. Above dbus, we can differentiate.
  • Expose features through dbus APIs implemented by UI-agnostic and language-agnostic services (daemons).
  • Optimize for Openmoko devices, but support multiple architectures (OpenEZX, Xanadu, …) and purposes through plugin interfaces and suitable hardware abstraction mechanisms.
  • Be not afraid of reinventing the wheel for a wheel-barrow if all the existing wheels are made for sports cars. ;-)

The framework is not going to cover everything but the kitchen sink though, especially it’s not about:

  • Bootloader, Kernel, or System Init.
  • X-Window-System, Window Manager, UI Toolkits,
  • Application Launchers, Applications, or Fancy UIs.

The Bread-and-Butter application

Zhone

The framework initiative is related to developing an application that uses the framework to turn a Linux-phone into a usable feature phone. The main goals for this application are:

  • Make it simple,
  • Concentrate on core features,
  • Have a beautiful, efficient and consistent UI,
  • Be easily extensible through scripting, and
  • Show the power of the framework.

This application is developed in tandem with the framework, because when you write framework APIs, it’s important to have existing API consumers. Without API consumers, APIs are just specs, could be awkyard, or plainly unusable — that’s why this bread-and-butter application is of central importance to the framework project.

I’m looking forward to spend a lot of time on this project and I invite all of you to participate. Most of the discussions will happen on the Openmoko developers mailing list and the FreeSmartPhone standards list We already have achieved some important basics thanks to great contributions by the moko underground people that are grouped around the neo1973-germany.de site and the IRC channel #neo1973-germany. I’m also looking forward to great results from this years’ Openmoko Google Summer of Code.
As for the current status, we will update the wiki page OpenmokoFramework frequently and sent status updates once and then to the mailing lists.

Good speed!

by mickey at May 05, 2008 04:02 PM

Koen Kooi

USB networking gadget in high-speed mode

The beagleboard is able to use usb high-speed (480Mbit/s) on its client port. Iperf says the following:

[  4]  0.0- 5.0 sec  43.7 MBytes  8.74 MBytes/sec

While that's certainly not the advertised 480Mbit/s, but more like 70Mbit/s, it sure is nice :)

by koen at May 05, 2008 09:26 AM

May 04, 2008

Philip Van Hoof

God save the Queen

People living somewhere on the British Islands.

This is a device that produces static electricity

You plug a power plug in a power socket

I have marked on this image of the power plug where the static electricity gets delivered into the power socket

Let me clarify my point:

  • Washing machines produce static electricity
  • Walls and sockets don’t produce static electricity

Let me add another point that I’m trying to make here

  • The dangerous looking pin in European sockets is not dangerous at all

Also note that the Germans and the Dutch use sockets that don’t have the dangerous looking pin. Both types of sockets and both types of plugs are compatible with each other. European continental standardisation is very useful sometimes.

Let’s take a look at the European plug and the location where it delivers the static electricity to the wall socket.

Let’s now compare that with an actual photo of a British Island’s (Irish guys use it too) plug.

My adult male finger (I have very thick fingers compared to Tinne’s skinny fingers and Tinne has thick fingers compared to a small child’s fingers) fitted in the space. It was possible for me to fully touch the static electricity pin. The device was powered on so the two pins for delivering the actual electricity where completely connected.

Now let’s see some actual photos of the European plug in action. Decide for yourself.



The solution is to convert those crazy English, Irish, Northern Irish, Scotts and Welshman (boy, I do hope I didn’t forget anybody) to the European system :-)

by pvanhoof at May 04, 2008 10:45 AM

May 03, 2008

Cliff 'cbrake' Brake

Autotools quick reference

At some point, most Linux developers need to master Autotools. For most of us, this is a fairly painful process, but like any good tool, Autotools is extremely useful and well worth learning. For example, if your program is set up correctly using Autotools, it will cross compile with almost zero effort in OpenEmbedded, or with slight effort manually. Compare this to the tedious effort of manually referencing toolchain locations, cross toolchain library and header file locations, etc. Despite first impressions, Autotools will make your life easier. This article contains a collection of tips on how to do standard operations using Autotools.

May 03, 2008 11:39 AM

May 02, 2008

Philip Van Hoof

Dear English-only speaking audience

We receive messages like this quite frequently:

Please only post in English on planet gnome or at least make non-english posts contain english translations.

If you don’t wish that posts like this are syndicated, please have the planet gnome administrator (jdub) pull a certain tag from your blog.

Thanks for understanding.

Note that Jeff Waugh (maintainer of planet-gnome) has indicated several times that he wants planet-gnome to be a window into the world, work and lives of GNOME hackers and contributors (top-right of the site). That includes “lives”, not just “work”, and for that reason planet-gnome does not filter based on tags like “GNOME”.

This however means that you get to read the personal blogs of the people who are syndicated. Very often they asked specifically about the use of non-English languages and about the fact that content is not always going to be related to GNOME at all. Very often it has been pointed out that is precisely the very idea of planet-gnome.

This means that planet-gnome is meant to have posts in different languages, is meant to have posts that are not about GNOME at all. If that’s not comfortable for you, then please either read another website or install filters.

I’m not planning to change my personal blog because planet-gnome doesn’t use my categories. Although I agree with and like its policies, I didn’t decide them. Please don’t complain to the non-English speaking blog writers who are syndicated on planet-gnome.

by pvanhoof at May 02, 2008 10:25 AM

April 29, 2008

Holger 'zecke' Freyther

Looking back at Guademy

I have attended Guademy 2008 in the beautiful city of Valencia this year and presented a talk on WebKit and the Qt integration, produced some demos showing to embed QWidgets and QObjects into the QWebPage and how to interact with it, my other talk was a look at Qt 4.4. While preparing the slides I was in a constant wow mode. It is incredible what the Trolls added to Qt 4.4. It was probably a bit too much but it highlights what a team of excellent programmers can achieve when they focus on a common goal. Qt developers keep on rocking!

It was nice to catch up with some of my fellow KDE developers, see some GNOME developers, talk with local developers. I think events like the Guadec are really helpful, not only you can catch up with developers from your village, but also to see people from other villages and projects and discuss and get inspired. It inspired me to give KDE4 a try, fix some bugs, write a mail (which is still in the moderation queue) to kde-devel on KNumInput.

So whatever you want to develop Guademy into for the following years, make sure to keep it a place where people from the different desktop and non-desktop Opensource and Free Software projects can come together and talk to each other. There are things GNOME can learn from us, there are things we can learn and should learn from GNOME. I sincerly believe that whatever makes GNOME and KDE different we have more in common than what separates us.

So thanks a lot for organizing Guademy, your hospitality and see you next year.

PS: Because Jos asked, blogger.com works in the demo browser, this post is created with it.

by zecke at April 29, 2008 03:21 PM

April 28, 2008

Michael 'Mickey' Lauer

Bossa Conference Video

The guys from INdT posted the Bossa Conference promotional video for next year’s installment:

Yours truly can be found a couple of times… so — how many appearances do I have in this video? :D

by mickey at April 28, 2008 06:24 PM

April 27, 2008

Philip Van Hoof

In Bruges

In Bruges, the movie

Today I went to the movie In Bruges in Newcastle together with Tinne. It’s a funny movie about two assassins in Bruges, a tourism city in Belgium. Now that we are back at our place in Durham UK, I immediately wondered whether they are playing the movie in Belgian movie theaters too. Surprisingly they don’t. Sure they make fun of Belgians, Belgium and the “shit-hole Bruges” quite a lot. But hey, that doesn’t mean you can’t air the movie in our country! We can take a couple of yokes. Don’t worry!

It was a bit sad that they didn’t speak a single word of Flemish/Dutch in the movie. It’s not really normal for Flemish people to spontaneously and automatically reply in fluent English each time any guy asks something. Even the people screaming when a dude falls out of the sky at the end of the movie don’t use a single word of Dutch for the shouting. I’m quite sure you’d hear a “Wat is da joh??” or a “Godverdoemme! Wah valt er naa ut de lucht?! Nen Englander!” and then they’d probably go look at say something like: “ei mo, dien hee een geweer”. And they’d continue with a “goh ligge, die zen aant schieten na mekander!”.

Nothing like that in the movie. Just boring English speaking people doing English, like in every typical movie. They did get the bus company, De Lijn, right in the beginning of the movie. Also some romantic images from the city Bruges. That was about it, regretfully.

Anyway, me and Tinne had a few good laughs. Funny Belgians, etc etc.

DBusGlibBindings and AsyncWorker combined

I added a sample to the DBus page that I wrote this weekend. It uses AsyncWorker. I also made the now two samples actually compile. Although I have not really tested them, you can download them too now.

by pvanhoof at April 27, 2008 11:04 PM

Today

Summer of code 2008

I’m going to mentor three Summer of Code applications.

One of the Igalians who developed Modest and among many of his Tinymail contributions implemented the libcst implementation for handling certificates in Tinymail, José Dapena Paz, is going to mentor Zhang Shunchang’s application together with me.

Picking up what I left in 2005

I also just picked up AsyncWorker. I made it a little page and with the help of Tinne I improved its API documentation. Perhaps I will do a release someday (I never did, actually). Thing is that I hate the work involved with releasing. Especially since most of our development tools stink.

Note that my super fantastic lovely girlfriend, Tinne, has her own blog now. It contains a bunch of photos of our stay in Durham UK. In a few minutes, she just told me, she will put online a funny photo of me holding a fish bowl filled with cocktail.

by pvanhoof at April 27, 2008 01:22 PM

April 26, 2008

Philip Van Hoof

DBus using DBus.GLib.Async and dbus-binding-tool

While I was gathering some info about a DBus related task that I’m doing at this moment, I wrote down whatever I found about DBus’s glib bindings in tutorial format.

A few other people have done similar things in their blogs. This one explains how to use org.freedesktop.DBus.GLib.Async a little bit too.

If you find any mistakes in the document, it’s a wiki page so please just correct them.

by pvanhoof at April 26, 2008 04:34 PM

Rodrigo 'vivijim' Vivi

Bossa Conference ‘08 - Have you missed it?



Bossa Conference ‘08 was a great open source conference for mobile embedded platforms.

Have you missed it?

Will you miss it again next year?

See you there next year!

http://www.bossaconference.indt.org/

by rodrigo at April 26, 2008 12:05 AM

April 21, 2008

Richard 'RP' Purdie

Baskerville Hall

I spent my weekend at Baskerville Hall in South Wales which quite an impressive building, now a hotel and is where Conan Doyle wrote The Hound of the Baskervilles even if he set it in Dartmoor to confuse people. You can feel something of the book about the place.

As the pictures feel, it was mainly dark, wet and windy. I covered 762 miles on the 675 over the weekend and saw some lovely roads and scenery but sadly took few pictures due to the weather.

I was in good company with lots of friends there and the number wimping out and traveling by car was lower than expected!

The bad bit is the bike is now totally filthy and is going to take some cleaning. Its also developed some worrying squeaks. The new tyres coped admirably with the wet roads and my confidence in the wet on the bike has defintely improved.

On a technical note, I did take a GPS and the n800, wiring both into the bike battery for the first time. Unfortunately due to a cable mixup, the n800 didn’t charge and ran out of battery by the time I reached Wales. I hadn’t taken any paper maps but thankfully knew where I was going. Maybe next time I’ll finally get a working navigation system on there.

by Richard at April 21, 2008 09:30 AM

April 18, 2008

Philip Van Hoof

April 17, 2008

Philip Van Hoof

Koen Kooi

Beagleboard in the wild


Jason shipped me a beagleboard, which I'm currently trying to get linux-omap git to run on.

The dialtone example from gnuradio is working already :)

by koen at April 17, 2008 08:01 AM

April 15, 2008

Philip Van Hoof

TMut’s account management support, now documented

I noticed that more and more people from several specific cities are visiting Tinymail pages, and I know at least a few companies and organisations who are using Tinymail right now.

My personal opinion on development frameworks is that if they come without documentation, they are worth as much as vaporware.That’s why I started first, at an early stage, with writing the API documentation of Tinymail and then Tinymail’s trac, which holds a collection of examples and on top of the API documentation also explains most of its types and how to use them.

This was not sufficient. I wanted to write a test E-mail client to find the source of bugs in Modest. While I was doing that I decided that this test E-mail client was going to be documentation too. Documentation in the form of source code that itself required documentation.

I started TMut’s trac to deposit that documentation. Yesterday I mentioned that I implemented simple account management in TMut, today this is ~ finished. Here is the documentation about that source code.

New items:

Former items:

by pvanhoof at April 15, 2008 07:29 PM

Koen Kooi

Time travelling

From the DHL site:

RECEIVED AMSTERDAM Tue, March 13, 2008 16:00:00.0
ALERTED KL0670/11 DALLAS-FORT WORTH, TX UTRECHT Fri, Apr 11, 2008 00:19:00.0
ON HAND KL0670/11 DALLAS-FORT WORTH, TX Fri, Apr 11, 2008 00:05:00.0
PENDING / DALLAS-FORT WORTH, TX Fri, Apr 11, 2008 07:08:00.0
PICKUP DATE Thu, Apr 10, 2008 14:00:00.0

Yes, the package was received in Amsterdam roughly a month before it was posted in Texas. I should probably start mailing exams to myself so I know the questions before I take the tests ;)

by koen at April 15, 2008 11:24 AM

April 14, 2008

Philip Van Hoof

Unfinished account management in TMut

You guys remember TMut? It’s an E-mail client for small screens that uses Tinymail. It serves as an actual E-mail client, as some code that you can use to peek at while developing your E-mail client and as a piece of code where you can derive your stuff from (although TMut’s current build is not set up to build TMut’s classes into a library, you could easily do this and then subclass TMut’s high level components).

What makes TMut unusable for non-software developers is that it has no account management. You need to do that in for example GConf (depending on what implementation of TnyAccountStore your TMut uses).

At Modest we need to test Tinymail’s account management capabilities without executing all of the extra code involved in what Modest does whenever you manage its accounts. Therefore I started putting in place some code to have basic account management in TMut.

It’s, as usual with the things that I blog about, unfinished.

by pvanhoof at April 14, 2008 11:40 PM

Philip 'crofton' Balister

The cat is not helping

Sorry about the complete break down in blogging. Not much interesting to blog about. I really should say more about the FOSDEM trip, but that is old news. If I get somewhere with the Lyrtech Small Form Factor SDR board, I'll talk a little about that.

I like our cats more than I like most people, but at least people don't do this to me:

by Philip at April 14, 2008 04:56 PM

April 12, 2008

Koen Kooi

April 11, 2008

Florian Boor

fl0rian


Since OpenSync switched to CMake build system I had to get along with CMake in the Maemo SDK. I have to admit the fun was limited. In fact CMake has some advantages over autotools - most notably: It is much faster. One major drawback is that it is more complicated to use pkg-config with it.

I have never worked with CMake before, but OpenSync had some quite good examples how to check and support additional libraries. So I hacked cmake support for some basic Maemo components (libhildon, libosso) and Maemo-like Debian packages.

My cmake files can be found here:

http://www.kernelconcepts.de/~fuchs/maemo/

CMake itself is in the official extras-devel repository at maemo.org. Just add this line to your sources.list:
deb http://repository.maemo.org/extras-devel chinook free

The package is available for all other SDKs from the same location.

The DpkgDeb.cmake file is based on the updated DpkgDeb.cmake by Mehdi Rabah. The other ones are based on random files found in OpenSync SVN.

by Florian at April 11, 2008 10:29 PM

Rodrigo 'vivijim' Vivi

Arena at fisl 9

Imagine a big aquarium and inside it computer programmers, challenges and prizes instead of fishes. This is how the FISL Programming Arena looks like.

The Arena main objective is promoting a meeting between members in technology community for a contest based in technical skills considering individuals and groups. Is occurs before in remote phases and during the FISL 9.0. The location is a aquarium-room with restricted access in the middle of event center. Free software projects are chosen and used as a case of study for Arena.

So, this year INdT is helping to organize this contest and Nokia will give N95 and N800 as prizes for the winners.

Reference: http://fisl.softwarelivre.org/9.0/www/arena_en

The official announcement in Portuguese-br:


Instituto Nokia de Tecnologia promove desafios em parceria

com Forum Nokia na Arena de Programação do FISL 2008

Vencedores serão premiados com dispositivos Nokia N95 e Nokia N800. Forum Nokia fará palestra para orientar desenvolvedores que queiram contribuir com projetos da empresa

São Paulo, 10 de abril de 2008 - O Instituto Nokia de Tecnologia (INdT) participará, pela primeira vez, do Festival Internacional de Software Livre (fisl), que terá sua nona edição entre 17 e 19 de abril, em Porto Alegre. O instituto, em parceria com o Forum Nokia, comunidade on-line com mais de três milhões de desenvolvedores cadastrados, promoverá desafios na Arena de Programação do evento e premiará os vencedores com aparelhos Nokia N95 e Internet Tablets Nokia N800.

Os desafios consistem em disputas que levam em conta habilidades técnicas de programação e desenvolvimento. As competições, realizadas individualmente e em grupo, serão vinculadas a projetos open source para plataformas móveis.

Serão duas fases: qualifying e insanifying. No qualifying, tarefas mais simples ajudam os times a se familiarizarem com a linguagem Python para o sistema operacional Symbian S60 e com a API (Interface de Programação de Aplicativos) da plataforma. Aqueles com os melhores resultados passam para a etapa seguinte, quando usarão parte do conhecimento adquirido durante o qualifying. O resultado será uma contribuição para um projeto de software livre com o qual os participantes poderão continuar colaborando mesmo após o fisl.

Daniel Rocha, gerente do Forum Nokia no Brasil, apresentará, durante o fisl, a palestra “Nokia - iniciativas e projetos open source para smartphones”. Ele irá mostrar as últimas iniciativas da Nokia no mundo open source, como Python for S60, Open C, Maemo, Mobile Web Server e outros projetos em andamento. A intenção é orientar os desenvolvedores sobre como participar destes projetos, portar código open source para os smartphones S60 e como contribuir com os projetos de código aberto da empresa.

Além de participar da arena, o INdT estará no evento também com o objetivo de identificar potenciais candidatos a trabalhar no instituto. “Sabemos que o fisl reúne os melhores profissionais da área de software livre, foco das pesquisas de nossa unidade em Recife. A atmosfera de competição é uma oportunidade de avaliarmos a capacidade dos participantes para possíveis vagas que se abram no INdT”, afirma Vanessa Nalesso, gerente de RH do INdT.

Vanessa explica que a idéia principal é formar um banco de currículos o que não significa que haverá contratações imediatas. “Na área de open source, o INdT oferece a melhor estrutura para que o pesquisador alcance o máximo de desempenho, desde máquinas, softwares e treinamentos, até a participação em congressos relacionados aos temas com os quais trabalhamos”, completa ela.

Sobre o INdT

Fundado em 2002, o INdT é uma instituição independente e sem fins lucrativos comprometida com a realização de pesquisa e desenvolvimento de tecnologias em comunicação móvel no Brasil. Além do

desenvolvimento de aplicações inovadoras, está entre os objetivos do instituto promover as oportunidades que a mobilidade tem a oferecer para os desenvolvedores.

O Instituto possui centros de pesquisa estabelecidos em Manaus, Brasília e Recife, e executa projetos em áreas de conhecimento distintas: Software Livre e Código Aberto, Desenvolvimento de Soluções Futuras em software, multimídia e telecomunicações,  processos de manufatura, pesquisa de propriedades mecânicas e componentes eletrônicos de dispositivos móveis.

Sobre o Forum Nokia

O Forum Nokia é uma comunidade on-line global voltada para desenvolvedores de aplicativos móveis, que fornece ampla variedade de ferramentas para criação, informações técnicas e documentos de suporte. Criado em 1995, o Fórum Nokia tem atualmente mais de 3 milhões de desenvolvedores cadastrados. O endereço do Fórum Nokia na web é http://forum.nokia.com. Para os brasileiros uma novidade é o Forum Nokia Wiki em português - http://wiki.forum.nokia.com/index.php/Portal:_Portuguese. Neste espaço colaborativo os cadastrados podem incluir desde artigos sobre programação até dúvidas (e suas soluções).

Informações para Imprensa

LVBA Comunicação - www.lvba.com.br - 11 3039.0660

Théo Filipe - theo.filipe@lvba.com.br - 11 8714.0669

Comunicação INdT

Beto Campainha  - beto.campainha@indt.org.br - 92 8114.1299

by rodrigo at April 11, 2008 09:22 PM

Nils Faerber

Linux Foundation Collaboration Meeting 2008

This was nice!

Three days of meetings at the J.J.Pickle Research Center of IBM at Austin, Texas USA.
A lot of groups of the Linux ecosystem met, some kernel guys, desktop guys, Linux printing folks, power management interested and also a complete track of Linux on mobile devices.

With almost every meeting and presentation mobile Linux was at least mentioned once. This is quite amazing!

read more

by nils at April 11, 2008 12:36 AM

April 08, 2008

Philipp 'pH5' Zabel

For my own future reference: How to quickly turn the neo1973 into a USB sound card, courtesy of avahi and pulseaudio:

ssh root@fic-gta01.local
ipkg install pulseaudio-module-zeroconf-publish
echo "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16" >> /etc/pulse/session
echo "load-module module-zeroconf-publish" >> /etc/pulse/session
/etc/init.d/pulseaudio restart


Now the padevchooser applet on the Desktop lists "output on fic-gta01" as audio sink. I really should stop ripping out my laptop's headphone jacks.

by pH5 at April 08, 2008 10:13 PM

Philip Van Hoof

Iterators and tree models! Shocking!

Iterators

Now that Murray has posted about the iterators idea I can no longer hide.

Together with Jürg, the Vala man and Murray, who before becoming a pregnant guy was and still is coding on things like Glom and gtkmm, I’ve been writing up a document. This document explains iterators like the ones you’ll find in .NET and Java.

This is related to the Iterators concept because the document about iterators could be part of a solution for this.

I once had to write a custom GtkTreeModel (I think I still suffer from vertigo) and therefore I sent treeview Kris an analysis about this.

There’s a rule that an interface should be a contract for solving exactly one problem.

Use interfaces to say “What objects can do” or “What can be done to an object”. You can let a class implement multiple interfaces. There’s absolutely no need to make huge interfaces. An interface should define that your class “Does One Thing”. Another interface defines that your class “Does Another Thing, too”, and a last interface defines that your class “Also Does This”. My class Z can do D, E and F. Therefore: class Z implements D, E and F.

Instead, the contract being GtkTreeModel requires you to solve five problems:

  • being iterable: you can go to the next node
  • being a container: you can add and remove things from it
  • being observable: it notifies a component about its changes
  • being a tree: sometimes items can parent other items
  • having columns: it’s something that describes columns

Summarizing: interface TreeModel means BEING a D, E, F, G and H at the same time. Correct would be if you specified that TreeView requires a model that does D, does E and perhaps also does F. In case treeview is showing the things as a tree, it requires that the model also does E and does H.

GtkTreeModel should have been five different interfaces.

Shocking! But in my opinion, true.

The consequence is that having to implement a GtkTreeModel has become a difficult task.

“You have to implement solutions for all five problems anyway!”, you might think. That’s true. However! If there were five interfaces, other people would have made default solutions for four other interfaces. Meanwhile “you” focus on “your” specialization. For example Rhythmbox and Banshee are specialized in huge models that contain a specific set of data that must be searchable. Preferably search and sort are done by a database instead of a model-filter.

Banshee and Rhythmbox developers:

  • … don’t have to care about the Columns problem
  • … don’t have to care at all about the Tree problem
  • … don’t have to care about the Container problem: they never need to add nor remove things from it because they set up their model instantly by passing a query to a data source. Maybe the feature “remove from playlist” requires solving the Container problem?
  • … unless they support inotify on the MP3 folder of the disk, they don’t even have to care about the observer problem

Yet with GtkTreeModel you have put the burden on application developers to solve all five the problems in their model. No wonder Banshee developers decide to code their own TreeView in .NET!

by pvanhoof at April 08, 2008 04:58 PM

April 07, 2008

Philip Van Hoof

Durham, a beautiful city

Since last week I’m staying in Durham together with Tinne for the next two months.

Tinne went to Durham last month because she’s doing her work placement. University college students in Belgium have to do three months of work placement in order to graduate. Tinne studies languages, so it was especially interesting to do her work placement in another country.

For me it doesn’t matter where I do my job, so I decided to join her in Durham city. We made some pictures to make you guys jealous.

Cathedral, taken from Framwellgate Bridge

I kinda wonder why we organized Guadec 2007 in Birmingham, given that Durham is such a beautiful city.

by pvanhoof at April 07, 2008 09:43 PM

April 04, 2008

Holger 'zecke' Freyther

Slowly getting frustrated with Qtopia

So I have been working on this Qtopia integration. Being a good Free Software citizen I report the issues (most of the time with patches) upstream. Because I don't like non public tasks and prefer discussions on patches I had to decide to use the qtopia-interest mailinglist (note the increased volume since february). The amount of feedback, even on obvious issues is kind of low, admitingly disappointing. I understand creating a generic framework which is easy to customize for very different kind of devices is very hard. But this is what Trolltech decided to do with Qtopia, so I ask for advice how I can achieve my customisation as it is currently not possible, the feedback is zero, none, nada. This is something that engineers, creators of frameworks should love to discuss, use cases, approaches to API... no interest at all from Trolltechs side.


But where the frustration starts is copy and paste. Their approach to platform integration is, copy an existing platform, sed -i s/THEIR_NAME/YOUR_NAME/g, hack on it until it is working, copy code from the Qtopia libraries and change one line, add device specific code to the core Qtopia libraries, have five copies of yuv blending code (unaccelerated, bytewise..., we had to call the ambulance for raster...). So I have had to fix bugs/asserts/crashes on copy and pasted code where someone fixed the original code in qmodemsiminfo.cpp but forgot to update all places where they copy and pasted the whole class to. In this case certain modems send different responses when no simcard is inserted, a perfect example for abstraction (removal of copy and paste, fix without copy and paste).


With C and C++ you have languages where you can change/extend the behavior of so called "objects" (coming from Object Orientated Programming) with something called "subclassing". You do not need to copy the sourcecode to achieve that.

With Linux we have gained generic input systems (started in 2.4, really used in 2.6), sysfs (2.6) and I'm specially proud that a couple of device classes (battery, backlight, led...) originated from our handhelds community and found their way into mainline. So instead of writing one class for one battery, you can create one class that is going to work for every battery, with a stable userspace interface. When raster saw that, he read the battery class specification and implemented it. And it doesn't look like Qtopia will gain support for these 'classes' of devices anytime soon, instead you, as an integrator, have to manually parse your special device, no help is coming.


When doing hardware development, you don't follow the waterfall model. You create hardware, write drivers, work on GUI stuff, have iterations on everything (new hardware, new kernel, new GUI). The kernel gets better suspend resume handling, the initialisation order of drivers change. The input device numbering in userspace change as well (/dev/input/eventX). Because the kernel developers knew that these numbers in userspace will be random, they added ioctl's to get the vendor id, product id, version and name. So sane code would have a class/factory where you create an input device handler for a given Vendor and Product ID, or name of the device (e.g. "Neo1973 keyboard"), I would hide this behind a nice API where you only have to deal with the actual handling of keyboard data. Qtopia's approach to this is... Right, Copy and Paste and using hardcoded device numbers. So in the neo case you have four copies of this code, they don't include linux/input.h but duplicate the struct and use magic numbers instead of the defines..


You have to rush, you do mistakes, you do stupid things and this is kind of acceptable but what really frustrates me is that they justify their behavior. They justify copy and pasting the same code to four places (and changing the class name) as a way to avoid bloat (which the abstraction would add) and that hardcoding the random device number is the right thing to do and that finding the right device is bloat and not needed.

So dear people can someone explain me where the world of someone who has grown up in the Free Software world, started to program here, getting review and comments, creating patches, polishing them, reworking them due feedback is disjunct with the world of copy and paste. As a buddhist I know that my world is not better than their world, only different. So please can some one help me to understand how their world is different, how I could understand them, how one can help them to recognize that copy and paste and layering violations create more problems than they solve?

by zecke at April 04, 2008 02:47 AM

April 03, 2008

Philip Van Hoof

Almost very happy

After being jealous about my girlfriend’s Fusion install on her cute MacOS X, I’m almost happy with VMWare 6.5 beta 1. As you can see on this screenshot, it for example played tricks on each Window that I touched. In the gnome-panel, they all start blinking and don’t stop blinking any more.

Moving Microsoft’s Word window to my second screen was not a very good idea because after I did that, I was unable to move the window any longer. The Window also got a piece of guest-OS desktop-background at the left (of about 150 pixels) and was itself shifted to the right within the window that Unity seems to create for it in X11.

Moving the notepad window over Microsoft’s Word window made Microsoft’s word window stop being redrawn until I activated it. I had to “paint” the Window or changing a piece of text or selecting text to get it back in shape.

Given that Tinne’s Fusion’s Unity feature does actually work perfect, I guess I’m still going to be quite jealous for a few more months. Until, I guess, people like ChipX86 fix all this kind of problems in the beta.

But, it sure looks promising. Cool. etc etc. Sadly is the beta version being ran in debugging mode. Therefore my machine becomes dog slow as soon as I start using VMWare. I hope I can still downgrade to my old VMWare Workstation, because the VMWare tools upgrade has been installing quite a lot of new drivers in the guest Windows OS. Lucky me I have made myself a snapshot before all this.

Proposing to make a snapshot is perhaps something VMWare Workstation could ask its users if it notices that a beta is being started? Just an idea, of course.

by pvanhoof at April 03, 2008 03:35 PM

April 02, 2008

Florian Boor

fl0rian


I have made an installable package for Maemo Sync, but do not expect too much. Its a basic port of the current Multisync-gui to Maemo. It is only tested to so far that the GUI starts up and registeres correctly. The fact that I had to use cmake for building Maemo software caused some headaches here… the quality of the source distribution package is still quite bad.

I also did not decide if I want it to become a project forked from Multisync-gui or to maintained with Multisync-gui adding optional support for Maemo environment. The always changing OpenSync API would be a reason to stay with Multisync-gui, but the fact that I have different opinions about UI design, Glade is involved and cmake are reasons for making it a separate project.

Binary package and sources are located here. You also need the OpenSync packages from Graham’s daily repository.

Another minor improvement of the GPE application packages in this repository is that latest Starling supports OGG playback. You only need to have an OGG plugin for GStreamer installed. The mogg package provides this for example.

Any feedback is welcome - if you manage to sync data with either the command line tool msynctool or using Maemo Sync please drop me a line. I would like to collect information which sync peers work with latest OpenSync and how to set up these.

Enjoy!

by Florian at April 02, 2008 04:14 PM

Cliff 'cbrake' Brake

The Linux kernel container_of macro

The Linux kernel contains a very useful macro named container_of that is used extensively in back-casting a data structure to its containing data structure. This article includes a simple program that illustrates how this macro is used, and explains why it is so useful.

April 02, 2008 11:15 AM

Graeme 'XorA' Gregory

Stuff

Its weird sometime you just look at something and its so terrible you just don't know whether to laugh or cry.


by xora at April 02, 2008 08:57 AM

April 01, 2008

Florian Boor

LinuxTag


LinuxTag 2008 will be great for people interested in mobile and embedded Linux. I do not know about all the projects that will have a booth there, but GPE, GPE Phone Edition, QuantumSTEP and OpenEmbedded will be there at least. The application for a booth for these projects was accepted some days ago.

LinuxTag

LinuxTag is one of the largest and most interesting Open Source events in Europe. It is known to be a great forum for meeting all sorts of people interested in Open Source - LinuxTag attracts developers, business people and users in equal measure. It will take place in Berlin from May 28th till May 31st

A big thanks to the LinuxTag people and the booth sponsors for the opportunity to show what we are doing.

For OpenEmbedded event planning we have a wiki page that can be found here.

by Florian at April 01, 2008 08:41 PM

March 28, 2008

Florian Boor

Logo


Some weeks ago the USPTO rejected the GPE trademark again - finally!

This is great news for the GPE project which really suffered from this situation. The latest entries in the ‘prosecution history’ look nice:

2008-02-27 - Notification Of Final Refusal Emailed
2008-02-27 - Final refusal e-mailed
2008-02-27 - Final Refusal Written

The complete attempt by Mr. France to register GPE as his personal trademark is publicly available at the USPTO website. Some background information can be found in this article. The handhelds.org website still claims several trademarks, but the related project become more and more obsolete. The hh.o bootloader is used for ancient hardware only or replaced by U-Boot and ipkg gets replaced by the much better maintained OPKG. Its a little bit sad that the Opie projects are not that active any more though…

Logo

by Florian at March 28, 2008 04:11 PM

March 27, 2008

Florian Boor

Diploma


I made some progress porting the multisync-gui to Maemo. The idea is to offer an easy to use graphical user interface for synchronizing data between the Maemo based tablets and other devices. The OpenSync framework that is used offers several plugins for interfacing data sources already. The most interesting ones are the two SyncML ones (HTTP server and client) and the GPE plugin we can use for the PIM applications on the Maemo device.

Sync GUI

Currently it is far from beeing useful, but there are some windows to make screenshots now :-) The first thing I want to archieve is to be able to sync PIM data from a Series60 cellphone.

Speaking about Series60 - I received my Forum Nokia Champion diploma today which came with a great target device for syncing experiments :) Many thanks to Nokia for this nice reward and for the great Forum Nokia Champion program and to Nils who suggested me for it!

Diploma

by Florian at March 27, 2008 11:06 PM

March 26, 2008

Philip Van Hoof

March 25, 2008

Philip Van Hoof

RE: More sect madness: euthanasia

Philip, ik geloof eerder dat er een theepot tussen de Aarde en Mars zweeft dan dat er een God is. Op de koop toe geloof ik dat ik een zeer gedetailleerde machine van enorm veel replicatoren ben. In dat opzicht ben ik in mijn filosofische en wetenschappelijk-denkende manier een atheïst in hart, nieren en vooral in mijn hersenen. Hoewel Richard Dawkins er veruit betere analyses over heeft weten te maken dan ik, ben ik ervan overtuigd dat ik er net zo als hem over kan nadenken.

Ga er dus maar met veel overtuiging van uit dat ik werkelijk een atheïst ben en dat de religie voor het vormen van mijn mening geen basis heeft gehad.

Wanneer kardinaal Danneels opmerkt dat Euthanasie geen heldendaad is, zal hij daar heus religieuze ideeën over hebben. Maar waarom jij daar zo nodig een antireligieuze tirade over moet beginnen begrijp ik niet helemaal.

In België, zoals in vele andere streken, heeft de religie voor veel van onze medemensen een troostend doel. Veel mensen lijden, en voor veel mensen is hun geloof in wat dan ook een troost. Daarmee krijgt iemand als Danneels, als religieus leider van een bepaald geloof in ons land, het recht van me om zich over lijden uit te spreken. Hij zal er immers mensen die vandaag lijden en die troost zoeken in hun geloof mee aanspreken. Dat is zijn taak in onze maatschappij, en ik gun hem die taak van harte. Vergeet niet, ik ben nog steeds een atheïst. Er wijzigt ook helemaal niets of ik hem dat nu gun of niet. Filosofisch, politiek, rechtvaardig en wetenschappelijk is er voor mij niets mis met mijn standpunt.

Wanneer Danneels zich uitspreekt over dat iemand als Hugo Claus geen held is omdat hij euthanasie pleegt, dan lees ik dat als volgt:

Beste mensen die lijden en die opkijken naar de kunst die Hugo maakte: de zin van jullie lijden is gerelateerd noch aan jullie ontzag voor zijn kunst noch aan zijn keuze om euthanasie te plegen noch aan eender wat. De zin van jullie lijden is die zin die jullie eraan geven, niet de (on)zin een ander aan zijn lijden gaf.

Misschien dat hij “God” plaatst daar waar ik “eender wat” plaatste. In dat geval verschillen hij en ik van mening op dat punt. Voor mij is dat prima, trouwens. Nog geen reden voor mij om een antireligieuze tirade te beginnen.

Mensen die lijden worden inderdaad meer en meer gezien als overbodig in onze maatschappij. Alsof “lijden” synoniem is voor “storen”. Alsof wanneer je lijdt, dat je dan maar beter in een put kruipt of naar de bergen trekt om te sterven (er zijn trouwens landen waar dit gebruikelijk is of was voor te oude mensen). Zodat je niemand van de gezonde mensen ten last bent.

Lijden heeft een voorbeeld functie. Al was het om andere mensen die ook lijden mee te geven dat ze niet alleen staan in hun leed. Daar is niets onzinnig aan. Los daarvan staat de keuze van een man, zoals of niet zoals Hugo Claus, om toch een eind te maken aan het leven. Wat de media heeft gedaan is die keuze als een heldendaad omschrijven. Dat is fout, vind ook ik. Opmerken dat dit niet juist is, is voor mensen die geloven helemaal toegeschreven aan iemand als Danneels. Je antireligieuze tirade slaat dus nergens op.

De heldendaad van Hugo Claus is zijn kunst, zijn gedreven passie, niet zijn zogenaamde grootsheid om voor zichzelf een keuze te maken. Het is net zo groots van een ander met gelijkaardig leed om dat lijden om te zetten in wat dan ook. Bijvoorbeeld in energie om mensen die nog harder lijden te ondersteunen. Nochtans doet dat er niet toe voor de keuze van Hugo. Die keuze is ook geen anti-heldendaad. Ze is, vind ik, neutraal.

De media aandacht zelf viel nog mee, vond ik. Deze reactie gaat dan ook vooral over jouw opmerkingen over Danneels.

De mens is een fantastisch flexibel beest dat mits de juiste psychologie enorme lasten kan dragen, enorm verlies kan verwerken en enorm leed kan verdragen. Er is niets verkeerd aan mensen die dat willen meemaken, die hun pijn willen voelen en die ermee willen leren omgaan.

Dat voor veel mensen daar de religie een hulpmiddel voor is, daarvan vindt deze atheïst dat dit deel uitmaakt van de vrijheid van filosofie, van het denken, van het zijn.

Dat afdoen als sprookjesverhalen is jouw visie erop. Ik geloof er ook niet in (maarja, en dan?). Letterlijk vragen dat een organisatie wegblijft uit de maatschappij, zoals jij hebt gedaan, is een actieve poging deze vrijheid te beperken voor anderen.

Daar ga ik niet mee akkoord. Atheïst tegenover atheïst.

ps. Je opmerking over inquisitie, exorcisme, heksen verbrandingen doe ik af als irrelevant in deze discussie. Intellectueel laf ze erbij te halen, vind ik.

by pvanhoof at March 25, 2008 01:13 PM

March 24, 2008

Philip Van Hoof

Reference counting

There’s nothing wrong with adding a reference to the GObjects that you’ll pass to a deferred call.

For example (also read GdkLock, for the gdk_threads_enter thing):

static gboolean
callback (gpointer user_data) {
  GObject *instance = user_data;
  gdk_threads_enter ();
  /* work with instance and don’t worry */
  gdk_threads_leave ();
  return FALSE;
}

static void
MyMethod (GObject *instance) {
  g_timeout_add_full (G_PRIORITY_DEFAULT, 5*1000,
		callback, g_object_ref (instance),
		(GDestroyNotify) g_object_unref);
}

Don’t do this:

static gboolean
callback (gpointer user_data) {
  GObject *instance = user_data;
  /* work with instance AND worry */
  return FALSE;
}

static void
MyMethod (GObject *instance) {
  g_timeout_add_full (G_PRIORITY_DEFAULT, 5*1000,
		callback, instance, NULL);
}

The problem is that most applications have multiple contexts. Either are those contexts threads or multiple code-paths for ‘instance’ to become finalized. For example D-Bus handlers, threads (yes, some people use them) or callbacks caused by GtkWidgets. Your timeout’s callback depends on that ‘instance’, therefore it’s required that you add a reference. Just like how a garbage collected higher language would add a reference to make sure that the instance wont be garbage collected during ‘callback’.

When I look at a lot of GLib/Gtk+ consuming code, I conclude that some people seem to be afraid of g_object_ref. Some people seem to believe that overuse of it creates memory leaks. The reality is much more simple: one misuse of it, causes a memory leak. Using it when required, doesn’t. Just be careful for cyclic references: an instance ‘A’ that references another instance ‘B’, that itself references ‘A’. Sometimes there is a type in between ‘A’ and ‘B’, like a container type. Use weak references for those situations in stead. Do use references when they are required, though.

In the example above nothing guarantees you that callback wont be interrupted. Nothing even guarantees you that callback will be started with a valid instance in its user_data. I have seen people putting G_IS_OBJECT checks at the top of their callback implementation. This is wrong and doesn’t really make it any better. Right after that runtime check your callback can get interrupted and you can again find the instance becoming finalized while using it in ‘callback’. By adding a reference, you are sure about the reference that you added. You are also sure that g_timeout_add_full will make sure that the GDestroyNotify will eventually execute. So you are sure that the g_object_ref is not causing any reference leak.

Also note that code like this is fine, indeed. Sure the two g_object_ref calls are atomic increments and therefore a little bit slower than avoiding one of the two. But it’s consistent. When a new developer reads that code he’ll immediately recognize that my_thing_get_instance returns a reference. It’s my opinion that readability is more important than a micro optimization hack.

static gboolean
callback (gpointer user_data) {
  GObject *instance = user_data;
  gdk_threads_enter ();
  /* work with instance and don’t worry */
  gdk_threads_leave ();
  return FALSE;
}

static void
MyMethod (void) {
  GObject *instance = my_thing_get_instance ();
  …
  g_timeout_add_full (G_PRIORITY_DEFAULT, 5*1000,
		callback, g_object_ref (instance),
		(GDestroyNotify) g_object_unref);
  …
  g_object_unref (instance);
}

by pvanhoof at March 24, 2008 05:07 PM

March 23, 2008

Michael 'Mickey' Lauer

Last day in Brazil

Sitting in the business center of the Beach Class Suites hotel trying to fix some strange bugs in ecore-native. In a couple of hours I’m leaving to the airport, travelling back to Frankfurt, Germany. This week in Brazil has been an amazing experience, especially the friendly guys at the INdT. There’s a spirit of freedom and creativity hanging over the whole installation and it’s not surprising at all that the results just rock. One of the key elements of successful software products is the communication between designers and developers — and they got this one completely right.

The Mamona team worked on an own branch of OpenEmbedded for quite a while now and we had a lot of diffs to go through. We started with merging EFL and Python since these are also important for Openmoko. We now have granted Vivi commit access and Aloisio will be on board soon as well maintaining some of the recipes upstream at org.openembedded.dev. By that we reduce further divergence and improve collaboration.

Although we did work most of the time, we also had the chance to hang around a bit together in the after hours, watching soccer, playing table-tennis, table-soccer, pool, etc. We even spent a couple of hours playing guitar and singing along — that was real fun. Thanks a lot guys, I really felt welcome! And yes, I’m trying to come back later this year, preferably when it gets cold and windy in Germany ;)

by mickey at March 23, 2008 05:23 PM

Philip 'crofton' Balister

Gumstix mounting solution

Mt friend Hasan's PHD project is the build a flexible RF front end for public safety radio's. In the US (and I suspect many other countries) public safety radios operate on a diverse set of frequencies. This creates problem for people trying to design radios that can operate of the range of services using these frequencies.

Hasan is working on a RF front to solve some of these problems. As part of this work he is build a demonstration unit that operates on several different frequencies. There are several parts of the radio that need configuration information via a SPI interface. He is using a gumstix computer to do the control and user interface.

Here is an overall picture of the unit. Since it is based on evaluation boards, it seems kind of large for a handheld unit. I'm certain that professionals could create a compact unit based on his work.


Here is a photo of the gumstis mounted on the front plate and the LCD touchscreen panel used to change the operating frequency.
Finally, a side view to give you an idea of how the gumstix is attached. He used a threaded rod to stack the gumstix boards and attach them to the plexiglass.

by Philip at March 23, 2008 09:56 AM

March 20, 2008

Philip Van Hoof

RE: EDS and Memory

Federico, I’m not going to make yet another long and technical blog post about this, because it’s rather obvious how it works. But you can make a db-cursor or a cursor-like API for a query that is solved at the service and kept in a session.

My opinion is also that 484 bytes actually is a lot of memory per item. Wrap that in a proxy instance and lazy load the proxy, and you reduce that to an actual average of 50 bytes per item. It wouldn’t even matter if when parsed the size exploded. Only the items that are needed right now would be exploded in memory, in stead of all items (which is now the case). You could even cache the strings that are needed to render an overview of the items in the proxy, and avoid creating the real this way. This would give you a solution that could scale to 100,000 items (although that’s probably stupid to render in a view, sure).

Note that for this proxy concept, you don’t even need a cursor-like API. Just an API to fetch one real item, and a way to fetch just the minimal info for your proxies, so that they know how to fetch their real.

About the structures that tend to explode in size when you parse them: is the library using GStringChunk to store all the tiny little strings? Else I kinda know already where all that heap-admin is going to. It’s a lot, if you measure it. That’s because all of them are stored in parsed structures, right? Each mini string needs four bytes for the pointer, at least four bytes for heap admin, etc. I can also imagine that this data contains a lot of duplicate strings, perhaps take a look at how camel_pstring_add works? If GStringChunk is sufficient, then go with that, of course.

Or, even more simple:

If you’d replace all \n characters with \0 characters in the original VCard string, you could also just make them point to an offset in the original buffer. Note sure about line wrapping and whether the format could support this easily (not my field of expertise).

Also note that the prevailing model for E-mail might be that you display a usually huge linear list of messages, but that the market is increasingly demanding a search-based model. Especially for mobiles with small screens.

Clarification:

  • A proxy here is an instance that has the same interface as the actual thing. To fulfill that interface it might have to get a real first, and then proxy the command to the real. A proxy usually only contains the things that are necessary to fetch a real from the service. It can also contain extra data (I call this a micro cache) so that it can avoid having to fetch the real for common strings. For example strings that are displayed in an overview screen. A proxy must be small.
  • A real is an instance with (all its) data fetched from the service. Perhaps not pixbuf image data if in this case the card contains image data. Perhaps you want to lazy load that data, in the real, too. A real can be really, really large.

by pvanhoof at March 20, 2008 11:46 AM

March 19, 2008

Philip Van Hoof

Nonetheless, there’s something I don’t like about the architecture of Evolution Data Server.

What I don’t like about it, is that it more or less requires each client of the service to keep a local copy of the calendar or contact data in its own memory. At least all the data that matched the search query. This data is not really small per item. In fact, it’s quite large. It never really surprised me a lot that both the calendar component of Evolution’s shell AND the Evolution Data Server consume quite a lot of memory.

This is a little bit silly if you think about it. You also give the reason why yourself, Ross: it’s a local daemon. Does it really make sense to have a copy of the item in each client if the daemon that already contains a copy is guaranteed to be local and therefore really quickly accessible?

Does it really make a lot of sense if you have a mobile device with a lot of applications that want to tightly integrate with calendaring and contact information? Your messenger, your E-mail client, your TODO-list app, your desktop searcher, your menu probably too will all be duplicating this data in their local address space.

What I would want is to have a cursor-like API (like a database cursor). We all know that certain people have been warning us about the extraordinary insanely unimaginably huge roundtrip cost of D-BUS and that therefore this is absolutely definitely not a good idea. My opinion is that this black and white point of view on that is quite … wrong.

I remember you being enthusiastic about Polymer, so I’ll use your favourite E-mail client as an example:

Mulberry and Polymer use that incredibly complicated IPC over for example GPRS. GPRS, a network with roundtrips measured in whole seconds. Let me illustrate: sending the query and waiting for its answer sometimes takes a longer time than you standing up from your chair, running around your chair quickly and going back to sitting.

Now that’s a real roundtrip!

Nonetheless are E-mail clients like Mulberry and Polymer using a concept that is similar to a db-cursor. The reason why they don’t suffer from a lot of roundtrip problems, is because they made sure that their queries are returning a carefully measured amount of items. On top of that will Polymer pipeline the queries (not sure about Mulberry’s pipelining).

Nonetheless is the concept very similar if not equal to cursor based data access: You get a finger that points to your current location (I usually call that, my iterator). Around that pointer you fetch the things that you need “right now”. For example the things that are visible, indeed. Each time you scroll you do a few iterator.Next(), iterator.Next(), iterator.Next() and you render what you just got. With GtkTreeModel you can actually do this. If you have a local daemon and definitely if on top of that you fetch a small amount of items in a group, per each roundtrip, and do some micro caching, this will be fast enough. Just make a proxy and let your proxy instances keep the real for a few seconds, before disposing it. Let the tree model hint the proxies in the unref_node about disposing the real.

Net result: only the visible ones and the cached ones will be in the memory of the client.

This indeed means doing the sorting at the service. Therefore keeping a session at the service, too. You can actually integrate this cursor-over-IPC with a cursor on the SQLLite table, if you’d write a database backend. Your database engine just needs to support multiple cursors.

Net result: only the visible ones and the cached ones will be in the memory of the client, and the service will be using a cursor too. Which has a memory usage similar to mmap (only data that you are using right now, is actually loaded). Usually are these database engines really good at making sure that you still get the data really fast.

ps. It’s less important to update the clients in case of events, if at the service the cursor is updated. The next scroll event will do new “Next(), Next(), next()”’s, and those will be updated already. You can of course still provide a “I’ll call you” mechanism to make the view update itself even faster.

Woah, this is probably going to unleash some sort of huge flamewar. Let’s try to keep it polite if you make replies in the comments, okay?

by pvanhoof at March 19, 2008 06:23 PM

Cliff 'cbrake' Brake

Should you be using monotonic timers?

In a previous article (http://bec-systems.com/web/content/view/78/9/ (content/view/78/9/) ), I covered some of the basics of Linux timers. Any time you are doing any type of fixed time delay in a program, you should really be using monotonic times, so the delay will not be affected by system time changes. In an effort to save cost, some embedded systems today do not have a battery backed up RTC, and instead get the time via GPS, NTP servers,