OCaml Meeting in Grenoble

February 4, 2009

Today I went to the Ocaml Meeting in Grenoble.

It began in the morning, but I was busy with some of my usual student-poking (several variables calculus hurts).

The first talk was David Teller, about “OCaml Batteries Included”, which seem to have gone a long way towards being both working and useful — though it doesn’t look 100% there yet. The previous sentence is a bit too pessimistic and cold : I’m pretty excited by what was explained, and it definitely looks very promising.

The second talk was Christophe Troestler about “Delimited overloading”, which may surprise some people, especially those who are used to writing “a + b” and not give it a second thought : in ocaml, you have to know “1 + 2” is a sum of integers, but the sum of two floats will be like “1.0 +. 2.0” (+ for integers, +. for floats). This can be pretty tedious sometimes so one of the goals of the project is to provide syntactic sugar — and more (things like automatically rewriting simply-written linear computations in an optimized and probably unreadable way).

Then Richard Jones made an impromptu talk about cross-compilation of ocaml programs for win32 on fedora, with NSIS installer. I would be interested to see what it gives on chimera projects (code mixing several languages).

After a short break, Sylvain Le Gall presented “OCaml as fast as C!”, which presented tips and tricks on having a good performance. It began with very general organization tricks, then went with more specific advices based on a recent work.

The last talk was Christophe Raffali on “Parsing technology for OCaml : from stream matching to dypgen”. He began with some simple BNF work (with the usual calculator example, explaining the different tools strengths and weaknesses. I must admit that at one point, he said “a reasonable C++ parser” — probably joking — but the shock of hearing those words together left me bewildered. He ended with an experience in parsing french grammar using dypgen… and impressive and a little crazy undertaking (if you wanted to somehow compare natural languages to computer languages, french would probably be like perl).

I had to go at the end of the last talk (unfortunately missing the spare-time-let’s-discuss part), since I had promised my wife I wouldn’t come home late. Of course, I didn’t find where I was supposed to take the bus at once and ended up coming home late anyway…

Cognitive clash

January 21, 2009

There is a guy coming to my children’s school getting his ow children, and who regularly wears a white sweater with the following words in red on his chest : “CAN ADA” (with the zipper materializing the space).

Of course, since I know what ada is, I always smile largely at him.

Now, if I could figure out what the big red maple leaf on his back means! 😉

Gstreamer and webkit

January 18, 2009

Since the 5th january of this new year, gstreamer’s app plugin and library have moved from the list of “bad” plugins to the list of “base” plugins! For those who have no clue what this app plugin is about : it allows interfacing a gstreamer pipeline with another framework.

This is of no interest if you’re writing a new program : you should just use gstreamer : it’s great framework — fully threaded, but sanely hiding that fact (leaky abstractions suck… especially when one leaks the threadedness and forces threads, locks, mutexes on the rest!). If you have existing code, and you would like to add some gstreamer plumbing here and there, app is what you need!

I have begun reworking gstreamer support in ekiga : video input seems to work quite good, audio input seems to need some tweaking… and I’m stuck with audio output, where I even get crashes… hopefully some discussion with the gstreamer gurus will settle the issue too.

Aside from that, I have looked at webkit recently, and found the documentation… well, a little thin! I was interested in displaying an in-memory document, and wondered what I could do with the javascript to trigger things back in the application. I haven’t a clear view of what I want, which explains why I’ve had trouble finding serious documentation.

When I saw that post, I dived into the list of “affected” programs, and went “ooohhh!!!” because ekiga was in the list.

I played the grep game in the sources, quickly found a few places where the problem applied and patched… then stumbled on a place where the fix was half-in. Why half? Because there was a #if GLIB_CHECK_VERSION(2,14,0) … #else … #endif ! After the first moment of surprise (gaping mouth), I jumped into configure.ac and saw that indeed we only require glib version 2.8.0. Ha!

I modified every applicable place to use g_timeout_add_seconds only if the right glib version is available even though I really don’t like #if code : consider the problem fixed for ekiga!

So there are a few things to know about this problem :

  • one can’t just patch like this because maybe the maintainers still support an older glib : either the dep has to stay lower and #if/#else/#endif should be used, or the expected version should be raised ;
  • even if grep says there’s a problem in a program, it may just be seeing the #else part of a #if GLIB_CHECK_VERSION part : there are false positives!

Thanks to Ted for the heads up!

Some programs just don’t seem to be as widely known as they should. One of them is pretty dear to me, as I’m contributing to it : ekiga. Even among gnomers, most people don’t know about it, never used it… and are sometimes surprised it isn’t named gnomemeeting anymore!

Here is an article about “Three free tools for teleconferencing with a ‘virtual presence'” (where the ‘free’ is as-in-cheap not as-in-libre), which should help ekiga get a little more mindshare.

Dodji is my hero!

November 12, 2008

I was craving for a way to automate a debugging session, and searching on the net only showed recent experiments for python-gdb — nothing useful yet.

As usual, I turned to #gnomefr to see if someone already knew a solution. Dodji was there and pointed me to nemiver — but not nemiver-the-standalone-gui-program : nemiver-the-lib!

Indeed, nemiver is cleanly organized as a base lib on top of which lives a gtkmm application : it is possible to write a program to automate a specific debugging session, leaving the gui aside. That isn’t 100% as simple as “scripting”, but it’s close enough!

The specific bug is still alive as I write those lines, but I feel much more powerful debugging-wise since I know I have nemiver-the-lib to turn to in case of problems!

Thanks Dodji!

Read this blog post on C++0x and cry with me.

This is how things work!

October 11, 2008

What things am I talking (writing?) about?

First, of open source software : Howard Chu of openLDAP fame stumbled on ekiga and found its LDAP support too bad for his taste (to my defense I would say it didn’t work that bad with ekiga.net which itself isn’t a real LDAP 😉 ). So what do you think he did? He reported the problem. And how did he do it? He checked for already existing reports — and found them. And then? Well, then he provided nice patches, asked for help on the source organization, made better patches, got them included… and now we’re ironing out the few problems with the new improved code.

Second, since almost all LDAP clients are broken, ekiga’s LDAP code is now a good example of correct code, which others should study.

I can’t help to be sad that ekiga only came after that many softwares on the list of things he tried : it’s been around and working since years! Let me repeat : gnome has had working VoIP since years!

PS: I hadn’t blogged since long… the site has been updated and the preview just opens a blank page : I hope the layout will still look good.

3.0 is coming near!

September 10, 2008

Today I closed the biggest bugs on my TODO for 3.00 : those about the avahi support. I needed some input from the avahi developpers to make things work, but now all is ok.

If things go well, we’ll be in time for the next gnome release — but notice that just five minutes after my last post, Matthias was finding big problems and postponing was considered… beta testing can find problems, after all.

It seems we won’t miss another gnome release, and be able to push out ekiga 3.00 out! Of course, there are a few problems to fix yet, some features which won’t make it, but the biggest are there already : it would be a shame if there were none to add in subsequent versions…

Unrelated topic : I’m a little worried that Dodji already complains having a kid makes spare time contributions hard : eh, it’s just *one* *baby* : it spends most of its days and night sleeping! [Of course, the fact that it does it on a fast cry-sleep rhythm is pretty exhausting, but still] Congrats to both parents!