Category archives: Snaking
Discussions of programming, particularly of programming Python
OMI Audio extension for glTF
Written by
on
in
Snaking.
Another OMI-based extension, this time for positional audio mixing. Again, Claude-coded, using the OMI/KHR audio extensions for glTF as the base model and then implementing the actual mixing using Numpy. Supports mp3, wav, opus and flac inputs and stereo (headset) outputs. Up on github as omi_audio and on PyPI as omi_audio as well.
This is ...
OMI Physics Extension for glTF
Written by
on
in
Snaking.
I had Claude code up an OMI Physics package using Numpy. It's up on pypi as omi_physics. This follows the OMI extensions to glTF pretty closely to create an engine with the common features you need. It's not trying to be real-world physics, it's just a game engine style simulation.
The core is GL-free, ...
PyVRML97 2.3.4b1
Written by
on
in
Snaking.
Continuing on with the Open Source work. PyVRML97 2.3.4b1 is almost all build and CI process updates. There are a few minor fixes for modern Python's where bool can't be used as a list index and a change for NumPy 2.x array comparison failures. This beta is mostly just so that we can pull it ...
PyOpenGL 4.0.0a1
Written by
on
in
Snaking.
I've been trying to make some time for Open Source projects again. I've been using LLMs for much of the coding because the vast bulk of it at this point is just grunt work. First up is PyOpenGL. The tests the LLM produced turned up a bunch of bugs in the core that have lain ...
Interesting Memory Leak with Python 3.12 for PyOpenGL-accelerate
Written by
on
in
Snaking.
So I'm currently trying to figure out why the PyOpenGL 3.12 test suite is failing. There's a particular test that looks for VBO memory leakage and it looks loosely like this:
for i in range(100):
create_a_vbo_and_delete_it()
calculate_total_process_memory()
assert_no_leak()
which shouldn't ever lose more than a few bytes (limit is set to 200 for this test, ...
Ubuntu 22.04 Python 3.12 pip is broken
Written by
on
in
Snaking.
It seems that we've removed an entry point that pip 22.0 uses from Python 3.12. That means that you need to install pip from get-pip.py on Ubuntu LTS python3.12.
However even with that done and tox supposedly configured to use pip 23.2.1 in its virtualenvs, I still wind up with pip 22.0 in the ...
What is Pythonic Typing for "There exists some plugin that provides an Adapter for X"
Written by
on
in
Snaking.
So starting to think about a PyOpenGL 4.x release, which would be first to drop Python 2.7 support, so the first one where type-hints can be used to declare metadata for type-coercion (vs the current nonstandard type declarations). The first big question that comes up is:
Given an open collection of types {A,B,C,...}
And a ...
PyOpenGL 3.1.7 Building Now
Written by
on
in
Snaking.
So I spent some of the Victoria Day weekend on PyOpenGL. Biggest changes are:
* got cibuildwheel running on github actions so that we can get a matrix of (manylinux) wheels built for accelerate
* automated upload from github actions to pypi
* investigate the egl regressions; so far all of them seem to be ...
Weird regressions in EGL setups
Written by
on
in
Snaking.
So trying to spend a bit of my vacation going through PyOpenGL issues. So far the biggest issues are all EGL related, with the one currently stumping me is that we do not seem to be able to do an eglMakeCurrent (getting an EGL_BAD_ACCESS) even though the context/view is only ever accessed from the pygame ...
Potions with Custom Effects
Written by
on
in
Snaking.
In Pycraft, I figured out the Potions-with-custom-effects, the problem being that Bukkit's PotionEffectType doesn't actually implement the keyed interface, but instead has its own .values() call, so needs a whole special handler. The code for creating potion with custom effects looks like:
await potion_of(
'night_vision',
"Gopher's Gruel",
{
'type': 'fast_digging',
'duration': 20 * 60 * ...