photog.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for your photos and banter. Photog first is our motto Please refer to the site rules before posting.

Administered by:

Server stats:

245
active users

#scripting

0 posts0 participants0 posts today

Still pondering upon whether to render the Amiga audio stream directly to 48kHz/16bit with UADE using sinc or to use 96kHz or even 192kHz and downsample it afterwards.

The funny thing the resampled 96kHz audio does sound nice and 192kHz even nicer in comparison but that might be just a mere trick of my imagination. I really doubt I have such bat ears... 🦇 👂

Also it could really be counterproductive to have signalprocessing both from UADE and ffmpeg...

hmmh, I should take a break from it, I guess.
I'm happy I fixed the UI quirks and will revisit it eventually.

#unix #amiga #music #uade
#FreeBSD #kde #plasma
#shell #scripting

New Kitten Release 🥳

kitten.small-web.org

(Run `kitten update` to update your dev machines. Production machines will automatically update in a couple of hours.)

• You can now add a generic script block to your markdown pages (see mastodon.ar.al/@aral/114432417)

• Markdown pages can now be `KittenPage` instances and attach `KittenComponent` instances (so you get a full server-side component hierarchy with an event-based workflow; ideal for authenticated pages where you can be use only the author of the page will be accessing them and thus the additional memory and processing overhead are not issues. Isn’t the Small Web great? Only having instances of one makes it possible to optimise so many things for the human experience instead of vertical scale of the data farming machine.)

• Two new examples showcase the new features: codeberg.org/kitten/app/src/br and codeberg.org/kitten/app/src/br

• Attributes with object values are no longer serialised into the DOM (but your components’ render functions will continue to receive them, of course.) This is because only string values make sense for attributes in the context of the HTML DOM. (You can still, of course, have stringified representations of objects in attributes, as used by the `data` attribute to pass data from nodes to event handers on the server.)

kitten.small-web.orgKitten: Home

I was looking for an alternative to classic shell scripts, so I timed a Hello World program in different languages for fun. I thought you might want to know:

1 ms - #Bash
1 ms - #Perl
12 ms - #Python
33 ms - #Go (shebang calling `go run`)
38 ms - #C (shebang compiling to temporary file)
61 ms - #Rust (shebang compiling to temporary file)

Needless to say that this is a highly unfair and silly comparison. It's still interesting, though.

Finally, finally, I've mastered the #moss sex without using complicated technical terms. Now it's time to ask the #tardigrade more questions. Then scripting the outro. The final spurt.
In the evenings and during breaks, I create the sound design for the episode (in thoughts).
Sleep is overrated, coffee undervalued. 😂

Tomorrow a disaster day of proofreading between multiple appointments.
I'm my own worst critic.
Then sleep. A voice needs sleep.

#weeklyreview 17/2025

Easter brunch with the family in the Hotel Döllnsee. Always a good place to go. But way too much food 😉 Could hardly move after the brunch.

Still we went watching the new lambs of a befriended shepherd in the afternoon.

Dad in law took care of our beehives. Out of two only one hive survived. But we’ll create a new hive by splitting the one left.

Docker container debugging

Every once in a while I have issues with docker containers running wild. It’s not entirely trivial to figure out to which container a certain process belongs when you have multiple containers running on the same host. Due to an open bug in Uptime-Kuma I had to dig a little deeper and wrote myself a shell script to show the process tree of each running container:

#!/bin/bash# iterate over all running containersfor container_id in `docker ps --format "{{.ID}}"`; do        # Find the containers main PID        CONTAINER_PID=`docker inspect --format "{{.State.Pid}}" ${container_id}`        # Find the containers name        CONTAINER_NAME=`docker inspect --format "{{.Name}}" ${container_id}`        # Print container name and pstree        echo "$CONTAINER_NAME"        pstree -as ${CONTAINER_PID}done

The output looks something like this:

