RSSAmplifier

Blog

blog.vrplumber.com - Entries for the category Snaking

Discussions of programming, particularly of programming Python

blog.vrplumber.comRSS feed ↗15 posts

Latest posts

OMI Audio extension for glTF

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 loosely the same model as Web Audio's Panner Node. The…

OMI Physics Extension for glTF

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, with a few GPGPU kernels to optimise certain bits over 10,000 objects, but in testing any more…

PyVRML97 2.3.4b1

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 from OpenGLContext's alpha when it's released.

PyOpenGL 4.0.0a1

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 dormant for years because the endpoints weren't getting used. The LLM tests are not particularly fun or interesting, but they…

Interesting Memory Leak with Python 3.12 for PyOpenGL-accelerate

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, but it doesn't lose even one normally).…

Ubuntu 22.04 Python 3.12 pip is broken

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 environments, so the environment building crashes and I can't actually run the PyOpenGL test suite…

What is Pythonic Typing for "There exists some plugin that provides an Adapter for X"

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 set of run-time-registered adaptors {E,F,G,...} Such that a given adaptor…

PyOpenGL 3.1.7 Building Now

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 related to something changing in PyGame. I constructed a raw-xlib test-case runner that shows…

Weird regressions in EGL setups

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 python context, which should all be executing in the single thread.

Potions with Custom Effects

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 * 8, # in…

Finally Got Potions (ItemMeta) and Signs (BlockState) working

So one of the long-standing requests from the boys has been that we have the ability to create potions from Pycraft's in-game REPL. Today I finally got that working, mostly because I finally decided that there was room for a reference pattern to make the whole thing easier. By way of background, Pycraft was previously an "indexable object only" or "nameable object only" model of RPC, so you could…

Creating some Pycraft Videos

Pycraft has remained relatively obscure. It lets you write (very close to) Python code in the minecraft chat window to perform magic that's written in Python code on the backend. I thought maybe a few demos showing what you can do with the code might serve to interest a few others in playing with it. The code consists of a Java plugin that exposes much of the Bukkit API over a form of json-rpc and…

Python Version Support Ideas

As a general rule, I don't like to just stop supporting Python releases just for the sake of deprecation. I try to be relatively wide in the set of Python's I'll support for my libraries, with my current general rule being 2.7, 3.6+ . Why those? Well, 2.7 is still on RHEL/Centos for another year or so, and dropping support for it means that people using a library pretty much need to re-code their…

Cleaning up the PyOpenGL Demos

Spent a bit of my second-last-day-of-vacation cleaning up the PyOpenGL Demos so that they run with current Python 3.10, PyOpenGL, numpy and PIL and can be installed as a package rather than only being usable via a git checkout. There were a few bits of bit-rot, mostly around ctypes no longer allowing you to raise exceptions (i.e. systemexit) from callbacks and around images/arrays now using…

Go Lang Impressions after 2 Months

So for work I've needed to learn GoLang, which I'd always before picked up, kicked the tires and said "meh" on. A few months now of working with it pretty-much-daily have upped the "meh" quite a bit. To be clear, I'd choose Go over raw C, but I'd likely pick modern C++ over Go. Channels and spaghetti... I get it, message passing is nice, and channels rigorously applied mean you don't need to worry…