Software: June 2008 Archives

 

June 20, 2008

When we wrote RELOAD-04, we specified it using a protocol description language based on that used to specify TLS (RFC4346). This was done with the intention that when it came time to do an implementation we would be able to write a compiler that would take the spec as input and automatically emit encoders and decoders. I chose the TLS language because I knew it well and because I already had a YACC grammar on hand from when I'd tried the same thing for TLS (though that didn't work out that well.)

Based on that experience, this time I wrote the PDU descriptions with compilation in mind so I was fairly confident I could make that approach work. Moroever, I used the first pass of the compiler as the basis for s2b, so when I cleaned up the PDUs for RELOAD-04, I had a pretty good idea of what would compile and what wouldn't and it made sense to do a compiler (s2c) for the RELOAD coding party. Even with that background, I quickly discovered mistakes, some in my choice of language constructs to use, and some in my compiler design.

More after the break.

 

June 19, 2008

Spent the last three days at a coding party for a P2PSIP/RELOAD implementation. (Long hours coding → no blogging) hosted at Google. I'll have more on the project itself later, but for now, check out my badges for the first and last day:

The first badge is on the top. As others were checking in, we noticed that the last letter of our host's name (Butcher, not Butche), was being cut off. I assumed the problem was that they hadn't left enough space for the field, so I dropped the middle letter to see if it would work.1 As you can see, it didn't. Same error, even though the field is shorter. David Butcher suggested adding a space afterwards, and though I don't have a picture, that works. This suggests that the problem is that the name field is being right aligned to a position that is outside the bounding box of the badge printing area. Hard to tell if this is in the rendering software or the printer itself.

As an experiment, yesterday I added a whole lot of spaces after my name. As you can see, it shifted it way to the left, confirming the justification/bounding box theory, but notice that I was able to shift it so far to the left that it overwrote the date field. I suspect with enough spaces I could push it all the way off the page. It would be an interesting experiment to see if you could do the same thing with the other fields. They appear to be centered, but does the centering take into account spaces? Anyone try it yet?

1. In retrospect, I should have realized this was wrong, since I've seen single-letter truncation on Google badges before with names that were longer than David's. If this theory were right, those names would be truncated further. Interesting that this bug has been there so long, though.