Category archives: Snaking
Discussions of programming, particularly of programming Python
When you find yourself reaching for heuristics (Stop yourself)
Written by
on
in
Snaking.
Frustrating day so far. Bryan needs the demo sometime this week or next, and I'm spending all day trying to find something intelligent to do that won't kill the Cinemon machine on network failure, but will also catch the offline condition within a minute or two.
And so I remember next time (Should have thought of it earlier, but the sketch said to go the other way...)
Written by
on
in
Snaking.
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 ] = ...!-->!-->
How many support modules, that is the question (PyOpenGL after kebabs...)
Written by
on
in
Snaking,
Vindaloo.
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 ...
Python C modules for PyOpenGL (Wow that's a lot of work for little tangible benefit...)
Written by
on
in
Snaking.
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 ...
Templating joys (Slog, slog, slog, slog-slog-slog, slog, slog, slog, slog-slog-slog, slog, slog...)
Written by
on
in
Snaking.
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 ...
Emerges for all! (Oh what a geeky life we lead...)
Written by
on
in
Snaking.
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 ...!-->!-->
Should check all these scripts into local CVS (Noticable amount of effort could be lost)
Written by
on
in
Snaking.
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 ... !-->!-->!-->
Premature optimisation kills (Well, introduces errors...)
Written by
on
in
Snaking.
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 ...!-->!-->
Oh, about the slogging (Little forward motion, mostly just learning the limitations of SVG)
Written by
on
in
Snaking.
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 ...
Moving work into Gentoo (Well, really just a little more work toward it...)
Written by
on
in
Snaking.
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. ...!-->!-->