Enrico's blog

Per celebrare il periodo arancione sto esplorando le possibilità di camminate e biciclettate lungo i confini di San Giorgio di Piano.

Oggi ho fatto un giro di circa 12km costeggiando il confine con Castello d'Argile/Mascarino, tutto sugli gli argini del canale Riolo e del Canale Emiliano Romagnolo.

Ho aggiunto tutto il percorso su OpenStreetMap in modo che si possa esplorare su una cartina. Per chi non conosce OpenStreetMap, la differenza con altri servizi è che se su OpenStreetMap manca qualcosa lo puoi sistemare. Se su altri servizi manca qualcosa, ti attacchi al tram e tiri forte. È anche possibile creare siti e cartine liberamente usando i dati di OpenStreetMap, mentre con altri servizi vale il suddetto discorso del tram.

Anni fa provai anche a chiedere aiuto al comune e all'Unione Reno Galliera per cercare di tirar fuori una cartina per passeggiate in mezzo alla campagna su percorsi che non fossero proprietà private, ma mi sorrisero, e mi trattarono con quell'educazione e cortesia estreme che generalmente la gente usa coi matti.

In mancanza di fonti istituzionali, per l'accessibilità di questo percorso mi sono rifatto a due regole indicative: gli argini dei canali dovrebbero essere terreno del demanio, e le strade che arrivano fino alle buchette della posta di casa di qualcuno dovrebbero essere percorribili.

Da via Don Minzoni all'argine di Riolo