/cryptpad-cryptpad-1systemd  └─containerd-shim -namespace moby -id dfb89938eb040038d51a03c016ca04d769eaf0829c00e10c0abe8cf4e6ec0d67 -address /run/containerd/containerd.sock      └─npm start          ├─sh -c node server.js          │   └─node server.js          │       ├─node ./lib/http-worker.js          │       │   └─10*[{node}]          │       ├─node ./lib/http-worker.js          │       │   └─10*[{node}]          │       ├─node lib/workers/db-worker          │       │   └─10*[{node}]          │       ├─node lib/workers/db-worker          │       │   └─10*[{node}]          │       └─10*[{node}]          └─10*[{npm start}]/asciinema-asciinema-1systemd  └─containerd-shim -namespace moby -id 4af82a250865da13c45431423d042cb6d79d6daaead8536c2f60d6e38a7ee640 -address /run/containerd/containerd.sock      └─tini -- /opt/app/bin/server          ├─beam.smp -- -root /opt/app -bindir /opt/app/erts-13.1.4/bin -progname erl -- -home /root -- -noshell -s elixir start_cli -mode embedded-setcook          │   ├─erl_child_setup 1048576          │   │   ├─cpu_sup          │   │   ├─inet_gethost 4          │   │   │   └─inet_gethost 4          │   │   ├─memsup          │   │   └─sh -s disksup          │   └─19*[{beam.smp}]          └─epmd -daemon/traefiksystemd  └─containerd-shim -namespace moby -id 100922f0440f49a306caa163a025c0a948d60ca37d2adfd80b090abd4b34a3ab -address /run/containerd/containerd.sock      └─traefik traefik --accesslog=true --api=true --api.dashboard=true --api.insecure=false --certificatesresolvers.myresolver.acme.tlschallenge=true...          └─12*[{traefik}]

This should help identifying the process and the container it belongs to. Now finding the respective docker-compose.yml on your disk is a different story 😉

Pop-Up Dinner

On Thursday evening we went to a pop-up dinner at Fechtner Deli. Delicious italian-indonesian-indian fusion kitchen. All veggie and very delicious. I can tell, because I had the left-overs from my friends as the portions were rather big.

Asparagus

As a German it’s customary to celebrate asparagus this time of the year. Large quantities will be consumed in the next few weeks. We did our part siding it with grilled salmon and self-made Sauce Hollandaise.

Gardening

Finally cut the hedge on the weekend. Quite exhausting due to the unusual movement of holding the electric hedge cutter overhead…

Also prepared the raised beet for the new season. We still wait for one or two more weeks to put our tomatoes outside as the nights are still too cold. It was below 0º C on the weekend again.

Today I learned from the flock(1) man page (on Debian) that you can put this line at the top of a shell script to prevent more than one copy of it from ever running at a time:

[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :

This is an extremely clever hack and I don't know how I've never stumbled upon it in 38 years of writing shell scripts.
#unix #linux #scripting #shellScripting

Here's a demo of the mp3 glitching script I wrote about here: reillyspitzfaden.com/posts/202

I added a batch script so I can take in a bunch of folders of .wav files, use ffmpeg to convert them to mp3 (and try out different bitrates), glitch them, re-encode those as .wav (easier to work with), and then clean up all the intermediate mp3s.

In less than 18 hours, including a solid 12 hours (at least) of downtime, I have gone from concept to 90% functional prototype of a creative rPi project, thanks to aus.social allowing quick and easy downloads, jq, an obscure CUPS driver project, and an intimate knowledge of scripting.

Feeling very accomplished.

howtogeek.com/learn-linux-scri

Why to learn scripting even if you are not a programmer.

From the article:
- Automating Repetitive Tasks
- You Can Find Scripts Online and Adapt Them
- Lots of Help From Programming Pros Online
- Save Time and Money With Your Existing Hardware
- You Can Use Your Existing OS
- Libraries, Programs Do the Hard Work for You
- Learning Advanced Skills Lets You Automate More
- Knowing Scripting Languages Is a Valuable Skill

How-To Geek · Why You Should Learn Scripting Even If You're Not A ProgrammerMake your computer work for you, not the other way around!

Want to trigger some #bash action once a process is finished? Find the pid of the process with `ps` or `top` (1234 in this example) and then:

while ps 1234 ; do sleep 5 ; done ; git add . && git commit -m 'Updated dependencies.'

The commands after the `done;` will happen once the process finishes. Keep in mind that this will fire regardless of whether it finished successfully, but this is useful for triggering an action on an already long-running process.