Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Two pings forward...

Spent the day on qnet yesterday.  Biggest change was using a structured library for the package/message format encoding/decoding.  That same structure stuff should be usable by people writing games to write their own protocols.  It's pretty straight-forward stuff.  Could use some optimisation work though. Speed dropped considerably with the structured approach instead of making single ...

Continue reading

Lazy wrappers around functions


As (extension) functions in OpenGL often are not available until a valid context is created (and functions can be available/unavailable for different contexts), it's necessary to do some lazy-loading inside PyOpenGL sometimes.  Discovered today that the glHistogram wrappers were doing load-time checks for function availability and only wrapping the functions if the checks succeeded.  So, ...

Continue reading

Channels and keys and loops, oh my

Worked on qnet yesterday.  Got the stateless (ordered, not guaranteed) channel working.  Basically this channel allows you to send messages with "keys" (think of them as sub-channels) where each key is considered to be a stateless update.  That is, each message with a given key is a complete update as to the current state of ...

Continue reading

Bit of qnet hacking

Got the multiple-channel dispatching roughed in.  Also roughed in the event-sending interface.  Sped up the handling considerably for long pending queues (was doing a linear scan of the whole queue for each ack'd message, oops).  Also roughed in code for ordered-but-not-guaranteed channels (i.e. channels that keep the latest received values, dropping any missing messages).  Statistics ...

Continue reading

Whether to tie qnet or not?

I've been working a bit on pyqnet over the weekend.

  • refactored into multiple modules in a package with a setup script
  • I've got a UDP-level implementation (i.e. real network level operations)
  • statistics gathering is started
  • the beginnings of adaptive retry/backoff code are there (i.e. resend frequency based on normal connection latency)
  • fixed handling of lossy ...

Continue reading

Sketchy network library...

Couldn't sleep this evening, so I sat down and hacked up a loose sketch of a networking library for Pygame.  The loose sketch is based on the description Phil gave at the OLPC jam at PyCon, but it's nowhere near finished yet.  Basically it's got the ordering and reliability stuff built, but hasn't touched ...

Continue reading

Check explicitly for extension support in OpenGL

Discovered a bug in PyOpenGL under Mesa this morning.  One of those "duh!" moments where you realise you're being a bit too clever and simple about things.  Luckily it was pretty easy to fix, as the whole of the extension hierarchy is auto-generated.

Basically, in OpenGL, extensions and functions > 1.1 are all potentially missing ...

Continue reading

PyOpenGL 3.0.0b4 available

Just released PyOpenGL 3.0.0b4.  This is a fairly minor point release.  It's the first to contain the proof-of-concept VBO support.  It also has a few more tests.  Still need work on the WGL extensions so that older WGL-using code that uses them will work.

A few fixes in OpenGLContext CVS as well.  Not releasing a ...

Continue reading

Code Aesthetics Excitement...

Sat down to collect my contribution for tomorrow's PyGTA. I've cut the set down to 8, maybe tomorrow after work I can narrow it down further. At the moment everything is my own code, save for Tim Peter's toposort from way back when. There's a number of very different views of what makes good code ...

Continue reading

Reminder Code Aesthetics @ PyGTA Tomorrow

Hope you're all wracking your brains and your source code control systems looking for that perfect piece of code that shows (some) programming has beauty and wonder.  Or maybe you're putting together a piece that shows programming really is just a kludge to get the job done.

PyGTA is tomorrow at Linux Caffe, 7:00pm.