Plurrrr

week 35, 2021

Fast Rust Builds

It’s common knowledge that Rust code is slow to compile. But I have a strong gut feeling that most Rust code out there compiles much slower than it could.

Source: Fast Rust Builds, an article by Aleksey Kladov.

Building a Reproducible Data Science Environment with Nix

Nix is a 100% reproducible package manager, for all languages and all things. This means your python environment, your R environment, your models, your entire computer can be completely reproduced, all using the magic of nix. In this article, we will walk through setting up a simple, reproducible, and failproof data science stack with nix, including importing packages not found on nixpkgs and caching the builds online

Source: Building a Reproducible Data Science Environment with Nix, an article by David Josephs.

Optimizing Slow SQL Queries

Most database problems go unnoticed during development, because we tend to code our applications using small datasets. It is when the application has been on production for some time that database performance issues start to appear, causing parts of the application to become slower and slower as the database continues to grow.

How do you debug and identify this type of problems? In this article I'm going to show you how to fix the most common database performance problems, which are those that are caused by improper indexing. Examples for Postgres, MySQL and SQLite are included!

Source: Optimizing Slow SQL Queries, an article by Miguel Grinberg.

Understanding Git Merge

Carrying on from my earlier article about some ways in which Git is commonly misunderstood — and how I think one should understand Git — I’d like to dive a bit deeper into one of the most important things Git knows how to do: merging.

If Git is often misunderstood, merging is one of the most misunderstood things about it! In this article, I’ll try to clear up some misunderstandings about merging with Git.

Source: Understanding Git Merge, an article by Matt Neuburg.

Liocheles australasiae Scorplings

In the afternoon I could take a few photos of the Liocheles australasiae scorpion I keep with her 1st instar brood. I post-processed the image in Pixelmator to remove the blurring effect of the plastic container.

Liocheles australasiae with 1st instar brood
Liocheles australasiae with 1st instar brood.

The Bodies Left Behind

When a night-time call to 911 from a secluded Wisconsin vacation house is cut short, offduty deputy Brynn McKenzie leaves her husband and son at the dinner table and drives up to Lake Mondac to investigate. Was it a misdial or an aborted crime report?

Brynn stumbles onto a scene of true horror and narrowly escapes from two professional criminals. She and a terrified visitor to the weekend house, Michelle, flee into the woods in a race for their lives. As different as night and day, and stripped of modern-day resources, Brynn, a tough deputy with a difficult past, and Michelle, a pampered city girl, must overcome their natural reluctance to trust each other and learn to use their wits and courage to survive the relentless pursuit. The deputy's disappearance spurs both her troubled son and her new husband into action, while the incident sets in motion Brynn's loyal fellow deputies and elements from Milwaukee's underside. These various forces race along inexorably toward the novel's gritty and stunning conclusion.

In the evening I started in The Bodies Left Behind by Jeffery Deaver.

How does Apple Private Relay Work?

Private Relay is an attempt by Apple to change the way traffic is routed from user to internet service and back. This is designed to break the relationship between user IP address and information about that user, reducing the digital footprint of that user and eliminating certain venues of advertising information.

It is a new feature in the latest version of iOS and MacOS that will be launching in "beta mode". It is available to all users who pay Apple for iCloud storage and I became interested in it after watching the WWDC session about preparing for it.

Source: How does Apple Private Relay Work?, an article by Mathew Duggan.

Perl & Raku: Best frenemies

Although the two languages aren’t source-compatible, the Inline::Perl5 module does enable Raku developers to run Perl code and use Perl modules within Raku, You can even subclass Perl classes in Raku and call Raku methods from Perl code. I hadn’t realized until recently that the Perl support was so strong in Raku despite them being so different, and so I thought I’d take the opportunity to write some sample code in both languages to better understand the Raku way of doing things.

Source: Perl & Raku: Best frenemies, an article by Mark Gardner.

Baby Scorpions

In the evening I noticed that the Liocheles australasiae I keep since May the 27th had given birth. As this species is parthenogenetic I was hoping the adult female scorpion I keep would give birth someday.

Method modifiers instead of overrides in object-oriented Perl

Last month [I wrote about using Moose’s override function] to, well, override a superclass’s method. Chris Prather on the #moose IRC channel suggested soon after that the around method modifier (or its little sisters before and after) might be a better choice if you’re also calling the original method inside. He noted that “at a minimum override only works if you’re subclassing, around will apply to composed methods too.”

Source: Taming the Moose: Method modifiers instead of overrides in object-oriented Perl, an article by Mark Gardner.

Tor is a Great SysAdmin Tool

Tor is a fantastic networking and privacy technology that makes private and anonymous browsing available to millions. Despite this, it is unfortunately seen by some people as a system that solely exists to facilitate an illegal criminal underground,

However, to take a literal view, Tor is just a networking tool, and it can be used in any way that you want. The features that enable privacy and anonymity are also extremely useful for many of the tasks carried out by Network Engineers and Systems Administrators on a daily basis. For example:

Source: Tor is a Great SysAdmin Tool, an article by Jamie Scaife.

Linux/BSD command line wizardry

As a relatively isolated junior sysadmin, I remember seeing answers on Experts Exchange and later Stack Exchange that baffled me. Authors and commenters might chain 10 commands together with pipes and angle brackets—something I never did in day-to-day system administration. Honestly, I doubted the real-world value of that. Surely, this was just an exercise in e-braggadocio, right?

Source: Linux/BSD command line wizardry: Learn to think in sed, awk, and grep, an article by Jim Salter.

Moving to modern Neovim

I installed Neovim v0.5 when it was released last month, and used it for a few weeks while reading about all the new features in it. Last weekend, I felt an uncharacteristic urge to try them out, and I'm glad I did. Here's a quick overview of what I learned.

Source: Moving to modern Neovim, an article by Abhijit Menon-Sen.

Go is pass-by-value — but it might not always feel like it

Go is a programming language which passes by value, which effectively means that if you give a value as a parameter to a function, the received value within the function is actually a copy of the original. You can modify it however you wish and your changes will not affect the original value or escape the function scope. This is in contrast to some languages which pass values by reference instead of copying them.

Source: Go is pass-by-value — but it might not always feel like it, an article by Neil Alexander.

Optimizing Immutable Strings in Rust

In this article, we will discuss certain ways to optimize the way we allocate and clone data in immutable contexts. Throughout this article, we will be using the String type as a particular example, but please do keep in mind that the concepts are generally applicable elsewhere.

Source: Optimizing Immutable Strings in Rust, an article by Basti Ortiz.