Slime molds

Via Kottke.

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