Older blog entries for uweo (starting at number 25)

I wrote some code in the mean time. I also wait for the next fatal bug report for ftpcopy, but nobody seems to have found it by now. Oh well.

The new code is a caching library with some command line tools around it. Nothing complicated, just a kind of "put this into the cache and if there's not enough space then throw away the oldest entries", but it took me some days to get the bugs out. I'm quite confident that it's stable by now.

Now i want to package it up and release it to the world, hoping that somebody else will not have to reinvent the wheel. But coding for me is one thing, coding for others is completely different. I mean, it hurts to say "you are an idiot and this code doesn't work reliably" to yourself - but it hurts even more if someone else tells this truth to you.
So i better make sure ... what? That's there the problem starts.

  • Documentation. There be a manual page? Sorry, have to write this myself. But i hate writing documentation.
    This time i'm going to not use POD but tmac.an, and try to get something readable from groff -Thtml.
  • Code quality. There's a big difference between "works for me" and "works or does something reasonable in every situation". "works for me" usually means "breaks on machines with different endian or alignment requirements". Think of possible overflows everywhere. What about strange input values or a corrupted cache? I've to re-read the whole stuff. It's _so_ boring.
  • What hidden limitations do the functions have? Remove or document them (the problem is the "hidden" part).
  • Simplicity: make sure that the code is so simple that at least i don't have problems to understand it in 17 months from now. This possibly means to rewrite the function to enter something into the cache. Not funny.

  • Library API: make sure the API is consistent. I tend to not even notice "f(char *buf, bufsize)" against "g(bufsize, buf)". Make sure the functions, constants, ... have reasonable names.
  • Command line API: make sure the tools options and arguments are consistent.
  • Locking: Did i _really_ correctly document the locking requirements? I don't think i'll get it right the first time ...
That's _work_. Boring work. Stuff for some evenings.

And it's summer now. For that kind of stuff winter has been invented, i think.

Sick, including, but not limited to, headaches. Not funny.

Am i just unable to think or is this paragraph of 6.16 of the usefor draft starting with

Whenever an Xref header is created by an agent for an article which includes a Replaces header with "disposition=revise" or "disposition=repost" (6.15), it SHOULD include, within the location field of each newsgroup in the Newsgroups header of whichever of the old articles referenced in that Replaces header is still current, a corresponding "revise:<old-article-locator>" or "repost:<old-article-locator>" for the oldest article known to be replaced, where <oldest-article-locator> is the article-locator under which that oldest article was filed.
not really clear?
I had a hard time understanding this sentence, but if i understood correctly then the chance that this will be implemented in the more important servers is nil.

The new built house is being painted ... but there's no sign that the work on the old one will continue this month.

Junta was the next game, and a funny one, again.

Continued to work on the news server today. Work? Rewrite of almost anything. Fixed a few bugs, added a few test cases. Spent most of the time thinking about some major design problems (like how to get a moderately fast history without needing lots of memory). No conclusion yet, but a few ideas:

  1. move the history to an own daemon process.This should take care of the ever-changing API problem :-)
  2. leave the group index as it is for now.
    can use a daemon for that, too, but later ...
  3. the history stuff will be accessible through a udp socket, just the commands will have to go through a pipe or unix daemon socket.
  4. not having an overview is fine, except for performance. Possible speedup: move the article header caches from the nntps daemons to a cache daemon.
    Is it worth the pain? (not that performance is _so_ bad, but the whole stuff is slower than i like it. The parsing isn't the problem, it's the article read time.)

Apart from that: i'm not feeling well. Am i catching a cold or is it because i didn't sleep enough? (the later is true, anyway)

Gaming evening. And today is the first time in all the long years that i'm certainly not going to win britannia.
That's what you get if everybody else allies against you. Should i get the lowest number of points i'll choose Junta for the next game.

Since the last diary entry i've worked on ftpcopy (0.3.7 released - a bugfix release only), which now has a test suite. I've spent about 16 hours or so on that, including fixes for the bugs i found during that. The time was well invested.

I also worked on upgpverify. It already had a test suite (yes, i took this project serious). The 0.3.3 version adds the ability to deal with signed news using the X-PGP-Sig header.

Junta will almost certainly be the next game.

Work wasn't funny this week (it wasn't since i came back from vacation).

fefe found another bug in ftpcopy.

And i wasn't even surprised when i saw his mail. In fact i had a bad feeling about the last changes in the handle of the primary target. I wasn't comfortable with initialentity() (too much "magic"), and thought about rewriting it, but then all my tests passed, and i told myself "new code is worse than working code".

