Games Hardware Software

Micro-mice and mazes

Via Kottke.

Truly wish we learned all this in school. Would’ve attended school significantly more often… 😉


Carl Sagan on climate change: “we’re doing something immensely stupid”

This is sobering: in an ad for the United Nations Global Compact, the words of Carl Sagan from nearly 40 years ago warn us of the necessity for urgent action on climate change, deforestation, and extinction.

Source: Kottke & Colosal.
Software www

Keeping Mastodon storage in check

For my Mastodon instance, I use Cloudflare R2; mainly for two reasons:

  • Storage was growing quickly (~80Gb during its peak); I am hosting my instance on a RPi4 (w/ 8Gb RAM) and the SSD was filling up rapidly,
  • I wanted something speedy to serve (big and cacheable) content (i.e. a CDN).

While I didn’t care much about storage any more, I still wanted to make sure it was kept in check, also for two reasons:

  • Mastodon downloads a copy of all content it says on the Fediverse, and keeps it until purged. So every instance has all the content from other instances. This could theoretically lead to you hosting illegal content and getting in trouble for it,
  • Cloudflare used to be my employer, and I have free access to R2. However, there’s always a risk they’ll disable my employee benefits one day and get me to pay for my used storage.

I run my Mastodon in a Docker instance, so your commands may vary (basically tootctl X Y is what matters). I run most of these commands once a week using systemd (except the media remover, that runs every day).

This will clear:

  • accounts (you never interacted with)
  • header files (big picture every account can upload)
  • profile pictures
  • link preview cards
  • orphaned media (uploaded media but not posted)
  • media (from other accounts)
  • statuses (from other accounts)
  • and as a bonus include updating Elasticsearch indices (which sound run every once in a while to optimise search)
/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl accounts prune

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl media remove --remove-headers --days 15

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl media remove--prune-profiles --days 30

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl preview_cards remove --days 15

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl media remove-orphans

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl media remove --days 30

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl statuses remove --days 30

/usr/bin/docker compose -f /srv/mastodon/docker-compose.yml run --rm shell tootctl search deploy

Note that you should play with the --days X to find something that works for you (i.e.: you can scroll back in the history and still see posts/media, but not overload your storage).

I’ve included all the systemd files that’s needed here. Again, will only work in a Docker environment using the same paths as me.

The systemd files will need to be activated using something similar to this (but again, don’t blindly run these commands as it’ll likely not work):

cp *.service *.timer /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now *.timer
systemctl list-timers | grep masto

Oh, and this is not specific to R2. This works even when storing everything locally.

I’ve written before on how to use Cloudflare CDN to protect/speed up your instance.


Nature in an urban setting

I’m very fortunate to have a handful of new trees, some grass and public seating bookend the street I live in. One of my favourite times of the day to be out on my balcony is dusk, because when the sun starts setting and the hustle and bustle of the city subsides, a group of Indian myna birds, attracted by that greenery, playfully chirps and flies between the trees. The tweeting draws out neighbours, too, and creates a beautiful moment of connection through nature in an otherwise man-made environment.

An increasing body of research tells us that interaction with nature is associated with better body and brain health. Birds play a particular role in this, in part because they are some of the only animals able to venture into highly developed areas and give out calls audible to the human ear, providing a direct link to the natural world.

The pleasure we get from encountering nature can be explained through the biophilia hypothesis, the idea that humans have an innate affinity for life and living systems: “Human preferences toward things in nature, while refined through experience and culture, are hypothetically the product of biological evolution.”

This theory is guiding academic work but also urban and architectural design. For example, there is solid evidence that having a window looking out to living plants helps speed up the healing process of patients in hospitals. In educational settings, exposure to nature seems to help kids focus better, feel less anxious and improve memory.

It’s fair to conclude then that we need nature. But does nature need us? Probably not. Clive Thompson calls this the biophilia paradox: “Biophilia is asymmetric. We have biophilia, but nature doesn’t have ‘anthrophilia’. In fact, it’s the opposite: If humanity were to vanish tomorrow, the remaining plants and animals would set about rapidly reclaiming all the asphalted-over world we’ve created.”

There is a tragic irony here: our modern existence is largely incompatible with our biophilic need for nature. Our attempt to be closer to nature often comes at a cost to nature.

“We humans should be living a little more densely, to give nature more space away from us. Meanwhile, to satisfy our biophilia, we should be designing more nature into these denser human environments – using everything from an increased number of street-plants to town parks to ‘living walls’ on houses, and buildings that use more natural materials. … We need plants close to us – and far away from us. That’s the biophilia paradox.”

Source: Dense Discovery

Kids and urban space

My local council recently bought a bunch of warehouses and turned them into a public park with a playground. What used to be a barren, semi-industrial area suddenly came alive with people and plants. Everyone visiting the park looked in surprise at the playground wondering the same thing: ‘Where have all of these kids been hiding?’

Today’s urban spaces are designed for cars and commerce, making them particularly hostile towards kids. With most streets being considered unsafe, there has been a huge drop in outdoor play. This study, for example, claims that today just 27% of children play outside their homes, compared to 71% of the baby boomer generation. Or look at this fascinating map showing how an eight year old’s ‘range of exploration’ has changed from ~10 km a few generations ago to a mere ~300 metres today.

This short piece makes some cogent points about how our society tends to divide children into two categories undeserving of autonomy – ‘angels’ and ‘demons’:

On one hand children are considered too small, vulnerable and innocent to roam and play in urban spaces because of traffic, ‘stranger-danger’ and other hazards. On the other hand, teenagers are constructed as a public threat and should not be allowed to hang out on the streets with their bikes, skateboards and presumably bad intentions. … Children and young people are increasingly sequestered in homes, cars or institutional spaces for adult-controlled education and play.

Research tells us that limiting children’s sense of safety and autonomy also hampers their mental and social wellbeing. And yet, we continue to design spaces that completely robs them of their right to participate in public life. “Children should not be reduced to mere ‘future investments’ or ‘adults of tomorrow’. They are also people with present-day rights to citizenship, participation and autonomy in their living environments.

As a kid who grew up in the country, I spent my summers roaming the neighbourhood, local fields and woods. I was pretty shocked to hear about friends in Melbourne having spent much of their early teenage years inside shopping malls. They did so because we gradually made every public space unsafe or unwelcoming for them. The irony of now blaming them for being glued to screens all day!

Many of us (especially people like me who don’t have kids of their own) move about a city oblivious to the lack of infrastructure suitable for young people. Away from home, their ability to move freely is often constrained to fenced off spaces: playgrounds, daycare centres, school yards, sports grounds. They are often chauffeured between these spaces in the very thing that makes streets unsafe for them: cars.

It doesn’t have to be this way. We know that designing cities for children ends up benefitting everyone which is why all of us should be demanding child-friendly, slow streets and engage in community efforts to take back public space from cars. Just watch any video of a Bike Bus in action and witness the joy of reclaiming our streets.

Source: Dense Discovery