I may be giving a workshop on livecoding audio in C early next year, but setting everything up on ~10 different Linuxes would take all the time. It doesn't work on Windows (probably no technical reason why something similar couldn't be constructed) nor macOS (likewise) but as I don't use them I'm not motivated to do the work.

So I'm thinking of making a live USB distro using debian-live live-build etc, but now I'm worried that modern "secure boot" nonsense on PCs will prevent booting from USB and we'll be stuck anyway. Remembering the immense waste of time spent trying and failing to get Puredyne to boot on stock Apple hardware more than a decade ago....

Anyway, this guide for adding persistence to the live USB (so you can save your work and configuration changes between reboots in an (optionally encrypted) overlay partition) is super nice: unix.stackexchange.com/a/53866

Had some issues with scripting fdisk, some timing race condition prevents the kernel rereading the partition table - unplugging and replugging the USB device fixes it.

more udev rules that might be necessary to get it to work properly (seems the AC rule doesn't work reliably alone):

SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="BAT0", ENV{POWER_SUPPLY_STATUS}=="Discharging", RUN+="/usr/local/bin/psu-hotplug.sh 0"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="BAT0", ENV{POWER_SUPPLY_STATUS}!="Discharging", RUN+="/usr/local/bin/psu-hotplug.sh 1"

Show thread

how to when is and running on

useful for media art installations where you don't want the laptop battery to be destroyed by excessive power consumption if there is a long power cut

$ cat /usr/local/bin/psu-hotplug.sh
XUSER="$(who | grep -F "(:0)" | cut -d\ -f 1)"
if [ "x${XUSER}" = "x${PSUUSER}" ]
if [ "x${ACTIVE}" = "x0" ]
# power off if power is not restored
echo "$(date --iso=s) power lost" >> /var/log/psu-hotplug.log
touch /var/run/psu-hotplug.shutdown
sleep 30
if [ -f /var/run/psu-hotplug.shutdown ]
echo "$(date --iso=s) shutting down" >> /var/log/psu-hotplug.log
shutdown now -h
echo "$(date --iso=s) not shutting down" >> /var/log/psu-hotplug.log
echo "$(date --iso=s) power restored" >> /var/log/psu-hotplug.log
rm -f /var/run/psu-hotplug.shutdown
$ cat /etc/udev/rules.d/50-psu-hotplug.rules
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_ONLINE}!="0", RUN+="/usr/local/bin/psu-hotplug.sh 1"
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="AC", ENV{POWER_SUPPLY_ONLINE}!="0", RUN+="/usr/local/bin/psu-hotplug.sh 1"

doesn't seem to work if you login manually in lightdm, but if you wait for autologin timeout it seems to function. strange..

Show thread

how to in (and possibly other )

