Geoffrey Thomas

@geofft
194 Followers
160 Following
310 Posts
systems engineer/UNIX arcanist in Brooklyn • https://ldpreload.com • "geofft" or "ldpreload" on other sites • he/they (Gal 3:28)
Webhttps://ldpreload.com
GitHubhttps://github.com/geofft
Twitterhttps://twitter.com/geofft
Blueskyhttps://bsky.app/profile/ldpreload.com

@villares @feoh @paco Yes, please give the latest build a try when you get a chance! See https://github.com/astral-sh/python-build-standalone/issues/129#issuecomment-3169282440 for upgrade instructions (the Python startup message should say it was compiled today).

I tested matplotlib and PIL.ImageTk myself and they work now. Haven't tested other things but I'm optimistic.

Can't import matplotlib on linux: module '_tkinter' has no attribute '__file__' · Issue #129 · astral-sh/python-build-standalone

Basic matplotlib usage such as import matplotlib.pyplot as plt; plt.plot(list(range(10)), list(range(10))) crashes with module '_tkinter' has no attribute '__file__'. On system python, _tkinter is ...

GitHub

[$] Accessing new kernel features from Python

Every release of the Linux kernel has lots of new features, many of which are accessible from user space. Usually, though, the GNU C Library (glibc) and tools that access the Linu [...]

https://lwn.net/Articles/1026749/ #LWN

something you have, something you are, something you oughta know
(little mermaid voice) what's a tensor and why does it...what's the word...flow?
Oh this is neat - a pure-Python userspace implementation of execve. https://github.com/anvilsecure/ulexecve
GitHub - anvilsecure/ulexecve: ulexecve is a userland execve() implementation which helps you execute arbitrary ELF binaries on Linux from userland without the binaries ever having to touch storage. This is useful for red-teaming and anti-forensics purposes.

ulexecve is a userland execve() implementation which helps you execute arbitrary ELF binaries on Linux from userland without the binaries ever having to touch storage. This is useful for red-teamin...

GitHub

Don't forget that SPDX also gives you convenient syntax for letting people opt into being blessed:

# SPDX-License-Identifier: 0BSD OR blessing

or combine a blessing with another license:

# SPDX-License-Identifier: GPL-2.0-or-later WITH Autoconf-exception-2.0 AND blessing

Software licensing fun fact: you can just write

# SPDX-License-Identifier: blessing

at the top of your file and it is spiritually equivalent to this full blessing: https://spdx.org/licenses/blessing.html

SQLite Blessing | Software Package Data Exchange (SPDX)

@glyph ah, yeah, I got sufficiently distracted by trying to make this work at all that I forgot about that goal, and indeed it completely does not work.

I feel like mostly I want @ dataclass class Foo(Enum) to work like this out of the box (right now it is documented to be broken but does not throw which seems bad), and I feel like getting type checkers to handle it should not be hard - they already know how to handle both enums and dataclasses.

@glyph I got inspired by your most recent post and made something, I'm curious for your take: https://gist.github.com/geofft/10dfd059d565038500533ea42ccb331f
dataenum

dataenum. GitHub Gist: instantly share code, notes, and snippets.

Gist
@rcombs @whitequark Oh I am interested in seeing your code if it's public, been working on something similar.