Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

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 ...

Continue reading

PyOpenGL 4.0.0a1

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 ...

Continue reading

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, ...

Continue reading

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 ...

Continue reading

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 ...

Continue reading

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 ...

Continue reading

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 ...

Continue reading

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 * ...

Continue reading

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 ...

Continue reading

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. ...

Continue reading