In Emacs version 28 Emacs developers introduced so-called read
symbol shorthands. If you’re interested in the rationale, feel free
to search the Emacs developer mailing list for the
discussion. However, it does seem that not everyone likes the idea
of shorthands as a substitution for namespaces (or packages, if
you’re coming from Common Lisp).
Macpine makes it possible to run LXD/LXC containers on MacOS with
support for both amd64 and arm64 processors, through its lightweight
virtualisation layer. This workflow makes it easy to develop and
test LXD containers locally.
Many users of Python deprioritize performance in favor of soft
benefits like ergonomics, business value, and simplicity. Users who
prioritize performance typically end up on faster compiled languages
like C++ or Java.
One group of users is left behind, though. The scientific computing
community has lots of raw data they need to process, and would very
much like performance. Yet, they struggle to move away from Python,
because of network effects, and because Python’s
beginner-friendliness is appealing to scientists for whom
programming is not a first language. So, how can Python users
achieve some fraction of the performance that their C++ and Java
I’m going to take that post and write a simplified version of part
of it here, as an exercise to help me understand what
happened. After all, the best way to understand something is to try
to explain it to someone else.
A few days ago I wrote a comment on The Orange
Site that seemed to
strike a chord there. The comment was about applying a few
principles of functional
in any language (well, maybe not BASIC from the 70s or 80s, but
these versions of BASIC aren't used much these days). There's no
need for functional application, functional composition, first class
functions, monads, (“Monads! How do they
work?”) or even
currying. No, I feel like you can get about 85% of the way to
functional programming by following three simple principles.
When writing tests for Django
projects, you typically need to create quite a lot of instances of
database model objects. This page documents the patterns I
recommend, and the ones I don’t.
Before I get going, I should mention that a lot of this can be
avoided altogether if you can separate out database independent
logic from your models. But you can only go so far without serious
contortions, and you’ll probably still need to write a fair number
of tests that hit the database.
Best friends Becky and Hunter find themselves at the top of a
2,000-foot radio tower.
In the evening Esme and I watched
Fall. At first I was not
sure if I would be able to watch the movie because I am very afraid of
heights. But with only one short break I managed to watch the whole
movie. I liked it and give the movie a 7 out of 10.
One of the best things to come out of the modern DevOps movement is
the aggressive push for “feature switches” (also known as “feature
flags” or “feature toggles”). At All Around the
World , we strongly recommend them
for our clients and sometimes we implement them, but I’m still
surprised that many companies don’t use them. They’re dead-simple to
build and they’re a powerful tool for site
reliability. Unfortunately, many articles discuss how to build them
or use them, but best practices are neglected. So we’ll skip the
implementation and instead focus on using feature switches
Functional programming offers a bunch of really cool programming
patterns. Two that I really enjoy are tail
especially how they are implemented in OCaml. However, I spend a lot
of time writing Emacs Lisp now, and I was wondering if I could find
a way to use these patterns in that language.
It turns out that it is possible, thanks to named-let and
pcase. It isn’t as pretty and elegant as OCaml, but at least I get
to keep excercising those parts of my programming brain. Maybe next
I’ll try to figure out currying in Emacs Lisp.
I hesitated writing this post, because I don’t want to start, or get
into, a holy war over programming languages. (Just to get the flame
bait out of the way, Visual Basic is the best language ever!) But
I’ve had a number of people ask me about my experience with Rust and
whether they should pick up Rust for their projects. So, I’d like to
share some of the pros and cons that I see of using Rust in a
startup setting, where moving fast and scaling teams is really
I'll describe a simple, one jail installation, not security oriented
nor explaining any single option. If you're managing an instance,
you should be skilled enough to understand what you're doing
here. It would be better to separate the services (Redis,
PostgreSQL, etc.) but, for simplicity, I'll just put everything in a
nice single (movable) jail.
This quickstart guide is intended to quickly familiarize GNU/Linux
users with the basics of OpenBSD and will highlight some of the
technical differences between OpenBSD and the various GNU/Linux
based distributions. It is not intended to be an exhaustive list of
differences, nor will it highlight the rather large philosophical
differences between OpenBSD and GNU/Linux.
12 Strong tells the story of the first Special Forces team deployed
to Afghanistan after 9/11; under the leadership of a new captain,
the team must work with an Afghan warlord to take down the Taliban.
In the evening I watched 12
Strong. I liked the movie and
give it a 7.5 out of 10.
As a Rust programmer you are probably quite familiar with how
references work in Rust. If you have a value of type T you can
generally get various references to it by using the ampersand (&)
operator on it. In the most trivial case &T gives you just that: a
reference to T. There are however cases where you can get
something else. For instance String implements
Deref<Target=&str> which lets you also get a &str from it and
that system also can be extended to work with mutable references as
This question has been answered many times before, but it bears
repeating: Why do people like using dynamic languages? One common
compelling reason is that dynamic languages like Python only require
you to learn a single tool in order to use them well.
One of the nice things about the Rust programming
language is that it makes it easier to
write correct concurrent (e.g. threaded) programs – to the degree
that Rust’s slogan has been, at times, “fearless concurrency.”
But I’d like to tell you about the other side of Rust, which I
think is under-appreciated. Rust enables you to write programs that
are not concurrent. This feature is missing from most other
languages, and is a source of much complexity and bugs.
A war fueled by the powers of dark sorcery is about to engulf the
peaceful land of Osten Ard—for Prester John, the High King, lies
dying. And with his death, the Storm King, the undead ruler of the
elf-like Sithi, seizes the chance to regain his lost realm through a
pact with the newly ascended king. Knowing the consequences of this
bargain, the king’s younger brother joins with a small, scattered
group of scholars, the League of the Scroll, to confront the true
danger threatening Osten Ard.
Simon, a kitchen boy from the royal castle unknowingly apprenticed
to a member of this League, will be sent on a quest that offers the
only hope of salvation, a deadly riddle concerning long-lost swords
of power. Compelled by fate and perilous magics, he must leave the
only home he’s ever known and face enemies more terrifying than
Osten Ard has ever seen, even as the land itself begins to die.
In the morning I started in The Dragonbone
book one of Memory, Sorrow, and Thorn by Tad Williams.
Intervals or ranges pop-up everywhere in the programming world. The
classic example is picking a start and end date, like you would when
booking an AirBnB or a flight. But that's just one example: from
slicing a JS
and even SQL's LIMIT operator, ranges are everywhere.
Have you ever wondered why they are always implemented as [closed, open) as opposed to [closed, closed]?
I have been trying to like static type checking in Python. For most
of my Django projects, I get annoyed and give up, so I’ve had a go
with some smaller projects instead. This blog post documents how it
went with Parsy, a parser
combinator library I maintain.
While it’s easy to fall in love with Nix and
want to use it to build and configure just about everything, let’s
face it: few of us are in a position to do so, especially in the
workplace. “Hey team, let’s Nixify our entire stack!” is unlikely to
endear you to your coworkers at daily standup. Fortunately, Nix is
good at enough things that you can reap many of its potential
benefits by incorporating it into only a subset of an already
existing software pipeline.
In this post, I’ll provide a concrete example of this by using Nix
inside a fairly standard
DevOps pipeline that builds
Docker images and deploys them to
Kubernetes in CI. Nix does a lot of heavy
lifting in this scenario but it doesn’t do everything: it doesn’t
stand up any infrastructure and it doesn’t handle deployment. That’s
all left to popular, trusted tools and platforms from outside the
Nix universe. I hope that this example inspires you to find ways to
incrementally introduce Nix into your own stacks.
I’ve always been intimidated by coding techniques: encryption and
decryption, hashing operations, error correction codes, and even
compression and decompression techniques. It’s not that I didn’t
know what they do, but I often felt that I never quite understood
the basics, let alone had an intuitive understanding of how they
Reed-Solomon forward error correction (FEC) is one such coding
method. Until the discovery of better coding techniques (Turbo codes
and low-density parity codes), it was one of the most powerful ways
to make data storage or data transmission resilient against
corruption: the Voyager
Reed-Solomon coding to transmit images when it was between Saturn
and CDs can recover from scratches that corrupt up to 4000 bits
thanks to the clever use of not one but two Reed-Solomon codes.
The story so far: At the end of the 1980s, Acorn Computers was at a
crossroads. A small team, led by Sophie Wilson and Steve Furber, had
invented a powerful new computer chip, the Acorn RISC Machine
(ARM). Acorn released a new computer line, the Archimedes, that used
these ARM chips. But the world wasn’t beating a path to the
State machines are a great way to design software but they can be
difficult to implement well.To illustrate this I’ll develop a simple
state machine then increase the complexity to demonstrate some of
There’s a lot of exciting work going on in the Swift project, and
it’s hard to keep track of it all because it’s happening in many
different repositories, pull requests, and forum threads. To give
the community a better view of the big picture, the Core Team
surveyed workgroups and developers across the project and collected
information about what they’re focused on over the next year.
Please keep in mind that nothing here is a lock for any particular
release of the project — plans and priorities can change over
time. This also isn’t an exhaustive list of everything happening in
the project. But we hope you find this interesting and informative,
and if you have questions about any of these areas, please feel free
to reach out and ask for more details.
Kiosks are designed to offer users specific information or a
specific experience, while preventing access to any other activities
on the device. They are often found in airports, shops, hospitals,
cafes, and museums — any location where people need easy access to
information or services like timetables, waiting times, product
information, directions, self check-in machines, and so on.
Kiosk mode on your Raspberry Pi allows you to boot straight into a
full-screen web page or an application without using the desktop
environment. It’s the foundation for many different projects where
you want to display information for a dedicated interaction with a
A tree view (collapsible list) can be created using only HTML and
see the tree view as lists nested inside disclosure widgets, and the
standard keyboard interaction is supported automatically.
I find blockchain fascinating because it extends open source
software development to open source + state. This seems to be a
genuine/exciting innovation in computing paradigms; We don’t just
get to share code, we get to share a running computer, and anyone
anywhere can use it in an open and permissionless manner. The seeds
of this revolution arguably began with Bitcoin, so I became curious
to drill into it in some detail to get an intuitive understanding of
how it works. And in the spirit of “what I cannot create I do not
understand”, what better way to do this than implement it from
We are going to create, digitally sign, and broadcast a Bitcoin
transaction in pure Python, from scratch, and with zero
dependencies. In the process we’re going to learn quite a bit
about how Bitcoin represents value. Let’s get it.
SwiftUI’s various stacks are some of the framework’s most fundamental layout tools, and enable us to define groups of views that are aligned either horizontally, vertically, or stacked in terms of depth.
When it comes to the horizontal and vertical variants (HStack and
VStack), we might sometimes end up in a situation where we want to
dynamically switch between the two. For example, let’s say that
we’re building an app that contains the following
LoginActionsView, which lets the user pick from a list of actions
when logging in.
I've started learning about spectrum analysis a long time ago at
university, but failed to gain a true insight in how it works under
the hood. For me, it was just some magical math formulas I had to
memorize and know about. I knew the theory but it didn't really
A few years ago I wanted to do some audio programming and play
around with analyzing sound. That's how I got interested into
building an intuition on how the Fourier transform "actually" works.
After stumbling upon Gautham's APE Python
port and seeing
how far along the Cosmopolitan
Libc has come
along, I was inspired to see what it would take to port my scripting
language of choice, Perl, to the Cosmopolitan Libc and turn it into
a self-contained binary. My motivation came from wanting to prove
that if Python can do it, Perl can do it too, wanting a more robust
Windows Perl port for running my personal media server (MHFS), and
the cool factor of hacking on Perl and the Cosmopolitan Libc.
If you’re using NumPy, Polars, Zarr, or many other libraries,
setting a single environment variable or calling a single API
function might make your code run 20%-80% faster. Or, more
accurately, it may be that your code is running that much more
slowly than it ought to.
The problem? A conflict over who controls parallelism: your
application, or the libraries it uses.
Last week, I finally started exploring
textual. The main motivation was
to start implementing a few project ideas I've had in my todo list
for years. I don't particularly have a preference between TUI
(terminal user interface) and GUI (graphical user interface) for
these projects. Seeing a few Textual demos on twitter (courtesy
Will McGugan) over the past few
months, I felt like exploring this framework first.
Trail of Bits has developed
abi3audit, a new Python
tool for checking Python packages for CPython application binary
interface (ABI) violations. We’ve used it to discover hundreds of
inconsistently and incorrectly tagged package distributions, each of
which is a potential source of crashes and exploitable memory
corruption due to undetected ABI differences. It’s publicly
available under a permissive open source license, so you can use it
I have found a new bugbear. Something to be creatively annoyed
about. I’m going to call it 80/20 refactoring, to express the idea
that a refactoring is started, but then not
finished. Probably because doing all of the edge cases in a
refactoring is hard.
Staged programming consists of evaluating parts of a program at
compile time for greater efficiency at runtime, as some computations
would have already been executed or made more efficient during
compilation. The poster child for staged programming is the
exponential function: to compute a^b, if b is known at compile
time, a^b can be replaced by b explicit multiplications. Staged
programming allows you to write a^5, but have the expression
compile to a*a*a*a*a.
A year has passed since LAPD detective Renée Ballard quit the force
in the face of misogyny, demoralization, and endless red tape. But
after the chief of police himself tells her she can write her own
ticket within the department, Ballard takes back her badge, leaving
“the Late Show” to rebuild and lead the cold case unit at the elite
For years, Harry Bosch has been working a case that haunts him—the
murder of an entire family by a psychopath who still walks
free. Ballard makes Bosch an offer: come volunteer as an
investigator in her new Open-Unsolved Unit, and he can pursue his
“white whale” with the resources of the LAPD behind him.
First priority for Ballard is to clear the unsolved rape and murder
of a sixteen-year-old girl. The decades-old case is essential to the
councilman who supported re-forming the unit, and who could shutter
it again—the victim was his sister. When Ballard gets a “cold hit”
connecting the killing to a similar crime, proving that a serial
predator has been at work in the city for years, the political
pressure has never been higher. To keep momentum going, she has to
pull Bosch off his own investigation, the case that is the
consummation of his lifelong mission.
The two must put aside old resentments and new tensions to run to
ground not one but two dangerous killers who have operated with
brash impunity. In what may be his most gripping and profoundly
moving book yet, Michael Connelly shows once again why he has been
dubbed “one of the greatest crime writers of all time” (Ryan Steck,
In the evening I started in Desert
a Renée Ballard and Harry Bosch novel by Michael Connelly.
If you read the title and thought “well, you were probably just
doing something silly beforehand”, you’re right! But what is
programming if not an exercise in making silly mistakes? Tracking
down silly mistakes is where all the fun is to be had!
At the time of writing, most articles on the Nix package manager are
written with individuals or small teams in mind. Unfortunately,
these articles do not offer much insight or advice on adopting Nix
across an entire engineering organization. This blog post is our
attempt to fix that.
The other day at work one of our python
processes stopped responding. It was on one of our servers that was
responsible for fetching and analyzing the web pages that we might
recommend to people.
By the time I got around to debugging this problem, the last log
message was over 20 minutes old - and the server had been maxed out
at 100% CPU for the whole time. And while it wasn’t dead, it wasn’t
responding to any requests, or even sending out any heartbeats. Even
worse, in the meantime this problem had repeated itself on another
server. Our whole ability to ingest new web pages looked to be going
down one server at a time.
Pitchforks down, please! I felt your anger as soon as you clicked on
the article. I have nothing against Rust — I prefer it for various
use cases. All programming languages are means to an end. In my
case, Rust simply did not cut it, and I had to gut the project and
rewrite it in Golang.