Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

And so I remember next time (Should have thought of it earlier, but the sketch said to go the other way...)


Oh, I figured out a simpler way to handle the numeric api module overriding of the base module's functions. Since the functions have identical signatures, I can just have the numeric module's initialiser load the base module and change the vtable using the base module's defined names for each function, i.e:

pyopenglbaseapi[ PyObject_FromDoubleArray_NUM ] = ...

Continue reading

How many support modules, that is the question (PyOpenGL after kebabs...)


Got home rather early from the dinner at Dave and Shabnam's place. We made kebabs (meat and onions barbequed on flat metal skewers). This is the second time we've tried that. This time was far more successful, with the primary advance being to switch to doing much smaller individual kebabs and being gentle when flipping ...

Continue reading

Python C modules for PyOpenGL (Wow that's a lot of work for little tangible benefit...)


First half of the weekend's PyOpenGL hacking finished. I spent most of the time working on getting a script put together to auto-generate a base and a numeric module. The idea is that we will try to load the numeric, and if that fails, we'll use the non-numeric, with both modules providing the same external ...

Continue reading

Templating joys (Slog, slog, slog, slog-slog-slog, slog, slog, slog, slog-slog-slog, slog, slog...)


Bryan truly impressed me today. Been trying to figure out why certain groups are winding up being reported as offline so often. The answer was staring me in the face, but Bryan had to point it out for me to realise it. Fixing it is going to be a bit of a PITA (the proper ...

Continue reading

Emerges for all! (Oh what a geeky life we lead...)


Tim dropped by this evening, so I figured I may as well do some work on Gentoo. Reworked all of the emerges I created (fonttools, ttfquery, pydispatcher, and twistedsnmp) to conform to the (rather too terse for my taste) Gentoo style.

Then I added drag-and-drop from Konquerer into Eric3 to open files, wound up with ...

Continue reading

Should check all these scripts into local CVS (Noticable amount of effort could be lost)


Being a python programmer, I tend to write Python scripts to solve little problems that arise, for instance:
  • Download my Sourceforge projects' CVS repositories into a directory for backup every week
  • process CVS logfiles to help with generating changelogs
  • add my python-coding sub-vocabulary to Dragon Naturally Speaking
  • backup mozilla profile and secondary mail directories as ...

Continue reading

Premature optimisation kills (Well, introduces errors...)


I think I've just discovered an anti-pattern in my code. Unfortunately, it's a really common idiom in the code base. Basically, I've been using dictionaries initialised with all records in a tracking table to make looking up a particular record very fast.

If you're going to be looking up individual records many times, and are ...

Continue reading

Oh, about the slogging (Little forward motion, mostly just learning the limitations of SVG)


I spent a truly inordinate amount of time trying to figure out how the heck to make an SVG graphic navigable... that is, how to make the darn viewer show scrollbars. Apparently it just isn't something that is supported. If you're SVG is "stand alone" and larger than your viewport it just gets clipped. Which ...

Continue reading

Moving work into Gentoo (Well, really just a little more work toward it...)


Too wired (far too much caf coffee at PyGTA) to work on Cinemon directly this evening (luckily I was pretty much done anyway), so I dumped the live database and am loading it into Gentoo.

Since it's taking forever I've been doing some work to create and submit ebuilds for many of my open-source projects. ...

Continue reading