[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

0x1e

Filed under: General — Thomas @ 22:18

2006-06-20
22:18

Happy Birthday to Jeremy back in Belgium who's finally left behind the boring third decade of his life ! Too bad I couldn't make it to the party, or Willeke's party, but Kristien is here for a week so I'm not complaining.

things to have done in life before you're 30

Some things you can't leave undone until you get too old. So right before turning too old, you've got to hurry getting them done.

  • buying beer from the supermarket for your own consumption: check
    I've bought a few Coronita's (which are the Mexican Corona's, but for some reason they get renamed) and once in a while end up drinking one with a slice of lemon. (I can hear dozens of friends in Belgium now go "What the hell ?")
  • getting angry - successfully - in a language other than your mother tongue: check. Last week I was riding my bike through the city as usual, and in a narrow street this car was indicating that it was going to turn left, and suddenly while I was about to pass it by, it first jerked to the right, forcing me to break hard. So I tapped his rear window with the flat of my hand, which caused him to chase me instead of turning, and then a discussion ensued that included the word imbécil on his part, and a failed attempt at civil education on mine. But - it was in Spanish.
  • finding a cocktail that you actually like - check. The last few years in Barcelona have brought me the caipiroska, and now when Mateo comes over with his cocktail making box and makes fresh strawberry daiquiris, I'm sold
  • Going to bed on two daiquiris and a caiporoska, and waking up and having breakfast on nachos and guacamole: check
  • Things I haven't done and everyone else around me is doing: buying houses, getting married, having kids.

    Ok, my list is wearing thin ... any other suggestions before it's too late ?

Emulators

Filed under: General — Thomas @ 08:50

2006-06-14
08:50

When Andy was gone to the US of A, my emulation obsession was reaching frightening levels. First I was compelled to write an ethereal/wireshark packet dissector for the GStreamer Data Protocol. In all fairness, I actually needed it for work, because I was stuck on a few bugs in my extraction of the GDP code into separate elements, but still. Here's the new module, in which I also folded Andy's nettime dissector.

Ethereal was actually quite nice to program for - it has a large progamming manual. Too bad it got very confusing in two spots, causing me to lose a good six hours combined. One was related to the fact that they have some new functions to do things differently, but the manual just tells you to "call the new-style function that returns an int", instead of telling you that the new-style function is actually a different function. The other problem was related to trying to figure out how you break up a TCP stream into actual packets according to your protocol. I had started writing a dissector that just simply alternated between the two states, header and payload. That worked fine in 99% of the cases, since as if by magic packets actually arrived in the same chunks as they were written to the socket. But once in a while I got more data in a TCP packet, and thus things went haywire. The different ways of reconstructing your data stream are explained in a confusing way in the manual.

After getting this to run and analyzing my packet stream, the problem was dead simple to spot and easy to find in the code.

My second step on the emulation ladder was related to the pretty graph Andy had made with Inkscape to explain how the streaming platform works. The graph was so pretty that it gave our boss the last convincing he needed to buy us 7 Dell PowerEdge 1850 machines to use as a test platform in the office. Once he saw all the pretty and different colors in the graph, and all the boxes, 7 seemed like a good number. (I can't show you Andy's work because I'd be giving away Valuable Company Secrets)

Re-realizing the power of the graphic, but also realizing that any techie could suddenly produce decent diagrams with inkscape, I gave it a shot last weekend as well. I went through the excellent Inkscape tutorials, available from within the program (really, give it a try !) and then proceeded to make my first diagram. After two hours, I had something decent, but hadn't saved at all yet. I clicked Save As and the program crashed. It told me it had saved some rescue data somewhere, I couldn't find it, asked in #inkscape, and there was no saved data where they said it would be. On the one hand, big bummer. On the other hand, this made me redo it from scratch with the knowledge I just gotten from trying things out, and making the graph the second time around turned out a lot better.

So here's my first Inkscape diagram, and last night I made the second (scroll down a little) in less than an hour.

The third was learning that Andy is giving up on the arch family. This time, I pre-emptively emulated him the past weekend - I wanted to hack on buildbot some more, and I had had to learn arch/bzr/... because buildbot was being maintained in arch, and it seemed like a good way to have different branches per feature I wanted to hack in, and pull together a "production" branch for internal use from that, while still being able to send stuff upstream.

I had a complicated README that detailed my strategy, how the different branches were to be created, how to pull, and so on. Only problem is, I had to actually read the damn thing to be able to do any work on my branches, then pull changes through three branches to finally use it in my production branch (pretty annoying when you need a quick fix), then deploy.

Also, in those two years I could never figure out how to generate a diff that showed me only the things I had changed on a branch. I assume there is some command that can let you know the set of patches that were not pulled from some other branch, but I could never figure it out. And for the record, baz changeset is very unintuitive - to this day I still don't know exactly what it is that it's showing me, other than that it is a lot bigger than I would have expected it to be from knowing what the branches are.

Anyway, buildbot is the project of one-new-revision-control-system-per-year, and Brian had switched over the last year from arch to darcs. Now the main tree is in darcs; the CVS tree is continuously updated from that; and he manually syncs his arch tree once in a while. So one of the two people that taught me how to use arch has moved on to something else. And now the second one - Andy - has, too. What am I to do but follow ?

My psychiatrist says this constant need to emulate someone around me is due to my fear of commital - in this case, fear of committing to being myself. I was doing better for a while, but with Andy's trip it turned worse. I realized I needed to stop this when I was shouting "Foolio" at my cat for rolling over and exposing her belly. I'd really like to talk to my psychiatrist about this some more but she's off on a business trip emulating Freud, so I'm stuck.

What is up …

Filed under: General — Thomas @ 11:09

2006-06-12
11:09

... with the New Wave of Peer-to-Peer download applications ? Do their developers have 15 GB of RAM on their development machines ?

Bittorrent - trying to download 4 GB of data over the weekend - hasn't downloaded *a single byte yet* - consuming 500 MB !

amule - consistently using over 100 MB when not downloading anything at all.

It takes some balls to be taking even more memory than the always-insisting-on-caching-every-single-page-you've-seen-even-though-you've-closed-the-tab-and-aren't-likely-to-ever-want-to-see-the-page-again Firefox/Mozilla for just *sitting in the background*.

Update:

While browsing the Dell website for stuff to spend money on for our platform, we noticed that you can get a specific server with 16 GB of RAM for a 4000 euro markup, and 32 GB of RAM for a 40000 euro markup to the base configuration. No, I did not mistype an additional 0. No, really, I didn't.

Surely 640K must be enough for everyone ?

SCons = Pain

Filed under: General — Thomas @ 15:53

2006-06-11
15:53

Being the forward-looking person I am, I decided it was high time I learned some SCons. A big manual, lots of Wiki notes, not much could go wrong, right ?

Wrong.

The first thing I wanted to do was to write a simple SConstruct file that would basically do the equivalent of this Makefile:

fail:
          exit 1

Can't be hard, right ?

Wrong again.

The manual doesn't mention anywhere I could find how to run a simple shell command *that does not take or generate files*. The manual is full of examples that explain how to build a program from source files, libraries from source files, everything. The Wiki mentions some things about how to make unit tests run (which is what I wanted to do next, since it should just run a shell command for the unit tests), but they all rely on some source being there to be turned into a program.

I tried various approaches, like using the Builder class (but it gets really upset if you don't have sources or results), using the Execute action (but that always executes *while parsing*, no matter what I do, confusing), using the Command action (failing in various ways if you don't have sources), ...

I spent three hours trying various approaches and I could get nothing to work.

If there's someone out there with a little more SCons knowledge, please translate the above simple Makefile into an SConstruct script that should do the same ...

Mach to the rescue – again

Filed under: Hacking — Thomas @ 22:09

2006-06-10
22:09

A few months ago I used mach to upgrade an old Gallery install, taking it from PHP4 to PHP5. Today I wanted to hack on buildbot some more, and when trying it on my local SVN test repository I noticed that the repository was borked. Apparently it was once created with BDB 4.2, while my laptop is now using FC5 with BDB4.3. Gotta love Berkley.

Anyway, here's how I got out of the situation. The last Fedora that shipped with BDB 4.2 was FC3. So I did:

mach -r f3c setup
mach -r f3c yum install subversion
cp -pr /home/svn/test /var/lib/mach/root/fedora-3-i386-core/tmp
mach -r f3c chroot

Then, inside the chroot:

cd /tmp
svndump test > svn.dump
exit

And then, outside the chroot again:

svnadmin create test
svnadmin load test < /var/lib/mach/roots/fedora-3-i386-core/tmp/svn.dump

Apparently, Subversion has switched to using FSFS by default, leaving BDB behind. Sounds like a sane choice to me. But if you run into this problem, remember - mach is there to help.

« Previous PageNext Page »
picture