Plurrrr

a tumblelog
week 44, 2020

Boot volume layout

When you format a disk and install macOS on it, making it a startup or boot volume, it has a standard structure, something that has changed greatly over the last couple of years. This article summarises all you need to know about the layout of APFS boot disks and volumes from High Sierra and Mojave through to Big Sur, running on an Intel Mac at least.

Source: Boot volume layout.

Building containers without Docker

In this post I'll outline several ways to build containers without the need for Docker itself. I'll use OpenFaaS as the case-study, which uses OCI-format container images for its workloads. The easiest way to think about OpenFaaS is as a CaaS platform for Kubernetes which can run microservices, and add in FaaS and event-driven tooling for free.

Source: Building containers without Docker, an article by Alex Ellis.

Why I prefer functional programming

This post explains why I stick with functional programming, using a rationale that a non-functional programmer can relate to.

The reason is actually pretty simple: functional programming idioms are more enduring and portable than idioms from other programming paradigms (such as procedural or object-oriented programming). To explain why, I need to first define what I understand “functional programming” to mean (which is admittedly an imprecise and vague term).

Source: Why I prefer functional programming, an article by Gabriel Gonzalez.

A visit to Rotterdam Zoo

Today we paid a visit to Rotterdam Zoo. All photos are taken with an iPhone 6S except the ones by Esme, those are made with an iPhone 8.

Adam taking photos of Dalmatian Pelicans; Pelecanus crispus
Adam taking photos of Dalmatian Pelicans; Pelecanus crispus.
A fishing cat, Prionailurus viverrinus, resting.
A fishing cat, Prionailurus viverrinus, resting.
Alice and Adam petting carp
Alice and Adam petting carp.
Prairie dog, genus Cynomys
Prairie dog, genus Cynomys.
Alice handing a leaf to a prairie dog
Alice handing a leaf to a prairie dog.
A butterfly enjoying some fruit
A butterfly enjoying some fruit.
Author with a butterfly on his head; Siproeta stelenes? Photo by Esme
Author with a butterfly on his head; Siproeta stelenes? Photo by Esme.
Alice, Adam, and John in Amazonica
Alice, Adam, and John in Amazonica.
Colorful fish in Oceanium
Colorful fish in Oceanium.
A chimeric lobster
A chimeric lobster.

Purple Sky

Near to our house Esme suddenly noticed that the sky had turned purple and stopped to take a few photos. I also took a few photos, but one of hers turned out the best. Taken with an iPhone 8.

Purple Sky. Photo by Esme
Purple Sky. Photo by Esme.

Cadaver (2020)

In the starving aftermath of a nuclear disaster, a family of three attends a charitable event at a hotel, which takes a dark turn when people start to disappear.

In the evening Alice, Esme, and I watched Cadaver (2020) on Netflix. Not a great movie, I give it a 6 out of 10.

I lost another spider

In the afternoon I checked the enclosure of the Psalmopoeus cambridgei that I keep. I hadn't seen the sling for a week or two. I checked the pieces of cork until I found what looked like a molt or a dead spider; it was somewhat decayed. Upon further examination of the enclosure I concluded that it what I had found was the dead body of the little tarantula and not a molt. 😢

Earlier, the 13th of August 2020 I lost both a scorpion and a tarantula. Back then it probably had to do with the high temperature of the room; over 30°C (86°F).

awk: `BEGIN { ...`

The other day, I was watching Bryan Cantrill’s 2018 talk, Rust, and Other Interesting Things, and he made an offhanded comment while discussing values of different programming languages and communities. He said, “If you get the awk programming language manual…you’ll read it in about two hours and then you’re done. That’s it. You know all of awk.”

Only two hours to learn an entire language?! …. Challenge accepted!

