Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Extreme Twisted Goodness! (Days are more productive with extreme programming... though having a "User" would be useful)


The day's work was basically getting the hierarchy-discovery code moved into the ping-scanner framework. As a side effect, I've finally built a full-system simulator for the CMTS+Channels+modems... makes writing tests much easier, which in turn gives a better feel to the development process... a good day :) .

The actual mock CMTS + Modems are ...

Continue reading

Joy of Twisted (Well, sort of an ennui, really...)


For days now I've been working in Twisted, building a severely trimmed-down version of Cinemon. Every so often little glimmers of greatness show up, but then I have to create yet another 2 functions to deal with success/failure cases, and the glimmer fades.

As I've mentioned time and again to anyone who will listen; the ...

Continue reading

Simpler solutions make life simpler... (Abandoning chaining in favour of updating)


As mentioned a while ago, I was trying to build a chaining mechanism into TwistedSNMP's OIDStore mechanism, the idea being that you could mix-and-match OIDStores so that you could compose test-cases readily from pre-built OIDStore fragments.

Problem was that the code became hideous. It's just a graph-traversal algorithm, but the code wasn't written with graph-traversal ...

Continue reading

Chaining OIDStores in TwistedSNMP (Today's little side project...)


TwistedSNMP has a mechanism called an OIDStore, which allows you to define the values to be returned from a (server-side) agent. At the moment, these are quite simplistic creations, basically either a bisect-sorted list or a BSDDB btree database (the OIDStore must be ordered, which is why a simple dictionary wouldn't work).

That works fine ...

Continue reading

Day's slogging grinds to a close (Somewhat unsatisfactorily...)


Spent most of the day (when I wasn't sleeping (I'm obviously not getting enough sleep these days)) tracking down bugs in the data-import mechanism. Honestly, I think I'm just trying to do too much with it. It allows for altering the planned objects as you are importing the data-set, generates an arbitrarily deep number of ...

Continue reading

Automating page-forwarding, an admin script (Generating silent-forwarding pages for sites...)


I've just finished the move to the vrplumber.com domain. One of the things I wanted to do was to make sure that anyone linking to the old site would get redirected to the new site automatically.

I intend to keep the Rogers account around for a while, so I can put page-forwarding code on it. ...

Continue reading

Panda and Soya 3D (Mr. Radix goes to graphics...)


Christopher Armstrong (a.k.a. Radix) has been playing with Soya 3D lately. Unfortunately, it's a GPL library, so of not particular interest to me, but apparently he's enjoying it.

Every so often I think I should really do some serious work on OpenGLContext, particularly on game-oriented features, so that it would be interesting as more than ...

Continue reading

PySpelling for fuzzy matching (Little experiments...)


PySpelling is one of my projects that never got finished. I'd originally intended it to be an engine for Chandler, but wound up moving on to other projects. The core engine works fairly well (the algorithm is losely based on ASpell), but it's not the kind of thing Chandler needs these days.

Anyway, I'm rather ...

Continue reading

Redefining foreign keys, much easier than I thought (Accessing database over ssh w/ 10 network hops is *very* slow...)


For those who are interested in how to alter the ON DELETE/ON CASCADE features of a foreign key constraint. There's no need whatsoever to alter the system catalogs directly, I'd just missed the ALTER TABLE variant that drops constraints, namely "DROP CONSTRAINT".

Turns out that the drop commands are using the pg_depend table to decide ...

Continue reading

Dratted postgresql failures are getting in the way... (I know, I know, if I hadn't poked where I shouldn't have I wouldn't have this problem...)


On Friday I made the mistake of trying to add ON DELETE constraints to a number of foreign-key field references. I wrote a little script that went through and altered the PostgreSQL system tables trying to drop the foreign-key references and then re-generate them with ALTER TABLE. Unforunately, that script messed up by not taking ...

Continue reading