Right. Too bad that there was no working code.

Regarding testing: I really need to automate the tests.

5 Apr 2001 (updated 5 Apr 2001 at 14:02 UTC) »
mrorganic: i love you merkins. If you don't know how to fly an airplane or to protect your valuable espionage machines then be quiet, but don't call for more military action. (killing a chinese pilot certainly _is_ military action)

A war because you lost your espionage toy? Get real. The world will be a safer place without it.
The chinese usually don't kill foreigners, but war is quite likely to.

End of flame.

olandgren wrote:

It's really surprising how easy life becomes when you realize that you are competent, can get stuff done, and are not something completely worthless. It's very interesting how the positive feedback cycle works.
Yes, but never forget that lesson. And don't forget to help others to get competent, for your own sake.
Q: What happens with this code:
sockfd=accept(fd, (struct sockaddr *)&sin, &sinl);
if (sin.sin_family==AF_INET6) 
  if (sinl<sizeof(struct sockaddr_in6))
   return ERROR;
/* ok */
if it happens to meet a glibc-2.2 / linux-2.2.18 system?

A: The kernel sets sinl to 24. sizeof(struct sockaddr_in6), if taken from netinet/in.h, is 28.

Things like this aren't likely to make me happy.

Back from vacation. 180 hours ago the world looked quite good. Now it's cold, rainy and dark. Oh well.
No, i don't mind rain. It's just that the rain is cold, which isn't really how i like it.
Oh well, i'll return some day. I liked the people.

I released ftpcopy-0.3.6 on tuesday and also update the strhash distribution. I also began to cleanup the udpserver code, but stumbled at the point where i had to update the documentation.

The problem is that pod is not good enough, texinfo can't generate manual pages. Let's sort the important points:

  1. i'm not going to duplicate information. It's bad enough that code, --help output and documentation can get out of sync, anything more is just not acceptable.
  2. any system i work on shall have all needed tools installed by default.
  3. i want manual pages. They don't have to be perfect.
  4. i want reasonable html output (this rules out pod).
  5. i also like printed manuals.

I feel a temptation to write the documentation in texinfo and use a slightly modified man2html for the manual pages, but that's still not good enough.

It seems that i'm never satisfied with whatever solution i use for manuals. I started with ASCII text, then i used texinfo, tried a number of other documentation systems, went back to texinfo (using a number of wrappers around it, it didn't like umlauts back then), tried html, tried a number of html wrappers, want back to nroff / man, and finally i tried pod. Not a single solution lasted for more than a year.

Work hasn't been funny this week. I'm again at the point i've been in september and october, and that's alarming, meaning that i'm not feeling well here anymore (and judging from what i hear some other people share this feeling).
I'm tired of doing patchwork on other peoples projects, especially since i don't see any chance to finish my own stuff. I'm also tired of getting spam complaints. I'm tired of the misorganisation here. I'm tired of not having the wrench needed to assemble a 19'-rack (it's not the only tool missing).

Almost nothing happened at home. I'm tempted to move. But where to? Simple answer: somewhere near the coast (being able to reach the sea in less than 2.5 hours? Really tempting). But it seems that 99% of the job openings are in the other direction.

To make it short: I'm still totally demotivated and only waiting for the vacation to start, which will happen 2001-03-03.
I'm going to be _far_ away from any computer, i hope.

But still, there are promises to keep and things to be done:

  • wrote the qmail-sendmail replacement, which just replaces the commandline sendmail emulation in the qmail package (in case you wonder: you almost certainly don't need it).
  • released ftpcopy-0.3.5. There's no really important reason to update.
  • released upgpverify-0.3.2 , a pgp/gpg filter for use in .qmail files. It checks the signature, decrypting if needed, and call's another program which can read de-mimed payload on a file descriptor. It shall replace the hackish pgp stuff used in the BBS (i remember having promised to replace that years ago).
  • "released" (somewhat) cacco-0.4.0.tar.gz, a collection of tools to summarize cisco accounting files ("show ip accounting"). The documentation is pretty minimal. I packaged that just to keep a promise given almost 10 months ago.
    Besides it's quite a bit faster than the stuff my boss did.

I spent an evening trying to find out why lrzsz was unable to get stuff from a friends computer. It turned out that some piece of hardware at his site "compressed" a series of "@" bytes to just two "@" bytes. I really think his self-made internal communication system is at least a bit broken.

16 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!