Gunnar Wolf: cat STDERR rot13
Cannot help but laugh and share.I've been triaging and trying to reproduce some oldish bugs on pkg-perl's packages. Some bugs are no longer there, some have to be forwarded upstream, and so on. Usual tasks, yes.
Until I stumbled with #406227. I just have to laugh and share! Hope nobody feels ashamed - The bug is the result of different people coding maybe under pressure and with quite different mindsets :)
For some reason I fail to understand, the submitter's test case (rot13 implemented over a HTTP proxy) is invoked in the report as
./rot13 2>/dev/null. Of course, when trying to debug a bug report, the first thing to do is not to ignore STDERR. So, off goes the 2>/dev/null. What happens next?
0 gwolf@mosca[2]/tmp$ perl ./rot13 &
[1] 4394
0 gwolf@mosca[3]/tmp$ GET -p http://localhost:8080/ http://www.debian.org/
Can't locate object method "filter" via package "UGGC::Cebkl::ObqlSvygre::fvzcyr=UNFU(0k604160)" (perhaps you forgot to load "UGGC::Cebkl::ObqlSvygre::fvzcyr=UNFU(0k604160)"?) at /usr/share/perl5/HTTP/Proxy/FilterStack.pm line 126.
500 EOF when chunk header expected
WTF... Well, at least the program name gives me a clue... Lets try to "decrypt" the error message...
gwolf@mosca[4]/tmp$ echo 'UGGC::Cebkl::ObqlSvygre::fvzcyr=UNFU(0k604160)' rot13
HTTP::Proxy::BodyFilter::simple=HASH(0x604160)
hrm... How comes the filter is filtering its own code and only then refusing to find itself!? Ok, time to open up the manpage - Remember, I'm only group-maintaining this pacakge, I am not yet at all familiar with it! Ok, so the core of the filter is when the submitter states:
my $proxy = new HTTP::Proxy();
$proxy->push_filter(response => new HTTP::Proxy::BodyFilter::simple(sub tr/a-zA-z/n-za-mN-ZA-M/; ));
While the manpage states it should be invoked as:
my $filter = HTTP::Proxy::BodyFilter::simple->new( sub $ $_[1] =~ s/foo/bar/g; );
$proxy->push_filter( response => $filter );
Of course, once looking at it, the answer is simple: The submitter left out which element to act on in the anonymous function body - The $ $_[1] =~ part. Adding it makes gur svygre jbex nf rkcrpgrq... Err, sorry - makes the filter work as expected.
Now, bonus points: For the non-Perlers out ther: How come we get the namespace translated as well? Oh, that's very simple: In Perl, as in Python (and concievably other languages I'm unaware of), the object is passed to any of its methods as the first argument. Functions in Perl receive their arguments via @_ (read: the default array). And, of course, the tr (regex-based transliteration) takes by default the first thing it sees - the object itself. And what happens when you apply a (string-oriented) regex to an object? Of course, it gets stringified - which, by default, in Perl means converting it to the closest possible description: "a hash reference blessed as an object of the class such-and-such at this memory location". That string gets worked on, and we get UGGC::Cebkl::ObqlSvygre::fvzcyr=UNFU(0k604160). This proxy does not die on very-very-short web pages, where the whole content fits on one iteration of the code (although it does not work correctly - the text remains unaltered, of course, as it was not worked on), but if the request spans several chunks, the second time the filter is called, it will be... just gibberish.
Oh, and what about the extra $ (...) around $_[1]? Oh, simple: The string is passed as a scalar reference, so it can be modified in place. Yes, it's the Perl way of pass-by-reference instead of pass-by-value (the default behaviour): Of course the parameter is only passed as a value. Only that the value is incidentally a reference - but who cares? ;-)
Anyway... Many oddities. I would implement the module in a completely different way, and it looks quite backwardish in my book. But then again, TIMTOWTDI.