Source: awk: BEGIN { ... , an article by Jemma Issroff.

I detest the Python static-typing annotation schemes

Basically. I don’t hate Python type annotations, per se — there is nothing wrong with thing: int = 0 in my eyes. But those same eyes do bleed a little whenever I have to look through any given morass of verbose flotsam of the sort the typing module encourages people to write.

Source: I detest the Python static-typing annotation schemes, an article by Kenzaburo Gell-Manti-Te’o.

Machine Learning Attack Series: Image Scaling Attacks

The basic idea is to hide a smaller image inside a larger image (it should be about 5-10x the size). The attack is easy to explain actually:

  • Attacker crafts a malicious input image by hiding the desired target image inside a benign image
  • The image is loaded by the server
  • Pre-processing resizes the image -The server acts and makes decision based on a different image then intended

Source: Machine Learning Attack Series: Image Scaling Attacks.

The ungentle joy of spider sex

Some spiders pair puny males with gigantic females, making mating both tricky and dangerous. Why and how such mismatches evolved remains curiously enigmatic.

Source: The ungentle joy of spider sex, an article by Stephanie Pain.

Data Augmentation in Python: Everything You Need to Know

Data Augmentation is a technique that can be used to artificially expand the size of a training set by creating modified data from the existing one. It is a good practice to use DA if you want to prevent overfitting, or the initial dataset is too small to train on, or even if you want to squeeze better performance from your model.

Source: Data Augmentation in Python: Everything You Need to Know, an article by Vladimir Lyashenko.

On code isolation in Python

Python is a very dynamic language, and you can do a lot of things. This article demonstrates a few approaches on how to modify or extract the source code.

Source: On code isolation in Python, an article by Artem Golubin.

Positional, Keyword and Default arguments

In this tutorial, you will learn how to call functions with positional and keyword arguments and also write functions with default parameters.

Some knowledge of python functions is required for this tutorial.

Source: Positional, Keyword and Default arguments.

10 Myths and Misconceptions in Machine Learning

Several misconceptions feature prominently amidst common practices in machine learning. It really seems like the same mistakes are being made today as they were 20 years ago, only with far more computing power. This post addresses 10 misconceptions that simply do not get enough attention.

Source: 10 Myths and Misconceptions in Machine Learning, an article by Laksan Nathan.

Photo of Aphonopelma seemanni taken with iPhone 6S

In the evening I took several photos of the female Aphonopelma seemanni I keep with the refurbished iPhone 6S that arrived yesterday.

Female Aphonopelma seemanni from above
Female Aphonopelma seemanni from above.

From the few photos I took I like the one above the most. The photo was taken inside her terrarium with not much room to move the phone around.

A "new" iPhone: refurbised iPhone 6S.

In the afternoon the Refurbished iPhone 6S Space Gray 64GB I ordered last Friday arrived. Later I made a backup, using iTunes, of my iPhone 5 and used this backup to initialise the 6S. This is the second iPhone I buy with Green Mobile and once more excellent service; thanks!

Higher Kinded Types in Python

dry-python/returns@0.15 is released! And it means that now anyone can use our Higher Kinded Types emulation in their projects.

In this post I will explain:

  • What Higher Kinded Types (HKTs) are and why they are useful
  • How they are implemented and what limitations there are
  • How can you use them in your own projects

Without further ado, let’s talk about typing!

Source: Higher Kinded Types in Python, an article by Nikita Sobolev.

Modular Computer: iPad Pro as a Tablet, Laptop, and Desktop

The more I think about it, the more I come to this conclusion: the iPad, unlike other computers running a “traditional” desktop OS, possesses the unique quality of being multiple things at once. Hold an iPad in your hands, and you can use it as a classic tablet; pair it with a keyboard cover, and it takes on a laptop form; place it on a desk and connect it to a variety of external accessories, and you’ve got a desktop workstation revolving around a single slab of glass. This multiplicity of states isn’t an afterthought, nor is it the byproduct of happenstance: it was a deliberate design decision on Apple’s part based on the principle of modularity.

Source: Modular Computer: iPad Pro as a Tablet, Laptop, and Desktop Workstation, an article by Federico Viticci.

Docker on macOS without noisy fans

TL;DR

  • Running Docker on macOS results in noisy CPU fans and low performance (build times)
  • Apple Silicon probably not the answer
  • The solution is using remote Linux Docker host (with setup instructions)

Source: Docker on macOS without noisy fans, an article by Coen Stevens.