$ cat blank.xbm
blank_width 1
blank_height 1
blank_x_hot 0
blank_y_hot 0
static unsigned char blank_bits[] = {
$ xsetroot -cursor blank.xbm blank.xbm

useful for media art installation. my previous hack was warping the mouse cursor to bottom right corner of the screen and hoping the single pixel visible was either transparent or matching the background; and that was obviously not robust to mouse movements afterwards...

Unfortunately after upgrade, sending "create" message to gemwin object crashes with segmentation fault in libstdc++. Hoping upgrade to Bullseye will fix this...

Show thread

After upgrade of old laptop to Debian Buster from Stretch, boot would spend a minute printing

> blkid: -t needs NAME=value pair

Followed by

> Gave up waiting for suspend/resume device

Solution turned out to be

swapoff /dev/sda2
mkswap -L espresso-swap /dev/sda2
swapon -a
update-initramfs -u -k all

Which now prints the UUID for the swap partition (previously the UUID was blank).

small issue: I have some "speech dispatcher" things that show up in qjackctl graph that autoconnect to my output device, when they are connected it blocks/pauses other programs (e.g. firefox) connected to the output device. disconnecting the speech dispatcher allows sound to be heard. possibly a resampling thing, maybe speech is at 22kHz and firefox is at 44 or 48kHz? using debian bullseye

Found a solvent that worked nicely for removing the sticky remains of label glue residue.

Have 12 floppy disks all installed with my software and clean and ready for new labels.

Getting labels seems to be harder than expected, the required size is about 70mm square with rounded corners. Most custom print jobs are minimum 200 stickers and I don't need anywhere near that many, so I'm thinking of getting plain white labels (also minimum pack size 200...) designed for inkjet/laser printing at home, and doing potato prints with acrylic paint, with finer details by hand.

Show thread

This is more like what I had imagined - just needed some settings adjusted, and an extra thing for preferring to continue in the same direction.

Show thread

an experiment with agent simulation (each leaves a trail when it goes from A to B, and prefers using existing trails even if the route is a bit longer)

didn't quite turn out as I had expected / hoped (was going for "emergent city plan")

Considering renaming my "Mandelbrot Perturbator GTK" project to "Matthew" but I'm not sure if it would be a good idea.

The old name comes from the Mandelbrot set fractal, perturbation techniques (for deep zooms), and the toolkit for the user interface.

The new name could be backronymed painfully, something like "Mandelbrot set Annotation Tool ...". I already have projects Clive, Barry, and Harry so it's not without precedent. The only thing name-related in Debian is `libmatthew-java`, which hopefully wouldn't be too conflicting.

The main purpose of the program is to make diagrams of the Mandelbrot set with annotations of things like (pre)periodic points, external rays, and atom domains.

Apparently there is a band called Perturbator that I'd not heard of until recently, and I'm thinking of porting it away from GTK to a lighter more-easily-cross-compiled toolkit.

Same content (a Mandelbrot set raster image plus annotation vectors on top), different file sizes:

228K eg.pdf
212K eg.pdf.gz
480K eg.png
480K eg.png.gz
8.0K eg.key.png
4.0K eg.key.png.gz
968K eg.svg
348K eg.svg.gz
8.0K eg.key.svg
4.0K eg.key.svg.gz
12K eg.toml

The SVG is bloated with base64-encoded PNG embedded in it, but it compresses surprisingly well. PDF wins in both file size and convenience (no separate file needed for the key, it's on page 2).

The TOML is just the specification of what should be drawn, so is unsurprisingly tiny in comparison. It takes some time to calculate, so I'm thinking of adding a TOML variant that includes pre-calculated annotations, which will bump the file size up a lot but (probably) speed up loading.

I also want to add support for multiple view specifications (center coordinates and view radius) in the same TOML document, which would be rendered in sequence after calculating annotations only once.

But first I want to reduce the dependency on GTK somehow, so (eg, TOML to PDF) conversion can work headless without needing windows to be opened...

Having PDF issues, again - cannot view actual size or select text in Evince, and Okular does not display fill patterns or print properly.

I tried a few other PDF things:

Okular (KDE, uses Poppler)
✅ text selection
✅ "100%" matches paper size on screen
❎ fill patterns
❎ prints properly

Evince (GTK, uses Cairo)
✅ fill patterns
✅ prints properly
❎ text selection
❎ "100%" matches paper size on screen

XPDF (Motif, uses Poppler)
✅ text selection
❎ fill patterns
❎ "100%" matches paper size on

GV (old, uses Ghostscript)
✅ fill patterns
❎ text selection
❎ "100%" matches paper size on screen

Atril (MATE, seems to use its own things?)
✅ fill patterns
✅ "100%" matches paper size on screen
❎ text selection (but "find as you type" works)

APVLV (Cairo and/or Poppler, not sure which)
✅ fill patterns
❎ "100%" matches paper size on screen
❎ text selection (could not figure it out, VIM is not my style)

Inkscape (tried Internal import mode, as well as Cairo/Poppler mode)
✅ fill patterns
✅ "100%" matches paper size on screen
❎ text selection (it's an editor, not a viewer)

ImageMagick (display command)
✅ fill patterns
❎ "100%" matches paper size on screen
❎ text selection

was trying to record a video demonstrating Mandelbrot Perturbator GTK but one feature didn't work properly (sometimes).

turns out it was a Use-After-Free bug:


"result" points to the first character after the parsed string...

Got detached key working in both PNG (an extra image file with extension ".key.png" in place of ".png") and PDF (a second page in the same file) export. Overlay on image is another option, as is having no key at all (the default mode).

I adjusted the dashing patterns for each ray by hand in the GUI, this would be something nice to automate because it's very tedious mouse clickery.

The way I'm showing the text makes it non-selectable in the PDF, need to fix that too... hopefully it's something simple in my use of the Cairo API.

Show thread

oh the key is upside down in the last image...

Show thread
Show older

Welcome to post.lurk.org, an instance for discussions around cultural freedom, experimental, new media art, net and computational culture, and things like that.