Content here is by Michael Still mikal@stillhq.com. All opinions are my own.
See recent comments. RSS feed of all comments.


Sat, 28 Dec 2002



29 December 2002

    Long time no write. Spent lots of time on family, and very little time on coding. Playing with code which can render PDF files to PNG bitmaps. Very cool. One day I might even finish it.

    The regression test results for the pandalex PDF parser are as follows today:
    2372 PDFs parsed:
    segfault = 12
    parse failed = 16
    other fault = 0
    ok = 2344
    
    These are random PDFs pulled from everywhere I could find them. If you have interesting PDFs (especially from slightly odd generators such as Oracle, and Great Plains), then feel free to email them to me. The bigger the better (within reason).

    It toook me a little while to realise that GNU time only has the GNU options if the binary name isn't time. How buggered is that?

    Another question on the debugging front. Why are there so many pages on the Internet (as documented by google), which have the abort man page, and therefore show up in a search for SIGABORT, but don't discuss why you might be sent this signal? Do people really think it helps the world if they publish the Redhat man pages? I could understand if the manpages were a little harder to find, like some of the libtiff ones, but these are all stock things.

posted at: 04:00 | path: /diary | permanent link to this entry


Wed, 25 Dec 2002



25 December 2002

    Christmas. Lots of presents for Andrew, I offically got my trampolene, and I also got a cool nurf bazooka. Heaps of people over, so little coding done. I did get an opportunity to break pandalex though...

posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 23 Dec 2002



24 December 2002

    Twas the day before Christmas, and all through the house, everything is silent, cause everyone's gone out.

    Waiting for work to get their act together and get the network happy enough for me to be able to work from home again.

    Ahhh. I understand the CVS logging problem I mentioned a couple of days ago. One of the members of my final year project group (Blake Swadling) appears to have hand editted the CVS respository files (the ones with ,v at the end of their names). He seems to have managed to damaged the respository in some subtle way in the process.

    My snapshot of the repository before he played still works, so I will just submit that to the lecturer.

posted at: 04:00 | path: /diary | permanent link to this entry


Sun, 22 Dec 2002



23 December 2002

    In the new building. The decor is nice, but it sure would be good to have power at my desk, and to be able to get into the building out of hours...

    Played a little with shdns, and pandalex. One day I might just manage to finish a project... Just in case, started another project which has been on the todo list for a while -- I'll let you know more if I ever get anywhere...

posted at: 04:00 | path: /diary | permanent link to this entry


Sat, 21 Dec 2002



Announcing side

    Finished off side, a little ditty that took an hour or two. It takes a filter arguement, and two file names. It then runs the two files through the filter (one at a time), and then displays the output of each beside each other. Therefore, the command:
    ./side "/home/mikal/opensource-stable/mi/i - < %s" 
       ../shdns/sample-response ../shdns/shdns-response  | less
    
    Takes two DNS packets, and displays them after they have been pretty printed. The output looks like this:
    /home/mikal/opensource-stable/mi/i - < ../shdns/sample-response        | /home/mikal/opensource-stable/mi/i - < ../shdns/shdns-response
                                                                           |
    0                 135       0x87       0207                            | 0                 135       0x87       0207  
    1                 210       0xD2       0322                            | 1                 210       0xD2       0322  
    2                 133       0x85       0205                            | 2                  10        0xA        012  
    3                 128       0x80       0200                            | 3                  56       0x38        070       '8'  
    4                   0        0x0         00                            | 4                   0        0x0         00  
    5                   1        0x1         01                            | 5                   0        0x0         00  
    6                   0        0x0         00                            | 6                   1        0x1         01  
    7                   1        0x1         01                            | 7                   0        0x0         00  
    8                   0        0x0         00                            | 8                   1        0x1         01  
    9                   1        0x1         01                            | 9                   0        0x0         00  
    10                  0        0x0         00                            | 10                  0        0x0         00  
    11                  0        0x0         00                            | 11                  0        0x0         00  
    12                  3        0x3         03                            | 12                  0        0x0         00  
    13                119       0x77       0167       'w'                  | 13                  3        0x3         03  
    14                119       0x77       0167       'w'                  | 14                119       0x77       0167       'w'  
    15                119       0x77       0167       'w'                  | 15                119       0x77       0167       'w'  
    16                  7        0x7         07                            | 16                119       0x77       0167       'w'  
    17                115       0x73       0163       's'                  | 17                  7        0x7         07  
    18                116       0x74       0164       't'                  | 18                115       0x73       0163       's'  
    19                105       0x69       0151       'i'                  | 19                116       0x74       0164       't'  
    20                108       0x6C       0154       'l'                  | 20                105       0x69       0151       'i'  
    21                108       0x6C       0154       'l'                  | 21                108       0x6C       0154       'l'  
    22                104       0x68       0150       'h'                  | 22                108       0x6C       0154       'l'  
    23                113       0x71       0161       'q'                  | 23                104       0x68       0150       'h'  
    24                  3        0x3         03                            | 24                113       0x71       0161       'q'  
    25                 99       0x63       0143       'c'                  | 25                  3        0x3         03  
    26                111       0x6F       0157       'o'                  | 26                 99       0x63       0143       'c'  
    27                109       0x6D       0155       'm'                  | 27                111       0x6F       0157       'o'  
    28                  0        0x0         00                            | 28                109       0x6D       0155       'm'  
    29                  0        0x0         00                            | 29                  1        0x1         01  
    30                  1        0x1         01                            | 30                  3        0x3         03  
    31                  0        0x0         00                            | 31                119       0x77       0167       'w'  
    32                  1        0x1         01                            | 32                119       0x77       0167       'w'  
    33                192       0xC0       0300                            | 33                119       0x77       0167       'w'  
    [snip]
    
    It handles line wrapping and stuff like that, but it is not a visual diff. It might one day be, who knows?

    You can get the code from here.

posted at: 04:00 | path: /side | permanent link to this entry


Announcing side

    Finished off side, a little ditty that took an hour or two. It takes a filter arguement, and two file names. It then runs the two files through the filter (one at a time), and then displays the output of each beside each other. Therefore, the command:
    ./side "/home/mikal/opensource-stable/mi/i - < %s" 
       ../shdns/sample-response ../shdns/shdns-response  | less
    
    Takes two DNS packets, and displays them after they have been pretty printed. The output looks like this:
    /home/mikal/opensource-stable/mi/i - < ../shdns/sample-response        | /home/mikal/opensource-stable/mi/i - < ../shdns/shdns-response
                                                                           |
    0                 135       0x87       0207                            | 0                 135       0x87       0207  
    1                 210       0xD2       0322                            | 1                 210       0xD2       0322  
    2                 133       0x85       0205                            | 2                  10        0xA        012  
    3                 128       0x80       0200                            | 3                  56       0x38        070       '8'  
    4                   0        0x0         00                            | 4                   0        0x0         00  
    5                   1        0x1         01                            | 5                   0        0x0         00  
    6                   0        0x0         00                            | 6                   1        0x1         01  
    7                   1        0x1         01                            | 7                   0        0x0         00  
    8                   0        0x0         00                            | 8                   1        0x1         01  
    9                   1        0x1         01                            | 9                   0        0x0         00  
    10                  0        0x0         00                            | 10                  0        0x0         00  
    11                  0        0x0         00                            | 11                  0        0x0         00  
    12                  3        0x3         03                            | 12                  0        0x0         00  
    13                119       0x77       0167       'w'                  | 13                  3        0x3         03  
    14                119       0x77       0167       'w'                  | 14                119       0x77       0167       'w'  
    15                119       0x77       0167       'w'                  | 15                119       0x77       0167       'w'  
    16                  7        0x7         07                            | 16                119       0x77       0167       'w'  
    17                115       0x73       0163       's'                  | 17                  7        0x7         07  
    18                116       0x74       0164       't'                  | 18                115       0x73       0163       's'  
    19                105       0x69       0151       'i'                  | 19                116       0x74       0164       't'  
    20                108       0x6C       0154       'l'                  | 20                105       0x69       0151       'i'  
    21                108       0x6C       0154       'l'                  | 21                108       0x6C       0154       'l'  
    22                104       0x68       0150       'h'                  | 22                108       0x6C       0154       'l'  
    23                113       0x71       0161       'q'                  | 23                104       0x68       0150       'h'  
    24                  3        0x3         03                            | 24                113       0x71       0161       'q'  
    25                 99       0x63       0143       'c'                  | 25                  3        0x3         03  
    26                111       0x6F       0157       'o'                  | 26                 99       0x63       0143       'c'  
    27                109       0x6D       0155       'm'                  | 27                111       0x6F       0157       'o'  
    28                  0        0x0         00                            | 28                109       0x6D       0155       'm'  
    29                  0        0x0         00                            | 29                  1        0x1         01  
    30                  1        0x1         01                            | 30                  3        0x3         03  
    31                  0        0x0         00                            | 31                119       0x77       0167       'w'  
    32                  1        0x1         01                            | 32                119       0x77       0167       'w'  
    33                192       0xC0       0300                            | 33                119       0x77       0167       'w'  
    [snip]
    
    It handles line wrapping and stuff like that, but it is not a visual diff. It might one day be, who knows?

    You can get the code from here.

posted at: 04:00 | path: /site | permanent link to this entry


22 December 2002

    Started the work required to roll Nick's honours extension to GDMS into the main app. Once that is done and I have done a little more cleaning up, it will be ready to announce on this site.

    In the process discovered that the CVS repository at uni seems to have issues:
    [snip]
    cvs server: Logging cvs001/contrib/wxwindows/docs/pdf
    cvs server: Logging cvs001/datasets
    cvs server: Logging cvs001/docbook
    cvs server: Logging cvs001/docbook/guide
    cvs server: Logging cvs001/docbook/guide/figures
    cvs server: Logging cvs001/lectures
    cvs server: Logging cvs001/manuals
    cvs server: Logging cvs001/meetings
    cvs server: Logging cvs001/presentation
    cvs server: Logging cvs001/prototype
    cvs server: Logging cvs001/reports
    cvs server: Logging cvs001/source
    cvs [server aborted]: unrecognized operation '\x20' in /cvs/cvs001/source/cepLs.cpp,v
    [root@localhost cvs001]# 
    
    That's why my CVS log reporting wasn't working properly... I did another log and get the same error, so I don't think it is a transitory problem. Anyway, something to put onto the TODO list to look at fixing...

    It's been very warm the last couple of days -- high thirties (celcius), which is warm for us.

posted at: 04:00 | path: /diary | permanent link to this entry


21 December 2002

    Finished off side, a little ditty that took an hour or two. It takes a filter arguement, and two file names. It then runs the two files through the filter (one at a time), and then displays the output of each beside each other. Therefore, the command:
    ./side "/home/mikal/opensource-stable/mi/i - < %s" 
       ../shdns/sample-response ../shdns/shdns-response  | less
    
    Takes two DNS packets, and displays them after they have been pretty printed. The output looks like this:
    /home/mikal/opensource-stable/mi/i - < ../shdns/sample-response        | /home/mikal/opensource-stable/mi/i - < ../shdns/shdns-response
                                                                           |
    0                 135       0x87       0207                            | 0                 135       0x87       0207  
    1                 210       0xD2       0322                            | 1                 210       0xD2       0322  
    2                 133       0x85       0205                            | 2                  10        0xA        012  
    3                 128       0x80       0200                            | 3                  56       0x38        070       '8'  
    4                   0        0x0         00                            | 4                   0        0x0         00  
    5                   1        0x1         01                            | 5                   0        0x0         00  
    6                   0        0x0         00                            | 6                   1        0x1         01  
    7                   1        0x1         01                            | 7                   0        0x0         00  
    8                   0        0x0         00                            | 8                   1        0x1         01  
    9                   1        0x1         01                            | 9                   0        0x0         00  
    10                  0        0x0         00                            | 10                  0        0x0         00  
    11                  0        0x0         00                            | 11                  0        0x0         00  
    12                  3        0x3         03                            | 12                  0        0x0         00  
    13                119       0x77       0167       'w'                  | 13                  3        0x3         03  
    14                119       0x77       0167       'w'                  | 14                119       0x77       0167       'w'  
    15                119       0x77       0167       'w'                  | 15                119       0x77       0167       'w'  
    16                  7        0x7         07                            | 16                119       0x77       0167       'w'  
    17                115       0x73       0163       's'                  | 17                  7        0x7         07  
    18                116       0x74       0164       't'                  | 18                115       0x73       0163       's'  
    19                105       0x69       0151       'i'                  | 19                116       0x74       0164       't'  
    20                108       0x6C       0154       'l'                  | 20                105       0x69       0151       'i'  
    21                108       0x6C       0154       'l'                  | 21                108       0x6C       0154       'l'  
    22                104       0x68       0150       'h'                  | 22                108       0x6C       0154       'l'  
    23                113       0x71       0161       'q'                  | 23                104       0x68       0150       'h'  
    24                  3        0x3         03                            | 24                113       0x71       0161       'q'  
    25                 99       0x63       0143       'c'                  | 25                  3        0x3         03  
    26                111       0x6F       0157       'o'                  | 26                 99       0x63       0143       'c'  
    27                109       0x6D       0155       'm'                  | 27                111       0x6F       0157       'o'  
    28                  0        0x0         00                            | 28                109       0x6D       0155       'm'  
    29                  0        0x0         00                            | 29                  1        0x1         01  
    30                  1        0x1         01                            | 30                  3        0x3         03  
    31                  0        0x0         00                            | 31                119       0x77       0167       'w'  
    32                  1        0x1         01                            | 32                119       0x77       0167       'w'  
    33                192       0xC0       0300                            | 33                119       0x77       0167       'w'  
    [snip]
    
    It handles line wrapping and stuff like that, but it is not a visual diff. It might one day be, who knows?

    You can get the code from here.

posted at: 04:00 | path: /diary | permanent link to this entry


Fri, 20 Dec 2002



New site skin

    I've had a bit of feedback recently that this site has been a little hard to read. Hopefully this tweak to the site skin will ease some of that pain... Let me know if you have any ideas for improvement.

posted at: 04:00 | path: /site | permanent link to this entry


20 December 2002

    Well, the company moved to a new building today, which meant that we didn't get much work done... Spent the afternoon at a team Christmas barbeque because the network was turned off at 11am...


posted at: 04:00 | path: /diary | permanent link to this entry


TOWER building move

    We moved building at work yesterday. These pictures are from wandering around upstairs harrassing people... Afterwards, R & D went out to a christmas barbeque.

posted at: 04:00 | path: /events | permanent link to this entry


Tue, 17 Dec 2002



18 December 2002

    Long time no write. I assembled my Christmas present with Catherine early this year, which is good because it required a whole kind of screw driver that I didn't own -- finding an open hardware store on Christmas day might have been a little hard.

    Social work golf pictures are now online...

    The company moves building at the end of the week.

posted at: 04:00 | path: /diary | permanent link to this entry


Sat, 14 Dec 2002



14 December 2002

    I was a good boy and took another offsite backup of my important data collection. Now I just have to get the mound of CDs somewhere than on my wife's desk in the study...

    Saw Jess' house (which caught fire) for the first time today. Wow. I have to go back with a camera (and probably a tripod) sometime.

posted at: 04:00 | path: /diary | permanent link to this entry


Thu, 12 Dec 2002



12 December 2002

    Spent the day is a meeting with Peter from Monash.NET discussing whether we should do .NET at work. He certainly seems to know his stuff, and .NET isn't as bad as I had first though.

    CAUUG committee meeting in the afternoon, and then home to assembly Catherine's christmas present -- a swinging seat.

posted at: 04:00 | path: /diary | permanent link to this entry


13 December 2002

    Back in this meeting with Peter again. Spent the morning discussion ASP.NET, which is only of passing relevance to me. The biggest problem is having to constantly fight the assumption that all clients are running the latest version of IE.

    Sent a Knoppix CD to Melbourne to be put on the front cover of the next AUUGN. It turns out Greg Lehey was having troubles burning it...

posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 10 Dec 2002



