Blood River

Share

This is the fourth book in the Amtrak Wars series. Its pretty good, about the same level of writing as Cloud Warrior and Iron Master, which I guess means it was better than First Family (which was mostly a connector between the first and third books in the series). In this book we learn that the first family are even more nasty than previously disclosed, and that Cadillac is possibly the most annoying person on the planet.

This book must not have been very popular in the US, because I’ve never seen it for sale in the US, but its reasonably common in Australia. That’s a shame because the copy I have is about to fall apart, which means I’ll have to wait until next time I am back home to try and find a replacement copy.

Overall this book was quite readable, and I enjoyed it.

[isbn: 0747400008]

Share

Isaac Asimov’s Robot City: Suspicion

Share

This is the second book in the Isaac Asimov’s Robot City series, and follows on directly from Odyssey. In fact, it follows so closely that it feels like it should be part of that earlier book.

I preferred this book to the first in the series, I suspect because it didn’t need to use a random unexplained change to escape a dying plot line (which is what I felt happened about a third of the way through the first book). This book does feel a little juvenile though, but I forgive it.

[isbn: 0441731260]

Share

PNGtools 0.4

Share

Wow, this is a blast from the past. When I wrote the pngchunks command in 2003, I had never seen a 64 bit machine, and knew enough to check that an int was the right size, but not enough to just use the guaranteed-to-be-32-bit version from day 1. I’d pretty much forgotten about this code until I got pinged about this Debian bug. The bug reporter is entirely right, this was lame.

PNGtools 0.4 should be 64 bit safe. The pngchunks command works on my 64 bit machines at least.

Share

Isaac Asimov’s Robot City: Odyssey

Share

This is the first in a series of robot stories endorsed by Isaac Asimov. I enjoyed the first third of the book more than the last two thirds, mainly because I found the second two thirds a little hard to believe. Interestingly they were hard to believe in a similar manner to some of the Stainless Steel Rat books (such as The Stainless Steel Rat Saves the World, The Stainless Steel Rat Wants You, and The Stainless Steel Rat Goes to Hell). I wont get too specific, because I don’t want to spoil the plot.

This book felt kinda juvenile as well — the plot lacked depth in my opinion. On the other hand, I did enjoy reading it, and it was better than I expected it to be.

[isbn: 0441731228]

Share

Packet capture in python

Share

I’m home sick with a cold today and got bored. I wanted to play with packet capture in python, and the documentation for pcapy is a little sparse. I therefore wrote this simple little sample script:

    #!/usr/bin/python
    
    # A simple example of how to use pcapy. This needs to be run as root.
    
    import datetime
    import gflags
    import pcapy
    import sys
    
    FLAGS = gflags.FLAGS
    gflags.DEFINE_string('i', 'eth1',
                         'The name of the interface to monitor')
    
    def main(argv):
      # Parse flags
      try:
        argv = FLAGS(argv)
      except gflags.FlagsError, e:
        print FLAGS
    
      print 'Opening %s' % FLAGS.i
    
      # Arguments here are:
      #   device
      #   snaplen (maximum number of bytes to capture _per_packet_)
      #   promiscious mode (1 for true)
      #   timeout (in milliseconds)
      cap = pcapy.open_live(FLAGS.i, 100, 1, 0)
    
      # Read packets -- header contains information about the data from pcap,
      # payload is the actual packet as a string
      (header, payload) = cap.next()
      while header:
        print ('%s: captured %d bytes, truncated to %d bytes'
               %(datetime.datetime.now(), header.getlen(), header.getcaplen()))
    
        (header, payload) = cap.next()
    
    if __name__ == "__main__":
      main(sys.argv)
    

