[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

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.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

picture