When faced with a potential latency issue in web services, this is
often one of the first commands I run several times from multiple
clients because the results form this command help to get a quick
sense of the layer that might be responsible for the latency issue.
I've been using Bash functions quite liberally over the past couple
years, but last week I discovered that they can be much better than
I thought. In this post, I'll explain how I thought they worked, why
I was wrong, and how that makes them better.
Title of this blog post isn’t a collection of every Kubernetes
related buzzword I could think of. It’s a collection of technologies
that went into creating an automated, resilient and scalable
I was having a problem at work with an ARM64 Linux edge device. I
have an ARM64 binary on the edge device, and I wanted to look at
which dynamic libraries it is linked to with the readelf
program. Unfortunately, readelf is not installed on the device. I
was unable to figure out how to use the device's package manager.
I was able to build a readelf binary that I could use on the
device by cross-compiling and statically-linking one from
Nixpkgs. This post explains how to easily cross-compile and
statically-link packages from Nixpkgs.
For reasons unknown, Hollywood has decided that Nmap is the tool
to show whenever hacking scenes are needed. At least it is a lot
more realistic than silly 3D animation approach used in many
previous movies (e.g. "hacking the Gibson" on Hackers, or the much
worse portrayals on Swordfish). We always like to see Nmap in the
movies, so we have catalogued known instances here.
We’re thrilled to announce a new open-source package for the Swift
on Server ecosystem, Swift Distributed
complete server-oriented cluster library for the upcoming
distributed actor language feature!
This library provides a complete solution for using distributed
actors in server use-cases. By open-sourcing this project early,
alongside the ongoing work on the language feature, we hope to
gather more useful feedback on the shape of the language feature and
associated transport implementations.
The goal of this explanation is to make you understand when and why
the global statement is needed. To accomplish this, we will
introduce two key concepts: code blocks and bindings. Before
diving in, take a moment to read the rest of this section.
During my final term at UWaterloo I took the CS444 compilers
class with a project
to write a compiler from a substantial subset of Java to x86, with a
language and two teammates of your choice. My group of three chose
to write our compiler in Rust and it was a fun experience. We spent
time coming to design decisions that worked out really well and used
Rust’s strengths. Our compiler ended up being around 6800 lines of
Rust and I personally put in around 60 hours of solid coding and
more on code review and design. In this post I’ll go over some of
the design decisions we made and some thoughts on what it was like
Today I'll discuss about an interesting concept: consistent
hashing. It's a widely employed technique to properly perform
sharding in distributed storage systems. I'm not aiming at a
rigorous explanation (please don't use the raw snippets I provide in
production code!), but I hope I can make the concept simple enough.
As of time of writing, the latest version of git is 2.28.0, and it
supports a total of 4 diff algorithms, namely myers, minimal,
patience, and histogram. In the following sections, I give my
take on when each of these algorithms should be used. This post does
not cover a breakdown of how the algorithm works, and/or its
complexity – you can find these via a quick search.
While Go does not have macros or other forms of metaprogramming,
it's a pragmatic language and it embraces code generation with
support in the official toolchain.
The go generate command has been introduced all the way back in Go
1.4, and since then has been widely used in the Go ecosystem. The Go
project itself relies on go generate in dozens of places; I'll do
a quick overview of these use cases later on in the post.
Pants has industry-leading support for Python builds - covering
steps such as resolving 3rd-party dependencies, running tests,
generating code, running formatters and linters, packaging python
executables, building Docker images, and more.
One important build step that Pants has supported for a long time is
building Python package distributions, namely
Monterey feels of a piece with maintenance-mode macOS updates like
the default wallpaper, and in day-to-day use you can easily forget
that you've upgraded from Big Sur at all. It's not that there aren't
any new features here—it's just that improving any operating system
as mature as macOS involves a lot of tinkering around the edges.
But there are plenty of things to talk about in even the most minor
of macOS releases, and Monterey is no different. The update refines
the Big Sur design and rethinks automation and what's possible via
local wireless communication between devices. It also makes a long
list of minor additions that won't be exciting for everyone but
will be interesting for some subset of Mac users.
Apple today released macOS 12 Monterey, and whenever a new operating
system is released for the Mac, some users prefer to perform a clean
installation. This article explains how to perform what is
effectively a clean install of Monterey using a brand new option
that's available on Apple silicon-powered Macs and Intel Macs with a
T2 security chip.
Combining Swift’s powerful generics system with the fact that any
Swift type can be extended with new APIs and capabilities enables us
to write targeted extensions that conditionally add new features to
a type or protocol when it fits certain requirements.
It all starts with the where keyword, which lets us apply generic
in a range of different situations. In this article, let’s take a
look at how that keyword can be applied to extensions, and what sort
of patterns that can be unlocked by doing so.
Type-checking plugins for GHC are a powerful tool which allows users
to inject domain-specific knowledge into GHC’s type-checker. In this
series of posts, we will explore why you might want to write your
own plugin, and how to do so.