Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Mmm ctypes goodness and chocolate (Shane gave me dark-chocolate raspberries!)


So, after everyone left I went back to work on the ctypes version of PyOpenGL. Finished the pointer-setting functions, mostly just a matter of generalising the code so that it creates all of the various permutations for the Pythonic wrappers.

Then I started in on making the API look like the original, so importing everything ...

Continue reading

Rework all of the tests? (Or try to make it work...)


So, it turns out that Twisted has some serious problems related to starting and stopping the reactor multiple times during a run, which is, of course, what we do all the time when doing test-driven development in the "normal" (twisted.trial-like) style.

Have just spent more than 2 hours trying to build something that would let ...

Continue reading

Was that really only 5 functions? (Hope the rest of it is not this slow...)


Began work on creating wrappers for ctypes that work approximately the same as the ones planned for the 3.0 release (though written in Python, rather than C). Basically each function that needs array processing gets a number of annotations with callable objects. Those callable objects will eventually be written in C (for the performance critical ...

Continue reading

Hmm, first comment spam invades (Guess I'll have to put something in to stop that...)


Wouldn't it be nice if we could just issue network-death-penalties for comment spammers? Of course, then the spammers would start using it as a DOS technique, or even an extortion technique. Blah.

[Later] Doesn't look as though CoreBlog has anything to use for eliminating the spam other than turning on comment-moderation. Really don't like doing ...

Continue reading

Long day's hacking (Forgot how fast the time goes when listening to lectures as I work...)


I've only recently fixed the sound on my machine so that I can reliably play sound files without requiring a reboot before I start MythTV. So far I've been listening to music, but today I decided to pick up with one of the lecture series to which I'd stopped listening just a few chapters in. ...

Continue reading

I should write now (But I feel like sleeping instead)


Switched over to the development branch today for testing. Went fairly well, just a few bugs that crept up due to differences between the test framework and the real system. Pretty good considering it's an entirely new CMTS and Modem type being added to the system.

I should take an hour or two to write. ...

Continue reading

No, it really was that subtle (Moreso than I'd thought...)


Turns out the device-view bug was one of those situations where procedural thinking and event-driven thinking were being applied separately and resulting in a collision.

(More detail than anyone cares about...)

Modems go out and find their identity, then send a message telling the rest of the world about their identity. CMTSs ask each modem ...

Continue reading

Happy that the taxes are simpler? (Or depressed that my investment income totalled less than $100 for a year!)


Took a quick trip up to the bank between helping D'Arcy and starting Cinemon work today. Taxes are due tomorrow evening in Canada, and I'd not been able to find any T5 (investment income) slips from the banks with which I do business.

So, I trundled over and asked them to print out some T5s ...

Continue reading

Ctypes experiments start well (Characterising the problems...)


Today began work in earnest on creating a PyOpenGL implementation with ctypes. This is basically a matter of figuring out how to make the API look like the old SWIG API without introducing too much overhead, either in run-time processing, or development effort.

So far it's going well. There are only about 5 or 6 ...

Continue reading