Nix is a tool for configuring software
environments according to source files. I’ve been hearing more and
more about Nix on Hacker News and Twitter. The idea of it appeals to
me, so I’ve been tinkering with it over the past few weeks.
This article describes some principles I’ve found useful for
designing good Python library APIs, including structure, naming,
error handling, type annotations, and more. It’s a written version
of a talk I gave in June 2023 at the Christchurch Python meetup.
Search capabilities span from free text (think Google) to raw data
access (think SQL). In between, there’s a wide range of options for
narrowing a search that are often provided with UI elements. But
what if there are too many fields for a UI to search on? Search DSLs
can give a user more granular access to searching without exposing
an overly complicated interface.
In the evening I finished Cruel and
Book 4 in the Kay Scarpetta series by Patricia Cornwell. I liked the
story. Cornwell is getting better and better with each book in the Kay
Earth failed. In a desperate bid to escape, the spaceship Enkidu and
its captain, Heorest Holt, carried its precious human cargo to a
potential new paradise. Generations later, this fragile colony has
managed to survive, eking out a hardy existence. Yet life is tough,
and much technological knowledge has been lost.
Then strangers appear. They possess unparalleled knowledge and
thrilling technology – and they've arrived from another world to
help humanity’s colonies. But not all is as it seems, and the price
of the strangers' help may be the colony itself.
In the evening I started in Children of
Children of Time book 3 by Adrian Tchaikovsky.
In the acknowledgements the author gives a nod to his research sources
which include the fantastic book The Genius of
by Jennifer Ackerman. I read this book several years ago while living
in Mexico and highly recommend it.
Instead of having to limit sanity checks to the boundaries of the
program, we could re-use those as function contracts using the
assert keyword. Indeed, setting PYTHONOPTIMIZE removes all
assert, making the check useful in dev, and free in production.
Unfortunately, the community doesn't know about the feature, and
use assert for things that should never be removed, so using the
flag would likely introduce bugs into your program.
Machine learning (ML) lets computers learn from data on their own
without requiring software developers to write out all the logic by
hand. Given enough data, the machine can learn useful patterns in
the data, which turns out to be quite powerful.
The earliest ML algorithms go back to the 1960’s but machine
learning started being commonly used in the early 2000’s. In 2012,
“deep learning” involving large neural networks became practical and
their usage and capabilities has grown exponentially since then.
The recent breakthroughs in Large Language Model (LLM) technology
are positioned to transition many areas of software. Search and
Database technologies particularly have an interesting entanglement
with LLMs. There are cases where Search improves the capabilities of
LLMs as well as where inversely, LLMs improve the capabilities of
Search. In this blog post, we will break down 5 key components of
the intersection between LLMs and Search.
LLMs in Re-Ranking
Search Result Compression
We will also conclude with some thoughts on how Generative Feedback
Loops fit into this picture.
Recently I’ve been working in static analysis land and as a part of
that have been familiarizing myself with data flow analysis. I look
at a fair amount of MIR and so decided to delve into the
rustc_mir_dataflow crate to see how these things are handled in
the rust compiler. There is a helpful introduction to this topic in
the rustc dev guide,
and this post fleshes things out a bit.
Large language models (LLMs) have powerful general capabilities out
of the box: they can answer questions, write poems and stories,
invent recipes, and write code. But they may not precisely fit your
use case. Their answers may be too vague, poorly formatted, or even
Fortunately, you can adapt LLMs to meet your needs. There are three
levels of LLM customization:
Embeddings via vector databases
Each level is an order of magnitude more difficult and expensive
than the previous, but offers far more customization.
Emacs is one of those magical pieces of technology that manages to
bridge the gap between being a tool that does useful work, and
becoming a deeply personal component in a software developer’s
life. It is one half of the editor war and is one of the longest
running examples of programmers elevating their personal choices to
beyond that, it is also a piece of software that has seen decades of
iteration. It’s old enough that parts of it were contributed by
people that have long since passed. They may be gone, but their code
still lives on, making our lives just a bit easier.
Ensuring your application can handle failures and outages is
crucial, and the availability of your application is only as good as
the availability of your PostgreSQL instance. With that in mind, you
may be wondering which PostgreSQL high availability (HA) deployment
option is best for your application.
Let’s review several popular solutions that increase the high
availability of PostgreSQL deployments and, as a result, the
availability overall of your application. Why several and not one?
Well, there’s no silver bullet or one-size-fits-all solution when it
comes to high availability and PostgreSQL. So, walk through the
options for a highly available deployment of PostgreSQL and then you
can make a choice that fits your use case.
A Bloom filter is a
standard data structure in computer science to approximate a
set. Basically, you start with a large array of bits, all
initialized at zero. Each time you want to add an element to the
set, you compute k different hash values and you set the bits at
the k corresponding locations to one.
A storm rages. A young girl is kidnapped. Her mother teams up with
the mysterious woman next door to pursue the kidnapper, a journey
that tests their limits and exposes shocking secrets from their
In the evening I watched
Lou. I liked the movie and
give it a 7 out of 10.
Tig is an ncurses-based text-mode interface for git. It functions
mainly as a Git repository browser, but can also assist in staging
changes for commit at chunk level and act as a pager for output from
various Git commands.
Last week I managed to glean more insights into Apple’s continuing
evolution of their passkeys support from other places online,
though, so I decided to pull it all together. Here’s the latest news
on changes coming in iOS 17, iPadOS 17, and macOS 14 to
Apple’s passkeys experience.
The fingerprints say the murderer is the man who's just been
executed . . .
At 11.05 one December evening in Richmond, Virginia, convicted
murderer Ronnie Joe Waddell is pronounced dead in the electric
chair. At the morgue Dr Kay Scarpetta waits for Waddell's
body. Preparing to perform a post-mortem before the subject is dead
is a strange feeling, but Scarpetta has been here before. And
Waddell's death is not the only newsworthy event on this freezing
night: the grotesquely wounded body of a young boy is found propped
against a rubbish skip. To Scarpetta the two cases seem unrelated,
until she recalls that the body of Waddell's victim had been
arranged in a strikingly similar position . . .
In the evening I started in Cruel and
Book 4 in the Kay Scarpetta series by Patricia Cornwell.
By any measure, CSS has gotten a lot better in recent years. It’s
gotten more useful features, better interoperability between
browsers, and become easier to learn thanks to a concerted push
toward making CSS a cohesive system free of quirks and hacks.
In this post, I go over what monad transformers are and how to use
them. I go into the internals of some common transformers, and we
see how monad transformers are essentially functions that take in a
monad and return an "augmented" monad with extra capabilities. We
finish with a discussion of two different ways of using monad
transformers, mtl-style and transformers-style.