The official documentation for writing zsh completion functions is
difficult to understand, and doesn’t give many examples. At the time
of writing this document I was able to find a few other tutorials on
the web, however those tutorials only explain a small portion of the
capabilities of the completion system. This document aims to cover
areas not explained elsewhere, with examples, so that you can learn
how to write more advanced completion functions. I do not go into
all the details, but will give enough information and examples to
get you up and running. If you need more details you can look it up
for yourself in the official
This post is a quick walkthrough of how I wrote a Python library,
procmaps, in nothing but
Rust. It uses PyO3 for the bindings
and maturin to manage the build
(as well as produce manylinux1-compatible wheels).
I’ve been working on www.rtljobs.com, a
job board for RTL and FPGA engineers, since September. Right now,
RTLjobs is an aggregator. We index open FPGA/RTL roles at a number
of companies, check them for relevance, and post them to our
site. I’ve already written two job scraping systems to help ease the
work of indexing jobs. Here’s some general rules I’ve come to hold
for writing web scrapers and other ETL systems.
Swift’s standard library is packed with types and functions to solve
the most common code problems quickly and efficiently, but it
doesn’t cover everything. So, for more advanced needs we need to
turn to Swift
Algorithms: Apple’s open
source package of sequence and collection algorithms, tuned for
maximum performance and flexibility.
The result builder
(originally it was called function builders) was implemented in
Swift 5.4. This feature allows us to build up a result value using a
sequence of components. At first sight, you might think, hey this
looks like an array with a series of elements, except the coma in
between the items, but nope, this is completely different. But why
is it good for us?
Result builder can be used to create entirely new Domain-Specific
Languages (DSLs) inside Swift. Creating a DSL has many advantages,
since DSLs are usually tied to a specific problem, the syntax that
you use to describe the language is very lightweight, yet powerful
and capable. Since Swift DSLs are type safe, it is much safer to use
one instead of manually concatenate objects. Swift DSLs also allows
us to use basic control flows inside these embedded
Like many languages, Python has a "null value", which it calls
None. By default, any Python variable can have the value None
at any moment in time, and the only way to know whether something
is currently None is to manually inspect it.
In this post, we’ll aim to cover practical techniques developers can
use to debug, manipulate, and otherwise probe running web
applications via Chrome’s built-in devtools. The goal is to
articulate the specific steps and shortcuts we would use at Reflect,
and to favor breadth over depth. Readers can follow the guide
step-by-step and try it out themselves at the provided link provided
The Network Time Protocol (NTP) is a system for synchronizing the
clocks of hosts and clients across the Internet. NTP is a protocol
intended to synchronize all computers participating in the network
to within a few milliseconds of Coordinated Universal Time
(UTC). The core of the protocol is NTP’s clock discipline algorithm
that adjusts the local computer’s clock time and tick frequency in
response to an external source — such as another trusted NTP server,
a radio or satellite receiver, or a telephone modem. A core problem
in NTP is establishing the trust and accuracy of nodes in the NTP
network. This is done through a combination of selection and
filtering algorithms to choose from the most reliable and accurate
peer in the synchronization network.
It's just a grid of data, right? Tables show up everywhere in
software, and you probably don't think about them much. Yet modern
software packs a surprising amount of functionality into them,
accumulated over the past half a century.
In this post, we'll take a high altitude pass over that history. In
later installments, we'll dive into how today's software handles the
complex requirements of modern tables.
Go 1.18 is set to arrive in February 2021, and with it comes the
long-awaited addition of generics to the language. It’s been a long
process to find something that works with the current Go ecosystem,
but a proposal has been accepted that tries to protect the
objectives of the language while adding the largest changes to the
language in over a decade. Will developers add more complexity and
make things less maintainable with generics? Or will this enable new
heights and capabilities for gophers everywhere?
If you write software for long enough you begin to develop instincts
about the relative difficulty of different problems and some of
those solidify into rules of thumb. The following are some of the
guidelines that direct my work on a daily basis.
In many discussions about Nix, the comparison
of Nix and Dockercomesupfrequently. This
question could be dismissed by saying that Nix and Docker are
different tools that solve different problems. One is a toolkit for
building and deploying containers and the other is a package and
configuration manager. However, these tools do have some overlap:
they can both be used to create reproducible environments. A
reproducible environment is one that can be recreated from scratch
in an identical way (ideally bit-for-bit). Practically, this means
having the same tools, versions, and configuration between the
There is a function called reduce in programming languages, which
can be applied to some containers. It goes element by element,
applying a given binary function and keeping the current result as
an accumulator, finally returning the value of the accumulator as a
summary value of the container.
Although parsing is often described from the perspective of writing
a compiler, there are many common smaller tasks where it’s
useful. Reading file formats, talking over the network, creating
shells, and analyzing source code are all easier using a robust
By taking time to learn general-purpose parsing tools, you can go
beyond fragile homemade solutions, and inflexible third-party
libraries. We’ll cover
in this guide because they are mature and portable. We’ll also cover
their later incarnations as Flex and Bison.
Since the very first version of Swift, we’ve been able to define our
various types as either classes, structs, or enums. But now, with
the launch of Swift 5.5 and its built-in concurrency system, a new
type declaration keyword has been added to the mix — actor.
So, in this article, let’s explore the concept of actors, and what
kinds of problems that we could solve by defining custom actor types
within our code bases.
If you spent a few years programming in C, you're probably much more
confident about your knowledge of the language than if you spent as
much time working with C++ or java.
Both the C language and its standard library are quite close to the
smallest they could be.
The current most used version of the language, c99, brought a bunch
of new features, many of which are completely unknown to most C
programmers (Older specifications obviously also have some dark