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
WordPress setup.
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
Actors, a
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.
Python has the wonderful "in" operator and it would be nice to have
additional infix operator like this. This recipe shows how (almost)
arbitrary infix operators can be defined.
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
using Rust.
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.
PyCaret is an open source, low-code machine learning library in
Python that allows you to go from preparing your data to deploying
your model within minutes in your choice of notebook environment.
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.
What follows is a quick walkthrough of getting a recommendation
engine setup directly inside Postgres on top of Crunchy
Bridge, our
database as a service.
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
sdists
and
wheels.
We just cut the first release
candidate for
Pants 2.8, so this is a good time to talk about the significant
enhancements to its distribution-building capabilities, including
support for native
extensions and
for PEP-517.
Monterey feels of a piece with maintenance-mode macOS updates like
El
Capitan
or
Sierra
or High
Sierra—change
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.
During the annual Python core development sprint we held a meeting
with Sam Gross, the author of
nogil, a fork of Python 3.9
that removes the
GIL. This
is a non-linear summary of the meeting.
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
type
constraints
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.
We’re running Haskell in production. We’ve told that story
before.
We are also running Haskell in production on Kubernetes, but we
never talked about that. It was a long journey and it wasn’t all
roses, so we’re going to share what we went through.
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.