We're now 2.5 months in 2012 and I'm indeed getting closer of my first
big goal of the year : the 80km run of Paris Ecotrail.
The race takes place next Saturday, March 24th, with a start at 12:00
in the South-West of Paris area (close to our place). The race is
mostly a trail race in woods and forests in the neighbourhood of
Paris, going up and down in our small hills and valleys, passing along
pools and lakes and indeed showing the natural beauties we have less
than 20km away from center Paris.
The race ends at the Eiffel Tower. And they really mean it! The race
ends at Eiffel Tower's *first floor* after climbing the steps
there. Those of you who have been there can imagine the surprise of
tourists from all over the world when hundreds of "road warriors"
wearing water backpacks, head lamps and looking a bit tired come and
climb the Old Lady's stairs.
So, in case you happen to be touring in Paris on the week-end of March 24-25, just
pop up at Eiffel Tower around 10-11pm (yes, at night) and try to spot
a bubulle crawling up there to reach the finish line..:-)
To prepare this, I already ran 538km in 2012, mostly done either with
my daily commute runs...or with week-end long runs (up to 37km on
march 4th, and many others above 20km).
I ran two half-marathons as well: one in February, where I nearly
broke my record, finishing it in 1h37'45" even though this is a quite
though race with two hills. I was very in shape that day and was lucky
to run with a friend setting the pace for me, which helps a
lot. Another half-marathon last Sunday in Rambouillet was also a good
race, though I was secretly hoping to break my record there (the race
is flat, much more than the former one). I had however to slow down
from a 4'35"/km pace to 4'50"/km in order to preserve my
condition. And, finally, I completed the race in 1h39'53".
So, two half-marathons in less than 1h40 again. That sounds promising
for the Ecotrail (even if there nothing similar between a flat half-marathon
and a hilly ultra-trail) and also for the next marathon, in June.
I'll keep you posted about the Ecotrail race but I can announce in
advance that I'll be using the Runtastic app on my brand new Android
phone, and people will be able to follow my race live here. And
you'll even be able to cheer at /me..:-)
Next running update on Sunday 25th to give you the outcome....
Continuing at same pace (one release every two days), I can announce Weblate 0.7. The major change is built in full text search and displaying of context for currently translated message (either based on location in po file or by string similarity based on full text data).
Full list of changes for 0.7:
demo account using demo password or register your own user.
Weblate is now also being used https://l10n.cihar.com/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.
Filed under: English Weblate 0 comments Flattr this!
So, since Wednesday, we have no more teenagers among our children.
Indeed, our youngest, Magali, turned 20 and we happily celebrated that
in a japanese restaurant in Paris : Magali is living in a (very) small
flat in Paris as she attends preparation courses for exams meant to
enter physical therapist schools. She's currently working very hard to
prepare these and is left with only one week before the first exam.
We're 100% confident that she'll succeed.
Really, the days where our little shrimp was crawling across her bed,
turning clockwise and finally sleeping in the width of the bed....do
not seem so far. And still, these folks we call "our kids" are now
grown-up persons living their own lives : Jean-Baptiste (some of my
friends reading this blog have met him at DebConf 10) will soon enter
profesionnal life after graduating an engineering school in
electronics, at 24. Sophie, now 22, will resume her social worker
school in Bordeaux in September and will probably start working as
social worker ("assistante sociale", in French) afterwards. And we
hope that our little shrimp (which her sister calls "mini-poop")
starts a physical therapist school next year.
So, well, more and more, Elisabeth and I are old parents and weeks
where we're indeed both alone at home are now common (not to mention
weeks where only one of us is alone either because she has
professionnal commitments on some other side of the planet or I have
some free software event on another side of the planet).
It is indeed really likely that this year's holidays will be the first
ones where we have a distant travel...which we'll be doing alone.
Holidays in Nicaragua (you probably guess why Nicaragua) are much
awaited and will be enjoyed a lot, but still...:-)
So, well, to all those of you who read this and are parents, or plan
to become parents, be happy. The wonder that it is lasts for years and
it's very hard to describe precisely the link that connects parents
and their children. At least the one we have with our children, which
both us and them are proud of. And that pride and this link have no
price. I really wish you guys to develop the same with your newborns
(particularly those of you who very very very recently became parents
anbd, yes I mean you who know who you are...).
In spite (or: because?) of these technical issues, I meet a few local
people from Sarajevo and from all parts of Europe. So the train trip proved
to be nice and entertaining, and I learned a bit about government issues
there.
Along the tracks, the signals were non-functional. The trains were directed
only by flags (and hand-lights) from personal. On entering any station the train
had to slow down till I got shown the relevant flag or hand-light that allowed
it to leave the station again. Another heritage from the last war.
With due delay, the train arrived in Sarajevo. Due to missing information
at the tram stop, I didn't know that the trams to the train station didn't run
that late (but I had the information that there would be trams if the train
was on time). As it was late, I shortcut that by taking a taxi to the
hotel (if I were to arrive in Sarajevo again, I would walk one tram
station to the main line - but well, travelling is also about experiences).
Unplanned that evening was also the Sarajevo film festival, with one stage
opposite of the hotel window. As this was almost closing down when I
arrived in Sarajevo, nothing to worry but to enjoy.
Some time ago I wrote about the status of Qt-based libs for using the serial port. Some days later I was pointed to the QtSerialPort project. The good news on this is that this is a project aimed to enter into Qt 5.
One of the earliest features I wrote for the Debian bug tracking
system (Debbugs) after joining the team was support for forcibly
merging bugs. Originally, merging two bugs required that the bugs be
in exactly the same state before merging them; forcemerge removed
this requirement.
Unfortunately, the way I originally implemented this was shortsighted,
and merely forced the merge partners to have the same values as the
merge master. This meant that owners, blocking bugs, and many other
things were silently changed, which meant that people weren't notified
of changes, and bugs could end up in an inconsistent state.
A while ago, I decided to fix this by calculating the changes required
to actually merge the bugs, making those changes, and then merging the
bugs normally; thus, doing everything that a maintainer would normally
have done for them. This necessitated abstracting out the entire
control apparatus into the Debbugs::Control module.
Now that it's complete, you can do the following:
> forcemerge 1 2
Bug #1 [foo] new title
Bug #2 Done: foo@bugs.something [foo] foo
Unset bug forwarded-to-address
Severity set to 'wishlist' from 'grave'
3 was blocked by: 2
3 was not blocking any bugs.
Removed blocking bug(s) of 3: 2
2 was blocked by: 4
2 was not blocking any bugs.
Removed blocking bug(s) of 2: 4
Bug reopened
Removed annotation that bug was owned by bar@baz.com.
Removed indication that 2 affects bleargh
Removed tag(s) unreproducible and moreinfo.
Merged 1 2
> thanks
Stopping processing here.
and bug 2 now is merged with 1 and matches the state of 1.
[The above is the control output from the appropriate bit of the 06_mail_handling.t test.]
This change also means that I'll be able to finally write support for
control@ operations at submit@ time. Also, all of the bug
modifications that happen at submit@ or nnn@ time (setting title,
found, etc.) will be implemented as calls to Debbugs::Control so we
can eventually keep a postgresql database updated in addition to the
flatfile database.
I've been experimenting with a new packaging tool/workflow based on
marking certain commits on my integration branch for export as quilt
patches. In this post I'll walk though converting the package nauty to
this workflow.
% echo ':debpatch: upstream..master' > debian/source/git-patches
% git add debian/source/git-patches && git commit -m'add control file for gitpkg quilt export'
% git config gitpkg.deb-export-hook /usr/share/gitpkg/hooks/quilt-patches-deb-export-hook
This says that all commits reachable from master but not from
upstream should be checked for possible export as quilt patches. % git archive --prefix=nauty/ build (cd /tmp ; tar xvf -)
More conventional git-buildpackage style packaging would not need this step.% git am /tmp/nauty/debian/patches/feature/shlib.diff
% git debpatch +export HEAD
git debpatch list outputs the following
afb2c20 feature/shlib
Export: true
makefile.in 241 +++++++++++++++++++++++++++++++++--------------------------
1 files changed, 136 insertions(+), 105 deletions(-)
The first line is the subject line of the patch, followed by any
notes from debpatch (in this case, just 'Export: true'), followed
by a diffstat. If more patches were marked, this would be repeated
for each one.
In this case I notice subject line is kindof cryptic and decide to amend.
git commit --amend
git debpatch list still shows the same thing, which highlights a
fundemental aspect of git notes: they attach to commits. And I just
made a new commit, so
git debpatch -export afb2c20
git debpatch +export HEAD
git debpatch list looks ok, so we try git debpatch export as
a dry run. In debian/patches we have
0001-makefile.in-Support-building-a-shared-library-and-st.patch
series
That looks good. Now we are not going to commit this, since one of
our overall goal is to avoid commiting patches.
To clean up the export, rm -rf debian/patchesgitpkg master exports a source package, and because I enabled the
appropriate hook, I have the following
% tar tvf ../deb-packages/nauty/nauty_2.4r2-1.debian.tar.gz grep debian/patches
drwxr-xr-x 0/0 0 2012-03-13 23:08 debian/patches/
-rw-r--r-- 0/0 143 2012-03-13 23:08 debian/patches/series
-rw-r--r-- 0/0 14399 2012-03-13 23:08 debian/patches/0001-makefile.in-Support-building-a-shared-library-and-st.patch
Note that these patches are exported straight from git.git push
git debpatch push
During the last week, I created ghc-heap-view, a library to investigate the actual memory representation of Haskell values. It is inspired by vacuum and the GHCi debugger, but goes beyond them by allowing the user to look inside thunks and functions and see what other values they refer to. Let me demonstrate it by running the included demo:
ghc-heap-view-demo
Here are a four different lists, where the first three are already evaluated.> l = [1,2,3]and is now found at 0x00000000006d1750/2 (where the /2 is the pointer tag information) and fully evaluated:
ConsClosure info = StgInfoTable ptrs = 2, nptrs = 0, tipe = CONSTR_STATIC, srtlen = 1 ,
ptrArgs = [0x00000000006d16e0/1,0x00000000006d1730/2],
dataArgs = [], descr = "ghc-prim:GHC.Types.:"
The second one, l2, is locally defined
> let l2 = 4:land now found at 0x00007fdce19fe4b0/2. See how the cons-cell references l!
ConsClosure info = StgInfoTable ptrs = 2, nptrs = 0, tipe = CONSTR_2_0, srtlen = 1 ,
ptrArgs = [0x00000000006dca50/1,0x00000000006d1750/2],
dataArgs = [],
descr = "ghc-prim:GHC.Types.:"
And the binding
> args <- map length fmap getArgsevaluates to the one , global empty list at 0x00000000006db640/1:
ConsClosure info = StgInfoTable ptrs = 0, nptrs = 0, tipe = CONSTR_NOCAF_STATIC, srtlen = 0 ,
ptrArgs = [],
dataArgs = [],
descr = "ghc-prim:GHC.Types.[]"
And now we have, at 0x00007fdce19fe4c8, the concatenation of them, but unevaluated:
> let x = l ++ l2 ++ argsThe thunk keeps a reference to l2 and args, but not l, as that is at a static address, unless you are running this in GHCi:
ThunkClosure info = StgInfoTable ptrs = 2, nptrs = 0, tipe = THUNK_2_0, srtlen = 1 ,
ptrArgs = [0x00007fdce19fe4b0/2,0x00000000006db640/1],
dataArgs = []
Now to some more closure types. m and m' locally bound of type the unboxed type Int#, with values 42 resp. 23.
> let f = \x n -> take (I# m + I# x) n ++ args t = f m' l2So here is (0x00007fdce1937d50/2), referencing its free variables args and 42:
FunClosure info = StgInfoTable ptrs = 1, nptrs = 1, tipe = FUN_1_1, srtlen = 65553 ,
ptrArgs = [0x00000000006db640/1],
dataArgs = [42]
And t is a thunk that applies f (also referenced here) to an unboxed value (23) and l2:
ThunkClosure info = StgInfoTable ptrs = 2, nptrs = 1, tipe = THUNK, srtlen = 0 ,
ptrArgs = [0x00007fdce19fe4b0/2,0x00007fdce1937d50/2],
dataArgs = [23]
Lastly, here is the standard example for self reference:
> let x = id (:) () xThis is what x (0x00007fdce1947940) looks like, at least without -O:
ThunkClosure info = StgInfoTable ptrs = 0, nptrs = 0, tipe = THUNK, srtlen = 1 ,
ptrArgs = [],
dataArgs = []
So it is unevaluated. Let us evaluate it using seq. Now we have, still at 0x00007fdce1947940:
IndClosure info = StgInfoTable ptrs = 1, nptrs = 0, tipe = BLACKHOLE, srtlen = 0 ,
indirectee = 0x00007fdce194cc98/2
The thunk was replaced by an indirection. If we look at the target, 0x00007fdce194cc98/2, we see that it is a newly created cons-cell referencing the original location of x:
ConsClosure info = StgInfoTable ptrs = 2, nptrs = 0, tipe = CONSTR_2_0, srtlen = 1 ,
ptrArgs = [0x00000000006db620/1,0x00007fdce1947940],
dataArgs = [],
descr = "ghc-prim:GHC.Types.:"
After running the garbage collector (performGC), we find that the address of x is now 0x00007fdce19f30d0/2 and that the self-reference is without indirections:
ConsClosure info = StgInfoTable ptrs = 2, nptrs = 0, tipe = CONSTR_2_0, srtlen = 1 ,
ptrArgs = [0x00000000006db620/1,0x00007fdce19f30d0/2],
dataArgs = [],
descr = "ghc-prim:GHC.Types.:"
Future plans
The output of ghc-heap-view is not really pretty yet; even the indentation in this blog post was added manually by me, so this really needs a pretty printer providing a nicer, possibly more compact representation, including something like what vacuum provides. Maybe vacuum can be ported to use this library, and also include the thunk s and function s references in the output. Maybe also the GHCi debugger can be extended to show more information about unevaluated expressions using this. Internally, the library is not very polished yet either. It only handles those closures types that I have seen so far, and is likely to break horribly if run in a threaded or debugging enabled runtime.
How it works
Obviously, this is not standard Haskell 98 code, but rather deep trickery involving the GHC API and some C code. Initially I tried to use the API that vacuum and the GHCi debugger rely on, which is an operation
unpackClosure# :: a -> (# Addr#, Array# b, ByteArray# #)which takes any Haskell value and returns the address to its info table, the pointers and the non-pointer-data in the closure. Unfortunately, it was not complete in that it was meant only for data closures and will for other closure types, e.g. thunks, return no data and no pointers (as can be seen in the code). So I implemented my own version of this operation:
foreign import prim "slurpClosurezh" slurpClosure# :: Any -> (# Addr#, ByteArray#, Array# b #)where the returned ByteArray# contains the complete closure, including extra information fields such as the arity of a function. The Array# is again the list of pointers in the closure. At first glance, this is a duplication, as the pointers are of course also contained in the ByteArray#. But as soon as the GHC runtime reigns again, a garbage collector run can happen, the referenced values will move somewhere else, and the words that once were pointers in the ByteArray# become useless. But the corresponding entries in the Array# are updated by the garbage collector, as it knows that these are pointers, and not just words. This way, we get both a faithful copy of the closure on the heap and useful references to the contained data. Here is a demonstration of this effect:
$ ghci -XMagicHash -package ghc-heap-view GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. [..] Loading package ghc-7.4.1 ... linking ... done. Loading package ghc-heap-view-0.1 ... linking ... done. Prelude> let a = [1,2,3,4]; b = 5:a Prelude> :m + GHC.HeapView Prelude GHC.HeapView> rawHeapData <- getClosureRaw b Prelude GHC.HeapView> rawHeapData (0x000000004080d658,[1082185320,140040739366568,140040739365928],[0x00007f5dc68626a8,0x00007f5dc6862428]) Prelude GHC.HeapView> System.Mem.performGC Prelude GHC.HeapView> rawHeapData (0x000000004080d658,[1082185320,140040739366568,140040739365928],[0x00007f5dc41b3ad8,0x00007f5dc41b3b28])The function rawHeapData is a thin wrapper around slurpClosure# which turns the primitive array in normal lists. Note that the second component of the triple is unchanged, but the third is updated by the garbage collector. Of course this means that the Show instance for the data type that ghc-heap-view uses to reference values is not referential transparent either. The foreign function import above is of type prim , i.e. does not call a C function but rather a Cmm function. Cmm is a reduced C that GHC uses internally to compile the Haskell code to, and most primitive operations are implemented in this language although I do quickly call regular C from my Cmm code to do the more complicated stuff, mainly figuring out what words of the closure are pointers. The knowledgeable reader might notice that I am passing a boxed value of type Any to the foreign function. This is currently not possible with foreign prim functions, and to actually use that code, you need the patch in GHC ticket #5931. But you can use ghc-heap-view without that as well (and the Cabal package will by default use that path), using the following hack to obtain the pointer to a Haskell value on the Heap as an unboxed type that can pass to the primitive operation:
foreign import prim "slurpClosurezh" slurpClosure'# :: Word# -> (# Addr#, ByteArray#, Array# b #) data Ptr' a = Ptr' a aToWord# :: Any -> Word# aToWord# a = case Ptr' a of mb@(Ptr' _) -> case unsafeCoerce# mb :: Word of W# addr -> addr slurpClosure# :: Any -> (# Addr#, ByteArray#, Array# b #) slurpClosure# a = slurpClosure'# (aToWord# a)This works because a Word and a Ptr' have the same closure layout, only differing in the fact that one stores an a, and the other stores a Word#. Once we obtained the raw representation of the closure, we do the parsing in Haskell. Using the info table and the raw closure, we have enough information to tell which words have to be replaced by the appropriate pointer (which might already have been updated by the garbage collector) in the pointers list. This work was supported by a scholarship from the Deutsche Telekom Stiftung.
Just as I promised yesterday, I pushed a new git repo with my fork of the tool I used to migrate my old Mephisto blog to this new WordPress one.
I forked because the tool have not worked the first time. First of all, I was missing uuidtools gem, and to install it would be a pain inside the jail system I used to run my blog. Too much trouble just to get a UUID we can get by other means so I just added an environment variable UUIDGEN anyone can use to point to a tool to do the job. I know this have performance implications, but I am not talking about 10-thousand entries
Then, I found out that, for some odd reason I still have to understand, WordPress was cutting my articles everytime it read a character. I could study the subject, but I just added a #gsub in mephisto-to-wxr code and moved on. I was about to remove it from the repo, but I left it there since it could help other people. Also, since there might be other similar occurrences, leaving it there serves as a heads up.
Also, I added support for Categories and Tags to mephisto-to-wxr, that seemed to be limitedly accepted (I translated Mephisto Sections into WordPress Categories).
All other activities were just clean-up. That tool generated a .WXR with all the articles and comments from my Mephisto blog. Everything I had to do was import it using WordPress import tool.
Justin TV is a streaming service that uses the broken flash concept in order to allow you to view channels.
Unfortunately it's the only source of Arabic movies, series and shows.
I wrote a GStreamer source that retrieves the channel information and uses libRTMP to connect to the Justin streaming server. The rest is handled by GStreamer ;-)
If you want to watch http://www.justin.tv/ammartv for example, you simply do
gst-launch-0.10 playbin uri=jtv://ammartvThe 2nd plugin is a Totem plugin that indirectly utilizes the GStreamer source.
Given a language code (ar or en or ...), it will download the list of channels in that language and shows them in Totem's side panel. One can then easily double click on a channel and simply watch it. I originally wanted to do the Totem plugin in python but the inability to do asynchronous callback based HTTP requests prevented me :-(
Be warned that the code is of course a bit buggy and needs a lot of cleanups, it's been years since I coded anything in Gtk and that Justin might find out and either block the source somehow or even change the protocol but let's wait until that happens ;-) read more
For a while now the git repository used for packaging WebKitGTK+ has been broken. Broken as in nobody was able to clone it. In addition to that, the packaging workflow had been changing over time, from a track-upstream-git/patches applied one to a import-orig-only/patches-not-applied one.
After spending some more time trying to unbreak the repository for the third time I decided it might be a good time for a clean up. I created a new repository, imported all upstream versions for series 1.2.x (which is in squeeze), 1.6.x (unstable), and 1.7.x (experimental). I also imported packaging-related commis for those versions using git format-patch and black magic.
One of the good things about doing this move, and which should make hacking the WebKitGTK+ debian package more pleasant and accessible can be seen here:
kov@goiaba ~/s/debian-webkit> du -sh webkit/.git webkit.old/.git
27M webkit/.git
1.6G webkit.old/.git
If you care about the old repository, it s on git.webkit.org still, named old-webkit.git. Enjoy!
Around two years ago, the OECD presented a study on residential bandwitdth available per country that triggered quite a bit of debate all over the world I have seen at least criticism to it in Mexico, in the USA and in Australia. It's very easy to take a simplified view of a statistic and bitch on how sorry the state of our country is. In our case, the outcry was that Mexico was the lowest of all of the OECD countries, and I have seen this repeated on so many topics that it what surprises me is that people keep getting surprised at it! OECD does not represent the 200 countries in this world (only the top 30, and the meaning of "top" is not unambiguous).
I found this graph that helps me illustrate this point:
| Attachment | Size |
|---|---|
| Residential Internet speed comparison per country (2010) | 397.15 KB |
| Measured and advertised download speeds (in kbps) | 252.86 KB |
I have just bought our plane tickets to Managua, so I can finally say this:
Yes, many of you will ask what happened, I was bragging everywhere I wanted to go by land, driving from Mexico City to Managua. I'd love to, and I'm sure it's completely doable... But we have family issues to attend on July 21, in Argentina. So we will have a beautiful flight schedule (and carbon footprint) for this July:
Next.