Plurrrr

a tumblelog
week 32, 2020

Psalmopoeus irminia exuviae

In the afternoon I noticed that the Psalmopoeus irminia sling I keep had molted; I saw the exoskeleton on top of a piece of moss coming out of the cork tube it lives in.

Psalmopoeus irminia molt
The exoskeleton of a Psalmopoeus irminia.

I hadn't seen the spider for weeks, and at times I was worried it had passed away. However, 4 days ago I removed some moss from it's cork tube and I saw legs that moved. And today it had kicked out it's exuviae.

The previous molt was discovered the 26th of May, 2020.

A Gentle Introduction to the Rectified Linear Unit (ReLU)

In a neural network, the activation function is responsible for transforming the summed weighted input from the node into the activation of the node or output for that input.

The rectified linear activation function is a piecewise linear function that will output the input directly if it is positive, otherwise, it will output zero. It has become the default activation function for many types of neural networks because a model that uses it is easier to train and often achieves better performance.

In this tutorial, you will discover the rectified linear activation function for deep learning neural networks.

Source: A Gentle Introduction to the Rectified Linear Unit (ReLU), an article by Jason Brownlee.

Surviving Rust async interfaces

I used to be afraid of async Rust. It's easy to get into trouble!

But thanks to the work done by the whole community, async Rust is getting easier to use every week. One project I think is doing particularly great work in this area is async-std.

Source: Surviving Rust async interfaces.

My Guide for Rubber Duck Debugging: A Better Process

Would you believe it if I told you that something called "rubber ducking" is actually one of the most insightful debugging techniques ever suggested? When you run into a programming snag you can't figure out, just find a rubber duck and start talking to it about your problems. Sold, right? Me neither.

I actually love rubber duck debugging, but not in the way it's usually explained. Turns out, it's hard for adults to take seriously the idea of talking to a literal rubber duck on their desk. And even if you guessed the duck is not really the point, you'd be surprised by how many engineers miss the point entirely. In this article, I'm going to explain what rubber ducking is, why it does actually work, and provide a step-by-step process for the way I do it that I think can change your debugging chops for good.

Source: My Guide for Rubber Duck Debugging: A Better Process (with No Rubber Ducks), an article by Joseph Pacheco.

Saving a Third of Our Memory by Re-ordering Go Struct Fields

In past projects at Qvault we had an application that typically ran with ~2GB in memory at any given time. By simply changing the order of some uint variables we managed to drop the memory usage to less than 1.4GB. The vast majority of this allocated memory is due to an enormous slice of stats structs.

Source: Saving a Third of Our Memory by Re-ordering Go Struct Fields, an article by Lane Wagner.

Pseudorandom numbers using Cellular Automata - Rule 30

There are lots of techniques to generate Pseudorandom numbers, namely: Blum Blum Shub algorithm, Middle-square method, Lagged Fibonacci generator, etc. Today we dive deep into Rule 30 that uses a controversial science called Cellular Automaton. This method passes many standard tests for randomness and was used in Mathematica for generating random integers.

Source: Pseudorandom numbers using Cellular Automata - Rule 30, an article by Arpit Bhayani.

Pysa: An open source static analysis tool

Pysa is a security-focused tool built on top of our type checker for Python, Pyre. It’s used to look at code and analyze how data flows through it. Analyzing data flows is useful because many security and privacy issues can be modeled as data flowing into a place it shouldn’t.

Source: Pysa: Open Source static analysis for Python code, an article by Graham Bleaney, and Sinan Cepel.

Mac keyboard shortcuts

By pressing certain key combinations, you can do things that normally need a mouse, trackpad, or other input device.

Source: Mac keyboard shortcuts

First Impressions of Rust

I've been wanting to write a big project in Rust for a while as a learning exercise, and actually started one in late 2018 (a FUSE server implementation). But then life happened and I got busy and never went anywhere with it. Due to certain world circumstances I'm currently spending a lot of time indoors so rust-fuse (docs) now exists and is good enough to write basic hello-world filesystems. I plan to polish it up a bit more with the goal of releasing a v1.0 that supports the same use cases as libfuse.

I took some notes along the way about things that struck me as especially good or bad. Overall I quite like Rust the language, have mixed feelings about the quality of ancillary tooling, and have strong objections to some decisions made by the packaging system (Cargo + crates.io).

Source: First Impressions of Rust, an article by John Millikin.

Post 500

For 500 days I have been blogging on Plurrrr non-stop, one post a day. Thank you for reading and following!

The JavaScript Promise Tutorial

This post is intended to be the ultimate JavaScript Promises tutorial: recipes and examples for everyday situations (or that’s the goal 😉). We cover all the necessary methods like then, catch, and finally. Also, we go over more complex situations like executing promises in parallel with Promise.all, timing out APIs with Promise.race, promise chaining and some best practices and gotchas.

