Older blog entries for hereticmessiah (starting at number 17)

I've thrown up FusionWiki, my quick hack of a ColdFusion wiki, up on sourceforge. The code is currently crap, but bear in mind that it was originally written in a couple of hours just because I needed a ColdFusion wiki that generated decent markup.

The current codebase is now happily sitting in its CVS repository, and I hope to start doing more work on it soon.

Did I mention that I started working again about a month and a half ago? Probably not. Well, I have.

I. Have. A. Gmail. Account!

As part of Job Search 2004, I’m resubscribing to the Open lists (you’ll know them if you’re an Irish developer) to see what jobs are about. Here goes nothing!

7 Jul 2004 (updated 7 Jul 2004 at 21:14 UTC) »

Woohoo! I’ve got the lads at Digital Crew to set up a datasource for me, so now I can work on getting my linklog up and running. About time too!

I’ve decided I’m going to write that Advogato Poster myself. I found XMLRPC-C back last in June 2003, and I’ve been hacking with wxWidgets recently. The basic app shouldn’t be all that difficult to knock together, I think, but I just need a box to build it all on. Seeing as my project box in college hasn’t been wiped by the admins yet, I think I might do it there.

And meanwhile, having finished my degree, jobsearching in Cork...

Saw Shrek II: Excellent. Wait till after the the credits, seriously. :-)

Until I finish my new blogging engine (file-based: we don’ need no steeking RDBMSs) and throws it up on talideon.com, I’m thinking of posting up my blog here for a while.

Question though: is there anything Win32 frontends out there for posting via the XML-RPC interface?

Well kids, I've finished my fourth year project. Managed to lose all the documentation and had to write it all out again last night. Got it written anyway. The diff (one-way) algorithm was an important part of it used in a versioning database the app included.

Now it's on to distributed systems. I have to write a client-server application with CORBA. It's up to me what I write, and the only requirement is that I have to use C++ and Java, one for the client and the other for the server. Yet again, it's up to me what I use. Oh, and did I mention that one has to run on Windows and the other on *nix?

It won't be so bad. I'm thinking of writing a version of Othello. Danka gave me the idea. It's been a long time since I've played the game and I did a search for an implementation. I thought it'd be a nice project to write an Othello server over UDP. I've never really done anything with UDP, and I thought it'd be nice to try.

I mentioned this to her, and she said that I should write it using CORBA. Sure, it's not exactly the best use of CORBA, but it'd get my DS assignment out of the way.

Thanks to Bram for his comments on the diffing algorithm. Much appreciated.

28 Feb 2004 (updated 1 Mar 2004 at 18:25 UTC) »

Am I an idiot or what! There were a few stupid errors in that diffing algorithm I threw up (give me a break: they don’t have python installed here in college). Here’s a corrected version. Again, any comments are welcome.

def GetDiff(oldLines, newLines):
    """Constructs a diff to get from newlines to oldlines."""
    # Construct our special "hash" table. Using primes for the table length
    # would be better, I know, but odd numbers are simpler.
    tblSize = len(newLines) * 2 + 1
    tbl     = tuple([] * tblSize)
    for iNew in range(len(newLines)):
        iBucket = hash(newLines[iNew]) % tblSize
    # Holds our diff information.
    result = []
    # Find the common subsequences and differences.
    iOld = 0
    iMax = 0
    while iOld < len(oldLines):
        iBucket = hash(oldLines[iOld]) % tblSize
        # Start with no match
        nMax = 0
        for iNew in tbl[iBucket]:
            # if nMax > 0 and iNew < iMax + nMax:
            #     continue
            nCur = 0
                while newLines[iNew + nCur] == oldLines[iOld + nCur]:
                    nCur += 1
            if nCur > nMax:
                nMax = nCur
                iMax = iNew
                iEnd = iMax + nMax
                if iEnd == len(oldLines) or iEnd == len(newLines):
        # Have we found a matching subsequence?
        if nMax == 0:
            # Nope.
            iOld += 1
            # Woohoo!
            result.append((iMax, nMax))
            iOld += nMax
     return result

There old version is in my last entry.

8 older entries...

New Advogato Features

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

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

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