Plurrrr

a tumblelog
week 28, 2020

Temporal Data Tables

MariaDB now supports temporal data tables in the form of system-versioning tables (allowing you to query and operate on historic data), application-time periods (allow you to query and operate on a temporal range of data), and bitemporal tables (which combine both system-versioning and application-time periods).

Source: Temporal Data Tables.

Puck the cat

In the afternoon we visited my brother to celebrate his birthday, which is actually tomorrow, and to meet the female kitten his daughter got as a present; Puck.

Adam holding Puck
Adam holding Puck.

Both Adam and Alice played a lot with this little cat, to her delight. She's very playfull and wants attention all the time.

Puck the cat
Puck the cat.

Apple Silicon: The Passing of Wintel

We’re about to enter an exciting, messy transition. Not only will Apple Silicon make better Macs, it will force Microsoft to polish its Windows on ARM act, both hardware and software. In turn, this will cause PC OEMs to reconsider their allegiance to x86 silicon…and that will have serious consequences for the old Wintel partnership.

Source: Apple Silicon: The Passing of Wintel, an article by Jean-Louis Gassée.

Parallel Gzip - Pigz

Sometimes, we would like to compress one or several files into one zipped file or decompress a zipped file. It is very common to use tools such as gzip, zip, or 7zip to create or decompress .gz, .zip, and .7z files, respectively. However, none of these tools on Linux uses multicore and multithread during compression and decompression. When the number of files are large or the file sizes are large, compression and decompression would take a lot of time using single thread.

Pigz is one of the parallel implementation for gzip and zip. Using pigz could greatly save us the time spent on compression and decompression. In this blog post, I would like to briefly discuss how to use pigz.

Source: Parallel Gzip - Pigz, an article by Lei Mao.

Modes, Medians and Means: A Unifying Perspective

Any traditional introductory statistics course will teach students the definitions of modes, medians and means. But, because introductory courses can’t assume that students have much mathematical maturity, the close relationship between these three summary statistics can’t be made clear. This post tries to remedy that situation by making it clear that all three concepts arise as specific parameterizations of a more general problem.

Source: Modes, Medians and Means: A Unifying Perspective, an article by John Myles White.

How Haskell threads block

If you’ve played around with Haskell for any amount of time, you probably know it has a M:N threading model with many Haskell threads multiplexed by a userspace scheduler onto a few operating system (OS) threads. Since a Haskell thread uses much less memory than an OS thread, it becomes possible to spin up large numbers (hundreds of thousands to millions) of Haskell threads. This threading model has great benefits for readibility, since most programmers find it easier to follow a linear “top-to-bottom” path through the code than to follow along nested callbacks. There are also some drawbacks to this approach. For example, managing blocking system calls becomes much harder, since a thread that is doing a blocking operation cannot serve normal workloads. There is also much more bookkeeping to be done in the runtime, which would normally be left to the operating system.

Source: How Haskell threads block, an article by Wander Hillen.

The Polymath Playbook

You’ve likely heard the saying: “A jack of all trades is a master of none.” It warns against the futility of pursuing too many disciplines. Be a specialist, or you’ll be nothing.

It may surprise you to learn there’s actually an extended version: “A jack of all trades is a master of none, but oftentimes better than a master of one.” With a subtle addition, its meaning becomes inverted to tout the benefits of being a polymath (a.k.a. generalist).

Why is the former so common, and the latter so unknown?

The answer lies in modern society’s preference for specialization. We’ll explore its origin, the limits it places on workers’ freedoms, and how the polymath approach can offer a reprieve. Finally, I’ll share my own experiences and learnings exploring a multitude of pursuits.

Source: The Polymath Playbook, an article by Salman Ansari.

What are PostgreSQL templates?

Whenever you create a new database in Postgres, you are actually basing it off an already present database in your cluster.

This database, template1, and another, called template0, are standard system databases that exist in every newly created database cluster.

Source: What are PostgreSQL templates?, an article by Angelico de los Reyes.

Unit Testing is Overrated

The importance of testing in modern software development is really hard to overstate. Delivering a successful product is not something you do once and forget about but is rather a continuous recurring process. With every line of code that changes, software must remain in a functional state, which implies the need for rigorous testing.

Source: Unit Testing is Overrated, an article by Alexey Golub.

Bayesian Judo

I was once at a dinner party, trying to explain to a man what I did for a living, when he said: “I don’t believe Artificial Intelligence is possible because only God can make a soul.”

Source: Bayesian Judo, an article by Eliezer Yudkowsky.

Python Web Applications & Frameworks

The Web Server Gateway Interface (or “WSGI” for short) is a standard interface between web servers and Python web application frameworks. By standardizing behavior and communication between web servers and Python web frameworks, WSGI makes it possible to write portable Python web code that can be deployed in any WSGI-compliant web server. WSGI is documented in PEP 3333.