11 December 2002

    About two weeks ago I gave a talk about my shell based DNS server shdns. At the time, it couldn't reply to traffic because of an unknown error. Tridge suggested that it was because the UDP socket was "disconnected" (i.e. has no specific end point), and therefore my shell script couldn't use write to reply to traffic.

    Well, I finally got some time to look at this, and, as ever, Tridge is right. Here's the sample programs I used to investigate this:
    // Disconnected UDP socket example: this example simply reads from clients (there can be more 
    // than one), and returns what they said straight back to them. You'll note that we can't use 
    // read and write to get to the traffic, as this is not available for disconnected UDP sockets.
    
    #include <stdio.h>
    #include <errno.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    
    int main(int argc, char *argv[]){
      int lfd;
      struct sockaddr_in servaddr;
      struct sockaddr clientaddr;
      char buf[1024];
      size_t len;
      socklen_t clen;
      
      // We will listen with this file descriptor
      if((lfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){
        fprintf(stderr, "Error whilst starting to listen\n");
        exit(42);
      }
    
      // Define what we are listening for
      bzero(&servaddr, sizeof(servaddr));
      servaddr.sin_family = AF_INET;
      servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
      servaddr.sin_port = htons(1234);
    
      // Bind to the address
      if(bind(lfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0){
        perror("Couldn't bind");
        exit(42);
      }
      
      // Do stuff
      while(1){
        len = 1024;
        printf("Reading...\n");
        clen = sizeof(clientaddr);
        if((len = recvfrom(lfd, buf, len, 0, (struct sockaddr *) &clientaddr, 
    		       &clen)) < 0){
          perror("Socket read error");
          exit(42);
        }
        if(len == 0) break;
    
        // The buffer is not null terminated
        buf[len] = '\0';
        printf("Read: %s\n", buf);
    
        // And send it straight back
        if(sendto(lfd, buf, len, 0, &clientaddr, clen) < 0){
          perror("Socket write error");
          exit(42);
        }
      }
    }
    
    This one above is the standard socket example. It just works, because we can use the socket specific read and write calls for the data.
    // Disconnected UDP socket example: this example simply waits fro traffic, and the starts
    // a process to deal with the results. One process per packet, one packet per process.
    // This version wont work, because the socket is not connected. In fact, cat is smart enough
    // to warn us about this:
    //
    //           cat: write error: Transport endpoint is not connected
    
    #include <stdio.h>
    #include <errno.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <sys/poll.h>
    #include <netinet/in.h>
    
    int main(int argc, char *argv[]){
      int lfd;
      struct sockaddr_in servaddr;
      struct pollfd pfd;
      
      // We will listen with this file descriptor
      if((lfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){
        fprintf(stderr, "Error whilst starting to listen\n");
        exit(42);
      }
    
      // Define what we are listening for
      bzero(&servaddr, sizeof(servaddr));
      servaddr.sin_family = AF_INET;
      servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
      servaddr.sin_port = htons(1234);
    
      // Bind to the address
      if(bind(lfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0){
        perror("Couldn't bind");
        exit(42);
      }
    
      // Setup the list of file descriptors we want to wait for events on
      pfd.fd = lfd;
      pfd.events = POLLIN | POLLPRI;
      
      // Do stuff
      while(1){
        if(poll(&pfd, 1, -1) < 0){
          perror("Waiting for new data failled");
          exit(42);
        }
    
        printf("Data arrived\n");
    
        // Spawn a child to handle this packet
        switch(fork()){
        case -1:
          perror("Couldn't spawn child to handle connection");
          exit(42);
          
        case 0:
          // Child process -- setup the file descriptors, and the run the helper application
          dup2(lfd, 0);
          dup2(lfd, 1);
    
          execl("/bin/cat", "cat", NULL);
          perror("Exec failled");
          exit(42);
          break;
    
        default:
          // Parent process
          break;
        }
      }
    }
    
    This one is the exec version of the first example. This is basically exactly what inetd and xinetd do. It doesn't work, because cat doesn't know that it has to use the socket specific read and write, instead of the normal ones.
    // Connected UDP socket example: this example simply reads from clients (there can be more 
    // than one), and returns what they said straight back to them. You'll note that we can now use 
    // read and write to get to the traffic...
    
    #include <stdio.h>
    #include <errno.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    
    int main(int argc, char *argv[]){
      int lfd;
      struct sockaddr_in servaddr;
      struct sockaddr clientaddr;
      char buf[1024];
      size_t len;
      socklen_t clen;
      
      // We will listen with this file descriptor
      if((lfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){
        fprintf(stderr, "Error whilst starting to listen\n");
        exit(42);
      }
    
      // Define what we are listening for
      bzero(&servaddr, sizeof(servaddr));
      servaddr.sin_family = AF_INET;
      servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
      servaddr.sin_port = htons(1234);
    
      // Bind to the address
      if(bind(lfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0){
        perror("Couldn't bind");
        exit(42);
      }
      
      // Do stuff
      while(1){
        // We need to peek at the first part of the packet to determine who to connect to
        len = 1;
        printf("Reading...\n");
        clen = sizeof(clientaddr);
        if((len = recvfrom(lfd, buf, len, MSG_PEEK, (struct sockaddr *) &clientaddr, 
    		       &clen)) < 0){
          perror("Socket peek error");
          exit(42);
        }
        if(len == 0) break;
    
        // Connect
        if(connect(lfd, &clientaddr, clen) < 0){
          perror("Could not connect");
          exit(42);
        }
    
        // And now we can just use the normal read and write
        len = 1024;
        if((len = read(lfd, buf, len)) < 0){
          perror("Socket read error");
          exit(42);
        }
        if(write(lfd, buf, len) < 0){
          perror("Socket write error");
          exit(42);
        }
      }
    }
    
    Here's an example of just the socket code, but connected, so that we can just use the read and write functions on the file descriptor (as if it was a file).
    // Connected UDP socket example: this example this example simply waits fro traffic, and the 
    // starts a process to deal with the results. One process per packet, one packet per process. 
    // You'll note that we can now use read and write to get to the traffic, and that this all
    // works...
    
    #include <stdio.h>
    #include <errno.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    
    int main(int argc, char *argv[]){
      int lfd;
      struct sockaddr_in servaddr;
      struct sockaddr clientaddr;
      char buf[1024];
      size_t len;
      socklen_t clen;
      
      // We will listen with this file descriptor
      if((lfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0){
        fprintf(stderr, "Error whilst starting to listen\n");
        exit(42);
      }
    
      // Define what we are listening for
      bzero(&servaddr, sizeof(servaddr));
      servaddr.sin_family = AF_INET;
      servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
      servaddr.sin_port = htons(1234);
    
      // Bind to the address
      if(bind(lfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0){
        perror("Couldn't bind");
        exit(42);
      }
      
      // Do stuff
      while(1){
        // We need to peek at the first part of the packet to determine who to connect to
        len = 1;
        printf("Reading...\n");
        clen = sizeof(clientaddr);
        if((len = recvfrom(lfd, buf, len, MSG_PEEK, (struct sockaddr *) &clientaddr, 
    		       &clen)) < 0){
          perror("Socket peek error");
          exit(42);
        }
        if(len == 0) break;
    
        // Connect
        if(connect(lfd, &clientaddr, clen) < 0){
          perror("Could not connect");
          exit(42);
        }
        
        printf("Data arrived\n");
    
        // Spawn a child to handle this packet
        switch(fork()){
        case -1:
          perror("Couldn't spawn child to handle connection");
          exit(42);
          
        case 0:
          // Child process -- setup the file descriptors, and the run the helper application
          dup2(lfd, 0);
          dup2(lfd, 1);
    
          execl("/bin/cat", "cat", NULL);
          perror("Exec failled");
          exit(42);
          break;
    
        default:
          // Parent process
          break;
        }
      }
    }
    
    And finally, this is what inetd and xinetd should do. And now cat works as a UDP echo server...

    The next step is to write up the patches to inetd and xinetd. It strikes me as being singularly useless otherwise...

    Peter Morgan also seems to think I am on the right track with my honours thesis, which is a good thing.

    Company social golf in the evening. Pictures up soon!

posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 09 Dec 2002



10 December 2002

    Josh got a job at Citadel (my mate Doug runs the managed services area out there, but Josh got the job strictly on merit). Well done. It's been raining here for the last day or so, which is nice, because we are officially in a drought... It's quite cold for a Summer day as well. I am even wearing a jumper.

    Back onto shdns whilst waiting for compiles of work type code.

    We have some consultant from monash.NET coming down at the end of the week to explain to us why .NET would make our lives much happier. I don't think I disagree -- anything has to be better than DCOM.

posted at: 04:00 | path: /diary | permanent link to this entry


Sun, 08 Dec 2002



09 December 2002

    TODO list for today:
    • Achieve sainthood.
    Done.

posted at: 04:00 | path: /diary | permanent link to this entry


Sat, 07 Dec 2002



08 December 2002

    Working more on my honours extension, which is a web interface to the main application which we wrote for the undergraduate bit. Things are going well. It should be pretty easy to get it in on time and working well (unless something evil comes up).

posted at: 04:00 | path: /diary | permanent link to this entry


08 December 2002

    Well, no closer to actually having a video capture happening, despite having carried the box with the capture card out into the lounge and plugging it into the nice aerial on the roof. Perhaps I have the tuner options wrong. I'll have to surf on that some more.

posted at: 04:00 | path: /diary | permanent link to this entry


Fri, 06 Dec 2002



07 December 2002

    Playing with video capture under linux. Plugged in Ben George's Maxtrox Millenium G200 Marvel (AGP), and had pain getting my AMD K6-500 machine to recognise that it could use an AGP video card. I'm blaming the Gigabyte GA-5AX motherboard at the moment, which has this wierd "use AGP " setting, which it seems to be ignoring.

    Played briefly with Ian's pixelview video capture card. First I had to guess the tuner type and put that in modules.conf. Once I had done that I still don't get a picture, but I am not sure if that is because of the aerial or not. I will move the machine closer to a real aerial tomorrow and try again...

    Basically, no closer to video capture after an hour or two.

    Checkout http://www.linuxprofessionalsolutions.com/pavlicek/tv.html for a quick guide...

posted at: 04:00 | path: /diary | permanent link to this entry


Wed, 04 Dec 2002



05 December 2002

    Well, here I am again, in my study. I can't believe that it is Thursday already. Time flies.

    Been doing lots of stuff on final year project honours extensions.

    I was having an arguement with a female friend this afternoon about whether her makeup was effective. My arguement is that makeup is intended to make people look different, and she still looked like Kate. I suggested next time she might try to look like Dracula, or Atilla the Hun.

    She countered with an arguement that makeup is meant to draw attention to your good features (a likely story!). When I suggested a more effective way was to draw arrows on her face, she got all grumpy. I don't understand women...

    Hacked up an extension to wget which will force it to only get filenames ending in .mp3. This is useful for grabbing the content of the linux show mp3 archive. I can see it being useful for other things as well. When I get around to it I will make it more general and submit it to the Maintainer...

posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 03 Dec 2002



04 December 2002

    I hurt my lower back yesterday during a wild grab to not drop my son Andrew in the shower. As a result, I can't bend over or do anything interesting today. I even had to cancel my trip to the gym last night. Bugger.

    Spent more time on my honours thesis, so no interesting Open Source coding last night...

    Hurrah. Catherine's mother is officially a diabetic.

posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 02 Dec 2002



03 December 2002

posted at: 04:00 | path: /resume | permanent link to this entry


03 December 2002

    The seminar on Saturday seemed to go well, and my notes are now available online in the presentations area. There is a problem with the way that UDP sockets are handled by inetd which basically means that writing UDP servers with straight simple shell (e.g. echos etc) is impossible. Tridge and I had a discussion about how to fix this. I will have to look into it when I have some free time...

    Working on that web server at work again. I will oneday get enough time to finish it. Got an abstract in for an educational conference in the middle east that University of Canberra is interested in sending some people to. We'll have to see what comes of that aas well.

    Started documenting my honours extension to final year project -- fun fun fun.

posted at: 04:00 | path: /diary | permanent link to this entry


Wed, 27 Nov 2002



2002: Canberra AUUG

posted at: 04:00 | path: /presentations | permanent link to this entry


28 November 2002

    Spent some time last night working on my DNS server so that it's ready for the talk on Saturday... I'm currently having pain getting xinetd to write back to the UDP connection. I need to look into this further...

    Cross the 100 linux CDs burnt barrier... So far I think I am up to about 105. Not bad for about 4 CLUGs.

posted at: 04:00 | path: /diary | permanent link to this entry


2002: DocBook

posted at: 04:00 | path: /presentations | permanent link to this entry


Tue, 26 Nov 2002



27 November 2002

    Spent some time installing ISYS desktop today in an attempt to debug why our synonym searches don't see to do what I want them to -- I am hoping it is something I have done wrong. If this doesn't work out then the next step is to contact one of the people I know at ISYS and see what they have to say...

posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 25 Nov 2002



26 November 2002

    Well, an exam today (in the afternoon), and then all I have left on the todo list for this week is preparing for my CLUG talk, and my talk at the AUUG Canberra chapter mini-conference thingie. I think I care more about preparing for the mini-conference than I do for the LUG at this stage, as we already have four talks and a competition judging lined up for this month -- we have no hope of getting through all of that in the normal time allocated, and people like to chat during pizza.

    I suspect people wont be keen to listen to more talking during the pizza itself.

    Once I have done the talk at the AUUG mini-conference, then I will be ready to announce to the general world what I have been working on (and am talking about). It is nothing special, but is a little quirky, and I wanted to let AUUG run with it first...

posted at: 04:00 | path: /diary | permanent link to this entry


Sun, 24 Nov 2002



25 November 2002

    Silly arguement with Kristy about the final year project, and whether or not she could claim copyright over all of my work... I think the CVS commit report might have a hint about why she wants to have her name mentioned on every source file.

posted at: 04:00 | path: /diary | permanent link to this entry


Sat, 23 Nov 2002



Mailling lists being monitored

    The mailling list monitoring part of patchtrack is currently monitoring the following mailling lists. If you think I should include more here, then let me know at mikal@stillhq.com and I will see what I can do...

  • Linux kernel mailling list
  • USB devel
  • Kernel janitor
  • acpi4linux
  • alsa devel
  • PPC devel
  • PPC embedded
  • PPC iSeries
  • PPC64 devel

posted at: 04:00 | path: /patchtrack | permanent link to this entry


Fri, 22 Nov 2002



23 November 2002

    Final year project is nearly over. The talk went well, now we just need to hand in the thesis and documentation. Then I can do honours.

    I have documentation due, an exam, a local LUG talk, and a conference talk, all this coming week. I guess that makes me still busy...

posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 19 Nov 2002



20 November 2002

    Got the flu, and now I'm losing my voice. I wish I wasn't sick for once...

posted at: 04:00 | path: /diary | permanent link to this entry


2002: Computer Engineering Project final report

    Is here. We don't actually present this until the 22nd...

posted at: 04:00 | path: /presentations | permanent link to this entry


Mon, 18 Nov 2002



Patchtrack 0.1

    The source code can be downloaded here.

posted at: 04:00 | path: /patchtrack | permanent link to this entry


Sat, 16 Nov 2002



17 November 2002

    Ditched my 132 cm internal projection TV in favour of a Grundig Xendia. Nice...

    Can't sleep, so coded some more.

posted at: 04:00 | path: /diary | permanent link to this entry


Fri, 15 Nov 2002



16 November 2002

    I'm getting really bored with being sick. A couple of group members spent yesterday throwing up. I have the flu now...

    Five more accepted kernel patches, and Chris Wilson has done some nice work making one of my patches nicer. Cool...

posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 12 Nov 2002



13 November 2002

posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 11 Nov 2002



Libmplot 0.5.4

    This version adds the required function prototype in the header for you to be able to use the height functionality...

posted at: 04:00 | path: /site | permanent link to this entry


Libmplot 0.5.4

    This version adds the required function prototype in the header for you to be able to use the height functionality...

posted at: 04:00 | path: /libmplot | permanent link to this entry


My first patches included

    From the 2.5.47 ChangeLog for Linus' tree:
    Summary of changes from v2.5.46 to v2.5.47
    ============================================
    
    ...
    
    
    [PATCH] [Trivial Patch] journal_documentation-001
    	
    	This corrects DocBook formatting errors in the journalling API
    	documentation which stopped a "make psdocs" from working
    
    ...
    
    
    ppc64: fix misc_register usage from Michael Still
    
    ...
    


posted at: 04:00 | path: /linux | permanent link to this entry


Sun, 10 Nov 2002



Libmplot 0.5.2

    There was a small bug in the text rotation implementation. This has now been fixed... You can download a new version of the code from here.

posted at: 04:00 | path: /site | permanent link to this entry


Libmplot 0.5.3

    This version adds a function which will return the vertical space taken by a painted string.

posted at: 04:00 | path: /site | permanent link to this entry


11 November 2002

    Knocked over the short reports for final year project during my lunch time, which means I am two things closer to being finished. Also filled in the paper work for my missed exam. It looks like the resit will be on 26 November, which works well because it is the day before my wedding anniversary.

    More work on final year project. It looks like we might be finally making enough progress. I crossed about four things off my todo list tonight.

    Call me two accepted kernel patches boy.

    My ISP had a massive hard disk failure on their mail / web server. This means stillhq.com has been offline for two days now, including email. I hate being out of contact... Perhaps they should consider some sort of mirrored setup in the future?

posted at: 04:00 | path: /diary | permanent link to this entry


Libmplot 0.5.3

    This version adds a function which will return the vertical space taken by a painted string.

posted at: 04:00 | path: /libmplot | permanent link to this entry


Libmplot 0.5.2

    There was a small bug in the text rotation implementation. This has now been fixed... You can download a new version of the code from here.

posted at: 04:00 | path: /libmplot | permanent link to this entry


Sat, 09 Nov 2002



10 November 2002

    Another really stressful final year project day. Hurrah!

posted at: 04:00 | path: /diary | permanent link to this entry


Fri, 08 Nov 2002



09 November 2002

    Final year project. The web interface isn't working as well as I would like -- and I am not sure why...

    Has anyone else noticed that Brick is a really depressing song?
    
    She's a brick and I'm drowning slowly
    off the coast and I'm headed nowhere
    She's a brick and I'm drowning slowly
    they call her name at 7:30
    I pace around the parking lot
    then I walk down to buy her flowers
    And sell some gifts that I got
    Can't you see
    It's not me you're dying for
    Now she's feeling more alone
    Than she ever has before
    
    


    Also spent some time rolling in a couple of patches I had been sent against Panda and PandaLex. The coolest one is that now Panda supports wrapped text boxes (for the 14 core Adobe PDF fonts at least). Given these are the only fonts currently supported by Panda, this is probably good enough for now...

    I'll be releasing new versions just as soon as I have been able to test the changes...

posted at: 04:00 | path: /diary | permanent link to this entry


2.5.46

    Checkout the patch tracker. I am currently trying to move away from janitoring to something a little more complex, and this version is the first version I have done this for. Then again, I am still doing janitor stuff as well...

posted at: 04:00 | path: /linuxpatch | permanent link to this entry


Thu, 07 Nov 2002



08 November 2002

    Sick. I'll have to do my exam another day. Did a little bit of laptopping from bed, but slept most of the day...

posted at: 04:00 | path: /diary | permanent link to this entry


Wed, 06 Nov 2002



cli and sti deprecated in 2.5

    Whilst installing 2.5.46, I experienced the following error:
    make -rR -f scripts/Makefile.modinst obj=net/sched
    make -rR -f scripts/Makefile.modinst obj=net/sunrpc
    make -rR -f scripts/Makefile.modinst obj=net/unix
    make -f scripts/Makefile.modinst obj=lib
    make -f scripts/Makefile.modinst obj=arch/i386/lib
    if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.5.46; fi
    depmod: *** Unresolved symbols in /lib/modules/2.5.46/kernel/arch/i386/kernel/apm.o
    depmod:         xtime_lock
    depmod: *** Unresolved symbols in /lib/modules/2.5.46/kernel/drivers/net/aironet4500_core.o
    depmod:         cli
    depmod:         restore_flags
    depmod:         awc_work
    depmod:         save_flags
    depmod: *** Unresolved symbols in /lib/modules/2.5.46/kernel/drivers/net/aironet4500_proc.o
    depmod:         cli
    depmod:         restore_flags
    depmod:         save_flags
    depmod: *** Unresolved symbols in /lib/modules/2.5.46/kernel/drivers/net/strip.o
    depmod:         cli
    depmod:         restore_flags
    depmod:         save_flags
    make: *** [_modinst_post] Error 1
    [root@localhost linux-2.5.46-build]# 
    
    I am assured on the kernel janitors mailing list that this is because cli, sti and restore_flags are deprecated in the 2.5 tree, and obviously these source files haven't been fixed. How to fix the problem is documented in Documentation/cli-sti-removal.txt

posted at: 04:00 | path: /linux | permanent link to this entry


07 November 2002

    I've got gastro. Yay. Trying to decide if I should sit my exam tomorrow, or if I should hold off until I feel better. Undecided at this stage -- it certainly has interrupted by studies though.

    Finally got linux kernel 2.5.46 compiled -- it took a little bit of effort. The N50 doesn't work with the newer kernel either, which is a good thing:
    Nov  7 15:24:45 localhost kernel: drivers/usb/core/hub.c: new USB device 00:07.2-1, assigned address 6
    Nov  7 15:24:45 localhost kernel: Product: General Purpose USB Hub
    Nov  7 15:24:45 localhost kernel: drivers/usb/core/hub.c: USB hub found at 1
    Nov  7 15:24:45 localhost kernel: drivers/usb/core/hub.c: 2 ports detected
    Nov  7 15:24:45 localhost /etc/hotplug/usb.agent: Bad USB agent invocation
    Nov  7 15:24:46 localhost kernel: drivers/usb/core/hub.c: new USB device 00:07.2-1.2, assigned address 7
    Nov  7 15:24:46 localhost kernel: drivers/usb/core/message.c: error getting string descriptor 0 (error=-32)
    Nov  7 15:24:46 localhost /etc/hotplug/usb.agent: Bad USB agent invocation
    Nov  7 15:24:48 localhost /etc/hotplug/usb.agent: ... no modules for USB product 451/2036/101
    Nov  7 15:24:49 localhost /etc/hotplug/usb.agent: ... no modules for USB product 50d/805/500
    


posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 05 Nov 2002



06 November 2002

    Really long final year project meeting at uni last night. Things seem to be back on track again, which is good, because we only have about two weeks to finalize the whole thing. Well enough to be back at work again today.

    Some talk on the Canberra Linux User's Group mailling list implied that the Belkin Nostromo N50 gamepad isn't supported on Linux. This is cool, because I have been looking for an inexpensive ($70 AU in this case), cool, portable, and preferably USB device to play with for a while.

    So I picked one up. It's great -- it doesn't instantly work (although I might just be missing the module:
    Nov  6 16:37:40 localhost kernel: hub.c: USB new device connect on bus1/1/1, assigned device number 5
    Nov  6 16:37:40 localhost kernel: usb-uhci.c: interrupt, status 2, frame# 236
    Nov  6 16:37:40 localhost kernel: input1: USB HID v1.00 Gamepad [050d:0805] on usb1:5.0
    Nov  6 16:37:43 localhost /etc/hotplug/usb.agent: ... no modules for USB product 50d/805/500
    Nov  6 16:37:59 localhost httpd: httpd startup succeeded
    


posted at: 04:00 | path: /diary | permanent link to this entry


Mon, 04 Nov 2002



05 November 2002

    Not feeling amazingly well today, so I am spending the morning taking it easy at home before having to go out to uni in the afternoon for the normal final year project meeting.

    Deadlines I have coming up:
  • 8 Nov: CE4 exam
  • 15 Nov: Final year project documentation due
    • 2 short reports
    • User manual
    • Technical manual
    • Finished code
    • Project report
    • Honours extension report
  • 22 Nov: Final year project presentations

    Fun fun fun... This diary entry was brought to you by the number 3, and vanilla coke.

posted at: 04:00 | path: /diary | permanent link to this entry


Sun, 03 Nov 2002



04 November 2002

    Spent yesterday studying for my exam. Spent most of today in at the office working on redback (the TRIM web server). I need to go home tonight a do more study. Yay.

    Rusty returned comments on a heap of my trivial kernel patches, so I need to process those sometime -- perhaps as a distraction to studying?

posted at: 04:00 | path: /diary | permanent link to this entry


Fri, 01 Nov 2002



02 November 2002

    Studying for an exam today. Did I mention that studying for exams is boring?

    I so have to go on a Linux geek cruise. I wonder if the Torvalds girls would baby sit Andrew?

    Everyone is putting their resumes online. I personally wonder about the effectiveness of it, but thought I would give it a try. Note that I'm not actually looking for work at the moment, although I guess I would reconsider to the right employer / project / a great open source focus.

posted at: 04:00 | path: /diary | permanent link to this entry


Resume

posted at: 04:00 | path: /resume | permanent link to this entry


Wed, 30 Oct 2002



31 October 2002

posted at: 04:00 | path: /diary | permanent link to this entry


2.5.44

    This is the first kernel version I have submitted patches against. Checkout the patch tracker.

posted at: 04:00 | path: /linuxpatch | permanent link to this entry


2.5.45

posted at: 04:00 | path: /linuxpatch | permanent link to this entry


Tue, 29 Oct 2002



What error should I return?

    What error should I return when a create_proc_info_entry fails? Well, this page has a it of guidance about the meaning of the various error values, whilst the canonical reference would have to be the kernel source.

posted at: 04:00 | path: /linux | permanent link to this entry


Linux

    I now have a page tracking the patches I have submitted to the linux kernel. You can find it here.

posted at: 04:00 | path: /site | permanent link to this entry


30 October 2002

    Spent the last few days working on a bunch of linux auditing, as well as final year project. Rusty Russel rocks -- he's been really good about giving me heaps of helpful feedback.

posted at: 04:00 | path: /diary | permanent link to this entry


2.5.44 create_proc_info_entry audit

    When fixing the misc_register stuff, there were a few calls to create_proc_info_entry which seemed to be broken. In fact, a quick grep shows up quite a few, so this TODO list covers that.

posted at: 04:00 | path: /linux | permanent link to this entry


Mon, 28 Oct 2002



2.5.44 register_reboot_notifier audit

    The janitor TODO has an audit of the return code of register_reboot_notifier down, so I thought I would build a TODO list. Then again, it turns out that the function never (whatever that means) fails, and always returns zero...

posted at: 04:00 | path: /linux | permanent link to this entry


2.5.44 scsi_register audit

    The janitor TODO has an audit of the return code of scsi_register down, so I thought I would build a TODO list. The following patches fell out the other end:

posted at: 04:00 | path: /linux | permanent link to this entry


Sun, 27 Oct 2002



2.5.44 misc_register audit

posted at: 04:00 | path: /linux | permanent link to this entry


Sat, 26 Oct 2002



27 October 2002

    Working on an assignment... You know how you sometimes sit in a unit thinking that the content can't possibly be as hard as it seems, and that you just need to find the piece of paper which explains it all? Well, I think I just found found the piece of paper for Speech recognition.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 23 Oct 2002



Want a copy of a distro?

    Caldera OpenLinux
  • eServer 2.3 (3 CDs)
  • Server 3.1.1 (1 CD)

    Clark Connect
  • 1.0.2 (1 CD)

    Cygwin
  • Cygwin as at 1 September 2002 (2 CDs)

    Debian
  • 1.2 (1 CD)
  • Woody -- an early candidate for 3.0 (8 CD set)
  • 3.0 release 1 (7 CD set)

    FreeBSD
  • 2.2.6 (4 CDs)
  • 2.2.7 (4 CDs)
  • 2.2.8 (4 CDs)
  • 3.1 (4 CDs)
  • 3.2 (4 CDs)
  • 3.3 (4 CDs)
  • 3.4 (4 CDs)
  • 4.0 (4 CDs)
  • 4.6 (4 CDs)
  • 4.6.2 (1 CD)

    Gentoo
  • 1.2 x86 (1 CD)

    TurboLinux
  • 6.0 Server (4 CDs)

    Linux Kernel Summit MP3s
  • 2002 Ottawa Linux Kernel Summit, MP3s of talks (1 CD)

    Lycoris
  • Redmond Linux 1.0 RC2 (4 CDs)

    Mandrake
  • 9.0 x86 (3 CDs)

    Minix
  • 2.0.3 (1 CD)

    NetBSD
  • 1.4.2 (1 CD)
  • 1.5 Sparc (1 CD)

    OpenBSD
  • 2.5 (2 CDs)
  • 3.1 (3 CDs)

    RedHat
  • 1.0 x86 (1 CD)
  • 1.1 x86 (1 CD)
  • 5.1 x86 (2 CDs)
  • 6.0 x86 (1 CD)
  • 6.1 Sparc (1 CD)
  • 6.1 x86 (1 CD)
  • 6.2 Sparc (1 CD) -- I could never get this to work
  • 6.2 x86 (1 CD)
  • 7.0 x86 (4 CDs)
  • 7.1 x86 (3 binary CDs)
  • 7.3 x86 (3 binary CDs)
  • 8.0 x86 (5 CDs)

    Slackware
  • 2.1 (2 CDs)

    TurboLinux
  • 6.0 Server (4 CDs)

    YellowDog
  • 2.3 (1 CD)

posted at: 07:00 | path: /cdr | permanent link to this entry


2.4.19 Configuration language

    I have been playing with the Linux kernel configuration language, and needed the configuration language documentation handy. The red bits have been implemented in my little perl parser...

    This code has become obsolete with the implementation of a new kernel configuration language in the latest beta kernel (2.5.45).

posted at: 07:00 | path: /linux | permanent link to this entry


Want a copy of a distro?

    Caldera OpenLinux
  • eServer 2.3 (3 CDs)
  • Server 3.1.1 (1 CD)

    Clark Connect
  • 1.0.2 (1 CD)

    Cygwin
  • Cygwin as at 1 September 2002 (2 CDs)

    Debian
  • 1.2 (1 CD)
  • Woody -- an early candidate for 3.0 (8 CD set)
  • 3.0 release 1 (7 CD set)

    FreeBSD
  • 2.2.6 (4 CDs)
  • 2.2.7 (4 CDs)
  • 2.2.8 (4 CDs)
  • 3.1 (4 CDs)
  • 3.2 (4 CDs)
  • 3.3 (4 CDs)
  • 3.4 (4 CDs)
  • 4.0 (4 CDs)
  • 4.6 (4 CDs)
  • 4.6.2 (1 CD)

    Gentoo
  • 1.2 x86 (1 CD)

    Knoppix
  • 3.1 (1 CD)

    TurboLinux
  • 6.0 Server (4 CDs)

    Linux Kernel Summit MP3s
  • 2002 Ottawa Linux Kernel Summit, MP3s of talks (1 CD)

    Lycoris
  • Redmond Linux 1.0 RC2 (4 CDs)

    Mandrake
  • 9.0 x86 (3 CDs)

    Minix
  • 2.0.3 (1 CD)

    NetBSD
  • 1.4.2 (1 CD)
  • 1.5 Sparc (1 CD)

    OpenBSD
  • 2.5 (2 CDs)
  • 3.1 (3 CDs)

    RedHat
  • 1.0 x86 (1 CD)
  • 1.1 x86 (1 CD)
  • 4.0 x86 (1 CD)
  • 5.1 x86 (2 CDs)
  • 6.0 x86 (1 CD)
  • 6.1 Sparc (1 CD)
  • 6.1 x86 (1 CD)
  • 6.2 Sparc (1 CD) -- I could never get this to work
  • 6.2 x86 (1 CD)
  • 7.0 x86 (4 CDs)
  • 7.1 x86 (3 binary CDs)
  • 7.3 x86 (3 binary CDs)
  • 8.0 x86 (5 CDs)

    Slackware
  • 96 (1 CD)
  • 2.1 (2 CDs)

    Suse
  • 6.1 Evaluation version (1 CD)
  • 8.0 (7 CDs)

    TurboLinux
  • 6.0 Server (4 CDs)

    YellowDog
  • 2.3 (1 CD)

posted at: 07:00 | path: /cdr | permanent link to this entry


2002: Autotools

posted at: 07:00 | path: /presentations | permanent link to this entry


Tue, 22 Oct 2002



23 October 2002

    Being able to point people at the Online CVS history for a project is nice, but I also wanted a way to point people simply at the latest version of a file, so there is also now a extracted tree from the source control system. This way people can just click on a PDF or whatever and it just works.

posted at: 07:00 | path: /diary | permanent link to this entry


2002: Computer Engineering Project progress report

    As part of our final year project, we are required to give regular progress reports. This is the fourth.

posted at: 07:00 | path: /presentations | permanent link to this entry


Mon, 21 Oct 2002



22 October 2002

    Got a fair bit of work on the final year project user interface done -- it is starting to look a little bit sexy. I had forgotten about the second speach recognition assignment, so I should start to look into that...

    I have a CVS log graphing script, which I have been using for final year project. I thought I would run it on the Samba source code... Has anyone else noticed that the log file is 716,291 lines (thats 25,382,244 bytes)?

    The problem with the current method is that there is a pretty column header jpeg generated for each source file which has ever been editted, and this slows down generation, as well as making the output of the script a lot bigger on disc (lots and lots of little images). I think that I need to refactor the script so that the days of the month (which hardly ever change) are across the top, and the source files are on the rows.

    The old method worked well for smaller projects, but isn't so crash hot for the huge ones... On the up side, the header images are only ever generated once, and then reused...

    Check the report out for yourself

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 20 Oct 2002



Syncing Kernel Traffic with your Palm via Avant Go

    I've been getting really into Avant Go as a way of reading interesting things in offline idle time. Here a URL which will add Kernel Traffic to your Avant Go config. It turns out that this beats it's head up against a Palm 32k db entry size limit -- so try using a different URL (which is a script on my webserver which breaks up the Kernel Traffic page into many smaller pages).

posted at: 07:00 | path: /site | permanent link to this entry


Libmplot 0.5.1

    There was a silly typo in one of the example programs. This has now been fixed... You can download a new version of the code from here.

posted at: 07:00 | path: /site | permanent link to this entry


Libmplot 0.5.1

    There was a silly typo in one of the example programs. This has now been fixed... You can download a new version of the code from here.

posted at: 07:00 | path: /libmplot | permanent link to this entry


21 October 2002

    Thinking about the Linux kernel configuration language.

    In the office today.

    Does the final year project work ever end?

    I've been getting really into Avant Go as a way of reading interesting things in offline idle time. Here a URL which will add Kernel Traffic to your Avant Go config. It turns out that this beats it's head up against a Palm 32k db entry size limit -- so try using a different URL (which is a script on my webserver which breaks up the Kernel Traffic page into many smaller pages).

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 18 Oct 2002



19 October 2002

    More work on the GDMS user interface. I have the basic graphing working, so for a change I started on the mouse selection stuff. There is now a status bar, showing the current mouse location, the current graph, and the selected graph region (if any).




    Thinking a little about iSCSI on linux after the UUnite presentation from the other night. There is a linux iSCSI client (called an initiator) at http://linux-iscsi.sourceforge.net/, but from the sound of the page they have only tested against a Cisco server.

    I can't find references to a Linux iSCSI server, but I know that IBM sells one... I'll post to CLUG and see what happens.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 16 Oct 2002



Picnic at the Botanic Gardens

    Some pictures from a weekend picnic at the National Botanic Gardens.

posted at: 07:00 | path: /events | permanent link to this entry


Libmplot 0.5

    Libmplot 0.5 is now available -- it features the following cool new things: Bezier curves, filled polygons, line widths, line dashing, and the name change. There is also more documentation. Get it from here.

posted at: 07:00 | path: /libmplot | permanent link to this entry


18 October 2002

    My girl game me a flower last night. She's a good girl.

    More work on the final year project graphing. Here's a screen shot of what I have so far, compared with what their current system produces:



    Apart from the "This is a foo" comment, which is me testing text, you can see that my graph is horizontally backwards (and perhaps vertically as well). This will be really easy to fix though.

    All these graphs need to be perfect in my mind is some axes labelling, and some of the descriptive text that the other graphs have on them...

    Started work on opening subviews based on a user mouse selection -- these can effecitively be treated as smaller datasets, created by the parent dataset me thinks.


posted at: 07:00 | path: /diary | permanent link to this entry


Dust storm!

    There was a dust storm followed by some rain last night. Checkout what happened to my car...

posted at: 07:00 | path: /events | permanent link to this entry


Andrew at home

posted at: 07:00 | path: /andrew | permanent link to this entry


Floriade

posted at: 07:00 | path: /events | permanent link to this entry


Libmplot 0.5

    Libmplot 0.5 is now available -- it features the following cool new things: Bezier curves, filled polygons, line widths, line dashing, and the name change. There is also more documentation. Get it from here.

posted at: 07:00 | path: /site | permanent link to this entry


17 October 2002

    I went out this morning, and there had been a dust and rain storm. Checkout my car!

    Well, Peter needed to see some samples of the new graphing format for my final year project, so I figured I would put it here -- please note that the horizontal scaling and gap resolution is not there yet...



    The guys out at the IBM LTC in Barton are really growing on me -- a cool bunch of people. I spent some time at the UUnite meeting yesterday, and apart from being a 20 questions session on SANs for the presenter, it was way cool... I was one of the people asking all the questions, so I don't feel too much guilt. It also helped guide the presentation in useful directions I suspect.


posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 15 Oct 2002



16 October 2002

    Doh! Normally I do a check before releasing something to make sure that my name is unique. I didn't do this for libplot, which is why I am now having to renamed it to libmplot (the M is for Mikal of course). This will take a little bit of work.

    Hacking on the AUUG website. HTML in CVS with commit scripts is a pain.

    I am having some pain using the even odd rule for filling polygons... If you look at the example below, you can see that the horizontal lines result in me overshooting heaps.



    I finally got it sorted out -- it now looks as it should:



posted at: 07:00 | path: /diary | permanent link to this entry


New features under development

    The libmplot 0.5 release is getting closer. So far, it will contain: Bezier curves, line widths, drawing outside of the raster bounds will no longer cause crashes, filled polygons, and the name change.

    Filled polygons are today's work, and I think they are pretty neat:



posted at: 07:00 | path: /libmplot | permanent link to this entry


Mon, 14 Oct 2002



15 October 2002

    Good chat with a friend at IBM yesterday. It helped determine some tactics for future directions...

    I need a haircut.

    And to get some projects off my todo list.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 13 Oct 2002



14 October 2002

    Currently unfinished projects. I have to get some of these off my plate as soon as I can or I might go insane. Not that I have any free time...

    article-trivsql
    cardinal
    chm
    clug
    ctpfaq
    cvs001
    cvs001-test
    dumppdf
    geekcodegen
    gmat
    howto-getopt
    libplot
    linux-webcam
    mysqlvi
    netflow
    palm-memopad
    panda
    pandalex
    pandascript
    pngtools
    shdns
    shmail
    short-grid
    short-ld
    short-ssl
    syncagent
    tiffapi
    trie
    trivsql
    tvguide
    


posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 12 Oct 2002



13 October 2002

    Working on rotated text support for libplot. This will mean that I will then be ready to label the graphs for final year project with their pretty little text string thingies. This will also bring me a lot closer to having a complete implementation of a library which can implement PDF rendering...

posted at: 07:00 | path: /diary | permanent link to this entry


Libplot 0.4

    This release includes a small bugfix, and support for rotated text. Get it from here.

posted at: 07:00 | path: /libmplot | permanent link to this entry


Fri, 11 Oct 2002



Site milestone

    Stillhq.com now takes over a gigabyte on the webserver! This figure doesn't take into account that most of these pages are generated, and there is therefore very little repeated boiler plate et cetera.

    I lost count of how many ages are here quite some time ago. One day I might run a crawler and see...

posted at: 07:00 | path: /site | permanent link to this entry


12 October 2002

    The things you learn on IRC. Be brave and try this on your local linux boxen:
    startx -- :1
    export DISPLAY=:1
    
    Then hit ctr-alt-f8 (ctrl-alt-f7 to get back).

    Very cool.

posted at: 07:00 | path: /diary | permanent link to this entry


11 October 2002

    COM plumbing can be evil. I am so outragiously busy, that I don't even have time to stop and ask what I should be doing... A bad sign.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 09 Oct 2002



10 October 2002

    Playing with the PCRE (Perl Compatible Regular Expressions) library. It's cool and really easy to use. It is now used to clean up the /tmp directory on my final year project...

    Nichrome wire with a 12 volt power supply easily lights paper -- therefore reaching about 230 degrees celcius.

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 08 Oct 2002



09 October 2002

    Matt has introduced me to Weebl and Bob. These guys rock.

    I have an article proposal in with Dr Dobb's Journal, so now I have to actually produce something. Spent some time today working on that. I really need to have something to them by the end of the week, because I keep letting the deadline on this one slip, which is a bad thing.

    Continued hacking on the CHM decompiler in my spare time (it will be useful for work). I now only need to work out how to decode sections other than section zero.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 07 Oct 2002



08 October 2002

    Libplot 0.3 is out the door... As far as I can see, the text implementation is now complete, and is fairly well documented. Kate's birthday.


posted at: 07:00 | path: /diary | permanent link to this entry


Libplot 0.3

posted at: 07:00 | path: /libmplot | permanent link to this entry


Libplot 0.3

posted at: 07:00 | path: /site | permanent link to this entry


Sun, 06 Oct 2002



Andrew at home and at The Entrance (north of Sydney)

posted at: 07:00 | path: /andrew | permanent link to this entry


06 October 2002

    Went to Floriade with a bunch of people from the Birthing Center classes. I took a fair few photos if you're interested in that sort of thing. A good day overall...


posted at: 07:00 | path: /diary | permanent link to this entry


07 October 2002

    A very productive day. I got heaps of progress made with the CHM decompiler I have been playing with, got lots done for final year project (conquered a Freetype coding problem which has been bothering me for a bit), had a picnic lunch at the National Botanic Gardens, and even went to the Gym.

    Bumped into Brad Hards (a linux USB hacker), and Karl Maftoum (a University of Canberra sysadmin) as well.


posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 01 Oct 2002



02 October 2002

posted at: 07:00 | path: /diary | permanent link to this entry


2002 AUUG

    I now have photos from the AUUG 2002 conference online.

posted at: 07:00 | path: /events | permanent link to this entry


2002 AUUG

    I now have photos from the AUUG 2002 conference online.

posted at: 07:00 | path: /site | permanent link to this entry


Mon, 30 Sep 2002



2002: Engineering industrial experience

posted at: 07:00 | path: /presentations | permanent link to this entry


Tue, 24 Sep 2002



25 September 2002

    Nearly finished building the x21 back into it's previous state... Honours extension to final year project approved. Life continues...

    The initial design for the honours extension looks something like:



posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 23 Sep 2002



2002: Computer Engineering Project progress report

    As part of our final year project, we are required to give regular progress reports. This is the third.

posted at: 07:00 | path: /presentations | permanent link to this entry


24 September 2002

    Building slides for the final year project progress presentation this afternoon. This also involves making sure I have a version of the user interface which actually compiles so I can demo it briefly.

    My x21 came back from IBM. It hasn't given me any electrical shocks yet, which is a good thing. They say they didn't find the fault, but then again they reseated all the connectors, so perhaps that was it.

    Denon returned too. I wonder how longer before it blows up again? Next time I'll call Merlin Electronics in Mitchell, he seemed to be much more helpful...

    Rebuilding my x21 from factory defaults:
  • Shrink the win98 partition and move it up 20 mb or so (/boot needs to be down low)
  • Copy the redhat ISO files to c:\temp
  • Boot with redhat floppy and install from hard disk

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 20 Sep 2002



21 September 2002

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 19 Sep 2002



20 September 2002

    Well, my Denon has been repaired yet again. The fault was in the left front output stage apparently. The little man will come out and have a look at my speakers for a second time apparently.

    http://www.softwaresecretsexposed.com/ this guy is very scary. We should all live in fear.

    Trying to dig some more information out about hyperthreading because of an interesting comment made by Anton Blanchard about the schedualling algorithm. There doesn't seem to be much out there on the subject.

    Dealing with HTTP date formats and the common log format for this web server. The Apache page is helpful, as is w3c page.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 18 Sep 2002



19 September 2002

    Final year project frustration. One of the other members of the group is upset because a Makefile, now that it has been Automaked, now takes 5 seconds longer to compile for his favourite target. Checkout the thread for yourself, and draw your own conclusions.

    The x21 got picked up for repair yesterday. All my hardware keeps breaking. On the hardware upside, the Cisco Catalyst 1900 is now in the server room, and I can now think again in my study. This is cool, because it now means that my test bench has a Cisco Catalyst 1900 (switch), and a Lattishub 2803 (hub) for when I want to play. You never know when you might need an extra 40 ports in the study temporarily...

    I also dug up some documentation on the Catalyst 1900 in case I need it: http://www.cisco.com/univercd/cc/td/doc/product/lan/28201900/1928v8x/.

posted at: 07:00 | path: /diary | permanent link to this entry


Panda 0.5 RC1 man pages now available online

posted at: 07:00 | path: /panda/panda-documentation | permanent link to this entry


Tue, 17 Sep 2002



18 September 2002

    Hmmmm. The Cisco 1900 switch is simply too loud to live on my desk. I can feel the great switch rearrangement coming on in orer to bring something quieter into this room.

    An interesting article on that Hungarian notation thing Microsoft is so big on.

    Finally sending my Thinkpad x21 in for repair -- I've been putting it off for about 8 weeks because I have been travelling a fair bit recently.
    Scott took my call (he's in Brisbane if that matters)
    
    My faults:
      - electrical shocks
      - long POST
      - dud floppy drive (this might be my fault though)
    
    Tracking number: p1d9hy3
    
    I must say that Scott was very polite. Unlike the milko, who I have called five times now to try to tell him about an incorrect delivery last Sunday.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 16 Sep 2002



17 September 2002

    Working on a loner laptop from Doug because my X21 has to go in for some serious IBM loving... In the end I wrote a simple shell script which attempts to keep my increasing number of machines in sync.

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 13 Sep 2002



14 September 2002

    Spending more time on final year project again. It is nearing crunch time...

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 12 Sep 2002



13 September 2002

    Still writing specifications at work.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 11 Sep 2002



JPEG 2 MPEG howto

posted at: 07:00 | path: /article | permanent link to this entry


Local cached version of the Docbook guide

posted at: 07:00 | path: /docbook | permanent link to this entry


Howto

    Abstract

    Recently, I went to a conference and was keen enough to setup a webcam. Now I have 27,000 JPEG images, which I want to turn into a simple MPEG movie. This document details the process I went through to make this happen...

    This was all done on a pretty vanilla Redhat 7.1 box, for those who care about such things.


    MPEG tools

    The project I found which did the conversion is called MJPEG tools. The URL for this project is http://mjpeg.sourceforge.net. There were lots of dependancies, which we should talk about first...


    Dependancies

    libavifile

    This library can be found at http://avifile.sourceforge.net. It is needed by MJPEG tools to be able to handle AVI files. The version I used was 0.7-0.7.15. It follows the standard autotools install process:

    ./configure
    make
    make install

    libsdl

    "Simple DirectMedia Layer is a cross-platform multimedia library designed to provide fast access to the graphics framebuffer and audio device. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power." Simple DirectMedia Layer supports Linux, Win32, BeOS, MacOS, Solaris, IRIX, and FreeBSD." -- http://www.libsdl.org/index.php

    libsdl can be found at http://www.libsdl.org, and is needed for some of the MJPEG playback routines. I used version 1.2.4. Again, installing is done by simply:

    ./configure
    make
    make install

    nasm

    NASM is an assembler, and the authors are none to modest. The web page is http://sourceforge.net/projects/nasm and to quote from that page:

    "This is NASM - the famous Netwide Assembler. Back at SourceForge and in intensive development!"

    It can't be that famous, I've never heard of it before.

    An explaination of where NASM came from can be found in the documentation:

     

    The Netwide Assembler grew out of an idea on comp.lang.asm.x86 (or possibly alt.lang.asm - I forget which), which was essentially that there didn't seem to be a good free x86-series assembler around, and that maybe someone ought to write one.

    • a86 is good, but not free, and in particular you don't get any 32-bit capability until you pay. It's DOS only, too.

    • gas is free, and ports over DOS and Unix, but it's not very good, since it's designed to be a back end to gcc, which always feeds it correct code. So its error checking is minimal. Also, its syntax is horrible, from the point of view of anyone trying to actually write anything in it. Plus you can't write 16-bit code in it (properly).

    • as86 is Minix- and Linux-specific, and (my version at least) doesn't seem to have much (or any) documentation.

    • MASM isn't very good, and it's expensive, and it runs only under DOS.

    • TASM is better, but still strives for MASM compatibility, which means millions of directives and tons of red tape. And its syntax is essentially MASM's, with the contradictions and quirks that entails (although it sorts out some of those by means of Ideal mode). It's expensive too. And it's DOS-only.

    So here, for your coding pleasure, is NASM. At present it's still in prototype stage - we don't promise that it can outperform any of these assemblers. But please, please send us bug reports, fixes, helpful information, and anything else you can get your hands on (and thanks to the many people who've done this already! You all know who you are), and we'll improve it out of all recognition. Again.

     
    --http://home.attbi.com/~fbkotler/nasmdoc1.html#section-1.1 

    Install it by doing the autotools thing once more. Note that the make install step is broken, and that I had to do this to get it to install:

    mkdir bin
    mkdir man
    mkdir man/man1
    make install
    cp bin/nasm /usr/local/bin/
    cp man/man1/n* /usr/local/man/man1/

    jpeg-mmx

    We'll also need the MJPEG people's MMX JPEG library. I am not sure how this differs from the standard JPEG library, which also seems to be an option here... I downloaded version 0.1.4, and did the autotools thing.

    For some reason they have disabled make install. I did:

    [root@localhost jpeg-mmx-0.1.4]# make install
    Make install has been disabled
    If you really want to install libjpeg-mmx, please use make install_real
    [root@localhost jpeg-mmx-0.1.4]# make install_real 
    /usr/bin/install -c -m 644 jconfig.h /usr/local/include/jconfig.h
    /usr/bin/install -c -m 644 ./jpeglib.h /usr/local/include/jpeglib.h
    /usr/bin/install -c -m 644 ./jmorecfg.h /usr/local/include/jmorecfg.h
    /usr/bin/install -c -m 644 ./jerror.h /usr/local/include/jerror.h
    /usr/bin/install -c -m 644 ./jinclude.h /usr/local/include/jinclude.h
    /usr/bin/install -c -m 644 libjpeg-mmx.a /usr/local/lib/libjpeg-mmx.a
    [root@localhost jpeg-mmx-0.1.4]# 

    And annoyingly, I also had to manually copy a file:

    cp jpegint.h /usr/local/include/

    movtar

    movtar is actaully written by the MJPEG people. You can download it from http://download.sourceforge.net/mjpeg/. I used the 1.3.0 release. The install was auttooled once more. I am sure by now I don't have to explain how to do that...


    Compiling MJPEG tools itself

    I downloaded version 1.6.0 from the sourceforge website. Yet again, the install process was:

    This wouldn't make out of the box:

    g++ -g -O2 -o .libs/divxdec divxdec.o lav_common.o -Wl,-rpath -Wl,/usr/local/lib  
    -L/root/mjpegtools-1.6.0/utils -lmjpegutils -L/usr/local/lib 
    /usr/local/lib/libaviplay.so -lz -L/usr/X11R6/lib -lSM -lICE -lXxf86dga -lXxf86vm 
    -lXi -lXft -lXv -lXext -lX11 -lpthread -lnsl -ldl -lm ./.libs/liblavfile.so -L/usr/lib 
    /usr/lib/libglib.so -lmovtar -L/root/mjpegtools-1.6.0/../jpeg-mmx-0.1.4 
    ./.libs/liblavplay.so ./.libs/liblavjpeg.so -ljpeg-mmx -Wl,--rpath -Wl,/usr/local/lib
    ./.libs/liblavplay.so: undefined reference to `SDL_Quit'
    ./.libs/liblavplay.so: undefined reference to `SDL_WM_SetCaption'
    ./.libs/liblavplay.so: undefined reference to `SDL_CreateYUVOverlay'
    ./.libs/liblavplay.so: undefined reference to `SDL_LockYUVOverlay'
    ./.libs/liblavplay.so: undefined reference to `SDL_EventState'
    ./.libs/liblavplay.so: undefined reference to `SDL_UnlockSurface'
    ./.libs/liblavplay.so: undefined reference to `SDL_LockSurface'
    ./.libs/liblavplay.so: undefined reference to `SDL_DisplayYUVOverlay'
    ./.libs/liblavplay.so: undefined reference to `SDL_UpdateRect'
    ./.libs/liblavplay.so: undefined reference to `SDL_Init'
    ./.libs/liblavplay.so: undefined reference to `SDL_GetError'
    ./.libs/liblavplay.so: undefined reference to `SDL_UnlockYUVOverlay'
    ./.libs/liblavplay.so: undefined reference to `SDL_FreeYUVOverlay'
    ./.libs/liblavplay.so: undefined reference to `SDL_SetVideoMode'
    collect2: ld returned 1 exit status

    Until I had applied this patch.

    Then we can go ahead and make the project:

    ./configure
    make
    make install

    For those who are interested, my build configuration at the end of the configure script looked like:

     MJPEG tools 1.6.0 build configuration :
    
        - X86 Optimizations:
          - MMX/3DNow!/SSE enabled      : true
          - cmov support enabled        : true
       ***********************************************************************
       * NOTE:                                                               *
       *   The resultant binaries will ***NOT*** run on a K6 or Pentium CPU  *
       ***********************************************************************
        - video4linux recording/playback: true
        - software MJPEG playback       : true
        - movtar playback/recording     : true
        - Quicktime playback/recording  : false
        - AVI MJPEG playback/recording  : true (always)
        - libDV (digital video) support : false  
        - AVIFILE divx encoding support : true
        - Gtk+ support for glav         : true
        - glibc support for >2GB files  : true

    Encoding the JPEGS into the MPEG

    Finally, we can use MJPEG tools to convert the JPEGs into a MPEG stream.

    "You can use jpeg2yuv to create a yuv stream from separate JPEG images. This stream is sent to stdout, so that it can either be saved into a file, encoded directly to a mpeg video using mpeg2enc or used for anything else."

    "Saving an yuv stream can be done like this: jpeg2yuv -f 25 -j image%05d.jpg > result.yuv"

    "Creates the file result.yuv containing the yuv video data with 25 FPS. The -f option is used to set the frame rate. Note that image%05d.jpg means that the jpeg files are named image00000.jpg, image00001.jpg and so on. (05 means five digits, 04 means four digits, etc.)"

    "If you want to encode a mpeg video directly from jpeg images without saving a separate video file type: jpeg2yuv -f 25 -j image%05d.jpg | mpeg2enc -o mpegfile.m1v" -- https://sourceforge.net/docman/display_doc.php?docid=3456&group_id=5776#Images

    Note that this documentation is wrong, and you also need to include an interlacing option...

    jpeg2yuv -f 25 -j frame-%05d.jpg -I p | mpeg2enc -o mpegfile.m1v

    The frames also have to count from 00000 in this example. I used the following little script to convert to the required naming format:

    count=0
    for item in `find . -type f`
    do 
      mv $item frame-`printf "%05d" $count`.jpg
      count=$(( $count + 1 ))
    done

    Note that the conversion is also quite slow, I walked away and came back later.



posted at: 07:00 | path: /jpeg2mpeg | permanent link to this entry


12 September 2002

    Are you in the Zone?

    There's been a lot of discussion lately at work about specification writing. This has lead to a lot of web surfing about the definition of a good specification. This articles discusses why you shouldn't interrupt programmers while they are working, and why we should all have offices instead of those crappy cube farms.

    It discusses a thing called the Zone, that place that you go when you're really concentrating, and at your most efficient. It explains why you shouldn't interrupt people when they are in the Zone, because it takes 15 minutes or so to get back into the Zone. This article has a lot to answer for -- it has resulted in people interrupting each other with the words "So, were you in the Zone?".

    Feeling a lot better today, but I am not sure how much of that is the cold and flu tablets talking. There is an interesting article linked to on Slashdot this morning: Strange Attractors and TCP/IP Sequence Number Analysis - One Year Later. Some vendors need to clean up their act methinks.

    Big update to the website. The AUUG 2002 MPEGs are now online. Converting the JPEG files to MPEG wasn't too hard, once the tools had been wrangled into installing. Things shouldn't have to be this hard to install. I am thinking about how the many dependancy problem applies to my code now...

    Caught up on comp.text.pdf a bit, after far too long an absense. Still not up to date though.

    Picked up my "new" switches -- Cisco 1900 10mbit 24 port thingies, ex-CSIRO.

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 10 Sep 2002



Site on correcting markup problems in Docbook

    It would seem that the folk at MandrakeSoft have put some effort into fixing some of the markup problems (like long URLs), which have been biting me recently. This site looks like it is worth a visit. The original document can also be found on the Madrake website.

posted at: 07:00 | path: /docbook | permanent link to this entry


Online CVS server

    The code for Panda can now also be found in my online CVS server here.

posted at: 07:00 | path: /panda | permanent link to this entry


CVS server

    The code for PandaLex can also be found in my online CVS server here.

posted at: 07:00 | path: /panda/pandalex | permanent link to this entry


11 September 2002

    Still flu enabled. This is making it hard to motivate myself to write specifications for work...

    On another note, I am impressed with the compression ratios available with MPEG compression. I took 275MB of JPEG images, and turned them into a 25 FPS MPEG, and it came out at 37MB. That's pretty cool. In case your wondering, these MPEGS are the conference webcam ones. Have a look over here for more details.

    Matt and April's site points to an interesting piece of satire: http://www.satirewire.com/news/0010/international.shtml. I thought satire wasn't meant to be true.

    Ohhhh, the courier has picked up the cabling for my switch box, and is bringing it to my very door as I write this. Yay not having two keyboards in front of me!

    And it arrived. I am now switchbox enabled.

    Spent some time trying to fix my Docbook formatting problems. This lead to my Docbook page.

posted at: 07:00 | path: /diary | permanent link to this entry


My docbook scripts

posted at: 07:00 | path: /docbook | permanent link to this entry


Online CVS server

posted at: 07:00 | path: /panda/pandascript | permanent link to this entry


Unofficial RedHat site on Docbook

posted at: 07:00 | path: /docbook | permanent link to this entry


CVS server

    The code from this page can be found in my online CVS server here, and here.

posted at: 07:00 | path: /bashrand | permanent link to this entry


Annual conference 2002 MPEGs

    During the 2002 annual conference we left a webcam overlooking the conference foyer. There are now MPEGS of the 27,000 or so frames which the camera took. It's sorta like watching a city street in fast motion, but with more geeks.

    The MPEGs: Wednesday, Thursday, Friday.

    If your curious about how I made these, then checkout this page.

posted at: 07:00 | path: /auug | permanent link to this entry


Docbook websites

posted at: 07:00 | path: /docbook | permanent link to this entry


CVS server

    The code from this page can be found in my online CVS server here.

posted at: 07:00 | path: /des | permanent link to this entry


Mon, 09 Sep 2002



Some rotation has occured

    I have worked through all the pictures on this page and made sure they are rotated so they make sense...

posted at: 07:00 | path: /andrew | permanent link to this entry


10 September 2002

    I have the flu. The Denon blew up again. Yay.

posted at: 07:00 | path: /diary | permanent link to this entry


More pictures of Andrew

posted at: 07:00 | path: /andrew | permanent link to this entry


Sun, 08 Sep 2002



Reading a single byte from stdin with Bash?

    I am currently having some pain reading very small amounts of input from stdin with bash. For example I want to be able to just pull the next byte of stdin (as a string). read wants to pull lines.

    I did think of doing something like:
    cat - > /tmp/foo
    cat /tmp/foo | cut -b 42
    
    But the problem with this is that stdin of the bash script I am writing never ends. Perhaps I could so something like:
    cat - > /tmp/foo &
    cat /tmp/foo | cut -b 42
    
    Then I need to be able to handle the scenario when the reader is ahead of the writing, probably by just spinning until the input appears.

    This of course doesn't work as I had expected it to, because the first cat can't be backgrounded because then it looses access to stdin. I need some sort of forking mechanism...

posted at: 07:00 | path: /problemcode | permanent link to this entry


09 September 2002

    There was a heated discussion about when casting should be used in C++ in our group assignment meeting yesterday. This URL http://www.cs.rpi.edu/~wiseb/xrds/ovp3-1.html seems to have a fairly convincing introduction on the subject.

    Argh! A morning of writing specs at work! At least Gordon (our project manager type person) found a funny article which makes me feel better about it all: http://www.joelonsoftware.com/articles/fog0000000036.html.

    My favourite quote:

    The moral of the story is that with a contrived example, you can prove anything. Oops. No, that's not what I meant to say.

    This is a runner up though:

    When you write a spec, you only have to communicate how the program is supposed to work once. Everybody on the team can just read the spec. The QA people read it so that they know how the program is supposed to work and they know what to test for. The marketing people use it to write their vague vaporware white papers to throw up on the web site about products that haven't been created yet. The business development people misread it to spin weird fantasies about how the product will cure baldness and warts and stuff, but it gets investors, so that's OK. The developers read it so that they know what code to write. The customers read it to make sure the developers are building a product that they would want to pay for. The technical writers read it and write a nice manual (that gets lost or thrown away, but that's a different story). The managers read it so that they can look like they know what's going on in management meetings. And so on.

    Of course, the ultimate arguement against asking people what they would like is: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#BIKESHED-PAINTING.

    At the risk of making it sound like I spent an infinite amount of time web surfing today, this MS press release about the project manager who oversaw the final release of Windows 2000 is also interesting.

posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 07 Sep 2002



08 September 2002

    After the conference. Chaired a session. Finished proposal. Tired.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 04 Sep 2002



05 September 2002

    Working on a proposal to have a published print my imaging tutorial as a book...

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 03 Sep 2002



04 September 2002

    Tired. Conference.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 02 Sep 2002



03 September 2002

    A day in Melbourne. Spent the morning looking for a good price on a MMC card for my new MP3 playing mobile phone. Settled on maxing out the phone with a 64 MB MMC card which was about one third of the highest retail price I found. Also bought a reader / writer cradle while I was at it.

    Copied some songs onto my phone... It is sorta cool having 64MB of portable storage if I need it, although the serial cable Siemens provided is way slow... The USB cradle is pretty fast though. I wonder if I can be a USB cable for the phone itself which just makes it look like a disc? That way I wouldn't ever need to pull the card out of the phone...

    It's now trivial to backup the address book on my phone. I wonder if the file format for the data is open, or if it needs to be made open?

    Ahhhhhhhhhhh, new toyness.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 01 Sep 2002



01 September 2002

    Flew to Melbourne after doing father's day kinda stuff. Also picked up my new mobile phone -- a Siemens SL42 MP3 playing mobile phone...

posted at: 07:00 | path: /diary | permanent link to this entry


02 September 2002

    The first day of AUUG 2002 for me. This was the day I was meant to be running a tutorial, but ended up just helping out with network problems instead.

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 30 Aug 2002



31 August 2002

    Quiet day, getting over a generally crap week.

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 29 Aug 2002



30 August 2002

    I'm at a bit of a loss after my tutorial got canned... I am not sure what to work on any more, it has been such a focus for the last couple of months. I really should try to get projects off my "unstable" list:
    [root@localhost opensource]# stable | grep unstable
    cardinal is unstable
    cep is unstable
    clug is unstable
    ctpfaq is unstable
    cvs001 is unstable
    dumppdf is unstable
    geekcodegen is unstable
    gmat is unstable
    libplot is unstable
    mkstemp is unstable
    mysqlvi is unstable
    netflow is unstable
    palm-memopad is unstable
    panda is unstable
    pandalex is unstable
    panda.old is unstable
    pandascript is unstable
    panda.tgz is unstable
    pngtools is unstable
    presskel is unstable
    shdns is unstable
    shmail is unstable
    short-grid is unstable
    short-ld is unstable
    short-ssl is unstable
    short-template is unstable
    stillhq-cgi is unstable
    template-library is unstable
    tiffapi is unstable
    trie is unstable
    trivsql is unstable
    utilities is unstable
    [root@localhost opensource]# 
    
    But where to start?

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 28 Aug 2002



Objectify 0.2

    This release fixes a bug where way too many methods were included under the parent class. We now also generate IDL on demand (although the IDL has not been completely tested yet). Get the code here.

posted at: 07:00 | path: /objectify | permanent link to this entry


29 August 2002

    Things seem to be hotting up on the Panda front suddenly (after about three years!), lots of email to answer...

    I thought you might like to see my desk at home:



    A little mess is a good thing. From left to right you can see:
  • My laptop, an IBM Thinkpad X21 running Redhat
  • My extremely grotty fish tank
  • My Palm III
  • My email computer: a labtam color xterm with a 21 inch monitor (it points at a Sparc 10 running Redhat and XDM in the server room)
  • My work computer: a dual gigahertz PIII machine with a 19 inch monitor running Windows 2000 Server (my day job is writing windows code)

    That lady in the pictures on the wall is my wife, Catherine

posted at: 07:00 | path: /diary | permanent link to this entry


Objectify 0.2

    This release fixes a big where way to many methods were included under the parent class. We now also generate IDL on demand (although the IDL has not been completely tested yet). Get the code here.

posted at: 07:00 | path: /site | permanent link to this entry


29 August 2002

    My tutorial got cancelled for lack of enrollments. Bummer.

    On another note, I now understand American foreign policy...



posted at: 07:00 | path: /diary | permanent link to this entry


2002: AUUG tutorial

    Well, my 2002 AUUG tutorial has been cancelled at the last minute (it didn't have enough people enroll). Oh well.

    The slides are available online, as is a PDF version of the course notes. Do as you will...

posted at: 07:00 | path: /presentations | permanent link to this entry


2002: AUUG tutorial

    Well, my 2002 AUUG tutorial has been cancelled at the last minute (it didn't have enough people enroll). Oh well.

    The slides are available online, as is a PDF version of the course notes. Do as you will...

posted at: 07:00 | path: /site | permanent link to this entry


Tue, 27 Aug 2002



28 August 2002

    Here I am again... Still working on those slides for AUUG in my little spare time. I currently have a target of about 300 slides, and I have 89 done. The maths goes something like:
     Class time: 9AM to 5PM (8 hours elapsed)
     Lunch and breaks: 2 hours
     Total Mikal ranting time: 6 hours = 360 minutes
     Average time per slide: 1.5 minutes
     Number of slides needed: 240
    
    The problem is that I have never given a tutorial this long before, and have no feel for how many questions the content is going to generate... This makes it very hard to judge what I should produce. The manual for the talk is about 360 pages... So even if I bugger up the talk itself, at least the customers have something they can walk away with.

    Dr Dobbs is really bad at answering email. I think I am now writing an article for them...

posted at: 07:00 | path: /diary | permanent link to this entry


28 August 2002

    About half way through the slides. Going well on my LBG VQ implementation... I have the codebook generation going (only 500 lines or so of code in the end), and the encoding of the MFC files against the codebook (about 20 lines of code).

    Need to verify somehow that the answers are correct, and worry more about the matlab stuff...

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 25 Aug 2002



25 August 2002

    Cleaning up the study because it was giving me the shits, and I have a couple of people from work coming around to make sure that my telecommuting world is ergonomic... This mainly involved bringing the Roland keyboard into the room so I can muck around on it, and making the book shelves a little neater.

    I also threw out about three trees of stuff I don't need any more.

    Andrew can now crawl. Backwards. About a meter.

posted at: 07:00 | path: /diary | permanent link to this entry


26 August 2002

    Hmmm. Visual Sourcesafe has wierd problems when you try to copy users from another VSS installation across.

    More work on getting slides ready for next week. I'll make them available online when I have them.

    Some discussion on the ldp-discuss mailing list of scripts to convert text to docbook. I mentioned the script I have been using to write this tutorial...

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 23 Aug 2002



24 August 2002

    Argh! My LBG VQ algorithm is broken...

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 22 Aug 2002



COMP 3410 Lecture

posted at: 07:00 | path: /site | permanent link to this entry


23 August 2002

    Hmmm. The Audrey created a bit of a stir in the the office this morning. It is interesting how people gravitate towards toys in the place. It's cool.

    Playing with how we can rearrange our build process at work yet again...

    Still confused about LBG VQ implementations.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 21 Aug 2002



Alice Springs: My wife is famous!

posted at: 07:00 | path: /au2002 | permanent link to this entry


Kings Canyon

posted at: 07:00 | path: /au2002 | permanent link to this entry


Alice Springs: Reptiles and the Royal Flying Doctor's Service

posted at: 07:00 | path: /au2002 | permanent link to this entry


22 August 2002

    No response to my automake patch yet...

posted at: 07:00 | path: /diary | permanent link to this entry


Cairns

posted at: 07:00 | path: /au2002 | permanent link to this entry


21 August 2002

    Wow. You know how you have days that seem quite ordinary until you're sitting in the shower the next day looking back and thing "that was amazing"... Well, today was like that...

    Got a sleep in, did some work at home, and then went into the office... We had to have a meeting about how we are going to manage our code base into the future. The problem is that at about 600,000 lines of code, it is non trivial to allow people to implement features on the releasable code tree -- we need to be able to release bug fixes almost instantly, and can't wait for someone's new feature to be stable. Plus, every time we make a change to the releasable code, we increase the risk that we will introduce bugs somewhere else in the product.

    The solution? All features will be implemented in sand boxes. When the feature is complete, then the sand box will be rolled into the releasable code tree... There is also some funky scripting happening to keep your sandbox as up to date compared with the releasable code as possible. A very neat solution which will work well (I hope).

    University in the afternoon. The speech recognition lecture was nothing special -- unlike we got onto LBG vector quantization... I love it when people introduce an algorithm that is so obvious and elegant that you wish you had thought of it... It also just works. And it has so many applications -- I spent the rest of the day walking around looking for excuses to qantize vectors.

    I was so keen I went home and started implementing the LBG VQ codebook speech recogition assignment which is due in a few weeks... I can't release it under the GPL until the assignment is over, so you'll just have to hold your breath to see what I am up to. It is cool that you can do speech recognition (with some pre processing), in under 1,000 lines of code.

posted at: 07:00 | path: /diary | permanent link to this entry


Ayer's Rock (Uluru) and the Olgas (Kuta Juta)

posted at: 07:00 | path: /au2002 | permanent link to this entry


At this point I will stop rating things

    ...As my notes are a little out of date. I think you can assume that Skynet gets zero (I have never got their service to work), and everybody else did well...

posted at: 07:00 | path: /au2002 | permanent link to this entry


More pictures from around Perth

posted at: 07:00 | path: /au2002 | permanent link to this entry


Over to Ayer's Rock (Uluru)

posted at: 07:00 | path: /au2002 | permanent link to this entry


Mon, 19 Aug 2002



20 August 2002

posted at: 07:00 | path: /diary | permanent link to this entry


Symlink on FAT patch

    This patch, which applies against automake 1.6.3, corrects a problem observed when using Linux to run automake --add-missing on a FAT filesystem. The attempt to symlink the files in the directory specified by AC_CONFIG_AUX_DIR fails, but no attempt is made to instead copy the files to the location...

  • The patch

    This ChangeLog entry documents the change:
    2002-08-19  Michael Still  
    
         * --add-missing will now attempt to copy if the symlink failed
    
  • The email

posted at: 07:00 | path: /automake | permanent link to this entry


Sun, 18 Aug 2002



19 August 2002

    Work. Gym. Food shopping. What a fun day!

posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 17 Aug 2002



18 August 2002

    Visited Calvary Private. It seems a much nicer place to have a baby... Released the first version of objectify.

posted at: 07:00 | path: /diary | permanent link to this entry


Objectify 0.1

    Is now available. You'll need this tarball, which contains the perl script, a sample Makefile, and some sample code...

posted at: 07:00 | path: /objectify | permanent link to this entry


Objectify

    Objectify is a perl script which converts C to C++ classes...

posted at: 07:00 | path: /site | permanent link to this entry


Fri, 16 Aug 2002



2001: AOSS

posted at: 07:00 | path: /presentations | permanent link to this entry


2001: AUUG Annual Conference

posted at: 07:00 | path: /presentations | permanent link to this entry


2002: ANU

posted at: 07:00 | path: /presentations | permanent link to this entry


17 August 2002

    Well, the Audrey is now sitting out in the lounge room being a computer... It works fine, although I think I have some SMB problems with it talking reliably to my WIN2K server.

    Spent some bandwidth downloading Debian 3.0 in case people want it. Spent some time putting my old presentations online (see to the right)...

posted at: 07:00 | path: /diary | permanent link to this entry


2001: Computer Engineering 3 A

posted at: 07:00 | path: /presentations | permanent link to this entry


Thu, 15 Aug 2002



2000: Panda

posted at: 07:00 | path: /presentations | permanent link to this entry


2000: AOSS

posted at: 07:00 | path: /presentations | permanent link to this entry


Tue, 13 Aug 2002



14 August 2002

    Hmmmm. Catherine and Andrew have an evil virus... Didn't get much sleep last night as I was fetching and carrying for them both. Oh well, at least I am on leave.

    There are discussions at work about whether or not the upstairs kitchen is excessively messy... I personally think this is a combination of the kitchen being so small that you have to get in and out straight away and therefore don't have time to clean, combined with just garden variety laziness.

    I picked up a webcam cheap whilst on my world travels (in Perth), I'm not using it at the moment, so it might just end up in the kitchen at work.

    On a different topic, I might end up giving a little guest lecture on Electronic Document Management and PDF at ANU sometime in the next couple of weeks. We shall see.

    I pick up my Audrey tonight off Hugh Blemings.

posted at: 07:00 | path: /diary | permanent link to this entry


An example of libplot output

    The CEP project I am working on at University of Canberra uses libplot. The graphs for the application are drawn using libplot:

    .

posted at: 07:00 | path: /libmplot | permanent link to this entry


Mon, 12 Aug 2002



Libplot 0.2

    Is available. There were some silly debugging printfs which I needed to remove...

posted at: 07:00 | path: /libmplot | permanent link to this entry


13 August 2002

    Now that I am back in town, I need to catch up with uni... I am reading up on Speach recognition, as this is the first part of a unit I am doing this semester... Nothing earth shattering yet, although I am only two pages into the reading backlog.

    The unit website went away.

    Catherine is going in for an ultra sound this morning... She has to drink 600ml of water two hours before, and then isn't allowed to go to the toilet until after the ultrasound. Let the urination jokes begin...

    Tags for this post: blog ultrasound pregnant
    Related posts: 31 October 2002; Its either a third child, or Cat is pregnant with a unicorn; Friday 8 June 2001

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 11 Aug 2002



11 August 2002

    Back from our trip. I found the time to do some more work on the user interface for my final year project. You can now select a dataset, and view various versions of it's graphs:



posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 01 Aug 2002



Perth, Fremantle, and more Jenny type people

posted at: 07:00 | path: /au2002 | permanent link to this entry


Wed, 31 Jul 2002



Andrew meets his second cousins

posted at: 07:00 | path: /au2002 | permanent link to this entry


Mon, 29 Jul 2002



Pictures of Melbourne things

posted at: 07:00 | path: /au2002 | permanent link to this entry


29 July 2002: Melbourne to Perth

posted at: 07:00 | path: /au2002 | permanent link to this entry


Rottnest Island

posted at: 07:00 | path: /au2002 | permanent link to this entry


Sun, 28 Jul 2002



29 July 2002

    Well, I sit on a plane as I write this, on our way to Perth. We have now been away for a week, and it has been good fun over all. On the coding front, I haven't had as much free time as I hoped to be honest -- Andrew has put on a growth spurt, and has grown about two inches in about a week. This is all well and good, but it means that he is permanently hungry, and sometimes quite upset -- growing heaps can hurt.

    One of the things we need to be able to do for the final year project application is be able to draw graphs into memory based rasters for display in the user interface. I have been playing with coding something to do this for the last few days because I can't find a library which does it to my satisfaction (yes, I've looked at gd). You can see my progress here.

posted at: 07:00 | path: /diary | permanent link to this entry


Libplot 0.1 released

    Libplot renders simple graphical primitives into rasters. Checkout the libplot page for more details.

posted at: 07:00 | path: /site | permanent link to this entry


Libplot 0.1

    Is available. Note that not all features are implemented at the moment.

posted at: 07:00 | path: /libmplot | permanent link to this entry


Fri, 26 Jul 2002



Melbourne Zoo

posted at: 07:00 | path: /au2002 | permanent link to this entry


26 July 2002: Melbourne

posted at: 07:00 | path: /au2002 | permanent link to this entry


Wed, 24 Jul 2002



25 July 2002: Hobart to Melbourne

posted at: 07:00 | path: /au2002 | permanent link to this entry


Pictures of Hobart to Melbourne

    ...should go here...

posted at: 07:00 | path: /au2002 | permanent link to this entry


24 July 2002: Port Arthur

posted at: 07:00 | path: /au2002 | permanent link to this entry


Tue, 23 Jul 2002



More pictures of Port Arthur than a normal person would take

posted at: 07:00 | path: /au2002 | permanent link to this entry


Mon, 22 Jul 2002



23 July 2002: Hobart and Richmond

posted at: 07:00 | path: /au2002 | permanent link to this entry


A day spread between Hobart and Richmond

posted at: 07:00 | path: /au2002 | permanent link to this entry


Sun, 21 Jul 2002



A full day doing Hobart stuff

posted at: 07:00 | path: /au2002 | permanent link to this entry


22 July 2002: Hobart

posted at: 07:00 | path: /au2002 | permanent link to this entry


21 July 2002: Flights from Canberra, to Melbourne, to Hobart and a night spent in Hobart

    Hmmmm. Allow me to offer my reviews of our experiences on the first day of our trip...
    Skynet Global
              (0 out of 10)


    These people have the hide to sell a wireless ISP service, advertising that it works in all Qantas Clubs. This is clearly not the case, because having signed up for an account with these jokers, they don't have any wireless coverage in Canberra at all.


    Qantas Business and Economy Class
              (9 out of 10)


    Fantastic. The only thing I can say against Qantas' service was that the pursor on the second flight (Melbourne to Hobart), looked like she needed a hug. I'm not sure I understand the attraction of business class... It sure is nice having leg room, but not worth doubling the price.


    Hertz
              (8 out of 10)


    Pretty good. The car is ok, and they stayed up to give us the car when our flight finally got to Hobart.



    Hobart Towers Motel
              (0 out of 10)


    I'm going to summarise here, so I don't get too angry...
    • The office closes at 9pm
    • Our plane gets in at 9:30pm
    • They claim to have left a key in the door, but after 30 minutes of looking in the cold, with our 5.5 month old son, we ended up having to call Chubb security to get them to call the on call number, so we could be let in
    • The heater broke

    "Honey, is this hell?"

    In their defense, they did give us a new room when we said that we didn't want to say in a room with a key missing... They also gave us a cot for free in the middle of the night. I'll give them a chance to improve (we're here for another night). We're trying not to be too negative. We shouldn't let the hotel experience ruin our trip.

    Tags for this post: au2002 travel hobart tasmania
    Related posts: A full day doing Hobart stuff; 22 July 2002: Hobart; A day spread between Hobart and Richmond; More pictures of Port Arthur than a normal person would take; 23 July 2002: Hobart and Richmond; 24 July 2002: Port Arthur

posted at: 07:00 | path: /au2002 | permanent link to this entry


22 July 2002

posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 20 Jul 2002



Travel photos

    You can find pictures of our 2002 Australian trip here.

posted at: 07:00 | path: /events | permanent link to this entry


Canberra to Hobart

posted at: 07:00 | path: /au2002 | permanent link to this entry


Andrew's first plane trip

    Well, we've left for our around Australia junket... Pictures of Andrew's first flight, as well as his new little friend at Canberra airport can be seen on the Australia trip page.

posted at: 07:00 | path: /andrew | permanent link to this entry


Fri, 19 Jul 2002



Trivsql 0.4.1

    Hmmm. A silly bug caused by not checking some NULL pointers has been fixed. You can source here.

posted at: 07:00 | path: /trivsql | permanent link to this entry


20 July 2002

    Sat on a chair today.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 17 Jul 2002



You can never have too big a backlog

posted at: 07:00 | path: /andrew | permanent link to this entry


Tue, 16 Jul 2002



17 July 2002

    Hmmmm. Saw Men in Black II. It was quite different from the first one -- I felt it was trying quite hard to be more of a comedy than last time, which felt a little off coming from Tommy Lee Jones. Final year project meeting in the evening.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 15 Jul 2002



16 July 2002

    Herm... Still trying to get gmat sorted out.

    Many hours later...

    Ahhhh ha! I've fixed my problem with jade, which fixes my immediate problem... Jade totally doesn't handle a mix of \r\n and \n line endings...

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 14 Jul 2002



15 July 2002

    My god. I am still working on the tutorial -- it is now two days late. The problem is that I have picked such a big topic area that it is impossible to do a good job of a discussion of the area without having infinite time on my hands. I am hoping to have sometime sent to the conference people by the end of the day...

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 12 Jul 2002



13 July 2002

    Working on the tutorial. It is due today... So far I've written something like 21,000 words, and the generated output is nearly 200 pages long. My problem is that the longest tutorial I have ever given before was an hour (I tutored in networking at University of Canberra last semester), and I have no real feel for how much content I can get through in eight hours.

    Not really finished it all yet. Argh!

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 11 Jul 2002



New site skin

    Thanks to Ben George, the site has a new skin. Way funky...

posted at: 07:00 | path: /site | permanent link to this entry


Wed, 10 Jul 2002



11 July 2002

    Hmmmm. Got my OpenGl unit mark back. I only got a distinction. Oh well... It doesn't stop me from getting into a PhD at the point (you need first class honours), so I am not too worried.

    Working on the GIF chapter of the imaging tutorial. The people behind GIF were on some quite serious drugs.

    Spent most of the morning putting out fires, be it problems with the build process for TRIM, to dealing with Qantas having lost by frequent flyer membership information. Hmmmm. I seemed to have broken some upgrade code yet again too. Doh!

    The libtiff mailing list finally noticed the libtiff articles I wrote for IBM DeveloperWorks. Soon I'll be able to retire in fame!

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 08 Jul 2002



09 July 2002

    Andrew's first typing:
     xw"c:\\mikal\\test\\fad_ass11.doc" x p fleaPFL        -lo`ol.1l;l.33.\5d .b f6l//f.l =l?F   0fdd
    
    The bold bit is where he lucked out and got ctrl-v :)

    I need to convert Panda, which is not object orientated, so something a little more C++ friendly. I thought about doing this by hand, but ended up deciding it is a job for a perl script (there are 85 function calls at the moment, and there will be more in the future, and I would like to automate generating the C++ wrapper around the library).

    Got most of the way through writing the script. It's actually an interesting little problem. It'll save me some time in the future as well methinks.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 07 Jul 2002



08 July 2002

    Seminar on grid computing today. A cool idea, wrapped in as much boring jargon as humanly possible... Need to finish off the tutorial soon, but not feeling overly motivated -- I'm not sure why.

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 05 Jul 2002



05 July 2002

    I am supposed to be writing a tutorial paper for a conference I am presenting at in September. I decided that I waste so much of my time waiting for other people and in lines and stuff that I should be writing some of this on my Palm III. So, I went to import the 30 sgml files with the Palm Desktop program which comes with the Palm.

    There's no simple way. I therefore got distracted by writing a simple program which can munch the data in the memopad.dat file. There's currently two applications -- a dumper, and a writer

posted at: 07:00 | path:
/diary | permanent link to this entry


Wed, 03 Jul 2002



04 July 2002

    Spent half the day in with eye specialist's with Andrew. It turns out he doesn't have the hereditary wierd eye disorder. Good.

    I need to write more of my tutorial real soon, but I have been distracted by bugs at work which need fixing before we start cutting release CDs. Hmmmmm.

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 02 Jul 2002



03 July 2002

    Left my laptop overnight verifying that there are no broken links on stillhq.com... I came back to discover that so far it has traversed 32,000 files... The thing is that the cvsweb stuff packs in all the versions you have ever committed, and this creates a lot of pages. Then again, all of this data is real, so the count is something to be proud of I suppose. stillhq.com is a lot bigger than I realised. I ended up having to remove the cvsweb cgi so that the check would one day end...

    Reading a book by Phillip Kerr, he mentions the possibility of natural fission reactors. It turns out that these things can really happen. How cool is that?

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 01 Jul 2002



02 July 2002

    Hmmmm. Pretty quiet. Wrote some short papers for my final year engineering project unit. They're on talks I've seen about SOAP and Tridge's genstruct.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 26 Jun 2002



Trivsql 0.4

    Trivsql now does selector trees, so you should get it here.

    What's a selector tree? It's something like...
    SELECT * FROM foo WHERE cola = 'duck' AND colb = 'chicken';
    
    Or even...
    SELECT * FROM foo WHERE (cola = 'duck' AND colb = 'chicken') or cola='wibble';
    

posted at: 07:00 | path: /trivsql | permanent link to this entry


27 June 2002

    Well, I ended up buying a new hard disk for my firewall. I lucked out in that the BIOS for my Pentium 133 just happens to support 15gb disks. Anyway, at least I am back online. Happy again...

    While I was at it, undertook the great server room clean up. Everything is now racked again, and much neater. It is surprising how much extra space this makes in my little 2 meter x 2 meter server room. The next step is to get another x86 machine so I can have more disc online...

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 25 Jun 2002



26 June 2002

    Sat my OpenGL / graphics exam today. I think that I went ok with it, we'll have to wait and see if I am correct or not...

    My firewall ate it's hard disc today... I think I am going to be buying a new one tomorrow. It wasn't on the hardware schedual, but one can't complain about how long the current 2gb one has lasted... The problem of course if finding a disc small enough to be handled by the machine's BIOS. Oh well.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 24 Jun 2002



Want a copy of a distro?

    Caldera OpenLinux
  • eServer 2.3 (3 CDs)
  • Server 3.1.1 (1 CD)

    Clark Connect
  • 1.0.2 (1 CD)

    Cygwin
  • Cygwin as at 1 September 2002 (2 CDs)

    Debian
  • 1.2 (1 CD)
  • Woody -- an early candidate for 3.0 (8 CD set)
  • 3.0 release 1 (7 CD set)

    FreeBSD
  • 2.2.6 (4 CDs)
  • 2.2.7 (4 CDs)
  • 2.2.8 (4 CDs)
  • 3.1 (4 CDs)
  • 3.2 (4 CDs)
  • 3.3 (4 CDs)
  • 3.4 (4 CDs)
  • 4.0 (4 CDs)
  • 4.6 (4 CDs)
  • 4.6.2 (1 CD)

    Gentoo
  • 1.2 x86 (1 CD)

    TurboLinux
  • 6.0 Server (4 CDs)

    Linux Kernel Summit MP3s
  • 2002 Ottawa Linux Kernel Summit, MP3s of talks (1 CD)

    Lycoris
  • Redmond Linux 1.0 RC2 (4 CDs)

    Mandrake
  • 9.0 x86 (3 CDs)

    Minix
  • 2.0.3 (1 CD)

    NetBSD
  • 1.4.2 (1 CD)
  • 1.5 Sparc (1 CD)

    OpenBSD
  • 2.5 (2 CDs)
  • 3.1 (3 CDs)

    RedHat
  • 1.0 x86 (1 CD)
  • 1.1 x86 (1 CD)
  • 5.1 x86 (2 CDs)
  • 6.0 x86 (1 CD)
  • 6.1 Sparc (1 CD)
  • 6.1 x86 (1 CD)
  • 6.2 Sparc (1 CD) -- I could never get this to work
  • 6.2 x86 (1 CD)
  • 7.0 x86 (4 CDs)
  • 7.1 x86 (3 binary CDs)
  • 7.3 x86 (3 binary CDs)
  • 8.0 x86 (5 CDs)

    Slackware
  • 2.1 (2 CDs)

    TurboLinux
  • 6.0 Server (4 CDs)

posted at: 07:00 | path: /cdr | permanent link to this entry


25 June 2002

    Hmmmm. Studying for my OpenGL / graphics exam tomorrow... Too much fun...

posted at: 07:00 | path: /diary | permanent link to this entry


Want a copy of a distro?

    Caldera OpenLinux
  • eServer 2.3 (3 CDs)
  • Server 3.1.1 (1 CD)

    Clark Connect
  • 1.0.2 (1 CD)

    Cygwin
  • Cygwin as at 1 September 2002 (2 CDs)

    Debian
  • Woody -- an early candidate for 3.0 (8 CD set)
  • 3.0 release 1 (7 CD set)

    FreeBSD
  • 2.2.6 (4 CDs)
  • 2.2.7 (4 CDs)
  • 2.2.8 (4 CDs)
  • 3.1 (4 CDs)
  • 3.2 (4 CDs)
  • 3.3 (4 CDs)
  • 3.4 (4 CDs)
  • 4.0 (4 CDs)
  • 4.6 (4 CDs)
  • 4.6.2 (1 CD)

    Gentoo
  • 1.2 x86 (1 CD)

    TurboLinux
  • 6.0 Server (4 CDs)

    Lycoris
  • Redmond Linux 1.0 RC2 (4 CDs)

    Linux Kernel Summit MP3s
  • 2002 Ottawa Linux Kernel Summit, MP3s of talks (1 CD)

    Lycoris
  • Redmond Linux 1.0 RC2 (4 CDs)

    Mandrake
  • 9.0 x86 (3 CDs)

    Minix
  • 2.0.3 (1 CD)

    NetBSD
  • 1.4.2 (1 CD)
  • 1.5 Sparc (1 CD)

    OpenBSD
  • 2.5 (2 CDs)
  • 3.1 (3 CDs)

    RedHat
  • 1.0 x86 (1 CD)
  • 1.1 x86 (1 CD)
  • 6.0 x86 (1 CD)
  • 6.1 Sparc (1 CD)
  • 6.1 x86 (1 CD)
  • 6.2 Sparc (1 CD) -- I could never get this to work
  • 6.2 x86 (1 CD)
  • 7.0 x86 (4 CDs)
  • 7.1 x86 (3 binary CDs)
  • 7.3 x86 (3 binary CDs)

    TurboLinux
  • 6.0 Server (4 CDs)

posted at: 07:00 | path: /cdr | permanent link to this entry


Sat, 22 Jun 2002



23 June 2002

    I hate studying for exams...

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 21 Jun 2002



22 June 2002

    Marking exams. You learn so much about assignment and exam technique from sitting on the other side of the fence. If it was practical, all first year students should be forced to tutor a unit so they understand why their writing needs to be legible... I worry about the state of networking knowledge at University of Canberra -- many of these people have no idea after six months of studying it (and the unit isn't that badly run). Hmmmmmmmm

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 18 Jun 2002



19 June 2002

    Avoiding studing for my OpenGL exam my pertying up the CLUG website. You can see a working sample at www.samba.org/~mikal. Whatcha think?

    Finally got the webserver I am writing for work serving files from the filesystem. The next step is to get it serving data from the SDK...

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 17 Jun 2002



18 June 2002

    Playing with distcc. Sorta cool, although it didn't compile until Martin added a missing file to the CVS repository...

    Got the heebees with manually testing one of the webby products we have at work, so I've whipped up a little script which I can use to do the regression testing... It just used lynx to make a bunch of standard requests every time I make a code change.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 16 Jun 2002



17 June 2002

    The tutorial progresses... I now have information about multiple sub images within a TIFF happening, and am currently working on a series of grayscale downsampling demos...

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 13 Jun 2002



14 June 2002

    Working on the tutorial for AUUG. I have ended up scripting a bunch of stuff so that I no longer have to manually convert source code samples to docbook and insert them into the docbook source. It now just magically happens...

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 12 Jun 2002



13 June 2002

    Dr Dobb's Journal want to talk about a possible article for the December edition... About trivsql in fact (take that AUUG!). Very cool. There is some discussion about whether Canberra should host the lca for 2004... I think it should. So do you, so join the mailing list.

    A wierd day yesterday -- I didn't pick up the laptop for the entire day, and didn't really miss it. I did use one of my desktop machines though...

    Catherine was sick yesterday with this fun looking pukey thing, and Andrew has just had his four month jab and is a little unimpressed. Spent some of the day caring for the other people in my family.

    Don't get the wrong -- I'm not upset with AUUG...

    Oh, and some pictures of our potential new building at work can be found here.

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 10 Jun 2002



11 June 2002

    Hmmmmm. AUUG rejected my conference paper proposal -- evidently trivsql is not of interest (or at least not as interesting as other things might be). They did however accept my proposal for a tutorial about image coding, so now I have to start writing the book...

    Oh, and IBM published my next libtiff article.

    Holding off on more changes to the CEP code until people catch up with me...

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 09 Jun 2002



Autodocbook 0.4

    In another bizarre twist of fate, I never got around to releasing autodobook 0.4, so here we go, check it out!

posted at: 07:00 | path: /autodocbook | permanent link to this entry


Sat, 08 Jun 2002



09 June 2002

    *Middle of the night* Mail server disc full -- this is the problem with only have 500mb for email... Fixed now.

posted at: 07:00 | path: /diary | permanent link to this entry


09 June 2002

    Hmmmmm. Still not achieving enough on the final year project for my liking... I wonder if we will finish this thing on time? I wonder if it will work when people have finally decided how to even start implementing it?

    Commit stats:
    • Me: 326
    • Daniel: 25
    • Nick: 16
    • Blake: 14
    • Kristy: 6


    Take that as you will...

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 07 Jun 2002



08 June 2002

    Trivsql is starting to look good -- it now supports CREATE TABLE, INSERT, SELECT, UPDATE SET, has recordsets, and updatable recordsets. All in 750 lines of code (not including tdb). Helped a friend move into their new house... Very cool.

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 05 Jun 2002



06 June 2002

    Getting trivsql to work with the final year project implementation has uncovered a few bugs -- a little frustrating, but it is improving the quality of the code. It is amazing how actually having to use a body of code for a reall application helps you test properly... I wonder if Panda would benefit from this sort of testing as well?

    Yeah, I have decided, in my wisdom, that the configuration information for the final year project application will be stored in a trivsql, tdb based SQL database. This is done because it makes it easy for the other people in the group to access (they all understand SQL), and to insert new config information later in life. I'm also not really interested in having to parse text based config files at this stage in my life.

    It's also an excuse to use trivsql for something interesting...

posted at: 07:00 | path: /diary | permanent link to this entry


Trivsql 0.3

    Fixes a bug with SQL string parsing... Get the code here.

posted at: 07:00 | path: /trivsql | permanent link to this entry


Trivsql 0.3.1

    Fixed a stupid bug. Get the code here.

posted at: 07:00 | path: /trivsql | permanent link to this entry


Trivsql 0.2

    This version improves error reporting by having an errno member in the recordset structure. Look at interface.c for an example (trivsql_displayrs). Get the code here.

posted at: 07:00 | path: /trivsql | permanent link to this entry


Tue, 04 Jun 2002



Announcing trivsql

    Trivsql is a simple SQL engine which is suitable to be embedded into your application -- I wrote it because I needed such a thing for a couple of things I am working on at the moment. It is licensed under the terms of the GNU GPL.

posted at: 07:00 | path: /site | permanent link to this entry


05 June 2002

    Playing with Trivsql. Still hate marking...

posted at: 07:00 | path: /diary | permanent link to this entry


Trivsql 0.1

    This version is pretty good, so long as you care about having many different select conditions... You can find the code here.

posted at: 07:00 | path: /trivsql | permanent link to this entry


Mon, 03 Jun 2002



04 June 2002

    I am flu enabled. Marking assignments still sucks, but I am starting to have a bit of fun with wxWindows for my final year project... It's quite similar (but less brain dead) than MFC, and once you have your head around the way they do things, you can whip up a very nice GUI in not much time at all...

    I wouldn't normally be a GUI kinda person, but it keeps me out of michief with this assignment. For information about the cvs commit rate on the assignment, checkout my online report.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 02 Jun 2002



03 June 2002

    Busy. Marking assignments sucks. I am making some progress on my final year project application though.

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 31 May 2002



Graphics programming with libtiff: gray scale and colour images

posted at: 07:00 | path: /article | permanent link to this entry


Sat, 25 May 2002



26 May 2002

    Hmmmmmmm, lazy weekend. Apart from going to the gym twice, haven't achieved anything much of interest...

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 23 May 2002



24 May 2002

    Rusty made a comment that sparc32 doesn't even compile in 2.5... This worried me a little, as my main mail server is a sparc 10. I copied the code to wayne (the sparc), and did a make config; make dep... I didn't et far:
    [root@wayne linux-2.5.14]# make dep
    gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/mkdep scripts/mkdep.c
    make -C arch/sparc/kernel check_asm
    make[1]: Entering directory `/usr/src/linux-2.5.14/arch/sparc/kernel'
    gcc -E -D__KERNEL__ -I/usr/src/linux-2.5.14/include tmp.c -o tmp.i
    In file included from /usr/src/linux-2.5.14/include/linux/spinlock.h:7,
                     from /usr/src/linux-2.5.14/include/linux/tqueue.h:16,
                     from /usr/src/linux-2.5.14/include/linux/sched.h:10,
                     from tmp.c:3:
    /usr/src/linux-2.5.14/include/linux/thread_info.h:11: asm/thread_info.h: No such file or directory
    In file included from tmp.c:3:
    /usr/src/linux-2.5.14/include/linux/sched.h:353: warning: `get_task_struct' redefined
    /usr/src/linux-2.5.14/include/asm/processor.h:199: warning: this is the location of the previous definition
    make[1]: *** [check_asm] Error 1
    make[1]: Leaving directory `/usr/src/linux-2.5.14/arch/sparc/kernel'
    make: *** [check_asm] Error 2
    [root@wayne linux-2.5.14]# 
    


    The first step seems to me to understand what to put in this file, so I copied the one from include/asm-sparc64 into include/asm-sparc, and tried to recompile...

    It would seem that a whole bunch of definitions in processor.h which have moved into thread_info.h -- started moving these across to reduce the compile errors.

    Hmmmmmmmm, it would seem that spinlock_t isn't defined whereever oplib.h needs it to be. Next step, find it!




    CLUG meeting last night. Noone seems to have an answer about how to make docbook less ugly in it's rendered form. Thye talk about the SQL database on top of tdb went well...

posted at: 07:00 | path: /diary | permanent link to this entry


Wed, 22 May 2002



23 May 2002

    Docbook questions for the day...
    • Where do I get less ugly docbook style sheets for jade?
    • How do I generate one big html page instead of the many small files?


posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 21 May 2002



22 May 2002

    Hmmmm, no diary entry for a while. I've been doing heaps of marking of assignments, as well as doing some assignments myself. The really good thing for the week -- Andrew slept through the night Sunday night...

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 14 May 2002



15 May 2002

    Still sleeping in shifts, so still quite tired. I have had a suggestion from someone on IRC... I am going to progressively installer increasingly older kernels until APM starts to work again. This will at least minimize the number of differences between the working kernel and the not working kernel. So I have downloaded 2.4.17, and am compiling it at the moment...

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 12 May 2002



13 May 2002

    Andrew, Catherine and I are all out of hospital again. We're trialling a new scheme where I go to bed really early, and then it is my job to wake up to Andrew during the night and early in the morning. It is actually pretty good, because I get at least a few hours of sleep before I am first woken up. Catherine gets to stay up to do the late (midnight feed), and then gets to sleep for the rest of the night, so hopefully she wont get so tired either.

    Still trying to debug this APM on 2.4.18 problem. My notes so far read something like:
    I think my initial problem was some undefined symbols. I am not sure why 
    these weren't defined, I should try to find out why sometime...
    
    [root@localhost kernel]# insmod apm
    Using /lib/modules/2.4.18/kernel/arch/i386/kernel/apm.o
    /lib/modules/2.4.18/kernel/arch/i386/kernel/apm.o: unresolved symbol machine_real_restart_Rsmp_3da1b07a
    /lib/modules/2.4.18/kernel/arch/i386/kernel/apm.o: unresolved symbol default_idle_Rsmp_92897e3d
    
    After commenting these function calls out, recompiling the module and 
    rebooting with an apm=debug, I get:
    
    apm: BIOS version 152.172 Flags 0xd231 (Driver version 1.16)
    apm: no 32 bit BIOS support
    
    Which is interesting, because the 2.4.2 kernel says the following 
    (with apm-debug):
    
    apm: BIOS version 1.2 Flags 0x03 (Driver version 1.14)
    apm: entry f000:3f7f cseg16 f000 dseg 40 cseg len ffff, dseg len ffff cseg16 len ffff
    Starting kswapd v1.8
    apm: Connection version 1.2
    apm: AC off line, battery status high, battery life 76%
    apm: battery flag 0x01, battery life 81 minutes
    
    The APM_BIOS_INFO #define in setup.c has not changed between the versions, 
    and seems to be copied straight to apm_info.bios.
    
    I then printed out the value of the pointer to the apm_info.bios structure 
    for 2.4.18, and 2.4.2:
    
    Mikal: apm.bios points to 0xc3a398ac   <---- 2.4.18
    
    These values don't change across multiple insmods, but this isn't conclusive.
    


posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 04 May 2002



08 May 2002

    Back in the QE2. One day Andrew might sleep through the night (let alone sleeping during the day)...

posted at: 07:00 | path: /diary | permanent link to this entry


05 May 2002

    Another busy day. Went to church, went to the gym, and battled with array based vector definition in OpenGL. Finally got it working...

posted at: 07:00 | path: /diary | permanent link to this entry


Thu, 02 May 2002



03 May 2002

    Got very little sleep last night. Andrew was up all the time crying, for no descernable reason. I have to write a conference paper proposal for AUUG 2002 before Friday next week...

posted at: 07:00 | path: /diary | permanent link to this entry


Tue, 30 Apr 2002



Panda 0.5.1 Release

    Panda 0.5.1 release is now available. It has a slight include file bug fix compared with 0.5...

    Source (with examples) (signed)
    Source (without examples) (signed)
    Source (with MS Windows stuff) (signed) Quite big


    Please note that this release lacks an RPM, a source RPM, and the Windows COM layer (which is being redeveloped).

posted at: 07:00 | path: /panda/panda-download | permanent link to this entry


How do I set this up?

    So now that I've convinced you have managed mode is the way to go, I should probably help you get there.

    The normal way to achieve a managed network is an access point. Access points are expensive (about twice what I paid for my PCI wireless card). The linux route is also more flexible.

    Please note that these instructions are based on you having an Intersil Prism2 wireless network card, such as the D-Link DWL 520. This stuff wont work on non-prism2 cards, because the Prism2's have some funky firmware to make this possible. If you're looking for a card, then have a look at Everything Linux, as they have good prices and understand linux.

    Follow these amazing steps:
    • Go forth and get a new kernel
      • I tried this on a 2.4.2 kernel, and the prism2 code didn't compile
      • It did work on a 2.4.18 kernel (the current stable kernel)
      • You might find that if you have a version inbetween, then it does work for you
      • Compile into the kernel 802.1d ethernet bridging, and probably iptables unless you're insane
    • Once you've verified that your new kernel boots and all that jazz, you're ready for the Prism2 drivers
      • Go to http://people.ssh.com/jkm/Prism2/ and download the latest version
      • Untar it
      • Read the instructions
      • Read them again
      • I did something along the lines of:
        make pci
        make install_pci
        
      • And it just worked
      • Note that the Makefile cares about the location of your kernel source, so you might need to edit that
    • Install the physical card and reboot
    • After the boot, all the link lights on your wireless cards should have magically gone on (if not, try an insmod on /lib/modules/...ver.../net/hostap_pci.o)
    • You now need to setup bridging of the wireless network with your wired network. This will allow you to reuse your existing DHCP server and stuff like that:
      • Do you have the brctl command? If you don't, go to http://bridge.sf.net and start downloading...
      • You need to build a bridge between the networks. For me, the set of commands to do this was:
          brctl addbr br0
          brctl addif br0 eth0
          brctl addif br0 wlan0
          ifconfig eth0 0.0.0.0
          ifconfig wlan0 0.0.0.0
          ifconfig br0 172.31.0.200 up
        
      • This was scary. I started doing this with an ssh login from a different box, and the login went away. In retrospect, that's because I took the interface down that I was logged in vai, the unexpected bit was that it went away with the brctl addif br0 eth0 command.
      • This sets up br0 as a bridge interface, and adds my existing wired network (eth0) and the wrieless network (wlan0) to it. The ip address is the ip address of the machine doing the bridging


posted at: 07:00 | path: /prism2ap | permanent link to this entry


Linux Host AP hints

    I've just been through setting up a host access point using linux and a PCI wireless card. I document what worked for me here.

posted at: 07:00 | path: /site | permanent link to this entry


Graphics programming with libtiff: black and white (reprint)

posted at: 07:00 | path: /article | permanent link to this entry


Mon, 29 Apr 2002



Panda 0.5.1

    There was a minor installation problem for some users in the 0.5 release of Panda. This new version corrects this problem, and may be downloaded for the Panda download page.

posted at: 07:00 | path: /site | permanent link to this entry


30 April 2002

    A very long day. It started at 6 am, and ended at 11pm. Got some stuff done though.

posted at: 07:00 | path: /diary | permanent link to this entry


Panda 0.5.1

    There was a minor installation problem for some users in the 0.5 release of Panda. This new version corrects this problem, and may be downloaded from the Panda download page.

posted at: 07:00 | path: /panda | permanent link to this entry


Sun, 28 Apr 2002



Dedication pictures and other backloggy things

posted at: 07:00 | path: /andrew | permanent link to this entry


29 April 2002

    Hmmmm. Wireless configuration pain continues. To get hostAP working, I needed a new kernel. I got the kernel compile to happen without any problems, but then the new kernel wasn't found by lilo (yes, I'd editted the lilo.conf and rerun lilo). It turn out (a day later) to be that the first character of the first line of the lilo.conf file should be a 'b' instead of an 'r'... Bugger.

    Then booted the new kernel, in time to discover I have forgotten to compile IDE support into it in my haste. At least I had the old kernel to fall back to...

posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 27 Apr 2002



28 April 2002

    Hmmm. A productive weekend. Finished by next developer works article, painted a wall in the lounge room, moved the old fridge to it's new home, and spent some time with Andrew.

    Still a lot on the TODO list though...

posted at: 07:00 | path: /diary | permanent link to this entry


Fri, 26 Apr 2002



24 April 2002: VSLive! Day Three

    How many linux jokes can you tell? Do windows people find us this annoying?

posted at: 07:00 | path: /diary | permanent link to this entry


27 April 2002

    Ok, now wireless on my linux laptop (the client):
    • Compiled up 2.4.18 with the relevant drivers from Mr Gibson
    • Hacked /etc/pcmcia/config to point to orinoco_cs instead of wvlan_cs
    • Get a core dump in iwconfig eth1 now...
    • Update wireless.h
    • Still have problems
    Hmmmmm

posted at: 07:00 | path: /diary | permanent link to this entry


25 April 2002: VSLive! Day Four

    Hmmmmmmmm. Soap

posted at: 07:00 | path: /diary | permanent link to this entry


26 April 2002

    Let the wireless begin.

    Started with an all Windows config, cause it is easy to make things work with their doco, or so I thought. It turns out about about two wasted hours, I need the "PS Mode" (which isn't about power saving after all) for the ad hoc networking to work on my dlink cards...

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 22 Apr 2002



23 April 2002: VSLive! Day Two

    Dinner with a couple of Microsoft people last night. They have a very impressive catering budget... Dinner for five people must have cost about $700. The meat in my main course alone was $40 Australian.

    At VSLive! for another day. MS is looking at putting a lot of effort into supporting mobile devices -- so long as they run a version of Windows. Things really haven't changed that much. They are saying that you could use a Linux box as your web service server though. Perhaps things have changed a little...

    Working on my next libtiff article.

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 21 Apr 2002



22 April 2002: VSLive! Day One

    Embarrassing admission for the week. I am currently sitting in a Microsoft conference which I am attending at short notice. They're spending the day trying to convince me that I should code in .NET right now... Scarily, it sounds like they have shipped over a million copies of Visual Studio .NET.

    Hmmm. Thinking that serializing processes to disc would be cool.

posted at: 07:00 | path: /diary | permanent link to this entry


Skynet Global with Linux at the Westin in Sydney Australia

    I'm not sure if this works well for other skynet sites in Australia, mainly because this was seen during a conference, and the configuration might have been hacked by skynet at the time of the conference...

    The magic incantation is something like:

    iwconfig eth1 essid "skynetglobal"
    iwconfig eth1 mode Managed
    iwconfig eth1 key off
    pump -i eth1
    


    Should produce something like:

    [root@localhost /root]# iwconfig
    lo        no wireless extensions.
    lo        Link encap:Local Loopback  
    eth1      IEEE 802.11-DS  ESSID:"skynetglobal"  Nickname:"Prism  I"
              Frequency:2.412GHz  Sensitivity:1/3  Mode:Managed  
              Access Point: 00:20:D8:01:64:CE:0 overruns:0 frame:0
              Bit Rate:1Mb/s   RTS thr:off   Fragment thr:off   er:0
              Encryption key:off
              Power Management:off
              Link quality:28/92  Signal level:-102 dBm  Noise level:-102 dBm
              Rx invalid nwid:0  invalid crypt:0  invalid misc:938
    
    [root@localhost /root]# 
    


posted at: 07:00 | path: /skynet | permanent link to this entry


Wed, 17 Apr 2002



FreeBSD connection information

    This is from http://www.lemis.com/~grog/wi0.skynet, at Greg Lehey's site...
    Setting up access to Skynet Global's airline lounge 802.11b system
    
    The following instructions should enable you to access Skynet's
    wireless network system and get as far as the login screen.  In order
    to use it, you will need to have an account with Skynet
    (http://www.skynetglobal.com/).
    
    This will also probably work for NetBSD and OpenBSD, and the
    information should be close enough for Linux users.
    
    The following description assumes that you have installed a Wavelan
    card in your system, and that it is recognized correctly.  If you're
    using a different card, your interface name (wi0 in this example) may
    be different.
    
    1.  Create the following file.  I call it /etc/wi0.skynetglobal:
    
        wicontrol -i wi0 -p 1
        wicontrol -i wi0 -e 0
        wicontrol -i wi0 -n skynetglobal
        killall dhclient
        dhclient wi0
    
        These commands do the following:
    
          - set "managed mode" on the interface
          - disable encryption.  The Skynet service does not use
            encryption.
          - sets the network name to "skynetglobal".
          - restarts DHCP on the interface.
    
        The contents of this file are shown indented because of the format
        of this document.  It doesn't make any difference whether the file
        contents are indented or not.
    
    2.  Insert the Wavelan card and wait for it to initialize (about 30
        seconds).  If you have booted with the card, this step will not be
        necessary.
    
        You can confirm that the card has been recognized like this:
    
        # ifconfig wi0
        wi0: flags=8802 mtu 1500
            ether 00:02:2d:04:09:3a 
    
        If the card has not been recognized, you will get the message:
    
        ifconfig: interface wi0 does not exist
    
    3.  Enter:
    
        # . /etc/wi0.skynetglobal
    
        You should see:
    
        No matching processes were found
        dhclient: New IP Address(wi0): 10.9.21.103
        dhclient: New Subnet Mask (wi0): 255.255.255.0
        dhclient: New Broadcast Address(wi0): 10.9.21.255
        dhclient: New Routers: 10.9.21.1
    
        The first line ("no matching processes") may or may not appear.
    
    4.  Start a web browser.  The connection should be direct, not via
        proxy.  You will get a login screen.  Enter your user name and
        password.
    


posted at: 07:00 | path: /skynet | permanent link to this entry


Tue, 16 Apr 2002



17 April 2002

    Marking assignments sucks. I can see why the university has trouble finding people willing to tutor units for them -- marking assignment one has wasted about 12 hours of my life, and they don't even pay you for it.

    I don't think I will be tutoring again unless things change significantly...

posted at: 07:00 | path: /diary | permanent link to this entry


Mon, 15 Apr 2002



16 April 2002

    Busy busy busy, my TODO list wont fit on it's whiteboard any more... I am implementing a SMTP client for work, because our developers have finally worked out that MAPI doesn't work so well. I also have to submit my first OpenGL assignment, as well as marking 40 sockets assignments for uni.

    Also need to catch up with about 400 posts on comp.text.pdf, so that I am ready for the next release of the FAQ -- I somehow managed to find the time to do this today as well.

posted at: 07:00 | path: /diary | permanent link to this entry


Sat, 13 Apr 2002



groff2db 0.3 Release

    Doh! This has been sitting in my outbox for a while... 0.4 of groff2db is available.

posted at: 07:00 | path: /groff2db | permanent link to this entry


Wed, 10 Apr 2002



Backlog, backlog, and hospital

posted at: 07:00 | path: /andrew | permanent link to this entry


11 April 2002

    A busy last few days. I have had two uni assignments due, and Andrew got admitted to hospital with a baby form of broncitis. He is better now, but it was a bit freaky seeing my baby on oxygen...

posted at: 07:00 | path: /diary | permanent link to this entry


Sun, 31 Mar 2002



Problems getting OSS to work - The code

    It turns out the problem is that I needed to byte swap the audio data from the wav file before playing it. The fixed code looks like:

    // Routines to handle the sound for Vic, the Bug
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    int slots[100];
    
    unsigned int toInteger(char *in){
      unsigned int ret;
      int i;
      char *p = ((char *) &ret);
    
      for(i = 0; i < 4; i++){
        *p++ = in[i];
      }
    
      return ret;
    } 
    
    char *getBytes(int input, size_t number, char *expect){
      char *data;
      int i;
      ssize_t numRead;
    
      if((data = malloc(number + 1)) == NULL){
        fprintf(stderr, "Malloc error\n");
        exit(0);
      }
    
      if((numRead = read(input, data, number)) < 1){
        fprintf(stderr, "Malformed wav file (EOF)\n");
        exit(0);
      }
      data[numRead] = 0;
    
      if(expect != NULL){
        for(i = 0; i < numRead; i++)
          data[i] = tolower(data[i]);
    
        if(strcmp(expect, data) != 0){
          fprintf(stderr, "Read \"");
          for(i = 0; i < numRead; i++)
    	fprintf(stderr, "%c", (isprint(data[i])) ? data[i] : '%');
          fprintf(stderr, "\", expected \"%s\"\n", expect);
        }
      }
    
      return data;
    }
    
    void playSound(int slotNumber, char *filename){
      slots[slotNumber] = 0;
    
      switch(fork()){
      case -1:
        // Parent with failure
        fprintf(stderr, "Sound play fork error\n");
        return;
        break;
    
      case 0:
        // Child
        {
          int soundHandle = -1, fileHandle = -1;
          int channels = 1; // stereo
          int format;
          unsigned int rate = 22050;
          unsigned int fmtLen;
          int bytes = 0;
          long i;
          char *data, *data2;
          char *tempPtr;
          ssize_t numRead;
    
          printf("Play sound %s\n", filename);
    
          if((fileHandle = open(filename, O_RDONLY)) == -1){
    	fprintf(stderr, "Could not open the specified wav file: %s\n",
    		filename);
    	exit(0);
          }
    
          // Check the format of the wav file
          free(getBytes(fileHandle, 4, "riff"));
          free(getBytes(fileHandle, 4, NULL)); // Length of package
          free(getBytes(fileHandle, 4, "wave"));
          free(getBytes(fileHandle, 4, "fmt "));
    
          tempPtr = getBytes(fileHandle, 4, NULL);
          fmtLen = toInteger(tempPtr);
          free(tempPtr);
    
          free(getBytes(fileHandle, 2, NULL)); // Reserved
    
          tempPtr = getBytes(fileHandle, 2, NULL);
          channels = tempPtr[0] - 1;
          free(tempPtr);
    
          tempPtr = getBytes(fileHandle, 4, NULL);
          rate = toInteger(tempPtr);
          free(tempPtr);
    
          free(getBytes(fileHandle, 4, NULL)); // Bytes per second
    
          tempPtr = getBytes(fileHandle, 2, NULL);
          bytes = tempPtr[0];
          free(tempPtr);
    
          free(getBytes(fileHandle, 2, NULL)); // Bits per sample
          free(getBytes(fileHandle, 4, "data"));
          free(getBytes(fileHandle, 3, NULL)); // Length of data
    
          // Open the sound interface
          if((soundHandle = open("/dev/dsp", O_WRONLY)) == -1){
    	fprintf(stderr, "Couldn't open the sound device\n");
    	exit(0);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_STEREO, &channels) == -1){
    	fprintf(stderr, "Could not set stereo\n");
    	exit(0);
          }
          else{
    	printf("\nStereo set to %d\n", channels);
          }
    
          switch(bytes){
          case 1:
    	format = AFMT_U8;
    	break;
    
          case 2:
    	if(channels == 0)
    	  format = AFMT_S16_LE;
    	else
    	  format = AFMT_U8;
    	break;
    
          case 4:
    	fprintf(stdout, "Stereo wav file\n");
    	format = AFMT_S16_LE;
    	break;
    
          default:
    	fprintf(stderr, "Unknown byte rate for sound\n");
    	exit(0);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_SETFMT, &format) == -1){
    	fprintf(stderr, "Could not set format\n");
    	exit(0);
          }
          else{
    	printf("Format set to %d\n", format);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_SPEED, &rate) == -1){
    	fprintf(stderr, "Could not set rate\n");
    	exit(0);
          }
          else{
    	printf("Speed set to %d\n", rate);
          }
    
          fprintf(stdout,
    	      "Playing file %s: channels = %d, rate = %d, bytes = %d\n",
    	      filename, channels, rate, bytes);
    
          if((data2 = malloc(1024)) == NULL){
    	fprintf(stderr, "Memory allocation error\n");
    	exit(0);
          }
    
          while(1){
    	if((numRead = read(fileHandle, data, 1024)) == 0)
    	  break;
    
    	for(i = 0; i < numRead; i+=2){
    	  data2[i] = data[i+1];
    	  data2[i+1] = data[i];
    	}
    
    	if(write(soundHandle, data2, numRead) == -1){
    	  fprintf(stderr, "Error writing to the sound device\n");
    	  exit(0);
    	}
          }
    
          // Get here when done?
          close(fileHandle);
          close(soundHandle);
          free(data);
          exit(0);
        }
        break;
       
      default:
        return;
        break;
      }
    }
    


posted at: 06:00 | path: /problemcode | permanent link to this entry


01 April 2002

    Got OSS working for the stereo files... All I needed to do in the end was byte swap the audio data. I should have thought of that about 2 days ago. Oh well.

    Anyway, back to the OpenGL assignment.

posted at: 06:00 | path: /diary | permanent link to this entry


Fri, 29 Mar 2002



Problems getting OSS to work - The code

    The code which doesn't work looks something like this:

    // Routines to handle the sound for Vic, the Bug
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    int slots[100];
    
    unsigned int toInteger(char *in){
      unsigned int ret;
      int i;
      char *p = ((char *) &ret);
    
      for(i = 0; i < 4; i++){
        *p++ = in[i];
      }
    
      return ret;
    } 
    
    char *getBytes(int input, size_t number, char *expect){
      char *data;
      int i;
      ssize_t numRead;
    
      if((data = malloc(number + 1)) == NULL){
        fprintf(stderr, "Malloc error\n");
        exit(0);
      }
    
      if((numRead = read(input, data, number)) < 1){
        fprintf(stderr, "Malformed wav file (EOF)\n");
        exit(0);
      }
      data[numRead] = 0;
    
      fprintf(stdout, "[%d] ", numRead);
      fflush(stdout);
    
      if(expect != NULL){
        for(i = 0; i < numRead; i++)
          data[i] = tolower(data[i]);
    
        if(strcmp(expect, data) != 0){
          fprintf(stderr, "Read \"");
          for(i = 0; i < numRead; i++)
    	fprintf(stderr, "%c", (isprint(data[i])) ? data[i] : '%');
          fprintf(stderr, "\", expected \"%s\"\n", expect);
        }
      }
    
      return data;
    }
    
    void playSound(int slotNumber, char *filename){
      slots[slotNumber] = 0;
    
      switch(fork()){
      case -1:
        // Parent with failure
        fprintf(stderr, "Sound play fork error\n");
        return;
        break;
    
      case 0:
        // Child
        {
          int soundHandle = -1, fileHandle = -1;
          int channels = 1; // stereo
          int format;
          unsigned int rate = 22050;
          unsigned int fmtLen;
          int bytes = 0;
          long i;
          char *data;
          char *tempPtr;
          ssize_t numRead;
    
          if((fileHandle = open(filename, O_RDONLY)) == -1){
    	fprintf(stderr, "Could not open the specified wav file: %s\n",
    		filename);
    	exit(0);
          }
    
          // Check the format of the wav file
          free(getBytes(fileHandle, 4, "riff"));
          free(getBytes(fileHandle, 4, NULL)); // Length of package
          free(getBytes(fileHandle, 4, "wave"));
          free(getBytes(fileHandle, 4, "fmt "));
    
          tempPtr = getBytes(fileHandle, 4, NULL);
          fmtLen = toInteger(tempPtr);
          free(tempPtr);
    
          free(getBytes(fileHandle, 2, NULL)); // Reserved
    
          tempPtr = getBytes(fileHandle, 2, NULL);
          channels = tempPtr[0] - 1;
          free(tempPtr);
    
          tempPtr = getBytes(fileHandle, 4, NULL);
          rate = toInteger(tempPtr);
          free(tempPtr);
    
          free(getBytes(fileHandle, 4, NULL)); // Bytes per second
    
          tempPtr = getBytes(fileHandle, 2, NULL);
          bytes = tempPtr[0];
          free(tempPtr);
    
          free(getBytes(fileHandle, 2, NULL)); // Bits per sample
          free(getBytes(fileHandle, 4, "data"));
          free(getBytes(fileHandle, 3, NULL)); // Length of data
    
          // Open the sound interface
          if((soundHandle = open("/dev/dsp", O_WRONLY)) == -1){
    	fprintf(stderr, "Couldn't open the sound device\n");
    	exit(0);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_STEREO, &channels) == -1){
    	fprintf(stderr, "Could not set stereo\n");
    	exit(0);
          }
    
          switch(bytes){
          case 1:
    	format = AFMT_U8;
    	break;
    
          case 2:
    	if(channels == 0)
    	  format = AFMT_S16_LE;
    	else
    	  format = AFMT_U8;
    	break;
    
          case 4:
    	fprintf(stdout, "Stereo wav file\n");
    	format = AFMT_S16_LE;
    	break;
    
          default:
    	fprintf(stderr, "Unknown byte rate for sound\n");
    	exit(0);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_SETFMT, &format) == -1){
    	fprintf(stderr, "Could not set format\n");
    	exit(0);
          }
    
          if(ioctl(soundHandle, SNDCTL_DSP_SPEED, &rate) == -1){
    	fprintf(stderr, "Could not set rate\n");
    	exit(0);
          }
    
          fprintf(stdout,
    	      "Playing file %s: channels = %d, rate = %d, bytes = %d\n",
    	      filename, channels, rate, bytes);
    
          while(1){
    	if((numRead = read(fileHandle, data, 1024)) == 0)
    	  break;
    
    	fprintf(stdout, "[%d] ", numRead);
    	fflush(stdout);
    
    	if(write(soundHandle, data, numRead) == -1){
    	  fprintf(stderr, "Error writing to the sound device\n");
    	  exit(0);
    	}
    	
    	if(ioctl(soundHandle, SNDCTL_DSP_SYNC) == -1){
    	  fprintf(stderr, "Could not sync sound data\n");
    	  exit(0);
    	}
    	//	free(data);
          }
    
          // Get here when done?
          close(fileHandle);
          close(soundHandle);
          free(data);
          exit(0);
        }
        break;
       
      default:
        return;
        break;
      }
    }
    


posted at: 04:00 | path: /problemcode | permanent link to this entry


Problems getting OSS to work - The problem

    The following code works just fine with 8KHz mono sound, but has troubles with stereo 44KHz sound. The stereo wav files just come out as loud clicking noises. I imagine this is something simple with my IOCTL setup, but I can't see it...

posted at: 04:00 | path: /problemcode | permanent link to this entry


Andrew learns to reach!

    Andrew has learnt to reach for things! I have put online. These pictures also show Catherine's god brother Peter, and one of his sons John. Peter's wife Lisa is also in there somewhere.

posted at: 04:00 | path: /andrew | permanent link to this entry


30 March 2002

    Photos with the family today. Gee it's cold in town suddenly, there are ice thingies hanging off the end of my nose.

    I'm having some trouble getting OSS to work for stero sound.

posted at: 04:00 | path: /diary | permanent link to this entry


30 March 2002 #2

    Nemo's other coding question for the day... How does he find the destination of a symbolic link in shell?

    #!/bin/bash
    
    # Find the destination of a link in only shell
    # $1 is the name of the file to check (including path if required)
    
    ls -l $1 | tr -s " " | sed 's/^.*[0-9] //' | sed 's/^.*-> //'
    


    Will return the name of the destination, or the name you handed it if the file is not a symlink.

posted at: 04:00 | path: /diary | permanent link to this entry


And then Nemo wanted weighted random numbers

    Nemo then wanted weighted random numbers, so this item has been added to this page. The following script selects a random element from a weight list of options...

    #!/bin/bash
    
    # Copyright (c) Michael Still 2002
    # Released under the terms of the GNU GPL
    
    # In this case, Nemo wants to be able to specify a list of items, with
    # weights associated with them...
    
    # $1 is the list with weights, in the form:
    # "1 frog 2 banana 3 hamster"
    
    # Scary assumption number one, people hand me correctly formatted lists
    # Incidentally, this will break with numbers exist in the items I am handed
    # e.g. Banana42 will break this
    NUMBERS=`echo $1 | sed 's/[^0-9 ]//g'`
    WORDS=`echo $1 | sed 's/[0-9]//g'`
    WEIGHTED=""
    
    # Build the list of options, including the weights
    for NUM in $NUMBERS
    do
      WORD=`echo $WORDS | sed 's/ .*$//'`
      WORDS=`echo $WORDS | sed "s/^$WORD *//"`
    
      COUNT=0
      while [ $COUNT -lt $NUM ]
      do
        WEIGHTED=`echo "$WEIGHTED $WORD"`
        COUNT=$(( $COUNT + 1 ))
      done  
    done
    
    # Get the random number
    LOBOUND=1
    HIBOUND=`echo $WEIGHTED | wc -w`
    RANDMAX=32767
    BINUMBER=$(( $LOBOUND + ($HIBOUND * $RANDOM) / ($RANDMAX + 1) ))
    
    # Get the item -- I can't use shift, because it is not on the command line
    COUNT=1
    while [ $COUNT -lt $BINUMBER ]
    do
      WEIGHTED=`echo $WEIGHTED | sed 's/^[^ ]*//'`
      COUNT=$(( $COUNT + 1 ))
    done
    
    # The first word should be magic selected one
    echo $WEIGHTED | sed 's/ .*$//'
    


posted at: 04:00 | path: /bashrand | permanent link to this entry


Thu, 28 Mar 2002



29 March 2002

    CLUG last night involved a challenge. My answer is online.

posted at: 04:00 | path: /diary | permanent link to this entry


Bounded random number generation with bash

    I have a mini discussion online due to a challenge from my local Linux user's group...

posted at: 04:00 | path: /site | permanent link to this entry


Getting a random number in bash

    This script generates a bounded random number:

    #!/bin/bash
    
    # Generate a random number. Copyright (c) Michael Still 2002
    # Released under the terms of the GNU GPL
    #
    # (Is it possible to copyright a single line of code?)
    
    # To quote from the rand manpage as to why we bound the random number this way:
    #
    #       In Numerical Recipes in C: The Art of Scientific Computing
    #       (William  H.  Press, Brian P. Flannery, Saul A. Teukolsky,
    #       William T.  Vetterling;  New  York:  Cambridge  University
    #       Press, 1992 (2nd ed., p. 277)), the following comments are
    #       made:
    #              "If you want to generate a random integer between 1
    #              and 10, you should always do it by using high-order
    #              bits, as in
    #
    #                     j=1+(int) (10.0*rand()/(RAND_MAX+1.0));
    #
    #              and never by anything resembling
    #
    #                     j=1+(rand() % 10);
    #
    #              (which uses lower-order bits)."
    
    # To seed the random number generator, set RANDOM to a value... We can see
    # that the bash code (2.05a in this case) already does some seeding for us...
    #
    # brand ()
    # {
    #  rseed = rseed * 1103515245 + 12345;
    #  return ((unsigned int)((rseed >> 16) & 32767));       /* was % 32768 */
    # }
    #
    # Here I have an example using the current time, which wont work well with
    # multiple calls per second
    #RANDOM=`date | tr -d ":" | cut -f 4 -d " "`
    
    # These variables just make the equation easier to read, and are not needed
    LOBOUND=1
    HIBOUND=10
    RANDMAX=32767
    BINUMBER=$(( $LOBOUND + ($HIBOUND * $RANDOM) / ($RANDMAX + 1) ))
    
    echo $BINUMBER
    


posted at: 04:00 | path: /bashrand | permanent link to this entry


Getting an arbitary item from a list

    This script gets the specified element form the list on the command line...

    #!/bin/bash
    
    # Select a specified item from a list. Copyright (c) Michael Still 2002
    # Released under the terms of the GNU GPL
    
    # $1 is the number to get, $* except for $1 is the list of options, delimited
    # by a space each
    
    # We can the shift operation to get to the right number
    shift $1
    echo $1
    


posted at: 04:00 | path: /bashrand | permanent link to this entry


How good are bash random numbers anyway

    How good are these random numbers anyway? I generated 100,000 random numbers between 1 and 10, and then had a look at their frequency:

    • 1: 9964
    • 2: 10009
    • 3: 9978
    • 4: 10015
    • 5: 9997
    • 6: 10020
    • 7: 10011
    • 8: 10008
    • 9: 10006
    • 10: 9992


    I would say that this is probably close enough to random for most users.

posted at: 04:00 | path: /bashrand | permanent link to this entry


The challenge and the result

    So, I was at a CLUG meeting last night, and one of the speakers had a whole bunch of bash scripts for XDM theming. Anyway, he was using a perl script to generate the random selection of the theme elements, and me and my big mouth offered that it could be done in bash itself. So here we are...

    Here's my post to the CLUG mailing list the next day:

    From mikal@stillhq.com Fri Mar 29 10:26:04 2002
    Date: Fri, 29 Mar 2002 10:14:17 +1100 (EST)
    From: Michael Still 
    To: Linux user group 
    Subject: Nemo's bash challenge for the day
    
    
    Well, I said it could be done...
    
    The brief: Generate a random number, and then return that element from a
    list of elements, in bash
    
    The code: (Assuming that the arguements on the command line are the
    possible return options, and that the random number generator is running
    as a separate script)
    
    LOBOUND=0
    HIBOUND=$#
    shift $(( $LOBOUND + ($HIBOUND * $RANDOM) / (32767 + 1) ))
    echo $1
    
    See the attachments for some exploratory scripts I wrote while coming up
    with this truncated sh. There are 54 lines of comments / white spaces, to
    the 4 or so lines of actual code.
    
    Have a nice life...
    
    Cheers,
    Mikal
    
    PS: How good is the bash random? See the attachment output.count for a
    summary of 100,000 numbers between 1 and 10 being generated with the
    default seed. It's probably good enough for most people.
    
    PPS: If you want the code, it should also be online at
    http://www.stillhq.com/cgi-bin/getpage?area=bashrand&page=index.htm in
    about 30 minutes, depending when Andrew goes to sleep.
    
    -- 
    
    Michael Still (mikal@stillhq.com)     UMT+11hrs
    
        [ Part 2, ""  Application/X-SH  2.1KB. ]
        [ Unable to print this part. ]
    
    
        [ Part 3, ""  Application/X-SH  412bytes. ]
        [ Unable to print this part. ]
    
    
        [ Part 4, ""  Text/PLAIN (Name: "output.count")  2 lines. ]
        [ Unable to print this part. ]
    
    


    I have included some explaination of the development process I went through below for those who are interested...

posted at: 04:00 | path: /bashrand | permanent link to this entry


Tue, 26 Mar 2002



Panda 0.5 Release

    Panda 0.5 release is now available. It includes many improvements, check the ChangeLog for details...

    Source (with examples) (signed)
    Source (without examples) (signed)
    Source (with MS Windows stuff) (signed) Quite big


    Please note that this release lacks an RPM, a source RPM, and the Windows COM layer (which is being redeveloped).

posted at: 04:00 | path: /panda/panda-download | permanent link to this entry


Panda 0.5 Release

    Panda 0.5 has been released, and is pretty funky. You can find out more details about it from the Panda download page...

posted at: 04:00 | path: /panda | permanent link to this entry


Panda 0.5 Release

    Panda 0.5 has been released, and is pretty funky. You can find out more details about it from the Panda download page...

posted at: 04:00 | path: /site | permanent link to this entry


Sun, 24 Mar 2002



The never ending stream of pictures continues...

posted at: 04:00 | path: /andrew | permanent link to this entry


Example of DES encryption code

    /******************************************************************************
      desex.c, an example of how to use the openssl DES implementation... Data
      is input on stdin, and the enrypted information is output to stdout. Prompts
      appear on stderr...
    
      This is an example of the Electronic Code Book mode, which is predictable
      for known input, and is not recommended.
    
      Copyright (c) Michael Still 2001
      Released under the terms of the GNU GPL
    ******************************************************************************/
    
    #include 
    #include 
    
    int main(int argc, char *argv[]){
      des_cblock key, input, output;
      des_key_schedule sched;
      int c, i;
    
      fprintf(stderr, "Setting up the DES library...\n");
      des_string_to_key("Mary had a little lamb, it's fleece as white as snow. Everywhere that Mary went, the lamb would surely go...", &key);
    
      fprintf(stderr, "Schedualling the key...\n");
      switch(des_set_key_checked(&key, sched)){
      case -1:
        fprintf(stderr, "Bad parity\n");
        _exit(42);
        break;
    
      case -2:
        fprintf(stderr, "Key is weak\n");
        _exit(42);
        break;
      }
    
      fprintf(stderr, "Start typing and hit ctrl-d to finish...\n");
      
      i = 0;
      while((c = fgetc(stdin)) != EOF){
        input[i] = c;
    
        i++;
        if(i == 8){
          des_ecb_encrypt(&input, &output, sched, DES_ENCRYPT);
          fprintf(stdout, "%c%c%c%c%c%c%c%c", output[0], output[1], output[2],
    	      output[3], output[4], output[5], output[6], output[7]);
          i = 0;
        }
      }
    }
    


posted at: 04:00 | path: /des | permanent link to this entry


DES examples

    This page contains some DES example code I wrote in reaction to a crypto tutorial I attended a while ago. I finally got around to putting the code online...

    The basic point of the code is it shows you how to use the DES calls within openssl. It also shows how the electronic code book for of DES is a bad choice for vaguely predictable data such as images.

    A visual demonstration of this is these two images. The one on the right is an encrypted version of the one on the left... The vertical flip of the image is because of the way libtiff reads colour images, and to be honest isn't worth fixing for this example.

       

posted at: 04:00 | path: /des | permanent link to this entry


26 March 2002

    Catherine needed sleep, so pulled an all nighter. I have Tuesday afternoon off because of uni, so I only had to do about four or so hours of paid work to have pulled my weight. Spent the rest of the time on things like pushing a release of PandaLex, announcing the new version of the comp.text.pdf FAQ, and crossing off more pages of the PDF specification with Panda.

posted at: 04:00 | path: /diary | permanent link to this entry


25 March 2002

    My church was invited to hold a service down at the local shops... Pretty cool methinks.

posted at: 04:00 | path: /diary | permanent link to this entry


Example of DES decryption code

    /******************************************************************************
      desex.c, an example of how to use the openssl DES implementation... Data
      is input on stdin, and the enrypted information is output to stdout. Prompts
      appear on stderr...
    
      This is an example of the Electronic Code Book mode, which is predictable
      for known input, and is not recommended.
    
      Copyright (c) Michael Still 2001
      Released under the terms of the GNU GPL
    ******************************************************************************/
    
    #include 
    #include 
    
    int main(int argc, char *argv[]){
      des_cblock key, input, output;
      des_key_schedule sched;
      int c, i;
    
      fprintf(stderr, "Setting up the DES library...\n");
      des_string_to_key("Mary had a little lamb, it's fleece as white as snow. Everywhere that Mary went, the lamb would surely go...", &key);
    
      fprintf(stderr, "Schedualling the key...\n");
      switch(des_set_key_checked(&key, sched)){
      case -1:
        fprintf(stderr, "Bad parity\n");
        _exit(42);
        break;
    
      case -2:
        fprintf(stderr, "Key is weak\n");
        _exit(42);
        break;
      }
    
      fprintf(stderr, "Start typing and hit ctrl-d to finish...\n");
      
      i = 0;
      while((c = fgetc(stdin)) != EOF){
        input[i] = c;
    
        i++;
        if(i == 8){
          des_ecb_encrypt(&input, &output, sched, DES_DECRYPT);
          fprintf(stdout, "%c%c%c%c%c%c%c%c", output[0], output[1], output[2],
    	      output[3], output[4], output[5], output[6], output[7]);
          i = 0;
        }
      }
    }
    


posted at: 04:00 | path: /des | permanent link to this entry


Sat, 23 Mar 2002



comp.text.pdf FAQ 2002-03 (21 Mar 2002 19:34:53 GMT)

posted at: 04:00 | path: /ctpfaq | permanent link to this entry


Fri, 22 Mar 2002



23 March 2002

    Another one of those gaps of which we speak so often. My article on IBM DeveloperWorks got published. It will be interesting to see if any more articles come about...

    New version of the comp.text.pdf FAQ released.

    Lots of uni and work work to do.

posted at: 04:00 | path: /diary | permanent link to this entry


PandaLex 0.5

    This release of PandaLex includes more parser events, and is generally better than 0.4... Quite a few bugs have been fixed in the parser as well.

    You can get it from SourceForge. There is also a ChangeLog...

posted at: 04:00 | path: /panda/pandalex | permanent link to this entry


Fri, 15 Mar 2002



General photos of small group

posted at: 04:00 | path: /andrew | permanent link to this entry


Birth centre reunion

    We have the reunion for our birthing class today... There are a whole bunch of photos... This was in Weston Park, which is on the edge of the lake.

posted at: 04:00 | path: /andrew | permanent link to this entry


Wed, 13 Mar 2002



Modifications to existing images online

    I have run through the images which were already published here and have reduced their size. They should now be faster to download and be viewable on smaller monitors, which is probably a good thing.

posted at: 04:00 | path: /andrew | permanent link to this entry


Yet more images of Andrew

    We recently spent 5 days in the Queen Elizabeth II family centre, where we learnt how to get Andrew to actually go to sleep during the day. Here are some pictures from then: 09 March 2002, 10 March 2002.

posted at: 04:00 | path: /andrew | permanent link to this entry


Fri, 08 Mar 2002



09 March 2002

    Catherine, Andrew and I are in Queen Elizabeth II hospital for women (and have been since Thursday afternoon last week). We are in here learning how to get Andrew to actually sleep. When we went in I thought I would get keeps of code stuff happening, but I have been too tired really.

    We think we have the sleep thing pretty much sorted out though...

posted at: 04:00 | path: /diary | permanent link to this entry


Wed, 06 Mar 2002



PandaLex 0.4

    This release of PandaLex includes huge improvements for the parser engine. Please note that the callback infrastructure is not implemented yet...

    You can get it from SourceForge. There is also a ChangeLog...

posted at: 04:00 | path: /panda/pandalex | permanent link to this entry


PandaLex 0.4

    This release of PandaLex includes huge improvements for the parser engine. Please note that the callback infrastructure is not implemented yet...

    You can get it from SourceForge. There is also a ChangeLog...

posted at: 04:00 | path: /site | permanent link to this entry


07 March 2002

    Hmmmmm. I'm running two tutorials out at University of Canberra for Distributed Systems Technology (a client server, networking kinda unit). There were way too many people in the tutes yesterday -- 24 for one, and 19 for another... This is after people had been sent away. This is clearly not fair for the people who did properly enroll, because it means they can even get near a computer. The theoretical maximum is meant to be 18 per tute.

    Kept playing with PandaLex. The regression testing to make sure I haven't made the world worse takes a little time. I guess I just need to be patient. At least it is automated so I can do something else with my life whilst it is underway.

    More UI bug fixes for work.

posted at: 04:00 | path: /diary | permanent link to this entry


07 March 2002

    Another diary entry today!

    Catherine and Andrew are being admitted to Queen Elizabeth 2 (which is a hospital place thingie for people who are having troubles with yound children). I wonder how the Queen feels about having large objects named after her -- boats, buildings, et cetera. I wouldn't find it particularly flattering I don't think.

    Released PandaLex 0.4...

    For my final year project my group is playing with some automated mathematical manipulations of GPS, VLBI and SLR data on techtonic movement. MIT seems interested, which is cool...

posted at: 04:00 | path: /diary | permanent link to this entry


Tue, 05 Mar 2002



06 March 2002

    Been distracted by Andrew being sick and uni for the last few days...

    It's good to see that most of the problem reports being raised about my code at work have now become consmetic things (they don't like certain icons, or feel a word should be changed), instead of bugs like "this ate my data".

    Had a play with PandaLex and Panda in my free time.

posted at: 04:00 | path: /diary | permanent link to this entry


Ongoing PandaLex development

    Its been a long time since the last release of PandaLex. This is because I have been focussing more on Panda, apart from that I have been putting a fair bit of effort into getting the parser engine right.

    The parser engine is nearly there. I have a test set of 2,347 test PDFs, of which PandaLex currently parses 2,320 correctly.

    I'll let you know when the next release is available...

posted at: 04:00 | path: /panda/pandalex | permanent link to this entry


Sun, 03 Mar 2002



Pictures of Andrew now online

    Well, because some people complained, there are now pictures of Andrew online here...

posted at: 04:00 | path: /diary | permanent link to this entry


Pictures of Andrew now online

    Well, because some people complained, there are now pictures of Andrew online here...

posted at: 04:00 | path: /site | permanent link to this entry


18 February 2002 pictures

    Are here. Highlights include my wife Catherine and Andrew (who is not my wife).

posted at: 04:00 | path: /andrew | permanent link to this entry


21 February 2002 pictures

    Are here. Highlights are Catherine, Andrew, Stuart the dog, Bradman the cat, Emily the sister in law, and Robyn the mother in law...

posted at: 04:00 | path: /andrew | permanent link to this entry