Source: The JavaScript Promise Tutorial, an article by Adrian Mejia.

Debugging Python server memory leaks with the Fil profiler

Your server is running just fine, handling requests and sending responses. But then, ever so slowly, memory usage creeps up, and up, and up–until eventually your process runs out of memory and crashes. And then it restarts, and the leaking starts all over again.

In order to fix memory leaks, you need to figure out where that memory is being allocated. And that can be tricky, unless you use the right tools.

Let’s see how you can identify the exact lines of code that are leaking by using the Fil memory profiler.

Source: Debugging Python server memory leaks with the Fil profiler, an article by Itamar Turner-Trauring.

The new CSS property that boosts your rendering performance

The content-visibility property, launching in Chromium 85, might be one of the most impactful new CSS properties for improving page load performance. content-visibility enables the user agent to skip an element's rendering work, including layout and painting, until it is needed. Because rendering is skipped, if a large portion of your content is off-screen, leveraging the content-visibility property makes the initial user load much faster. It also allows for faster interactions with the on-screen content. Pretty neat.

Source: content-visibility: the new CSS property that boosts your rendering performance, an article by Una Kravets and Vladimir Levin.

Defunctionalization and Freyd’s Theorem

The main idea of functional programming is to treat functions like any other data types. In particular, we want to be able to pass functions as arguments to other functions, return them as values, and store them in data structures. But what kind of data type is a function?

Source: Defunctionalization and Freyd’s Theorem, an article by Bartosz Milewski.

Bayes Theorem: A Framework for Critical Thinking

This 9,000 word blog post is a complete introduction to Bayes Theorem and how to put it to practice. In short, Bayes Theorem is a framework for critical thinking. By the end of this post, you’ll be making better decisions, realise when you’re being unreasonable, and also understand why some people believe in UFOs.

Source: Bayes Theorem: A Framework for Critical Thinking, an article by Neil Kakkar.

What Are Python Wheels and Why Should You Care?

Python .whl files, or wheels, are a little-discussed part of Python, but they’ve been a boon to the installation process for Python packages. If you’ve installed a Python package using pip, then chances are that a wheel has made the installation faster and more efficient.

Wheels are a component of the Python ecosystem that helps to make package installs just work. They allow for faster installations and more stability in the package distribution process. In this tutorial, you’ll dive into what wheels are, what good they serve, and how they’ve gained traction and made Python even more of a joy to work with.

Source: What Are Python Wheels and Why Should You Care?, an article by Brad Solomon.

Unlearn rotation matrices as rotations

Rotation matrices just describe the unit vectors of a new coordinate system.

Source: Unlearn rotation matrices as rotations, an article by Markus Lindelöw.

How to read code: the next generation

Reading type signatures will become the part of basic computer literacy curriculum taught in elementary schools.

While they taught you how Microsoft spreadsheets operated kids in future will learn some lambda calculus instead.

Types will be the standard user interfacing element to access computer systems. It will replace the buttons and text boxes of the present day and ordinary people will use them every day.

This article tells what these "types" are and gives a taste of how to read type signatures. Then I explain why I think this is useful and conclude with an example of reading code with types. I assume that you understand a bit of basic algebra.

Source: How to read code: the next generation, an article by Henri Tuhola.

How Link-Begging Became the Most Annoying Search Engine Tactic

Businesses want to show up on the front page of a specific search term, and they’re willing to annoy you to get a backlink from you. Please never do this.

Source: How Link-Begging Became the Most Annoying Search Engine Tactic, an article by Ernie Smith.

The earliest domestic cat on the Silk Road

We present the earliest evidence for domestic cat (Felis catus L., 1758) from Kazakhstan, found as a well preserved skeleton with extensive osteological pathologies dating to 775–940 cal CE from the early medieval city of Dzhankent, Kazakhstan. This urban settlement was located on the intersection of the northern Silk Road route which linked the cities of Khorezm in the south to the trading settlements in the Volga region to the north and was known in the tenth century CE as the capital of the nomad Oghuz. The presence of this domestic cat, presented here as an osteobiography using a combination of zooarchaeological, genetic, and isotopic data, provides proxy evidence for a fundamental shift in the nature of human-animal relationships within a previously pastoral region. This illustrates the broader social, cultural, and economic changes occurring within the context of rapid urbanisation during the early medieval period along the Silk Road.

Source: The earliest domestic cat on the Silk Road, an article by A. F. Haruda, A. R. Ventresca Miller, J. L. A. Paijmans, A. Barlow, A. Tazhekeyev, S. Bilalov, Y. Hesse, M. Preick, T. King, R. Thomas, H. Härke & I. Arzhantseva