Source: Web Applications & Frameworks.

Crime Scene

Natural causes or foul play? That’s the question Clay Edison must answer each time he examines a body. Figuring out motives and chasing down suspects aren’t part of his beat—not until a seemingly open-and-shut case proves to be more than meets his highly trained eye.

In the evening I started in Crime Scene, Clay Edison Book 1, by Jonathan Kellerman and his son Jesse Kellerman.

GNU: A Heuristic for Bad Cryptography

If you see the letters GNU in a systems design, and that system intersects with cryptography, I can almost guarantee that it will be badly designed to an alarming degree.

Source: GNU: A Heuristic for Bad Cryptography.

Delta Compression

A diff algorithm outputs the set of differences between two inputs. These algorithms are the basis of a number of commonly used developer tools. Yet understanding the inner workings of diff algorithms is rarely necessary to use said tools. Git is one example where a developer can read, commit, pull, and merge diffs without ever understanding the underlying diff algorithm. Having said that there is very limited knowledge on the subject across the developer community.

Source: The definitive, practical guide to diff algorithms and patch formats, an article by Tsviatko Yovtchev.

The Autumn Republic: Good

In the evening I finished The Autumn Republic, the final book in the Powder Mage Trilogy by Brian McClellan. I enjoyed the book a lot, but still consider the first in this series; Promise of Blood the best. It was a good read, with a very good ending. I do recommend this series.

Acanthoscurria geniculata Volcano

In the early evening Adam came to me and told me his tarantula, a juvenile female Acanthoscurria geniculata, was building something. I went up to his bedroom to have a look.

Acanthoscurria geniculata volcano
Acanthoscurria geniculata volcano.

The tarantula had been moving a lot of substrate to make its burrow larger and shaped it like a turret, or like a volcano as I said to Adam. Some of the substrate covered up the bottle cap that is used to provide water, hence the very moist spot to the right of the volcano.

Adam got this female tarantula as a belated birthday gift the 20th of May, 2020.

Mastering jq: xml (and any other data format)

In this tutorial, we will go over how to use jq to transform xml data as well as any other data format, including binary formats. The steps assumes a basic familiarity with jq and unix shell pipelines.

Source: Mastering jq: xml (and any other data format), an article by Tyler Adams.

Multitasking from the Linux Command Line + Process Prioritization

Did you know that you aren’t limited to working on one thing at a time while on a Linux command line? You can actually “minimize” a program that you are in, get back to the command line, and then return to the program whenever you’d like.

Source: Multitasking from the Linux Command Line + Process Prioritization, an article by Chris Jean.

HTTPie – command-line HTTP client for the API era

HTTPie—aitch-tee-tee-pie—is a user-friendly command-line HTTP client for the API era. It comes with JSON support, syntax highlighting, persistent sessions, wget-like downloads, plugins, and more.

Source: HTTPie – command-line HTTP client for the API era.

Now Perl 6 Is Raku, Perl 5 Can Be 7

After Perl 6's renaming to Raku, acknowledging that it really is another language, Perl can now use number 7 without fear. It already has claimed the newly freed territory with the announcement that Perl 5.32 with more modern and sensible defaults is to be Perl 7.

Source: Now Perl 6 Is Raku, Perl 5 Can Be 7, an article by Nikos Vaggalis.

All the Loops

Modern JavaScript supports many different looping constructs. I often use these different constructs for working with arrays. This is a reference, for myself and for others, written to augment the existing MDN documentation.

Source: All the Loops, an article by Matt Hall.

D-Bus and Polkit, No More Mysticism and Confusion

Dbus and Polkit are two technologies that emanate an aura of confusion. While their names are omnipresent in discussions, and the internet has its share of criticism and rants about them, not many have an actual grasp of what they actually do. In this article I’ll give an overview of these technologies.

Source: D-Bus and Polkit, No More Mysticism and Confusion, an article by Patrick Louis.

Object-Oriented Programming (OOP) in Python 3

Object-oriented programming (OOP) is a method of structuring a program by bundling related properties and behaviors into individual objects. In this tutorial, you’ll learn the basics of object-oriented programming in Python..

Source: Object-Oriented Programming (OOP) in Python 3, an article by David Amos.

A tiny Plurrrr update

In the evening I modified the Makefile I use to generate this blog. I added the --date-format argument once to tumblelog.pl and once to tumblelog.py. Default the date-format is set to '%d %b %Y'—day of the month, abbreviated month name, and year—but using the aforementioned argument I changed this to '%a %d %b %Y'. This value adds the abbreviated weekday name to the front of the date, see strftime(3).

The static microblog generator I wrote is available at GitHub. Feedback is welcome.