In the early evening I noticed that Adam's female Brazilian whiteknee
tarantula, scientific name Acanthoscurria geniculata, had
molted. Because I don't check daily it might have happened earlier
this week but the tarantula looks really fresh so it might have
In the above photo you can see the spider in the bottom right corner
and her exuviae, the cast-off exoskeleton, in the top left corner. The
tarantula is resting on the web mat she made to molt on top of.
I wanted to grab a CSV version of a JSON representation of an
entityset in the Northwind OData service. Here's how I converted the
JSON structure into CSV with jq, and along the way, I talk about
arrays, objects, iterators, object indices, variables, identity,
array construction and format strings.
With each major Python release, all the attention goes to the new
language features: the walrus operator, dictionary merging, pattern
matching. There is also a lot of writing about asyncio and
typing modules — they are developing rapidly and are obviously
important for the core team.
The rest of the standard library modules receive undeservedly little
attention. I want to fix this and tell you about the novelties
introduced in versions 3.8–3.10.
In this post, I will show you how to use cryptobyte to parse a TLS
Client Hello message, and introduce
https://tlshello.agwa.name, an HTTP
server that returns a JSON representation of the Client Hello
message sent by your client.
Monads hide some of the repeated logic of composing functions with
embellished types, so that you don’t have to feel like Bart Simpson
in detention, but rather like Bart Simpson on his skateboard,
bowling a cricket ball, while it is his turn to bat.
Just like UIKit, SwiftUI is implemented on top of an event loop that
dispatches messages to your UI code. The UI code in turn may trigger
parts of the screen to be re-rendered. The handling of messages and
rendering of graphics on screen form the render loop of an
application. All UI frameworks are based on a render loop, in
SwiftUI it is hidden particularly well. Most of the time, it works
under the hood without us needing to know anything about it. It is
amazing how we can write UI code without even needing to understand
what an event loop is, and without us needing to worry about how
often to render screen content. But in some cases, it is useful to
know what is happening behind the scenes.
We've now tested every version of Apple's M1 processor, from the
first M1 chip in the 13-inch Macbook Pro all the way up to the M1
Ultra in the new Mac Studio, and the chip's ability to scale
performance is pretty incredible. The M1 Ultra fuses two M1 Max
chips together to get you a processor with 20 CPU cores and 64 GPU
cores, along with up to 128GB of RAM, and it's one of the fastest
processors we've ever tested.
This astonishes youngsters, when they enrolled first time to school
or kindergarten. They found coincidences when list their
birthdays. Only 23 random persons in groups is enough to have a
probability of 50% that there is a pair with the same birthday.
My coding time this year has been invested in
an event-filtering library implemented in Go. Just in the last
couple of weeks I spotted an opportunity to bring Go’s shiny new
generics to bear, and not just anywhere, but for a central data
structure. I got good results, but the process was sort of painful;
I kept trying things that looked like they ought to work but
didn’t. I’m sharing this tour through that experience because I’m a
reasonably competent programmer with mainstream tastes and if I hit
these bumps in the road others probably will too.
Recently I wanted to do some basic data analysis using data from my
Shopify store. So I figured I’d query the Shopify API and import my
data into SQLite, and then I could make queries to get the graphs I
But this seemed like a lot of boring work, like I’d have to write a
schema and write a Python program. So I hunted around for a
solution, and I found sqlite-utils, a tool designed to make it
easy to import arbitrary data into SQLite to do data analysis on the
Dune Messiah continues the story of Paul Atreides, better known--and
feared--as the man christened Muad'Dib. As Emperor of the known
universe, he possesses more power than a single man was ever meant
to wield. Worshipped as a religious icon by the fanatical Fremen,
Paul faces the enmity of the political houses he displaced when he
assumed the throne--and a conspiracy conducted within his own sphere
And even as House Atreides begins to crumble around him from the
machinations of his enemies, the true threat to Paul comes to his
lover, Chani, and the unborn heir to his family's dynasty...
In the evening I started in the second book of the Dune Chronicles by
Frank Herbert: Dune Messiah.
Rust makes it easy to add dependencies to your project: edit your
Cargo.toml (or use cargo add to have it changed for you from the
command line), and you get to use the crate. But do you know what
you’ve added to your project? Are you sure you can trust those lines
In this article, we would like to dive a bit further into the latest
major milestone we have reached: Win32k Lockdown, which greatly
reduces the capabilities of the content process when running on
Windows. Together with two major earlier efforts
that shipped before, this completes a sequence of large leaps
forward that will significantly improve Firefox’s security.
This is the first in hopefully a series of posts I intend to write
about how to build/manage/deploy/etc. Python applications in as
boring a way as possible. So before I go any further, I want to be
absolutely clear on what I mean by “boring”: I don’t mean “reliable”
or “bug-free” or “no incidents”. While there is some overlap, and
some of the things I’ll be recommending can help to reduce bugs, I
also want to be clear: there will be bugs. There will be incidents
where a feature or maybe an entire service is down.
I recently added proper handling of CSV files to
GoAWK, my POSIX-compatible AWK
interpreter, and I think it’s a feature that will make AWK
significantly more useful for developers and data analysts in our
When talking about Haskell, the term “lambda calculus” often crops
up. It’s a theoretical framework used to define the meaning of
computation in many functional languages, such as Haskell, Agda,
Idris, etc. Understanding lambda calculus can be very helpful when
talking about programs written in these languages.
The new Podman v4.1.0 release is now available. This release is all
about new features, with some of the most exciting being improved
support for running on Mac and Windows, and adding support for
Docker Compose v2.0. These are just the beginning, though, as this
release also includes the ability to clone containers, significant
improvements to checkpointing, and over 25 bug fixes. Read on for
Are you a data scientist or a developer who mostly uses Python? Are
websites in a browser? How nice would it be if we could write
websites in Python? Amazingly, at PyCon US 2022, Anaconda’s CEO
Peter Wang announced a shiny new technology called PyScript that
allows users to write Python and in fact many languages in the
Optics make it possible to conveniently access and modify data
structures in an immutable, composable way. Thanks to that, they
catch lots of attention from the functional programming
community. Still, you can have a hard time understanding how they
work just by looking at data declarations and type definitions.
In this post, I present a way of encoding optics that is different
from usual. This encoding, called existential optics, is easier to
understand than the other encodings, since it makes more explicit
the structure of each optic. This is not new and is well known in
the category theory academic circles. Still, these ideas do not seem
to appear in libraries for languages like Haskell, Purescript, or
The most well-known type of optics are lenses, which were also the
first to be analyzed and used. We will use them as our recurring
example to compare the several ways we have to encode optics.
For many developers, databases are basically magic. Like Penn &
Teller, this blog post is set to break the illusion. Databases are
just like any other code, they have algorithms and processes. These
algorithms and processes are meant to improve performance, but can
cause limitations if they are not expected.
JSON Patch is a format for describing changes to a
JSON document. It can be used to avoid sending a
whole document when only a part has changed. When used in
combination with the HTTP PATCH
method, it allows partial
updates for HTTP APIs in a standards compliant way.
The patch documents are themselves JSON documents.
JSON Patch is specified in RFC
6902 from the IETF.
Recursive Descent Parser is a top-down parser where every
non-terminal in the BNF grammar is a subroutine. The parser works
by recursively calling each subroutine to construct the parsed
output. It’s not the only algorithm to implement a parser, but it’s
one of the most simple ones that are very easy to understand and
In my personal projects, I’ve never imposed any order on my CSS
declarations. Or rather: I’ve ordered my declarations, just not
mindfully. To Eric’s point, it’s mostly been: “arbitrarily adding
properties everywhere until it looks right in the browser.” That’s
After reading Eric’s article, I’m feeling convinced to go alphabetical.
Scapy is a Python module and interactive
program for low-level network programming that attempts to make it
easier without abstracting away the technical details. This project
is fairly prominent in cybersecurity space and used for things like
exploit development, data exfiltration, network recon, intrusion
detection and analysing captured traffic. Scapy integrates with data
visualisation and report generation tooling for presenting the
results of your research to bug bounty program or during the meeting
with customer or management. The foundational idea for Scapy is
proposing a Python-based domain specific language for easy and quick
wire format management.
Whether I’m teaching new Pythonistas or long-time Python
programmers, I frequently find that Python programmers
underutilize multiple assignment.
Multiple assignment (also known as tuple unpacking or iterable
unpacking) allows you to assign multiple variables at the same time
in one line of code. This feature often seems simple after you’ve
learned about it, but it can be tricky to recall multiple
assignment when you need it most.
In preparing some data for another upcoming blog post, I needed to
convert a list of fully qualified GitHub repository names into a
JSON array of single-property objects (to reflect the style of JSON
output from GitHub's gh CLI). I achieved this with a short jq
filter. Here's how, recorded here, with my working thoughts, mostly
for my outboard memory.
This blog post documents my understanding of how the conventions for
Unix command line syntax have evolved over time. It’s not properly
sourced, and may well be quite wrong. I’ve not been using Unix until
1989, so I wasn’t there for the early years. Maybe someone has
written a proper essay on this, with citations. I’m too lazy to dig
These are some technical tips for publishing a blog. These have
nothing to do with good content, just how to share that content. The
recommendations are roughly in order of importance and have
rationale for why they are that important.
Rust is infamous for having a steep learning curve. The borrow
checker is the first boss you must defeat, but with a good mental
model of how memory works, how objects move, and the rules that the
borrow checker enforces, it becomes second nature rather
quickly. These rules may sound complicated, but really, they are
about understanding the fundamentals of how a computer works.
There are basically two types of client applications on the internet:
Clients that use the request-response model. One request will
generally result in one response. Some examples would be web
browsers and many API clients.
Clients that receive a continuous stream of data from a server and
may or may not send data back at any time. Examples of this type
would include chatbots, automated trading applications and
multiplayer video games.
In this article, I will describe a fairly general way to use Haskell
for constructing a specific kind of clients of the second type:
clients that listen to a single network socket and send replies to
that same socket, possibly while maintaining state. This article
assumes basic proficiency with Haskell and networking.