Which outputs something like this:

    2008-11-25 10:09:53.308310: captured 98 bytes, truncated to 98 bytes
    2008-11-25 10:09:53.308336: captured 66 bytes, truncated to 66 bytes
    2008-11-25 10:09:53.315028: captured 66 bytes, truncated to 66 bytes
    2008-11-25 10:09:53.316520: captured 130 bytes, truncated to 100 bytes
    2008-11-25 10:09:53.317030: captured 450 bytes, truncated to 100 bytes
    2008-11-25 10:09:53.324414: captured 124 bytes, truncated to 100 bytes
    2008-11-25 10:09:53.327770: captured 114 bytes, truncated to 100 bytes
    2008-11-25 10:09:53.328001: captured 210 bytes, truncated to 100 bytes
    

Next step, decode me some headers!

Share

Daggerspell

Share

This is yet another book I read as a kid and liked. I must admit that I find the Celtic names used through out the book to be quite confusing, especially when there are multiple similar names in use at the same time. Despite that, I really enjoyed this book — even though its a pretty classic formula story.

[isbn: 0553565214;0586073159]

Share

Foundation and Earth

Share

I really like how Asimov wraps up the extended Foundation series. Specifically, I’d previously complained while reading Pebble in the Sky that it was hard to believe that everyone simply forgets that they originated on Earth — this book and Foundation’s Edge go a long way to resolving that annoyance for me. Its also good to find out what happened to Aurora and Solaria finally — especially given the Solaria mystery has been bothering me since Robots and Empire.

Speaking just about this book so a moment, I do find the use of sex as a plot development method quite odd. There are three examples that bother me — when Bliss is slipped through interstellar customs with the explanation that she’s just a whore and therefore not important enough to make an issue of; the second is when Trevize basically shags his way out of an awkward situation, despite the other protagonist being quite hostile initially; and finally where he bonks someone on a rural world. I find all three of those incidents a little out of place with the rest of the book, and in fact the rest of the series. Other authors use those kinds of plot elements, but they seem out of place in Asimov’s work.

Overall, I loved this book and it was a good conclusion to the series.

[isbn: 0586071105]

Share

Foundation’s Edge

Share

I’m back to reading Foundation Series books actually written by Isaac Asimov. This one is the fourth in the Foundation Series if you count them in the order they were written, but is the second last in chronological terms. Its set 500 years after the failure of the first galactic empire, and follows the first Foundation’s attempt to discover if the second Foundation still exists. Well, its a bit more complicated than that, but I don’t want to ruin it for you.

As an aside, the user interface described for the ship’s computer is really cool. Its a bit like augmented reality, mixed with gesture control, mixed with a direct interface into the brain. I’m not saying I want one in my house, but its cool that a book written in 1983 still has a user interface description which isn’t dated, and still seems plausible.

This book has minor inconsistencies with the story presented in the second foundation trilogy (Foundation’s Fear, Foundation and Chaos and Foundation’s Triumph), but I see that more as a failure in those followup authors than in this book. In fact, I’ve already complained about how untrue to Asimov’s vision some of those books are elsewhere.

This is a good read, and I enjoyed it greatly.

[isbn: 0586058397;0345308980]
[award: winner hugo 1983; nominee nebula 1982]

Share

Automatically creating folders for mailing lists

Share

I’ve been using some simple procmail rules to automatically create folders for mailing lists for ages. Tony asked me for those rules today, so I figured I’d just put them online.

    ##########################################################################
    # Mailman
    
    :0:
    * List-Id:.*<\/[^>]*
    $MATCH
    
    :0:
    * List-Post: ]*
    $MATCH
    
    ##########################################################################
    # Majordomo lists (sometimes don't have <>'s around the address
    
    :0:
    * X-Mailing-List:.*<\/[^>]*
    $MATCH
    
    :0:
    * X-Mailing-List:.*\/.*
    $MATCH
    
    ##########################################################################
    # Ezmlm
    
    :0:
    * Mailing-List: .* \/[^ ;]*
    $MATCH
    
    ##########################################################################
    # I'm not sure what creates this one...
    
    :0:
    * X-Loop: \/.*
    $MATCH
    
Share