On January 26th 2008, the OCaml community has its first meeting in Europe. There was 5 different talks, including one from me. The meeting was pretty constructive and i think some great things should come out of it. In this post, i will focus on the Debian maintainer point of view.
The meeting was organized by me, with the help of Garbriel Kerneis and Vincent Balat. I wish to thank Mme Turgis from ENST/ParisTech who has made possible all this to happen.
Introduction:
I announce the creation of OCamlCore, a SS2L. It will provide commercial support for OCaml and related products. It will also provide community with some resources (including a GForge, a planet, some SCM repository...)
For now, i will open administration to Debian people who wish to help (for root rights) and from the whole community for other task (gforge and general administration). For now, i will choose alone who can administrate and who cannot... This is not a very open position, but this server is also for my company.
Xavier Leroy give us a nice talk that has let us see some future direction:
My body hates Mondays. Over the weekend I get up at 9am or later. My
coffee consumption is also minimal. This morning I was up at the usual
5:30am and was on my 4th cup of coffee before 10am. And we're not
talking weak coffee - my cow orkers have been known to pour the pot out
if it doesn't meet with their approval for strength. This thunking
between the weekend and my weekday routine means that Mondays are sort
of a blur for me. Thankfully I seem to fall into more of a rhythm by
Tuesday.
(This post is a substitute for any technical content. I'll try to think
of some soonish.)
Wow, probably the news of the day for me.
It’s done and not a joke:
Your new door to the world the slogan for Bangkok s new
Suvarnabhumi airport tries to get people to stop-over on their
trips between Europe and Asia. The airport s webpage claims that
the airport currently handles 45 million passengers per year, but
that it would scale up to 110 million.
I don t see this happening, at all. Today, leaving for
Melbourne, I waited for an hour in the security queue, as four
flights were leaving concourse E (which has 10 gates) at once:
around 500 passengers were queueing to be scrutinised for
explosive liquids and other stuff a real terrorist would
never consider smuggling on a plane via the standard passenger
processing theatre in four lines behind four security checkpoints
(in fact, that s how I confirmed my estimate: around 30 seconds per
passenger (I timed it), it took me one hour, that s 120 passengers
per queue, so about 500 total, at once).
Four lines, one hour? 45 million passengers. 110 million
passengers? Six lines (there isn t much more space), so 200
passengers per line, 1:40 hours? My new door to the world?
Bangkok?
Of course, this is in large part because of idiot passengers.
While I was waiting in line, they came three times (every 20
minutes) to empty the garbage can where potential terrorists have
to dump their drinkable explosive fluids. We ve had this ban for
over 1 years, for crying out loud! Sure, some people don t (get
to) fly a lot and a few may really not have heard about dangerous
liquids yet (I felt really sorry for an elderly couple who had to
ditch pretty much all their toiletries leaving Zurich for Madrid
and wondering how they would survive there), but then at least
open your eyes and turn on your brain, please.
Unfortunately, the typical Bangkok/Southern Thailand tourist
probably hasn t got brain cycles left between walking and carrying
luggage. If you don t believe me, stop-over in Bangkok and look
around: anything with legs in shorts and flip-flops probably fits
right in, any obscenely and annoyingly loud group as well. For
instance, this circus of 10 en route to London, who joined the end
of the queue (read: about 1 hour to go) after their flight s final
call with millions of shopping bags. They furiously tried to raise
hell, but failed and probably missed their flight.
Observing all such episodes around me made the hour go by fast
I also had ample time left before my gate would close. There was
one situation, however, that made walk over and complain to the
supervisor (the one with the walkie-talkie): a couple from Canada
were similarly faced with the final call for their flight to
Toronto and walked straight up to the top of the lines outside
the ropes. After a short discussion, one of the security attendants
escorted them to the gate without subjecting either their
bags or bodies to the ever-secure screening process.
The supervisor (the one with the walkie-talkie) didn t speak
English. All she did was smile and make motions with her hands
which suggested that I should join the end of the queue.
As I said before, I don t believe that the (minimal) added
security we have at airports today corresponds to or justifies in
the slightest bit the shit we have to go through these days to be
airborne. However, if you make rules, then stick to them and don t
open gaping (= inviting) security holes.
Fortunately, the Canadians later had to surrender their weapons
of plane destruction since, on every gate, another party
of security attendants glove-hand-searched every bag a second
time, with the previous security checkpoint no 100 metres
behind.
I don t see Suvarnabhumi as a successful or scalable airport. If
Bangkok wasn t such a great place 
Robert A. Heinlein: 

We have a problem with our tools in Debian, and it's this:
Above the core tools in
How often have you said to yourself "this programming language's if
statement is too flexible, I need to make it more rigid, and with a
syntax nobody else understands"?
If you've ever said that to yourself, then take a look at 
Mausefalle, Karusellkurve, Steilhang, Br ckenschuss, Alte Schneise,
Seildamsprung, L chenschuss, Oberhausberg, Hausbergkante, Zielschuss
(ach mein Gott!) and the terrible Zielsprung.
After last week's Lauberhorn downhill, today was Hahnenkamm's downhill race in Kitzb hel (Austria). Even though I slightly prefer the Wengen race, Die Streif is one of the scariest racest of the Ski World Cup.
Great spectacle today again, however saddenned by Scott Mc Carthy's terrible accident on the Zielsprung. We don't have news yet but I cross fingers for him.
Today, Didier Cuche won the race wonderfully, just before lastweek's winner, the tireless Bode Miller.
Again another great ski week-end, really.