Quantcast
Channel: Enrico's blog
Browsing all 22 articles
Browse latest View live

Sharing argparse arguments with subcommands

argparse subcommands are great, but they have a quirk in which options are only available right after the subcommand that define them.So, if you for example add the --verbose / -v argument to your main...

View Article


Things I learnt in November 2022

Debian:You can Build-Depend on debhelper-compat (=version) and get rid of debhelper as a build-dependency, and of debian/compat (details)You can Build-Depend on dh-sequence-foo and get rid of the...

View Article


Things I learnt in December 2022

Python: typing.overloadtyping.overload makes it easier to type functions with behaviour that depends on input types. Functions marked with @overload are ignored by Python and only used by the type...

View Article

Released staticsite 2.x

In theory I wanted to announce the release of staticsite 2.0, but then I found bugs that prevented me from writing this post, so I'm also releasing 2.12.2 2.3 :grin:staticsite is the static site...

View Article

Staticsite redesign

These are some notes about my redesign work in staticsite 2.x.Maping constraints and invariantsI started keeping notes of constraints and invariants, and this helped a lot in keeping bounds on the...

View Article


Monitoring a heart rate monitor

I bought myself a cheap wearable Bluetooth LE heart rate monitor in order to play with it, and this is a simple Python script to monitor it and plot data.Bluetooth LEI was surprised that these things...

View Article

Generating MIDI events with JACK and Python

I had a go at trying to figure out how to generate arbitrary MIDI events and send them out over a JACK MIDI channel.Setting up JACK and PipewirePipewire has a JACK interface, which in theory means one...

View Article

Heart-driven drum loop

I have Python code for reading a heart rate monitor.I have Python code to generate MIDI events.Could I resist putting them together? Clearly not.Here's Jack Of Hearts, a JACK MIDI drum loop generator...

View Article


Things I learnt in March 2023

str.endswith() can take a tuple of possible endings instead of a single stringAbout JACK and DebianThere are 3 JACK implementations: jackd1, jackd2, pipewire-jack.jackd1 is mostly superseded in favour...

View Article


Image may be NSFW.
Clik here to view.

Handling keyboard-like devices

I acquired some unusual input devices to experiment with, like a CNC control panel and a bluetooth pedal page turner.These identify and behave like a keyboard, sending nice and simple keystrokes, and...

View Article

Gtk4 model-backed radio button in Python

Gtk4 has interesting ways of splitting models and views. One that I didn't find very well documented, especially for Python bindings, is a set of radio buttons backed by a common model.The idea is to...

View Article

Image may be NSFW.
Clik here to view.

Mysterious DNS issues

Uhm, salsa is not resolving:$ git fetch ssh: Could not resolve hostname salsa.debian.org: Name or service not known fatal: Could not read from remote repository. $ ping salsa.debian.org ping:...

View Article

Image may be NSFW.
Clik here to view.

Regular virus scan

Debian: when you're more likely to get a virus than your laptop

View Article


Adulting

SlidesTalk page (including video)AbstractAlthough Debian has just turned 30, in my experience it has not yet fully turned adult: we sometimes squabble like boys in puberty, like children we assume that...

View Article

Introducing Debusine

SlidesSlide sourcesTalk page (including video)AbstractDebusine manages scheduling and distribution of Debian-related tasks (package build, lintian analysis, autopkgtest runs, etc.) to distributed...

View Article


meson, includedir, and current directory

Suppose you have a meson project like...

View Article

Typing decorators for class members with optional arguments

This looks straightforward and is far from it. I expect tool support will improve in the future. Meanwhile, this blog post serves as a step by step explanation for what is going on in code that I'm...

View Article


New laptop setup

My new laptop Framework (Framework Laptop 13 DIY Edition (AMD Ryzen™ 7040 Series)) arrived, all the hardware works out of the box on Debian Stable, and I'm very happy indeed.This post has the notes of...

View Article

How to right click

I climbed on top of a mountain with a beautiful view, and when I started readying my new laptop for a work call (as one does on top of mountains), I realised that I couldn't right click and it kind of...

View Article

Disable spellchecker popup on Android

On Android, there's a spellchecker popup that occasionally appears over the keyboard, getting very annoyingly in the way. See for example this unanswered question with screenshots.It looks like a...

View Article
Browsing all 22 articles
Browse latest View live