C++20 introduces concepts as a way to write powerful
self-documenting templates. At their core, concepts are logical
binary expressions that can be used to constrain the template
parameters of any class or function template. These logical
expressions are evaluated at compile time to determine whether the
template parameters satisfy the given constraints.
gitfs is a FUSE file system that
fully integrates with git. You can mount a remote repository’s
branch locally, and any subsequent changes made to the files will be
automatically committed to the remote.
In this article, I’ll share my experience with organizing large Rust
projects. This is in no way authoritative — just some tips I’ve
discovered through trial and error.
One of the changes to Perl that we're considering on p5p (the
perl5-porters mailing
list) is the
removal of taint support. The first step towards that is to add a
Configure option that lets you build a Perl without taint support.
In this post I'll explain what we're considering, and why. The
purpose of this post is to let everyone beyond p5p know about this,
and give you a chance to comment.
In a time of conflict, a group of unlikely heroes band together on a
mission to steal the plans to the Death Star, the Empire's ultimate
weapon of destruction.
In the evening, Adam, Esme, and I watched Rogue One: A Star Wars
Story. I like this movie a
lot, and give it a solid 8 out of 10.
I recently wrote the most complex procedural Rust macro I’ve ever
attempted. This post tries to outline the problems I’ve encountered
and tells how I overcame them.
Creating small CLI tools is a fun way to get more familiar with a
programming language. If you are coming from an infrastructure
background, a CLI tool that you can use to send commands to
devices/servers might be considered a neat starting point getting
into Rust. This is how I started off learning Python, by writing
small things that were usefull in a context that I was familiar
with. Back then, I used argparse, getpass and
netmiko. Starting with Rust is pretty daunting, and I have found
that using similar tactic used to learn Python can also be applied
when learning Rust.
When the island's dormant volcano begins roaring to life, Owen and
Claire mount a campaign to rescue the remaining dinosaurs from this
extinction-level event.
In the evening Esme, Alice, and I watched Jurassic World: Fallen
Kingdom. Esme and Alice fell
asleep halfway. Not a great movie; nothing new. I give it a 6 out of 10.
tmux is a terminal multiplexer, meaning it is a window manager
within your terminal. It allows you to open multiple windows
(sessions) within one terminal window (session). So it enables other
programs to run from it, allowing you to manipulate them
easily. Most of the folks find that one of the features to use tmux
on a daily basis.
Throwing properties allow defining computed
properties
that throw an error on
failure. SE-310
introduced this feature in Swift 5.5 and is part of the
async-await
concurrency changes allowing async properties to throw errors.
Hot on the heels of another Git-related
article
that was making the rounds recently, I was reminded of Git’s own
structure and how it influences user experience. Specifically what
we assume is part of how Git works, is actually a part of the
porcelain (in Git speak, the user interface and commands that back
it). As someone developing a Git client,
it’s interesting to think Git’s user experience could be
significantly different with a different interface, particularly
because people have a particular mental model of Git influenced by
the default interface. Said influence is enough that libgit2’s
API emulates the porcelain’s
semantics, in-process.
He'd thought he had five years left - now he's got less than
one. With fifty thousand refugees, a bastard son and an ex-fiancée
who may have learned his darkest secret, Gavin's got problems on
every side.
As he loses control, the world's magic runs wild, threatening to
destroy the Seven Satrapies. The old gods are being reborn and their
army of colour wights is unstoppable.
The only salvation may be the brother whose freedom and life Gavin
stole sixteen years ago.
In the morning I started in The Blinding
Knife,
Book 2 of Lightbringer series by Brent Weeks.
If you’ve worked with data for any length of time, you’ve come
across the Comma-Separated Values (CSV) format. Its simplicity and
ubiquity make CSV an extremely popular way for organizations to
exchange data both internally and externally. While many programs
can’t read or write Excel spreadsheets, almost anything can read and
write CSVs, and a human can open a CSV file in any text editor and
understand roughly what it contains.
Despite this ubiquity and ease of access, CSV is a wretched way to
exchange data. The CSV format itself is notoriously inconsistent,
with myriad competing and mutually-exclusive formats that often
coexist within a single dataset (or, if you’re particularly unlucky,
a single file). Exporting a dataset as a CSV robs it of a wealth of
metadata that is very hard for the reader to reconstruct accurately,
and many programs’ naïve CSV parsers ignore the metadata
reconstruction problem entirely as a result. In practice, CSV’s
human-readability is more of a liability than an asset.
Recently, I’ve been reading through the excellent Database
Internals
(Alex Petrov, 2019). The first half of the book is dedicated to the
implementation of database storage engines – the subsystem(s) of a
DBMS that handles long-term persistence of data. A surprising amount
of this section discusses the implementation and optimization of
various B-Tree data structures.
This article walks through the components of a modern LZ
compressor. It's amazing how rich and deep the compression field
is. If you enjoy algorithms and data structures, there are not too
many better places to play. I hope you enjoy reading it as much as I
enjoyed writing it!
By the end, we will have a compressor that can beat gzip while
decompressing at almost the same speed — in less than 1000 lines.
The Free monad gives you a Monad for any Functor. The Free
monad can also be used to construct extensible effect systems. I
never understood why Free why this was the case. It turns out it
is deeply connected to their ability to yield monads for functors.
Rust
1.26
introduced a nifty little feature called Basic Slice Patterns which
lets you pattern match on slices with a known length. Later on in
Rust
1.42,
this was extended to allow using .. to match on “everything else”.
As features go this may seem like a small addition, but it gives
developers an opportunity to write much more expressive code.
Since I wrote How to write really slow Rust
code
and its sequence, Part
2,
I have received so much feedback and suggestions to make my Rust
code run faster that I decided I had enough material to write
another post, this time focusing on more advanced tools and
techniques available to Rust developers rather than on how to avoid
noobie mistakes that will totally destroy your Rust code
performance, as the previous blog posts did.
If you use email with your own domain, a lot of the burden of
authenticity has suddenly shifted from your service provider to
you. This guide will hopefully give you the information and
practices you need to keep your domain's email authentic and less
vulnerable to spoofing.
We'll cover the three major components of modern email domain
security: DKIM for signing, SPF for sender verification, and
DMARC for stricter enforcement of the other two. It is assumed
the reader has a basic understanding of DNS and has experience using
email with their own domain.
Recently, I encountered a problem. My domain didn't correctly
implement SPF, DKIM, or DMARC.
Then, I encountered a second problem: I had no idea what those were,
and seemingly nobody has written about SPF, DKIM, or DMARC in a way
that a human can understand, not to mention implement. Every article
I found was either highly technical, trying to game SEO to sell me
something, or too high level to be useful.
As a result, I've had to do a lot of hard work and research to
understand this problem. Hopefully, because I had to do this, you
won't.
There's two main sections here: a human explanation of what these
things are, followed by a reasonably straightforward way to
implement them.
Let's say you have more than one version of Python installed on your
machine. What version does python3 point to? If you said, "the
newest version", you may actually be wrong. That's because python3
points at the last version of Python you installed, not necessarily
the newest; python3 typically gets overwritten every time you
install some version of Python.
This is a bit annoying when you simply want to work with the newest
version of Python (e.g., creating a new virtual environment). It
would be convenient if there was a command which just always used
the newest version of Python that's installed ...