Partendo da via don Minzoni, sono entrato nella cavedagna che attraversa il podere di Atti, ringraziando il signore (quello che lavora all'urbanistica) che non abbiano ancora asfaltato tutto per farci in quartierino di muri grigi chiamato Green qualcosa. Ho visto però che ci stanno lavorando.

Ho seguito la cavedagna, attraversando il fosso con la traversina di ferrovia e via Selvatico, e poi sempre dritto fino a Riolo.

Dall'ultima buchetta della posta fino a Riolo c'è un piccolo tratto tra i frutteti, che è bellissimo in primavera, ma potrebbe essere proprietà privata. Io nel dubbio, se vedo qualcuno, chiedo il permesso di attraversarlo e trovo sempre persone gentili.

L'argine di Riolo

Arrivato a Riolo l'ho preso verso a destra. Avrei potuto attraversare il ponte della Scodellara, perché di là sarebbe ancora un lembo di San Giorgio, però poi dopo poco l'altra riva di Riolo passa sotto Argile, e quindi niente.

Una volta da queste parti le persone xenofobe dicevano "Sèra l'oss ch'a i'é i pivén ch'i vinen zò da Mascarén". Ora abbiamo chiuso i confini anche con Mascarino, ma le persone xenofobe continuano a lamentarsi.

ASCII

La camminata sull'argine è bella e lunga. Attraversando via Mascherino l'argine continua e continua fino al Canale Emiliano Romagnolo. Poco prima del canale c'è un ponticello un po' disastrato e stretto.

ASCII

Sono arrivato fino al punto in cui Riolo scorre sotto al Canale Emiliano Romagnolo, ho ammirato l'ingegnosa opera idraulica, e sono salito sull'argine del Canale.

L'argine del Canale Emiliano Romagnolo

ASCII

Salito sul canale l'ho trovato vuoto. Dice che l'acqua sia ferma ai confini del Piemonte e stiano cercando di capire se serva o no l'autocertificazione. Per me è stata un'ottima occasione per vedere com'è fatta un'idrovora anche da sotto.

Se l'argine di Riolo è normalmente ben tenuto, quello del canale è un po' piú selvaggio, soprattutto all'inizio, ed ero contento di avere scarpe buone e pantaloni lunghi.

Proseguendo ho incontrato uno che è finito col camion in mezzo al canale, ma stava bene.

ASCII

Prima di arrivare al ponte con la provinciale, subito dopo una villa c'è un sentiero sulla destra che riporta su via Codini. Sono rientrato attraversando il Laghetto dei Germani gentrificato, e poi via Irma Bandiera, chiudendo il giro.

Growing up framed as a somewhat nerdy male, I was exposed to a horrible mainstream narrative for relationships. I really like how these two links take some of it apart and make its serious problems visible:

The narrative for mainstream-desirable males also needs questioning:

And since I posted a link about unreasonable expectations towards male bodies:

This is part of a series of posts on compiling a custom version of Qt5 in order to develop for both amd64 and a Raspberry Pi.

Building Qt5 takes a long time. The build server I was using had CPUs and RAM, but was very slow on I/O. I was very frustrated by that, and I started evaluating alternatives. I ended up setting up scripts to automatically provision a throwaway cloud server at Hetzner.

Initial setup

I got an API key from my customer's Hetzner account.

I installed hcloud-cli, currently only in testing and unstable:

apt install hcloud-cli

Then I configured hcloud with the API key:

hcloud context create

Spin up

I wrote a quick and dirty script to spin up a new machine, which grew a bit with little tweaks:

#!/bin/sh

# Create the server
hcloud server create --name buildqt --ssh-key … --start-after-create \
                     --type cpx51 --image debian-10 --datacenter …

# Query server IP
IP="$(hcloud server describe buildqt -o json | jq -r .public_net.ipv4.ip)"

# Update ansible host file
echo "buildqt ansible_user=root ansible_host=$IP" > hosts

# Remove old host key
ssh-keygen -f ~/.ssh/known_hosts -R "$IP"

# Update login script
echo "#!/bin/sh" > login
echo "ssh root@$IP" >> login
chmod 0755 login

I picked a datacenter in the same location as where we have other servers, to get quicker data transfers.

I like that CLI tools have JSON output that I can cleanly pick at with jq. Sadly, my ISP doesn't do IPv6 yet.

Since the server just got regenerated, I remove a possibly cached host key.

Provisioning the machine

One git server I need is behind HTTP authentication. Here's a quick hack to pass the relevant .netrc credentials to ansible before provisioning:

#!/usr/bin/python3

import subprocess
import netrc
import tempfile
import json

login, account, password = netrc.netrc().authenticators("…")

with tempfile.NamedTemporaryFile(mode="wt", suffix=".json") as fd:
    json.dump({
        "repo_user": login,
        "repo_password": password,
    }, fd)
    fd.flush()

    subprocess.run([
        "ansible-playbook",
        "-i", "hosts",
        "-l", "buildqt",
        "--extra-vars", f"@{fd.name}",
        "provision.yml",
        ], check=True)

And here's the ansible playbook:

#!/usr/bin/env ansible-playbook

- name: Install and configure buildqt
  hosts: all
  tasks:
   - name: Update apt cache
     apt:
        update_cache: yes
        cache_valid_time: 86400

   - name: Create build user
     user:
        name: build
        comment: QT5 Build User
        shell: /bin/bash

   - name: Create sources directory
     become: yes
     become_user: build
     file:
        path: ~/sources
        state: directory
        mode: 0755

   - name: Download sources
     become: yes
     become_user: build
     get_url:
        url: "https://…/{{item}}"
        dest: "~/sources/{{item}}"
        mode: 0644
     with_items:
      - "qt-everywhere-src-5.15.1.tar.xz"
      - "qt-creator-enterprise-src-4.13.2.tar.gz"

   - name: Populate home directory
     become: yes
     become_user: build
     copy:
        src: build
        dest: ~/
        mode: preserve

   - name: Write .netrc
     become: yes
     become_user: build
     copy:
        dest: ~/.netrc
        mode: 0600
        content: |
           machine …
           login {{repo_user}}
           password {{repo_password}}

   - name: Write .screenrc
     become: yes
     become_user: build
     copy:
        dest: ~/.screenrc
        mode: 0644
        content: |
           hardstatus alwayslastline
           hardstatus string '%{= cw}%-Lw%{= KW}%50>%n%f* %t%{= cw}%+Lw%< %{= kK}%-=%D %Y-%m-%d %c%{-}'
           startup_message off
           defutf8 on
           defscrollback 10240

   - name: Install base packages
     apt:
        name: git,mc,ncdu,neovim,eatmydata,devscripts,equivs,screen
        state: present

   - name: Clone git repo
     become: yes
     become_user: build
     git:
        repo: https://…@…/….git
        dest: ~/…

   - name: Copy Qt license
     become: yes
     become_user: build
     copy:
        src: qt-license.txt
        dest: ~/.qt-license
        mode: 0600

Now everything is ready for a 16 core, 32Gb ram build on SSD storage.

Tear down

When done:

#!/bin/sh
hcloud server delete buildqt

The whole spin up plus provisioning takes around a minute, so I can do it when I start a work day, and take it down at the end. The build machine wasn't that expensive to begin with, and this way it will even be billed by the hour.

A first try on a CPX51 machine has just built the full Qt5 Everywhere Enterprise including QtWebEngine and all its frills, for amd64, in under 1 hour and 40 minutes.

Weather: We can only forecast the weather a few days into the future.

Nuclear: I had no idea Thorium-based nuclear power was a thing.

Fluid dynamics applied to traffic: Traffic Flow and Phantom Jams.

Psychology, economics, and a history of culturally biased experiment results: We aren’t the world.

Italy during the cold war has always been in too strategic a position, and with too strong a left wing movement, not to get the CIA involved.

Here are a few stories of coup d'état and other kinds of efforts to manipulate Italian politics:

The Bouletcorp » Love & Dragons is a strip I like about fairytale relationships.

There are a lot of mainstream expectations about relationships. These links challenge a few of them:

More about emotional work, some more links to follow a previous links post:

A few interesting places to visit. Traveling could be complicated, and internet searches could be interesting enough.

For example, churches:

Or fascinating urbanistic projects, for which it's worth to look up photos:

Or nature, like Get Lost in Mega-Tunnels Dug by South American Megafauna

Cognitive bias cheat sheet has another elegant infographic summarising cognitive biases. On this subject, you might want to also check out 15 Insane Things That Correlate With Each Other.

Get started | Learning Music (Beta) has a nice interactive introduction to music making.

If you leave in a block of flats and decide to learn music making, please use headphones when experimenting. Our neighbour, sadly, didn't.

You can also learn photography with Photography for Beginners (The Ultimate Guide in 2020) and somewhat related, Understanding Aspect Ratios: A Comprehensive Guide

A fascinating apparent paradox that kind of makes sense: Czech nudists reprimanded by police for not wearing face-masks.

Besides being careful about masks when naked at the lake, be careful about your laptop being confused for a pizza: German nudist chases wild boar that stole laptop.

Talking about pigs: Pig starts farm fire by excreting pedometer.

Now that traveling is complicated, you might enjoy A Brief History of Children Sent Through the Mail, or learning about Narco-submarines.

Meanwhile, in a time of intense biotechnological research, Scientists rename human genes to stop Microsoft Excel from misreading them as dates.

Finally, for a good, cheaper, and more readily available alternative to a trip to the pharmacy, learn about Hypoalgesic effect of swearing.

Here are the slides of mine and Ulrike's talk Doing things /together/.

Our thoughts about cooperation aspects of doing things together.

Sometimes in Debian we do work together with others, and sometimes we are a number of people who work alone, and happen to all upload their work in the same place.

In times when we have needed to take important decisions together, this distinction has become crucial, and some of us might have found that we were not as good at cooperation as we would have thought.

This talk is intended for everyone who is part of a larger community. We will show concepts and tools that we think could help understand and shape cooperation.

Video of the talk:

The slides have extensive notes: you can use ViewNotes in LibreOffice Impress to see them.

Here are the Inkscape sources for the graphs:

Here are links to resources quoted in the talk:

In the Q&A, pollo asked:

How can we still have a good code review process without making it a "you need to be perfect" scenario? I often find picky code reviews help me write better code.

Ulrike wrote a more detailed answer: Code reviews: from nitpicking to cooperation