Mechanical keyboards the big fat rabbit hole you can disappear I started using mechanical keyboards about a year ago, with a Drevo Blademaster Pro (review coming up), but recently got a Pulsar PCML TKL keyboard in a build-it-yourself order.
The Drevo Blademaster Pro I am using is great, but doesn t allow changing switches at all. So I was contemplating getting a mechanical keyboard that allows for arbitrary switches. My biggest problem here is that I am used to the Japanese JIS layout which gives you a lot more keys which come in extremely handy in Emacs or when typing various languages. Fortunately, APlusX a Korean company manufactures a lot of gear under the Pulsar name, and supports also JIS layout. In addition, they have a great web site to customize your keyboard (layout, color, switch, keycaps) and send you a build-yourself kit for a very reasonable prize at least in Japan.
So I got my first keyboard to put together myself . how was I nervous getting all the stuff out! Despite being a DIY keyboard, it is very easy (and they offer also pre-assembly options, too!). You don t need to solder the PCB or similar, the steps are more or less: (i) put in the switches, and (ii) add the key caps. I started with the first, putting the switches (I went with Kailh Box Brown tactile ones) into the PCB board
Well, that was easy at least I thought until I started testing the keys and realized that about 20 of them didn t work!! Pulling out the switches again I saw that I twisted a pin on each of them. One by one I straightened the pins and reinserted them very carefully. Lesson learned! At the end all the switches were on the board and reacted to key presses.
Next step was adding the key caps. Again, those are not really special key caps, but simply style and sufficient for me. Of course I messed up 0 and O (which have different heights) and at first were confused about different arrow options etc, but since plugging in and pulling out key caps is very easy, at the end all the caps were in place.
With the final keyboard assembled (see top photo), I connected it to my Linux system and started typing around. And first of all, the typing experience was nice. The Kailh Box Brown switches have a bit stronger actuation point then the switches I have in the Blademaster Pro (which are Cherry MX Brown ones), but above all the sound is a bit deeper and thumbier , which really gives a nice feeling.
The keyboard also allows changing the RGB lightening via the keyboard (color, pattern, speed, brightness etc). There is a configuration software for macros etc, unfortunately it only works on Windows (and I couldn t get it to work with Wine, either), a sour point One more negative point is that the LED backlight doesn t have a timeout, that is, it stays on all the time. The Drevo I have turns off after a configured number of seconds, and turns completely black something I really like and miss on the Pulsar.
Another difference to the Blademaster is connectivity: While the Blademaster offers cable, bluetooth, and wireless (with dongle), the Pulsar only offers cable (USB-C). Not a real deal-breaker for me, since I use it at my desktop and really don t need wireless/bluetooth capabilities, but still.
I have been using the Pulsar now for a few days without even touching the Drevo (besides comparing typing sounds and actuation points), and really like the Pulsar. I think it is hard to get a fully configurable and changeable mechanical keyboard for a similar prize.
There is one last thing that I really really miss an ergonomic mechanical keyboard. Of course there are some, like the ErgoDox EZ or the Kinesis Advantage 2, but they don t offer JIS layout (and are very expensive). Then there is the Truly Ergonomic CLEAVE keyboard, which is really great, but quite expensive. I guess I have to dive down the rabbit hole even more and make my own PCB and ergonomic keyboard!
Review: The Story of the Treasure Seekers, by E. Nesbit
Publisher:
Amazon
Copyright:
1899
Printing:
May 2012
ASIN:
B0082ZBXSI
Format:
Kindle
Pages:
136
The Story of the Treasure Seekers was originally published in 1899
and is no longer covered by copyright. I read the free Amazon Kindle
version because it was convenient. My guess is that Amazon is
republishing the Project
Gutenberg version, but they only credit "a community of volunteers."
There are six Bastable children: Dora, Oswald, Dicky, the twins Alice and
Noel, and Horace Octavius (H.O.), the youngest. Their mother is dead and
the family's finances have suffered in the wake of her death (or, as the
first-person narrator puts it, "the fortunes of the ancient House of
Bastable were really fallen"), which means that their father works long
hours and is very absorbed with his business. That leaves the six kids
largely to fend for themselves, since they can't afford school. Clearly
the solution is to find treasure.
This is a fix-up novel constructed from short stories that were originally
published in various periodicals, reordered and occasionally rewritten for
the collected publication. To be honest, calling it a fix-up novel is
generous; there are some references to previous events, but the first
fourteen chapters can mostly stand alone. The last two chapters are
closely related and provide an ending. More on that in a moment.
What grabs the reader's attention from the first paragraph is the writing
style:
This is the story of the different ways we looked for treasure, and I
think when you have read it you will see that we were not lazy about
the looking.
There are some things I must tell before I begin to tell about the
treasure-seeking, because I have read books myself, and I know how
beastly it is when a story begins, "Alas!" said Hildegarde with a deep
sigh, "we must look our last on this ancestral home" and then some
one else says something and you don't know for pages and pages where
the home is, or who Hildegarde is, or anything about it.
The first-person narrator of The Story of the Treasure Seekers is
one of the six kids.
It is one of us that tells this story but I shall not tell you
which: only at the very end perhaps I will.
The narrator then goes on to elaborately praise one of the kids,
occasionally accidentally uses "I" instead of their name, and then
remembers and tries to hide who is telling the story again. It's
beautifully done and had me snickering throughout the book. It's not much
of a mystery (you will figure out who is telling the story very quickly),
but Nesbit captures the writing style of a kid astonishingly well without
making the story poorly written. Descriptions of events have a headlong
style that captures a child's sense of adventure and heedless immortality
mixed with quiet observations that remind the reader that kids don't miss
as much as people think they do.
I think the most skillful part of this book is the way Nesbit captures a
kid's disregard of literary convention. The narrator in a book written by
an adult tends to fit into a standard choice of story-telling style and
follow it consistently. Even first-person narrators who break some of
those rules feel like intentionally constructed characters. The
Story of the Treasure Seekers is instead half "kid telling a story" and
half "kid trying to emulate the way stories are told in books" and tends
to veer wildly between the two when the narrator gets excited, as if
they're vaguely aware of the conventions they're supposed to be following
but are murky on the specifics. It feels exactly like the sort of book a
smart and well-read kid would write (with extensive help from an editor).
The other thing that Nesbit handles exceptionally well is the dynamic
between the six kids. This is a collection of fairly short stories, so
there isn't a lot of room for characterization. The kids are mostly
sketched out with one or two memorable quirks. But Nesbit puts a lot of
effort into the dynamics that arise between the children in a tight-knit
family, properly making the group of kids as a whole and in various
combinations a sort of character in their own right. Never for a moment
does either the reader or the kids forget that they have siblings. Most
adventures involve some process of sorting out who is going to come along
and who is going to do other things, and there's a constant but
unobtrusive background rhythm of bickering, making up, supporting each
other, being frustrated by each other, and getting exasperated at each
other's quirks. It's one of the better-written sibling dynamics that I've
read.
I somehow managed to miss Nesbit entirely as a kid, probably because she
didn't write long series and child me was strongly biased towards books
that were part of long series. (One book was at most a pleasant few
hours; there needed to be a whole series attached to get any reasonable
amount of reading out of the world.) This was nonetheless a fun bit of
nostalgia because it was so much like the books I did read: kids finding
adventures and making things up, getting into various trouble but getting
out of it by being honest and kind, and only occasional and spotty adult
supervision. Reading as an adult, I can see the touches of melancholy of
loss that Nesbit embeds into this quest for riches, but part of the appeal
of the stories is that the kids determinedly refuse to talk about it
except as a problem to be solved.
Nesbit was a rather famous progressive, but this is still a book of its
time, which means there's one instance of the n-word and the kids have
grown up playing the very racist version of cowboys and indians. The
narrator also does a lot of stereotyping of boys and girls, although
Nesbit undermines that a bit by making Alice a tomboy. I found all of
this easier to ignore because the story is narrated by one of the kids who
doesn't know any better, but your mileage may vary.
I am always entertained by how anyone worth writing about in a British
children's novel of this era has servants. You know the Bastables have
fallen upon hard times because they only have one servant. The kids don't
have much respect for Eliza, which I found a bit off-putting, and I
wondered what this world looks like from her perspective. She clearly did
a lot of the work of raising these motherless kids, but the kids view her
as the hired help or an obstacle to be avoided, and there's not a lot of
gratitude present.
As the stories unfold, it becomes more and more clear that there's a quiet
conspiracy of surrounding adults to watch out for these kids, which the
kids never notice. This says good things about society, but it does
undermine the adventures a little, and by the end of the book the sameness
of the stories was wearing a bit thin. The high point of the book is
probably chapter eight, in which the kids make their own newspaper, the
entirety of which is reproduced in the book and is a note-perfect
recreation of what an enterprising group of kids would come up with.
In the last two stories, Nesbit tacks on an ending that was probably
obligatory, but which I thought undermined some of the emotional subtext
of the rest of the book. I'm not sure how else one could have put an
ending on this book, but the ending she chose emphasized the degree to
which the adventures really were just play, and the kids are rewarded in
these stories for their ethics and their circumstances rather than for
anything they concretely do. It's a bit unsatisfying.
This is mostly a nostalgia read, but I'm glad I read it. If this book was
not part of your childhood, it's worth reading if only for how well Nesbit
captures a child's narrative voice.
Rating: 7 out of 10
TLDR: we are making progress on the Rust implementation of the GNU coreutils.
Well, it is an understatement to say my previous blog post interested many people. Many articles, blog posts and some podcasts talked about it! As we pushed coreutils 0.0.12 a few days ago and getting closer to the 10 000 stars on github, it is now time to give an update!
This has brought a lot of new contributors to this project. Instead of 30 to 60 patches per month, we jumped to 400 to 472 patches every month. Similarly, we saw an increase in the number of contributors (20 to 50 per month from 3 to 8). Two new maintainers (Michael Debertol & Terts Diepraam) stepped in and have been doing a much better job than myself as reviewers now! As a silly metric, according to github, we had 5 561 clones of the repository over the last 2 weeks!
The new contributors focused on:
Performances. Now, some binaries are significantly faster than GNU (ex: head, cut, etc)
Adding missing binaries or options (see below)
Improve the testsuite: we grew the overall code coverage from 55% to 75% (in general, we consider that a 80% code coverage on a project is excellent).
Refactoring the code to simplify the maintenance. Examples:
Managing error the same way in the various binaries - (Kudos to Jeffrey Finkelstein for the huge work)
Improving the GNU compatibility (thanks to Jan Verbeek, Jan Scheer, kimono-koans and many others)
Move toclap 3. Upgrade by Terts which unblocks us on various problems.
...
Closing the gap with GNU
As far as I know, we are only missing stty (change and print terminal line settings) as a program.
Thanks to some heroes, basenc, pr, chcon and runcon have been implemented. For example, for the two last programs, Koutheir Attouchi wrote new crates to manage SELinux properly. This crate has been used for some other utilities like cp, ls or id.
Leveraging the GNU testsuite to test this implementation
Because the GNU testsuite is excellent, we now have a proper CI using it to run the tests. It is pretty long on the Github action CI (almost two hours to run it) but it is an amazing improvement to the way we work. It was a joint work from a bunch of folks (James Robson, Roy Ivy III, etc). To achieve this, we also made it easier to run the GNU testsuite locally with the Rust implementation but also to ignore some tests or adjust some error messages (see build-gnu.sh and run-gnu-test.sh).
Following a suggestion of Brian G, a colleague at Mozilla (he did the same for some Firefox major change), we are now collecting the history of fail/pass/error into a separate repository and generating a daily graph showing the evolution of regression. At this date, we have, with GNU/Coreutils 9.0:
Total
611 tests
Pass
214
Skip
84
Fail
298
Error
15
We are now automatically identifying new passing tests and regressions in the CI.
For example: Warning: Congrats! The gnu test tests/chmod/c-option is now passing!
<br />Warning: Congrats! The gnu test tests/chmod/silent is now passing!
<br />Warning: Congrats! The gnu test tests/chmod/umask-x is now passing!
<br />Error: GNU test failed: tests/du/long-from-unreadable. tests/du/long-from-unreadable is passing on 'master'. Maybe you have to rebase?
[...]
<br />Warning: Changes from master: PASS +4 / FAIL +0 / ERROR -4 / SKIP +0
This is also beneficial to GNU as, by implementing some options, Michael Debertol noticed some incorrect behaviors (with sort and cat) or an uninitialized variable (with chmod).
Documentations
Every day, we are generating the user documentation and of the internal coreutils.
User documentation: https://uutils.github.io/coreutils-docs/user/ Example: ls or cp
The internal documentation can be seen on:https://uutils.github.io/coreutils-docs/dev/uucore/ For example, the backup style is documented here: https://uutils.github.io/coreutils-docs/dev/uucore/backup_control/index.html
More?
Besides my work on Debian/Ubuntu, I have also noticed that more and more operating systems are starting to look at this:
In parallel, https://github.com/uutils/findutils/, a rust dropped-in replacement for find, is getting more attention lately! Here, the graph showing the evolution of the program using the BFS testsuite (much better than GNU's).
What is next?
stty needs to be implemented
Improve the GNU compatibility on key programs and reduce the gap
Investigate how to reduce the size of the binaries
Allow Debian and Ubuntu to switch by default without tricky manipulation
How to help?
I have been maintaining a list of good first bugs for new comers in the repo!
Don't hesitate to contribute, it is much easier than it seems and a terrific way to learn Rust!
Review: I Didn't Do the Thing Today, by Madeleine Dore
Publisher:
Avery
Copyright:
2022
ISBN:
0-593-41914-6
Format:
Kindle
Pages:
291
At least from my narrow view of it, the world of productivity self-help
literature is a fascinating place right now. The pandemic overturned
normal work patterns and exacerbated schedule inequality, creating vastly
different experiences for the people whose work continued to be in-person
and the people whose work could become mostly or entirely remote.
Self-help literature, which is primarily aimed at the more affluent
white-collar class, primarily tracked the latter disruption: newly-remote
work, endless Zoom meetings, the impossibility of child care, the
breakdown of boundaries between work and home, and the dawning realization
that much of the mechanics of day-to-day office work are neither
productive nor defensible.
My primary exposure these days to the more traditional self-help
productivity literature is via Cal Newport.
The stereotype of the productivity self-help book is a collection of life
hacks and list-making techniques that will help you become a more
efficient capitalist cog, but Newport has been moving away from that dead
end for as long as I've been reading him, and his
recent work focuses more on structural issues
with the organization of knowledge work. He also shares with the newer
productivity writers a willingness to tell people to use the free time
they recover via improved efficiency on some life goal other than improved
job productivity. But he's still prickly and defensive about the
importance of personal productivity and accomplishing things. He gives
lip service on his podcast to the value of the critique of productivity,
but then usually reverts to characterizing anti-productivity arguments as
saying that productivity is a capitalist invention to control workers.
(Someone has doubtless said this on Twitter, but I've never seen a serious
critique of productivity make this simplistic of an argument.)
On the anti-productivity side, as it's commonly called, I've seen a lot of
new writing in the past couple of years that tries to break the connection
between productivity and human worth so endemic to US society. This is
not a new analysis; disabled writers have been making this point for
decades, it's present in both Keynes and in Galbraith's
The Affluent Society, and Kathi Weeks's
The Problem with Work traces some of its
history in Marxist thought. But what does feel new to me is its
widespread mainstream appearance in newspaper articles, viral blog posts,
and books such as Jenny Odell's How to Do Nothing and Devon Price's
Laziness Does Not Exist. The pushback
against defining life around productivity is having a moment.
Entering this discussion is Madeleine Dore's I Didn't Do the Thing
Today. Dore is the author of the
Extraordinary Routines blog and
host of the Routines and
Ruts podcast. Extraordinary Routines began as a survey of how various
people organize their daily lives. I Didn't Do the Thing Today is,
according to the preface, a summary of the thoughts Dore has had about her
own life and routines as a result of those interviews.
As you might guess from the subtitle (Letting Go of Productivity
Guilt), Dore's book is superficially on the anti-productivity side. Its
chapters are organized around gentle critiques of productivity concepts,
with titles like "The Hopeless Search for the Ideal Routine," "The Myth of
Balance," or "The Harsh Rules of Discipline." But I think
anti-productivity is a poor name for this critique; its writers are not
opposed to being productive, only to its position as an all-consuming
focus and guilt-generating measure of personal worth.
Dore structures most chapters by naming an aspect, goal, or concern of a
life defined by productivity, such as wasted time, ambition, busyness,
distraction, comparison, or indecision. Each chapter sketches the impact
of that idea and then attempts to gently dismantle the grip that it may
have on the reader's life. All of these discussions are nuanced; it's
rare for Dore to say that one of these aspects has no value, and she
anticipates numerous objections. But her overarching goal is to help the
reader be more comfortable with imperfection, more willing to live in the
moment, and less frustrated with the limitations of life and the human
brain. If striving for productivity is like lifting weights, Dore's
diagnosis is that we've tried too hard for too long, and have overworked
that muscle until it is cramping. This book is a gentle massage to induce
the muscle to relax and let go.
Whether this will work is, as with all self-help books, individual. I
found it was best read in small quantities, perhaps a chapter per day,
since it otherwise began feeling too much the same. I'm also not the
ideal audience; Dore is a creative freelancer and primarily interviewed
other creative people, which I think has a different sort of productivity
rhythm than the work that I do. She's also not a planner to the degree
that I am; more on that below. And yet, I found this book worked on me
anyway. I can't say that I was captivated all the way through, but I
found myself mentally relaxing while I was reading it, and I may re-read
some chapters from time to time.
How does this relate to the genre of productivity self-help? With less
conflict than I think productivity writers believe, although there seems
to be one foundational difference of perspective.
Dore is not opposed to accomplishing things, or even to systems that help
people accomplish things. She is more attuned than the typical
productivity writer to the guilt and frustration that can accumulate when
one has a day in which one does not do the thing, but her goal is not to
talk you out of attempting things. It is, instead, to convince you to
hold those attempts and goals more lightly, to allow them to move and
shift and change, and to not treat a failure to do the thing today as a
reason for guilt. This is wholly compatible with standard productivity
advice. It's adding nuance at one level of abstraction higher: how
tightly to cling to productivity goals, and what to do when they don't
work out. Cramping muscles are not strong muscles capable of lifting
heavy things. If one can massage out the cramp, one's productivity by
even the strict economic definition may improve.
Where I do see a conflict is that most productivity writers are planners,
and Dore is not. This is, I think, a significant blind spot in
productivity self-help writing. Cal Newport, for example, advocates
time-block planning, where every hour of the working day has a job.
David Allen advocates a complex set of
comprehensive lists and well-defined next actions.
Mark Forster builds a flurry of small systems
for working through lists. The standard in productivity writing is to to
add structure to your day and cultivate the self-discipline required to
stick to that structure.
For many people, including me, this largely works. I'm mostly a planner,
and when my life gets chaotic, adding more structure and focusing on that
structure helps me. But the productivity writers I've read are quite
insistent that their style of structure will work for everyone, and on
that point I am dubious. Newport, for example, advocates time-block
planning for everyone without exception, insisting that it is the best way
to structure a day. Dore, in contrast, describes spending years trying to
perfect a routine before realizing that elastic possibilities work better
for her than routines. For those who are more like Dore than Newport,
I Didn't Do the Thing Today is more likely to be helpful than
Newport's instructions. This doesn't make Newport's ideas wrong; it
simply makes them not universal, something that the productivity self-help
genre seems to have trouble acknowledging.
Even for readers like myself who prefer structure, I Didn't Do the
Thing Today is a valuable corrective to the emphasis on every-better
systems. For those who never got along with too much structure, I think
it may strike a chord. The standard self-help caveat still applies: Dore
has the most to say to people who are in a similar social class and line
of work as her. I'm not sure this book will be of much help to someone
who has to juggle two jobs with shift work and child care, where the
problem is more sharp external constraints than internalized productivity
guilt. But for its target audience, I think it's a valuable, calming
message. Dore doesn't have a recipe to sort out your life, but may help
you feel better about the merits of life unsorted.
Rating: 7 out of 10
This is a program visualization tool aimed at concurrent programs
and related issues. The tool itself is mostly language agnostic, and
relies on Storm to compile the provided code and provide basic debug
information. The generated code is then inspected and instrumented
to provide an experience similar to a basic debugger. The tool
emphasizes a visual representation of the object hierarchy that is
manipulated by the executed program to make it easy to understand
how it looks. In particular, a visual representation is beneficial
over a text representation since it makes it easier to find shared
data that might need to be synchronized in a concurrent program.
As mentioned, the tool is aimed at concurrent programs. Therefore,
it allows spawning multiple threads running the same program to see
if that affects the program s execution (this is mostly interesting
if global variables are used). Furthermore, any spawned threads also
appear in the tool, and the user may control them independently to
explore possible race conditions or other synchronization errors. If
enabled from the menu bar, the tool keeps track of reads and writes
to the data structure in order to highlight basic race conditions in
addition to deadlocks.
So, what is this Storm thing? Filip promptly informed me that
Progvis is not just a pedagogical tool Or rather, that it is part
of something bigger. Progvis is a program built using the Storm
programming language platform is more than a
compiler; it presents as a framework for creating languages,
designed to make easy to implement languages that can be extended
with new syntax and semantics. Storm is much more than what I have
explored, and can be used as an interactive compiler, a language
server used as a service for highlighting and completing in IDEs. But
I won t dig much more into Storm (which is, of course, now also
available in Debian as
well as the libraries built from the same source).
Back to progvis: It implements a very-close-to-C++ language, with some
details to better suit its purpose (i.e. instead of using the usual
pthread implementation, an own thread model is used; i.e. thread
creation is handled via int thread_id = thread_name(funcname,
¶ms) instead of the more complex
pthread_create()
function (including details such as the thread object being passed as
by reference as a parameter)
All in all, while I have not yet taken full advantage of this tool in
my teaching, it has helped me show somewhat hard to grasp concepts
such as:
Understanding pointers and indirection
How strings are handled
Heap allocation vs. stack allocation
Shared access to global data
All in all, a great tool. I hope you find it useful and enjoyable as well!
PS- I suggest you to install the progvis-examples package to get
started. You will find some dozens of sample programs in
/usr/share/doc/progvis-examples/examples; playing with them will
help you better understand the tool and be able to better write your
own programs.
A friend recently reminded me of the existence of chrony, a
"versatile implementation of the Network Time Protocol (NTP)". The
excellent introduction is worth quoting in full:
It can synchronise the system clock with NTP servers, reference
clocks (e.g. GPS receiver), and manual input using wristwatch and
keyboard. It can also operate as an NTPv4 (RFC 5905) server and peer
to provide a time service to other computers in the network.
It is designed to perform well in a wide range of conditions,
including intermittent network connections, heavily congested
networks, changing temperatures (ordinary computer clocks are
sensitive to temperature), and systems that do not run continuosly,
or run on a virtual machine.
Typical accuracy between two machines synchronised over the Internet
is within a few milliseconds; on a LAN, accuracy is typically in
tens of microseconds. With hardware timestamping, or a hardware
reference clock, sub-microsecond accuracy may be possible.
Now that's already great documentation right there. What it is, why
it's good, and what to expect from it. I want more. They have a very
handy comparison table between chrony, ntp and
openntpd.
My problem with OpenNTPd
Following concerns surrounding the security (and complexity) of the
venerable ntp program, I have, a long time ago, switched to using
openntpd on all my computers. I hadn't thought about it until I
recently noticed a lot of noise on one of my servers:
jan 18 10:09:49 curie ntpd[1069]: adjusting local clock by -1.604366s
jan 18 10:08:18 curie ntpd[1069]: adjusting local clock by -1.577608s
jan 18 10:05:02 curie ntpd[1069]: adjusting local clock by -1.574683s
jan 18 10:04:00 curie ntpd[1069]: adjusting local clock by -1.573240s
jan 18 10:02:26 curie ntpd[1069]: adjusting local clock by -1.569592s
You read that right, openntpd was constantly rewinding the clock,
sometimes in less than two minutes. The above log was taken while
doing diagnostics, looking at the last 30 minutes of logs. So, on
average, one 1.5 seconds rewind per 6 minutes!
That might be due to a dying real time clock (RTC) or some other
hardware problem. I know for a fact that the CMOS battery on that
computer (curie) died and I wasn't able to replace
it (!). So that's partly garbage-in, garbage-out here. But still, I
was curious to see how chrony would behave... (Spoiler: much better.)
But I also had trouble on another workstation, that one a much more
recent machine (angela). First, it seems OpenNTPd
would just fail at boot time:
anarcat@angela:~(main)$ sudo systemctl status openntpd
openntpd.service - OpenNTPd Network Time Protocol
Loaded: loaded (/lib/systemd/system/openntpd.service; enabled; vendor pres>
Active: inactive (dead) since Sun 2022-01-23 09:54:03 EST; 6h ago
Docs: man:openntpd(8)
Process: 3291 ExecStartPre=/usr/sbin/ntpd -n $DAEMON_OPTS (code=exited, sta>
Process: 3294 ExecStart=/usr/sbin/ntpd $DAEMON_OPTS (code=exited, status=0/>
Main PID: 3298 (code=exited, status=0/SUCCESS)
CPU: 34ms
jan 23 09:54:03 angela systemd[1]: Starting OpenNTPd Network Time Protocol...
jan 23 09:54:03 angela ntpd[3291]: configuration OK
jan 23 09:54:03 angela ntpd[3297]: ntp engine ready
jan 23 09:54:03 angela ntpd[3297]: ntp: recvfrom: Permission denied
jan 23 09:54:03 angela ntpd[3294]: Terminating
jan 23 09:54:03 angela systemd[1]: Started OpenNTPd Network Time Protocol.
jan 23 09:54:03 angela systemd[1]: openntpd.service: Succeeded.
After a restart, somehow it worked, but it took a long time to sync
the clock. At first, it would just not consider any peer at all:
anarcat@angela:~(main)$ sudo ntpctl -s all
0/20 peers valid, clock unsynced
peer
wt tl st next poll offset delay jitter
159.203.8.72 from pool 0.debian.pool.ntp.org
1 5 2 6s 6s ---- peer not valid ----
138.197.135.239 from pool 0.debian.pool.ntp.org
1 5 2 6s 7s ---- peer not valid ----
216.197.156.83 from pool 0.debian.pool.ntp.org
1 4 1 2s 9s ---- peer not valid ----
142.114.187.107 from pool 0.debian.pool.ntp.org
1 5 2 5s 6s ---- peer not valid ----
216.6.2.70 from pool 1.debian.pool.ntp.org
1 4 2 2s 8s ---- peer not valid ----
207.34.49.172 from pool 1.debian.pool.ntp.org
1 4 2 0s 5s ---- peer not valid ----
198.27.76.102 from pool 1.debian.pool.ntp.org
1 5 2 5s 5s ---- peer not valid ----
158.69.254.196 from pool 1.debian.pool.ntp.org
1 4 3 1s 6s ---- peer not valid ----
149.56.121.16 from pool 2.debian.pool.ntp.org
1 4 2 5s 9s ---- peer not valid ----
162.159.200.123 from pool 2.debian.pool.ntp.org
1 4 3 1s 6s ---- peer not valid ----
206.108.0.131 from pool 2.debian.pool.ntp.org
1 4 1 6s 9s ---- peer not valid ----
205.206.70.40 from pool 2.debian.pool.ntp.org
1 5 2 8s 9s ---- peer not valid ----
2001:678:8::123 from pool 2.debian.pool.ntp.org
1 4 2 5s 9s ---- peer not valid ----
2606:4700:f1::1 from pool 2.debian.pool.ntp.org
1 4 3 2s 6s ---- peer not valid ----
2607:5300:205:200::1991 from pool 2.debian.pool.ntp.org
1 4 2 5s 9s ---- peer not valid ----
2607:5300:201:3100::345c from pool 2.debian.pool.ntp.org
1 4 4 1s 6s ---- peer not valid ----
209.115.181.110 from pool 3.debian.pool.ntp.org
1 5 2 5s 6s ---- peer not valid ----
205.206.70.42 from pool 3.debian.pool.ntp.org
1 4 2 0s 6s ---- peer not valid ----
68.69.221.61 from pool 3.debian.pool.ntp.org
1 4 1 2s 9s ---- peer not valid ----
162.159.200.1 from pool 3.debian.pool.ntp.org
1 4 3 4s 7s ---- peer not valid ----
Then it would accept them, but still wouldn't sync the clock:
anarcat@angela:~(main)$ sudo ntpctl -s all
20/20 peers valid, clock unsynced
peer
wt tl st next poll offset delay jitter
159.203.8.72 from pool 0.debian.pool.ntp.org
1 8 2 5s 6s 0.672ms 13.507ms 0.442ms
138.197.135.239 from pool 0.debian.pool.ntp.org
1 7 2 4s 8s 1.260ms 13.388ms 0.494ms
216.197.156.83 from pool 0.debian.pool.ntp.org
1 7 1 3s 5s -0.390ms 47.641ms 1.537ms
142.114.187.107 from pool 0.debian.pool.ntp.org
1 7 2 1s 6s -0.573ms 15.012ms 1.845ms
216.6.2.70 from pool 1.debian.pool.ntp.org
1 7 2 3s 8s -0.178ms 21.691ms 1.807ms
207.34.49.172 from pool 1.debian.pool.ntp.org
1 7 2 4s 8s -5.742ms 70.040ms 1.656ms
198.27.76.102 from pool 1.debian.pool.ntp.org
1 7 2 0s 7s 0.170ms 21.035ms 1.914ms
158.69.254.196 from pool 1.debian.pool.ntp.org
1 7 3 5s 8s -2.626ms 20.862ms 2.032ms
149.56.121.16 from pool 2.debian.pool.ntp.org
1 7 2 6s 8s 0.123ms 20.758ms 2.248ms
162.159.200.123 from pool 2.debian.pool.ntp.org
1 8 3 4s 5s 2.043ms 14.138ms 1.675ms
206.108.0.131 from pool 2.debian.pool.ntp.org
1 6 1 0s 7s -0.027ms 14.189ms 2.206ms
205.206.70.40 from pool 2.debian.pool.ntp.org
1 7 2 1s 5s -1.777ms 53.459ms 1.865ms
2001:678:8::123 from pool 2.debian.pool.ntp.org
1 6 2 1s 8s 0.195ms 14.572ms 2.624ms
2606:4700:f1::1 from pool 2.debian.pool.ntp.org
1 7 3 6s 9s 2.068ms 14.102ms 1.767ms
2607:5300:205:200::1991 from pool 2.debian.pool.ntp.org
1 6 2 4s 9s 0.254ms 21.471ms 2.120ms
2607:5300:201:3100::345c from pool 2.debian.pool.ntp.org
1 7 4 5s 9s -1.706ms 21.030ms 1.849ms
209.115.181.110 from pool 3.debian.pool.ntp.org
1 7 2 0s 7s 8.907ms 75.070ms 2.095ms
205.206.70.42 from pool 3.debian.pool.ntp.org
1 7 2 6s 9s -1.729ms 53.823ms 2.193ms
68.69.221.61 from pool 3.debian.pool.ntp.org
1 7 1 1s 7s -1.265ms 46.355ms 4.171ms
162.159.200.1 from pool 3.debian.pool.ntp.org
1 7 3 4s 8s 1.732ms 35.792ms 2.228ms
It took a solid five minutes to sync the clock, even though the
peers were considered valid within a few seconds:
jan 23 15:58:41 angela systemd[1]: Started OpenNTPd Network Time Protocol.
jan 23 15:58:58 angela ntpd[84086]: peer 142.114.187.107 now valid
jan 23 15:58:58 angela ntpd[84086]: peer 198.27.76.102 now valid
jan 23 15:58:58 angela ntpd[84086]: peer 207.34.49.172 now valid
jan 23 15:58:58 angela ntpd[84086]: peer 209.115.181.110 now valid
jan 23 15:58:59 angela ntpd[84086]: peer 159.203.8.72 now valid
jan 23 15:58:59 angela ntpd[84086]: peer 138.197.135.239 now valid
jan 23 15:58:59 angela ntpd[84086]: peer 162.159.200.123 now valid
jan 23 15:58:59 angela ntpd[84086]: peer 2607:5300:201:3100::345c now valid
jan 23 15:59:00 angela ntpd[84086]: peer 2606:4700:f1::1 now valid
jan 23 15:59:00 angela ntpd[84086]: peer 158.69.254.196 now valid
jan 23 15:59:01 angela ntpd[84086]: peer 216.6.2.70 now valid
jan 23 15:59:01 angela ntpd[84086]: peer 68.69.221.61 now valid
jan 23 15:59:01 angela ntpd[84086]: peer 205.206.70.40 now valid
jan 23 15:59:01 angela ntpd[84086]: peer 205.206.70.42 now valid
jan 23 15:59:02 angela ntpd[84086]: peer 162.159.200.1 now valid
jan 23 15:59:04 angela ntpd[84086]: peer 216.197.156.83 now valid
jan 23 15:59:05 angela ntpd[84086]: peer 206.108.0.131 now valid
jan 23 15:59:05 angela ntpd[84086]: peer 2001:678:8::123 now valid
jan 23 15:59:05 angela ntpd[84086]: peer 149.56.121.16 now valid
jan 23 15:59:07 angela ntpd[84086]: peer 2607:5300:205:200::1991 now valid
jan 23 16:03:47 angela ntpd[84086]: clock is now synced
That seems kind of odd. It was also frustrating to have very little
information from ntpctl about the state of the daemon. I understand
it's designed to be minimal, but it could inform me on his known
offset, for example. It does tell me about the offset with the
different peers, but not as clearly as one would expect. It's also
unclear how it disciplines the RTC at all.
Compared to chrony
Now compare with chrony:
jan 23 16:07:16 angela systemd[1]: Starting chrony, an NTP client/server...
jan 23 16:07:16 angela chronyd[87765]: chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
jan 23 16:07:16 angela chronyd[87765]: Initial frequency 3.814 ppm
jan 23 16:07:16 angela chronyd[87765]: Using right/UTC timezone to obtain leap second data
jan 23 16:07:16 angela chronyd[87765]: Loaded seccomp filter
jan 23 16:07:16 angela systemd[1]: Started chrony, an NTP client/server.
jan 23 16:07:21 angela chronyd[87765]: Selected source 206.108.0.131 (2.debian.pool.ntp.org)
jan 23 16:07:21 angela chronyd[87765]: System clock TAI offset set to 37 seconds
First, you'll notice there's none of that "clock synced" nonsense, it
picks a source, and then... it's just done. Because the clock on this
computer is not drifting that much, and openntpd had (presumably) just
sync'd it anyways. And indeed, if we look at detailed stats from the
powerful chronyc client:
anarcat@angela:~(main)$ sudo chronyc tracking
Reference ID : CE6C0083 (ntp1.torix.ca)
Stratum : 2
Ref time (UTC) : Sun Jan 23 21:07:21 2022
System time : 0.000000311 seconds slow of NTP time
Last offset : +0.000807989 seconds
RMS offset : 0.000807989 seconds
Frequency : 3.814 ppm fast
Residual freq : -24.434 ppm
Skew : 1000000.000 ppm
Root delay : 0.013200894 seconds
Root dispersion : 65.357254028 seconds
Update interval : 1.4 seconds
Leap status : Normal
We see that we are nanoseconds away from NTP time. That was ran very
quickly after starting the server (literally in the same second as
chrony picked a source), so stats are a bit weird (e.g. the Skew is
huge). After a minute or two, it looks more reasonable:
Reference ID : CE6C0083 (ntp1.torix.ca)
Stratum : 2
Ref time (UTC) : Sun Jan 23 21:09:32 2022
System time : 0.000487002 seconds slow of NTP time
Last offset : -0.000332960 seconds
RMS offset : 0.000751204 seconds
Frequency : 3.536 ppm fast
Residual freq : +0.016 ppm
Skew : 3.707 ppm
Root delay : 0.013363549 seconds
Root dispersion : 0.000324015 seconds
Update interval : 65.0 seconds
Leap status : Normal
Now it's learning how good or bad the RTC clock is ("Frequency"), and
is smoothly adjusting the System time to follow the average offset
(RMS offset, more or less). You'll also notice the Update interval
has risen, and will keep expanding as chrony learns more about the
internal clock, so it doesn't need to constantly poll the NTP servers
to sync the clock. In the above, we're 487 micro seconds (less than a
milisecond!) away from NTP time.
(People interested in the explanation of every single one of those
fields can read the excellent chronyc manpage. That thing made me
want to nerd out on NTP again!)
On the machine with the bad clock, chrony also did a 1.5 second
adjustment, but just once, at startup:
jan 18 11:54:33 curie chronyd[2148399]: Selected source 206.108.0.133 (2.debian.pool.ntp.org)
jan 18 11:54:33 curie chronyd[2148399]: System clock wrong by -1.606546 seconds
jan 18 11:54:31 curie chronyd[2148399]: System clock was stepped by -1.606546 seconds
jan 18 11:54:31 curie chronyd[2148399]: System clock TAI offset set to 37 seconds
Then it would still struggle to keep the clock in sync, but not as
badly as openntpd. Here's the offset a few minutes after that above
startup:
System time : 0.000375352 seconds slow of NTP time
And again a few seconds later:
System time : 0.001793046 seconds slow of NTP time
I don't currently have access to that machine, and will update this
post with the latest status, but so far I've had a very good
experience with chrony on that machine, which is a testament to its
resilience, and it also just works on my other machines as well.
Extras
On top of "just working" (as demonstrated above), I feel that
chrony's feature set is so much superior... Here's an excerpt of the
extras in chrony, taken from the comparison table:
source frequency tracking
source state restore from file
temperature compensation
ready for next NTP era (year 2036)
replace unreachable / falseticker servers
aware of jitter
RTC drift tracking
RTC trimming
Restore time from file w/o RTC
leap seconds correction, in slew mode
drops root privileges
I even understand some of that stuff. I think.
So kudos to the chrony folks, I'm switching.
Caveats
One thing to keep in mind in the above, however is that it's quite
possible chrony does as bad of a job as openntpd on that old
machine, and just doesn't tell me about it. For example, here's
another log sample from another server
(marcos):
jan 23 11:13:25 marcos ntpd[1976694]: adjusting clock frequency by 0.451035 to -16.420273ppm
I get those basically every day, which seems to show that it's at
least trying to keep track of the hardware clock.
In other words, it's quite possible I have no idea what I'm talking
about and you definitely need to take this article with a grain of
salt. I'm not an NTP expert.
Update: I should also mentioned that I haven't evaluated
systemd-timesyncd, for a few reasons:
I have enough things running under systemd
I wasn't aware of it when I started writing this
I couldn't find good documentation on it... later I found the
above manpage and of course the Arch Wiki but that is very
minimal
therefore I can't tell how it compares with chrony or (open)ntpd,
so I don't see an enticing reason to switch
It has a few things going for it though:
it's likely shipped with your distribution already
it drops privileges (possibly like chrony, unclear if it also has
seccomp filters)
it's minimalist: it only does SNTP so not the server side
the status command is good enough that you can tell the clock
frequency, precision, and so on (especially when compared to
openntpd's ntpctl)
So I'm reserving judgement over it, but I'd certainly note that I'm
always a little weary in trusting systemd daemons with the network,
and would prefer to keep that attack surface to a minimum. Diversity
is a good thing, in general, so I'll keep chrony for now.
It would certainly nice to see it added to chrony's comparison table.
Switching to chrony
Because the default configuration in chrony (at least as shipped in
Debian) is sane (good default peers, no open network by default),
installing it is as simple as:
apt install chrony
And because it somehow conflicts with openntpd, that also takes care
of removing that cruft as well.
Update: Debian defaults
So it seems like I managed to write this entire blog post without
putting it in relation with the original reason I had to think about
this in the first place, which is odd and should be corrected.
This conversation came about on an IRC channel that mentioned that the
ntp package (and upstream) is in bad shape in Debian. In that
discussion, chrony and ntpsec were discussed as possible replacements,
but when we had the discussion on chat, I mentioned I was using
openntpd, and promptly realized I was actually unhappy with it. A
friend suggested chrony, I tried it, and it worked amazingly, I
switched, wrote this blog post, end of story.
Except today (2022-02-07, two weeks later), I actually read that
thread and realized that something happened in Debian I wasn't
actually aware of. In bookworm, systemd-timesyncd was not only
shipped, but it was installed by default, as it was marked as a hard
dependency of systemd. That was "fixed" in systemd-247.9-2 (see
bug 986651), but only by making the dependency a Recommendsand marking it as Priority: important.
So in effect, systemd-timesyncd became the default NTP daemon in
Debian in bookworm, which I find somewhat surprising. timesyncd has
many things going for it (as mentioned above), but I do find it a bit
annoying that systemd is replacing all those utilities in such a
way. I also wonder what is going to happen on upgrades. This is all a
little frustrating too because there is no good comparison between the
other NTP daemons and timesyncd anywhere. The chrony comparison
table doesn't mention it, and an audit by the Core Infrastructure
Initiative from 2017 doesn't mention it either, even though
timesyncd was announced in 2014. (Same with this blog post from Facebook.)
I have a home server.
Initially conceived and sized so I could digitize my (rather sizeable)
DVD collection, I started using it for other things; I added a few play
VMs on it, started using it as a destination for the
deja-dup-based backups of my
laptop and the time machine-based ones of the various macs in the house,
and used it as the primary location of all the photos I've taken with my
cameras over the years (currently taking up somewhere around 500G) as
well as those that were taking at our wedding (another 100G). To add to
that, I've copied the data that my wife had on various older laptops and
external hard drives onto this home server as well, so that we don't
lose the data should something happen to one or more of these bits of
older hardware.
Needless to say, the server was running full, so a few months ago I
replaced the 4x2T hard drives that I originally put in the server with
4x6T
ones,
and there was much rejoicing.
But then I started considering what I was doing. Originally, the intent
was for the server to contain DVD rips of my collection; if I were to
lose the server, I could always re-rip the collection and recover that
way (unless something happened that caused me to lose both at the same
time, of course, but I consider that sufficiently unlikely that I don't
want to worry about it). Much of the new data on the server, however,
cannot be recovered like that; if the server dies, I lose my photos
forever, with no way of recovering them. Obviously that can't be okay.
So I started looking at options to create backups of my data, preferably
in ways that make it easily doable for me to automate the backups --
because backups that have to be initiated are backups that will be
forgotten, and backups that are forgotten are backups that don't exist.
So let's not try that.
When I was still self-employed in Belgium and running a consultancy
business, I sold a number of lower-end tape
libraries for which I then
configured bacula, and I preferred a solution
that would be similar to that without costing an arm and a leg. I did
have a look at a few second-hand tape libraries, but even second hand
these are still way outside what I can budget for this kind of thing, so
that was out too.
After looking at a few solutions that seemed very hackish and would
require quite a bit of handholding (which I don't think is a good idea),
I remembered that a few years ago, I had a look at the Amazon Storage
Gateway for a customer. This gateway provides a virtual tape library
with 10 drives and 3200 slots (half of which are import/export slots)
over iSCSI. The idea is that you install the VM on a local machine, you
connect it to your Amazon account, you connect your backup software to
it over iSCSI, and then it syncs the data that you write to Amazon S3,
with the ability to archive data to S3 Glacier or S3 Glacier Deep
Archive. I didn't end up using it at the time because it required a
VMWare virtualization infrastructure (which I'm not interested in), but
I found out that these days, they also provide VM images for Linux
KVM-based virtual machines (amongst others), so that changes things
significantly.
After making a few calculations, I figured out
that for the amount of data that I would need to back up, I would
require a monthly budget of somewhere between 10 and 20 USD if the bulk
of the data would be on S3 Glacier Deep Archive. This is well within my
means, so I gave it a try.
The VM's technical requirements state that you need to assign four vCPUs
and 16GiB of RAM, which just so happens to be the exact amount of RAM
and CPU that my physical home server has. Obviously we can't do that. I
tried getting away with 4GiB and 2 vCPUs, but that didn't work; the
backup failed out after about 500G out of 2T had been written, due to
the VM running out of resources. On the VM's console I found complaints
that it required more memory, and I saw it mention something in the
vicinity of 7GiB instead, so I decided to try again, this time with 8GiB
of RAM rather than 4. This worked, and the backup was successful.
As far as bacula is concerned, the tape library is just a (very big...)
normal tape library, and I got data throughput of about 30M/s while the
VM's upload buffer hadn't run full yet, with things slowing down to
pretty much my Internet line speed when it had. With those speeds,
Bacula finished the backup successfully in "1 day 6 hours 43 mins 45
secs", although the storage gateway was still uploading things to S3
Glacier for a few hours after that.
All in all, this seems like a viable backup solution for large(r)
amounts of data, although I haven't yet tried to perform a restore.
The Rcpp team is thrilled to share the news of the newest release 1.0.8 of Rcpp which hit CRAN today, and has already been uploaded to Debian as well. Windows and macOS builds should appear at CRAN in the next few days. This release continues with the six-months cycle started with release 1.0.5 in July 2020. As a reminder, interim dev or rc releases will alwasys be available in the Rcpp drat repo; this cycle there were once again seven (!!) times two as we also tested the modified header (more below). These rolling release tend to work just as well, and are also fully tested against all reverse-dependencies.
Rcpp has become the most popular way of enhancing R with C or C++ code. Right now, around 2478 packages on CRAN depend on Rcpp for making analytical code go faster and further, along with 242 in BioConductor.
This release finally brings a change we have worked on quite a bit over the last few months. The idea of enforcing the setting of STRICT_R_HEADERS was prososed years ago in 2016 and again in 2018. But making such a chance against a widely-deployed code base has repurcussions, and we were not ready then. Last April, this was revisited in issue #1158. Over the course of numerous lengthy runs of tests of a changed Rcpp package against (essentially) all reverse-dependencies (i.e. packages which use Rcpp) we identified ninetyfour packages in total which needed a change. We provided either a patch we emailed, or a GitHub pull request, to all ninetyfour. And we are happy to say that eighty cases were resolved via a new CRAN upload, with a seven more having merged the pull request but not yet uploaded.
Hence, we could make the case to CRAN (who were always CC ed on the monthly nag emails we sent to maintainers of packages needing a change) that an upload was warranted. And after a brief period for their checks and inspection, our January 11 release of Rcpp 1.0.8 arrived on CRAN on January 13.
So with that, a big and heartfelt Thank You! to all eighty maintainers for updating their packages to permit this change at the Rcpp end, to CRAN for the extra checking, and to everybody else who I bugged with the numerous emails and updated to the seemingly never-ending issue #1158. We all got this done, and that is a Good Thing (TM).
Other than the aforementioned change which will not automatically set STRICT_R_HEADERS (unless opted out which one can), a number of nice pull request by a number of contributors are included in this release:
I aki generalized use of finalizers for external pointers in #1180
Kevin ensured include paths are always quoted in #1189
Dirk added new headers to allow a more fine-grained choice of Rcpp feature for faster builds in #1191
Travers Ching extended the function signature generator to allow for a default R argument in #1184 and #1187
Dirk extended documentation, removed old example code, updated references and refreshed CI setup in several PRs (see below)
The full list of details follows.
Changes in Rcpp release version 1.0.8 (2022-01-11)
Changes in Rcpp API:
STRICT_R_HEADERS is now enabled by default, see extensive discussion in #1158 closing #898.
A new #define allows default setting of finalizer calls for external pointers (I aki in #1180 closing #1108).
Rcpp:::CxxFlags() now quotes the include path generated, (Kevin in #1189 closing #1188).
New header files Rcpp/Light, Rcpp/Lighter, Rcpp/Lightest and default Rcpp/Rcpp for fine-grained access to features (and compilation time) (Dirk #1191 addressing #1168).
Changes in Rcpp Attributes:
A new option signature allows customization of function signatures (Travers Ching in #1184 and #1187 fixing #1182)
Changes in Rcpp Documentation:
The Rcpp FAQ has a new entry on how not to grow a vector (Dirk in #1167).
Some long-spurious calls to RNGSope have been removed from examples (Dirk in #1173 closing #1172).
DOI reference in the bibtex files have been updated per JSS request (Dirk in #1186).
Changes in Rcpp Deployment:
Some continuous integration components have been updated (Dirk in #1174, #1181, and #1190).
Updates
24.01.2022:
What I love about the community is the playful creativity that inspires a game like Wordle and that in turn inspires others to create fun tools around it:
Robert Reichel has reverse engineered the Wordle application, so in case you want to play tomorrow's word today .. you can. Or have that one guess "Genius" solution experience.
JP Fosterson created a Wordle helper that is very much the Python version of my grep-foo above. In case you play regularly and can use a hand.
And Tom Lockwood wrote a Wordle solver also in Python. He blogged about it and ... is pondering to rewrite things in Rust:
I ve decided to explore Rust for this, and so far what was taking 1GB of RAM in Python is taking, literally 1MB in Rust!
Welcome to 2022.
01.02.2022:
OMG. Wordle has been bought by the New York Times for "for a price in the low seven figures" (Source).
Joey Rees-Hill put it well in The Death of Wordle:
Today s Web is dominated by platforms. The average Web user will spend most of their time on large platforms such as Instagram, Facebook, Twitter, TikTok, Google Drive/Docs, YouTube, Netflix, Spotify, Gmail, and Google Calendar, along with sites operated by large publishers such as The New York Times or The Washington Post. [..]
The Web wasn t always this way. I m not old enough to remember this, but things weren t always so centralized. Web users might run their own small website, and certainly would visit a good variety of smaller sites. With the increasing availability of internet access, the Web has become incredibly commercialized, with a handful of companies concentrating Web activity on their own properties.
Wordle was a small site that gained popularity despite not being part of a corporate platform. It was wonderful to see an independent site gain attention for being simple and fun. Wordle was refreshingly free of attention-manipulating dark patterns and pushy monetization. That s why it s a shame to see it absorbed, to inevitably become just another feature of one large media company s portfolio.
Still kudos to Josh Wardle, a Million Pounds for Wordle. Well done!
It was fun while it lasted. Let's see what the next Wordle will be. This one has just been absorbed into the borg collective.
After a hiatus of 6 years, it was nice to be back with the ThinkPad. This blog post briefly touches upon my impressions with the current generation ThinkPad T14 Gen2 AMD variant.
ThinkPad T14 Gen2 AMD
Lenovo
It took 8 weeks to get my hands on the machine. Given the pandemic, restrictions and uncertainities, not sure if I should call it an ontime delivery. This was a CTO - Customise-to-order; so was nice to get rid of things I really didn t care/use much. On the other side, it also meant I could save on some power. It also came comparatively cheaper overall.
No fingerprint reader
No Touch screen
There s still parts where Lenovo could improve. Or less frustate a customer. I don t understand why a company would provide a full customization option on their portal, while at the same time, not provide an explicit option to choose the make/model of the hardware one wants. Lenovo deliberately chooses to not show/specify which WiFi adapter one could choose. So, as I suspected, I ended up with a MEDIATEK Corp. Device 7961 wifi adapter.
AMD
For the first time in my computing life, I m now using AMD at the core. I was pretty frustrated with annoying Intel Graphics bugs, so decided to take the plunge and give AMD/ATI a shot, knowing that the radeon driver does have decent support. So far, on the graphics side of things, I m glad that things look bright. The stock in-kernel radeon driver has been working perfect for my needs and I haven t had to tinker even once so far, in my 30 days of use.
On the overall system performance, I have not done any benchmarks nor do I want to do. But wholly, the system performance is smooth.
Power/Thermal
This is where things need more improvement on the AMD side. This AMD laptop terribly draws a lot of power in suspend mode. And it isn t just this machine, but also the previous T14 Gen1 which has similar problems. I m not sure if this is a generic ThinkPad problem, or an AMD specific problem. But coming from the Dell XPS 13 9370 Intel, this does draw a lot lot more power. So much, that I chose to use hibernation instead.
Similarly, on the thermal side, this machine doesn t cool down well as compared the the Dell XPS Intel one. On an idle machine, its temperature are comparatively higher. Looking at powertop reports, it does show to consume an average of 10 watts power even while idle.
I m hoping these are Linux ingeration issues and that Lenovo/AMD will improve things in the coming months. But given the user feedback on the ThinkPad T14 Gen1 thread, it may just be wishful thinking.
Linux
The overall hardware support has been surprisingly decent. The MediaTek WiFi driver had some glitches but with Linux 5.15+, things have considerably improved. And I hope the trend will continue with forthcoming Linux releases. My previous device driver experience with MediaTek wasn t good but I took the plunge, considering that in the worst scenario I d have the option to swap the card.
There s a lot of marketing about Linux + Intel. But I took a jibe with Linux + AMD. There are glitches but nothing so far that has been a dealbreaker. If anything, I wish Lenovo/AMD would seriously work on the power/thermal issues.
Migration
Other than what s mentioned above, I haven t had any serious issues. I may have had some rare occassional hangs but they ve been so infrequent that I haven t spent time to investigate those.
Upon receiving the machine, my biggest requirement was how to switch my current workstation from Dell XPS to Lenovo ThinkPad. I ve been using btrfs for some time now. And over the years, built my own practise on how to structure it. Things like, provisioning [sub]volumes, based on use cases is one thing I see. Like keeping separate subvols for: cache/temporary data, copy-on-write data , swap etc. I wish these things could be simplified; either on the btrfs tooling side or some different tool on top of it.
Below is filtered list of subvols created over years, that were worthy of moving to the new machine.
rrs@priyasi:~$ cat btrfs-volume-layout
ID 550 gen 19166 top level 5 path home/foo/.cache
ID 552 gen 1522688 top level 5 path home/rrs
ID 553 gen 1522688 top level 552 path home/rrs/.cache
ID 555 gen 1426323 top level 552 path home/rrs/rrs-home/Libvirt-Images
ID 618 gen 1522672 top level 5 path var/spool/news
ID 634 gen 1522670 top level 5 path var/tmp
ID 635 gen 1522688 top level 5 path var/log
ID 639 gen 1522226 top level 5 path var/cache
ID 992 gen 1522670 top level 5 path disk-tmp
ID 1018 gen 1522688 top level 552 path home/rrs/NoBackup
ID 1196 gen 1522671 top level 5 path etc
ID 23721 gen 775692 top level 5 path swap
18:54
btrfs send/receive
This did come in handy but I sorely missed some feature. Maybe they aren t there, or are there and I didn t look close enough. Over the years, different attributes were set to different subvols. Over time I forget what feature was added where. But from a migration point of view, it d be nice to say, Take this volume and take it with all its attributes . I didn t find that functionality in send/receive.
There s get/set-property which I noticed later but by then it was late. So some sort of tooling, ideally something like btrfs migrate or somesuch would be nicer.
In the file system world, we already have nice tools to take care of similar scenarios. Like with rsync, I can request it to carry all file attributes.
Also, iirc, send/receive works only on ro volumes. So there s more work one needs to do in:
create ro vol
send
receive
don t forget to set rw property
And then somehow find out other properties set on each individual subvols and [re]apply the same on the destination
I wish this all be condensed into a sub-command.
For my own sake, for this migration, the steps used were:
user@debian:~$ for volume in sudo btrfs sub list /media/user/TOSHIBA/Migrate/ cut -d ' ' -f9 grep -v ROOTVOL grep -v etc grep -v btrbk ; do echo $volume; sud
o btrfs send /media/user/TOSHIBA/$volume sudo btrfs receive /media/user/BTRFSROOT/ ; done
Migrate/snapshot_disk-tmp
At subvol /media/user/TOSHIBA/Migrate/snapshot_disk-tmp
At subvol snapshot_disk-tmp
Migrate/snapshot-home_foo_.cache
At subvol /media/user/TOSHIBA/Migrate/snapshot-home_foo_.cache
At subvol snapshot-home_foo_.cache
Migrate/snapshot-home_rrs
At subvol /media/user/TOSHIBA/Migrate/snapshot-home_rrs
At subvol snapshot-home_rrs
Migrate/snapshot-home_rrs_.cache
At subvol /media/user/TOSHIBA/Migrate/snapshot-home_rrs_.cache
At subvol snapshot-home_rrs_.cache
ERROR: crc32 mismatch in command
Migrate/snapshot-home_rrs_rrs-home_Libvirt-Images
At subvol /media/user/TOSHIBA/Migrate/snapshot-home_rrs_rrs-home_Libvirt-Images
At subvol snapshot-home_rrs_rrs-home_Libvirt-Images
ERROR: crc32 mismatch in command
Migrate/snapshot-var_spool_news
At subvol /media/user/TOSHIBA/Migrate/snapshot-var_spool_news
At subvol snapshot-var_spool_news
Migrate/snapshot-var_lib_machines
At subvol /media/user/TOSHIBA/Migrate/snapshot-var_lib_machines
At subvol snapshot-var_lib_machines
Migrate/snapshot-var_lib_machines_DebianSidTemplate
..... snipped .....
And then, follow-up with:
user@debian:~$ for volume in sudo btrfs sub list /media/user/BTRFSROOT/ cut -d ' ' -f9 ; do echo $volume; sudo btrfs property set -ts /media/user/BTRFSROOT/$volume ro false; done
ROOTVOL
ERROR: Could not open: No such file or directory
etc
snapshot_disk-tmp
snapshot-home_foo_.cache
snapshot-home_rrs
snapshot-var_spool_news
snapshot-var_lib_machines
snapshot-var_lib_machines_DebianSidTemplate
snapshot-var_lib_machines_DebSidArmhf
snapshot-var_lib_machines_DebianJessieTemplate
snapshot-var_tmp
snapshot-var_log
snapshot-var_cache
snapshot-disk-tmp
And then finally, renaming everything to match proper:
snapper
Entirely independent of this, but indirectly related. I use snapper as my snapshotting tool. It worked perfect on my previous machine. While everything got migrated, the only thing that fell apart was snapper. It just wouldn t start/run proper. Funny thing is that I just removed the snapper configs and reinitialized with the exact same config again, and voila snapper was happy.
Conclusion
That was pretty much it. With the above and then also migrating /boot and then just chroot to install the boot loader. At some time, I d like to explore other boot options but given that that is such a non-essential task, it is low on the list.
The good part was that I booted into my new machine with my exact workstation setup as it was. All the way to the user cache and the desktop session. So it was nice on that part.
But I surely think there s room for a better migration experience here. If not directly as btrfs migrate, then maybe as an independent tool. The problem is that such a tool is going to be used once in years, so I didn t find the motivation to write one. But this surely would be a good use case for the distribution vendors.
Anna Tromedlov is a hench, which means she does boring things for terrible
people for money. Supervillains need a lot of labor to keep their bases
and criminal organizations running, and they get that labor the same way
everyone else does: through temporary agencies. Anna does spreadsheets,
preferably from home on her couch.
On-site work was terrifying and she tried to avoid it, but the lure of a
long-term contract was too strong. The Electric Eel, despite being a
creepy sleazeball, seemed to be a manageable problem. He needed some
support at a press conference, which turns out to be code for being a
diversity token in front of the camera, but all she should have to do is
stand there.
That's how Anna ends up holding the mind control device to the head of
the mayor's kid when the superheroes attack, followed shortly by being
thrown across the room by Supercollider.
Left with a complex fracture of her leg that will take months to heal, a
layoff notice and a fruit basket from Electric Eel's company, and a
vaguely menacing hospital conversation with the police (including
Supercollider in a transparent disguise) in which it's made clear to her
that she is mistaken about Supercollider's hand-print on her thigh, Anna
starts wondering just how much damage superheroes have done. The answer,
when analyzed using the framework for natural disasters, is astonishingly
high. Anna's resulting obsession with adding up the numbers leads to her
starting a blog, the Injury Report, with a growing cult following. That,
in turn, leads to a new job and a sponsor: the mysterious supervillain
Leviathan.
To review this book properly, I need to talk about Watchmen.
One of the things that makes superheroes interesting culturally is the
straightforwardness of their foundational appeal. The archetypal
superhero story is an id story: an almost pure power fantasy aimed at
teenage boys. Like other pulp mass media, they reflect the prevailing
cultural myths of the era in which they're told. World War II superheroes
are mostly all-American boy scouts who punch Nazis. 1960s superheroes are a more
complex mix of outsider misfits
with a moral code and sarcastic but earnestly ethical do-gooders. The superhero genre is
vast, with numerous reinterpretations, deconstructions, and alternate
perspectives, but its ur-story is a good versus evil struggle of
individual action, in which exceptional people use their powers for good
to defeat nefarious villains.
Watchmen was not the first internal critique of the genre, but it
was the one that everyone read in the 1980s and 1990s. It takes direct
aim at that moral binary. The superheroes in Watchmen are not
paragons of virtue (some of them are truly horrible people), and they have
just as much messy entanglement with the world as the rest of us. It was
superheroes re-imagined for the post-Vietnam, post-Watergate era, for the
end of the Cold War when we were realizing how many lies about morality we
had been told. But it still put superheroes and their struggles with
morality at the center of the story.
Hench is a superhero story for the modern neoliberal world of
reality TV and power inequality in the way that Watchmen was a
superhero story for the Iran-Contra era and the end of the Cold War.
Whether our heroes have feet of clay is no longer a question. Today, a
better question is whether the official heroes, the ones that are
celebrated as triumphs of individual achievement, are anything but clay.
Hench doesn't bother asking whether superheroes have fallen short
of their ideal; that answer is obvious. What Hench asks instead is
a question familiar to those living in a world full of televangelists,
climate denialism, manipulative advertising, and Facebook: are superheroes
anything more than a self-perpetuating scam? Has the good superheroes
supposedly do ever outweighed the collateral damage? Do they care in the
slightest about the people they're supposedly protecting? Or is the whole
system of superheroes and supervillains a performance for an audience, one
that chews up bystanders and spits them out mangled while delivering
simplistic and unquestioned official morality?
This sounds like a deeply cynical premise, but Hench is not a
cynical book. It is cynical about superheroes, which is not the
same thing. The brilliance of Walschots's approach is that Anna has a
foot in both worlds. She works for a supervillain and, over the course of
the book, gains access to real power within the world of superheroic
battles. But she's also an ordinary person with ordinary problems: not
enough money, rocky friendships, deep anger at the injustices of the world
and the way people like her are discarded, and now a disability and PTSD.
Walschots perfectly balances the tension between those worlds and
maintains that tension straight to the end of the book. From the
supervillain world, Anna draws support, resources, and a mission, but all
of the hope, true morality, and heart of this book comes from the ordinary
side.
If you had the infrastructure of a supervillain at your disposal, what
would you do with it?
Anna's answer is to treat superheroes as a destructive force like climate
change, and to do whatever she can to drive them out of the business and
thus reduce their impact on the world. The tool she uses for that is
psychological warfare: make them so miserable that they'll snap and do
something too catastrophic to be covered up. And the raw material for
that psychological warfare is data.
That's the foot in the supervillain world. In descriptions of this book,
her skills with data are often called her superpower. That's not exactly
wrong, but the reason why she gains power and respect is only partly
because of her data skills. Anna lives by the morality of the ordinary
people world: you look out for your friends, you treat your co-workers
with respect as long as they're not assholes, and you try to make life a
bit better for the people around you. When Leviathan gives her the
opportunity to put together a team, she finds people with skills she
admires, funnels work to people who are good at it, and worries about the
team dynamics. She treats the other ordinary employees of a supervillain
as people, with lives and personalities and emotions and worth. She wins
their respect.
Then she uses their combined skills to destroy superhero lives.
I was fascinated by the moral complexity in this book. Anna and her team
do villainous things by the morality of the superheroic world (and,
honestly, by the morality of most readers), including some things that
result in people's deaths. By the end of the book, one could argue that
Anna has been driven by revenge into becoming an unusual sort of
supervillain. And yet, she treats the people around her so much better
than either the heroes or the villains do. Anna is fiercely moral in all
the ordinary person ways, and that leads directly to her becoming a
villain in the superhero frame. Hench doesn't resolve that
conflict; it just leaves it on the page for the reader to ponder.
The best part about this book is that it's absurdly grabby, unpredictable,
and full of narrative momentum. Walschots's pacing kept me up past
midnight a couple of times and derailed other weekend plans so that I
could keep reading. I had no idea where the plot was going even at the
80% mark. The ending is ambiguous and a bit uncomfortable, just like the
morality throughout the book, but I liked it the more I thought about it.
One caveat, unfortunately: Hench has some very graphic descriptions
of violence and medical procedures, and there's an extended torture
sequence with some incredibly gruesome body horror that I thought went on
far too long and was unnecessary to the plot. If you're a bit squeamish
like I am, there are some places where you'll want to skim, including one
sequence that's annoyingly intermixed with important story developments.
Otherwise, though, this is a truly excellent book. It has a memorable
protagonist with a great first-person voice, an epic character arc of
empowerment and revenge, a timely take on the superhero genre that uses it
for sharp critique of neoliberal governance and reality TV morality, a
fascinatingly ambiguous and unsettled moral stance, a gripping and
unpredictable plot, and some thoroughly enjoyable
competence porn. I had put off reading it because I was worried that it
would be too cynical or dark, but apart from the unnecessary torture
scene, it's not at all. Highly recommended.
Rating: 9 out of 10
The FAI.me service for creating customized installation and cloud
images now supports a backports kernel for the stable release Debian 11
(aka bullseye). If you enable the backports option, you will currently
get kernel 5.14. This will help you if you have newer
hardware that is not support by the default kernel 5.10.
The backports option is also still available for the images when using
the old Debian 10 (buster) release.
The URL of the FAI.me service is
https://fai-project.org/FAIme/FAI.me
The histories of the 2008 financial crisis that I have read focus almost
exclusively on the United States. They also stop after the bank rescue
and TARP or, if they press on into the aftermath, focus on the resulting
damage to the US economy and the widespread pain of falling housing prices
and foreclosure. Crashed does neither, instead arguing that 2008
was a crisis of European banks as much as American banks. It extends its
history to cover the sovereign debt crisis in the eurozone, treating it as
a continuation of the same crisis in a different guise. In the process,
Tooze makes a compelling argument that one can draw a clear, if wandering,
line from the moral revulsion at the propping up of the international
banking system to Brexit and Trump.
Qualifications first, since they are important for this type of
comprehensive and, in places, surprising and counterintuitive history.
Adam Tooze is Kathryn and Shelby Cullom Davis Professor of History at
Columbia University and the director of its European Institute. His
previous books have won multiple awards, and Crashed won the Lionel
Gelber Prize for non-fiction on foreign policy. That it won a prize in
that topic, rather than history or economics, is a hint at Tooze's chosen
lens.
The first half of the book is the lead-up and response to the crisis
provoked by the collapse in value of securitized US mortgages and leading
to the failure of Lehman Brothers, the failure in all but name of AIG, and
a massive bank rescue. The financial instruments at the center of the
crisis are complex and difficult to understand, and Tooze provides only
brief explanation. This therefore may not be the best first book on the
crisis; for that, I would still recommend Bethany McClean and Joe Nocera's
All the Devils Are Here, although it's
hard to beat Michael Lewis's storytelling in The Big Short. Tooze is not interested in dwelling on a
blow-by-blow account of the crisis and initial response, and some of his
account feels perfunctory. He is instead interested in describing its
entangled global sweep.
The new detail I took from the first half of Crashed is the depth
of involvement of the European banks in what is often portrayed as a US
crisis. Tooze goes into more specifics than other accounts on the
eurodollar market, run primarily through the City of London, and the vast
dollar-denominated liabilities of European banks. When the crisis struck,
the breakdown of liquidity markets left those banks with no source of
dollar funding to repay dollar-denominated short-term loans. The scale of
dollar borrowing by European banks was vast, dwarfing the currency
reserves or trade surpluses of their home countries. An estimate from the
Bank of International Settlements put the total dollar funding needs for
European banks at more than $2 trillion.
The institution that saved the European banks was the United States
Federal Reserve. This was an act of economic self-protection, not
largesse; in the absence of dollar liquidity, the fire sale of dollar
assets by European banks in a desperate attempt to cover their loans would
have exacerbated the market crash. But it's remarkable in its extent, and
in how deeply this contradicts the later public political position that
2008 was an American recession caused by American banks. 52% of the
mortgage-backed securities purchased by the Federal Reserve in its
quantitative easing policies (popularly known as QE1, QE2, and QE3) were
sold by foreign banks. Deutsche Bank and Credit Suisse unloaded more
securities on the Fed than any American bank by a significant margin. And
when that wasn't enough, the Fed went farther and extended swap lines to
major national banks, providing them dollar liquidity that they could then
pass along to their local institutions.
In essence, in Tooze's telling, the US Federal Reserve became the reserve
bank for the entire world, preventing a currency crisis by providing
dollars to financial systems both foreign and domestic, and it did so with
a remarkable lack of scrutiny. Its swap lines avoided public review until
2010, when Bloomberg won a court fight to extract the records. That
allowed the European banks that benefited to hide the extent of their
exposure.
In Europe, the bullish CEOs of Deutsche Bank and Barclays claimed
exceptional status because they avoided taking aid from their national
governments. What the Fed data reveal is the hollowness of those
boasts. The banks might have avoided state-sponsored
recapitalization, but every major bank in the entire world was taking
liquidity assistance on a grand scale from its local central bank, and
either directly or indirectly by way of the swap lines from the Fed.
The emergency steps taken by Timothy Geithner in the Treasury Department
were nearly as dramatic as those of the Federal Reserve. Without regard
for borders, and pushing the boundary of their legal authority, they
intervened massively in the world (not just the US) economy to save the
banking and international finance system. And it worked.
One of the benefits of a good history is to turn stories about heroes and
villains into more nuanced information about motives and philosophies. I
came away from Sheila Bair's account of the
crisis furious at Geithner's protection of banks from any meaningful
consequences for their greed. Tooze's account, and analysis, agrees with
Bair in many respects, but Bair was continuing a personal fight and Tooze
has more space to put Geithner into context. That context tells an
interesting story about the shape of political economics in the 21st
century.
Tooze identifies Geithner as an institutionalist. His goal was to keep
the system running, and he was acutely aware of what would happen if it
failed. He therefore focused on the pragmatic and the practical: the
financial system was about to collapse, he did whatever was necessary to
keep it working, and that effort was successful. Fairness, fault, and
morals were treated as irrelevant.
This becomes more obvious when contrasted with the eurozone crisis, which
started with a Greek debt crisis in the wake of the recession triggered by
the 2008 crisis. Greece is tiny by the standards of the European economy,
so at first glance there is no obvious reason why its debt crisis should
have perturbed the financial system. Under normal circumstances, its
lenders should have been able to absorb such relatively modest losses.
But the immediate aftermath of the 2008 crisis was not normal
circumstances, particularly in Europe. The United States had moved
aggressively to recapitalize its banks using the threat of compensation
caps and government review of their decisions. The European Union had
not; European countries had done very little, and their banks were still
in a fragile state.
Worse, the European Central Bank had sent signals that the market
interpreted as guaranteeing the safety of all European sovereign debt
equally, even though this was explicitly ruled out by the Lisbon Treaty.
If Greece defaulted on its debt, not only would that be another shock to
already-precarious banks, it would indicate to the market that all
European debt was not equal and other countries may also be allowed to
default. As the shape of the Greek crisis became clearer, the cost of
borrowing for all of the economically weaker European countries began
rising towards unsustainable levels.
In contrast to the approach taken by the United States government, though,
Europe took a moralistic approach to the crisis. Jean-Claude Trichet,
then president of the European Central Bank, held the absolute position
that defaulting on or renegotiating the Greek debt was unthinkable and
would not be permitted, even though there was no realistic possibility
that Greece would be able to repay. He also took a conservative hard line
on the role of the ECB, arguing that it could not assist in this crisis.
(Tooze is absolutely scathing towards Trichet, who comes off in this
account as rigidly inflexible, volatile, and completely irrational.)
Germany's position, represented by Angela Merkel, was far more realistic:
Greece's debt should be renegotiated and the creditors would have to
accept losses. This is, in Tooze's account, clearly correct, and indeed
is what eventually happened. But the problem with Merkel's position was
the potential fallout. The German government was still in denial about
the health of its own banks, and political opinion, particularly in
Merkel's coalition, was strongly opposed to making German taxpayers
responsible for other people's debts. Stopping the progression of a Greek
default to a loss of confidence in other European countries would require
backstopping European sovereign debt, and Merkel was not willing to
support this.
Tooze is similarly scathing towards Merkel, but I'm not sure it's
warranted by his own account. She seemed, even in his account, boxed in
by domestic politics and the tight constraints of the European political
structure. Regardless, even after Trichet's term ended and he was
replaced by the far more pragmatic Mario Draghi, Germany and Merkel
continued to block effective action to relieve Greece's debt burden. As a
result, the crisis lurched from inadequate stopgap to inadequate stopgap,
forcing crippling austerity, deep depressions, and continued market
instability while pretending unsustainable debt would magically become
payable through sufficient tax increases and spending cuts. US officials
such as Geithner, who put morals and arguably legality aside to do
whatever was needed to save the system, were aghast.
One takeaway from this is that expansionary austerity is the single worst
macroeconomic idea that anyone has ever had.
In the summer of 2012 [the IMF's] staff revisited the forecasts they
had made in the spring of 2010 as the eurozone crisis began and
discovered that they had systematically underestimated the negative
impact of budget cuts. Whereas they had started the crisis believing
that the multiplier was on average around 0.5, they now concluded that
from 2010 forward it had been in excess of 1. This meant that cutting
government spending by 1 euro, as the austerity programs demanded,
would reduce economic activity by more than 1 euro. So the share of
the state in economic activity actually increased rather than
decreased, as the programs presupposed. It was a staggering
admission. Bad economics and faulty empirical assumptions had led the
IMF to advocate a policy that destroyed the economic prospects for a
generation of young people in Southern Europe.
Another takeaway, though, is central to Tooze's point in the final section
of the book: the institutionalists in the United States won the war on
financial collapse via massive state interventions to support banks and
the financial system, a model that Europe grudgingly had to follow when
attempting to reject it caused vast suffering while still failing to
stabilize the financial system. But both did so via actions that were
profoundly and obviously unfair, and only questionably legal. Bankers
suffered few consequences for their greed and systematic mismanagement,
taking home their normal round of bonuses while millions of people lost
their homes and unemployment rates for young men in some European
countries exceeded 50%. In Europe, the troika's political pressure
against Greece and Italy was profoundly anti-democratic.
The financial elite achieved their goal of saving the financial system.
It could have failed, that failure would have been catastrophic, and their
actions are defensible on pragmatic grounds. But they completely
abandoned the moral high ground in the process.
The political forces opposed to centrist neoliberalism attempted to step
into that moral gap. On the Left, that came in the form of mass protest
movements, Occupy Wall Street, Bernie Sanders, and parties such as Syriza
in Greece. The Left, broadly, took the moral side of debtors, holding
that the primary pain of the crisis should instead be born by the wealthy
creditors who were more able to absorb it. The Right by contrast, in the
form of the Tea Party movement inside the Republican Party in the United
States and the nationalist parties in Europe, broadly blamed debtors for
taking on excessive debt and focused their opposition on use of taxpayer
dollars to bail out investment banks and other institutions of the rich.
Tooze correctly points out that the Right's embrace of racist nationalism
and incoherent demagoguery obscures the fact that their criticism of the
elite center has real merit and is partly shared by the Left.
As Tooze sketches out, the elite centrist consensus held in most of
Europe, beating back challenges from both the Left and the Right, although
it faltered in the UK, Poland, and Hungary. In the United States, the
Democratic Party similarly solidified around neoliberalism and saw off its
challenges from the Left. The Republican Party, however, essentially
abandoned the centrist position, embracing the Right. That left the
Democratic Party as the sole remaining neoliberal institutionalist party,
supplemented by a handful of embattled Republican centrists.
Wall Street and its money swung to the Democratic Party, but it was deeply
unpopular on both the Left and the Right and this shift may have hurt them
more than helped. The Democrats, by not abandoning the center, bore the
brunt of the residual anger over the bank bailout and subsequent deep
recession. Tooze sees in that part of the explanation for Trump's
electoral victory over Hilary Clinton.
This review is already much too long, and I haven't even mentioned Tooze's
clear explanation of the centrality of treasury bonds to world finances,
or his discussions of Russian and Ukraine, China, or Brexit, all of which
I thought were excellent. This is not only an comprehensive history of
both of the crises and international politics of the time period. It is
also a thought-provoking look at how drastic of interventions are required
to keep the supposed free market working, who is left to suffer after
those interventions, and the political consequences of the choice to
prioritize the stability of a deeply inequitable and unsafe financial
system.
At least in the United States, there is now a major political party that
is likely to oppose even mundane international financial institutions, let
alone another major intervention. The neoliberal center is profoundly
weakened. But nothing has been done to untangle the international
financial system, and little has been done to reduce its risk. The world
will go into the next financial challenge still suffering from a
legitimacy crisis. Given the miserly, condescending, and dismissive
treatment of the suffering general populace after moving heaven and earth
to save the banking system, that legitimacy crisis is arguably justified,
but an uncontrolled crash of the financial system is not likely to be any
kinder to the average citizen than it is to the investment bankers.
Crashed is not the best-written book at a sentence-by-sentence
level. Tooze's prose is choppy and a bit awkward, and his paragraphs
occasionally wander away from a clear point. But the content is excellent
and thought-provoking, filling in large sections of the crisis picture
that I had not previously been aware of and making a persuasive argument
for its continuing effects on current politics. Recommended if you're not
tired of reading about financial crises.
Rating: 8 out of 10
Zinnia Gray lives in rural Ohio and is obsessed with Sleeping Beauty, even
though the fairy tale objectively sucks. That has a lot to do with having
Generalized Roseville Malady, an always-fatal progressive amyloidosis
caused by teratogenic industrial waste. No one with GRM has ever lived to
turn twenty-two. A Spindle Splintered opens on Zinnia's
twenty-first birthday.
For her birthday, her best (and only) friend Charm (Charmaine Baldwin)
throws her a party at the tower. There aren't a lot of towers in Ohio;
this one is a guard tower at an abandoned state penitentiary occasionally
used by the local teenagers, which is not quite the image one would get
from fairy tales. But Charm fills it with roses, guests wearing cheap
fairy wings, beer, and even an honest-to-god spinning wheel. At the end
of the night, Zinnia decides to prick her finger on the spindle on a whim.
Much to both of their surprise, that's enough to trigger some form of
magic in Zinnia's otherwise entirely mundane world. She doesn't fall
asleep for a thousand years, but she does get dumped into an actual
fairy-tale tower near an actual princess, just in time to prevent her from
pricking her finger.
This is, as advertised on the tin, a fractured fairy tale, but it's one
that barely introduces the Sleeping Beauty story before driving it
entirely off the rails. It's also a fractured fairy tale in which the
protagonist knows exactly what sort of story she's in, given that she
graduated early from high school and has a college degree in folk studies.
(Dying girl rule #1: move fast.) And it's one in which the fairy
tale universe still has cell reception, if not chargers, which means you
can text your best friend sarcastic commentary on your multiversal
travels. Also, cell phone pictures of the impossibly beautiful princess.
I should mention up-front that I have not watched Spider-Man: Into
the Spider-Verse (yes, I know, I'm sure it's wonderful, I just don't
watch things, basically ever), which is a quite explicit inspiration for
this story. I'm therefore not sure how obvious the story would be to
people familiar with that movie. Even with my familiarity with the
general genre of fractured fairy tales, nothing plot-wise here was all
that surprising. What carries this story is the characters and the
emotional core, particularly Zinnia's complex and sardonic feelings about
dying and the note-perfect friendship between Zinnia and Charm.
"You know it wasn't originally a spinning wheel in the story?" I
offer, because alcohol transforms me into a chatty Wikipedia page.
A Spindle Splintered is told from Zinnia's first-person
perspective, and Zinnia is great. My favorite thing about Harrow's
writing is the fierce and complex emotions of her characters. The overall
tone is lighter than The Once and Future
Witches or The Ten Thousand Doors of
January, but Harrow doesn't shy away from showing the reader Zinnia's
internal thought process about her illness (and her eye-rolling bemusement
at some of the earlier emotional stages she went through).
Dying girl rule #3 is no romance, because my entire life is one
long trolley problem and I don't want to put any more bodies on the
tracks. (I've spent enough time in therapy to know that this isn't "a
healthy attitude towards attachment," but I personally feel that
accepting my own imminent mortality is enough work without also having
a healthy attitude about it.)
There's a content warning for parents here, since Harrow spends some time
on the reaction of Zinnia's parents and the complicated dance between
hope, despair, smothering, and freedom that she and they had to go
through. There were no easy answers and all balances were fragile, but
Zinnia always finds her feet. For me, Harrow's character writing is like
emotional martial arts: rolling with punches, taking falls, clear-eyed
about the setbacks, but always finding a new point of stability to punch
back at the world. Zinnia adds just enough teenage irreverence and
impatience to blunt the hardest emotional hits. I really enjoy reading
it.
The one caution I will make about that part of the story is that the focus
is on Zinnia's projected lifespan and not on her illness specifically.
Harrow uses it as setup to dig into how she and her parents would react to
that knowledge (and I thought those parts were done well), but it's told
from the perspective of "what would you do if you knew your date of
death," not from the perspective of someone living with a disability. It
is to some extent disability as plot device, and like the fairy tale that
it's based on, it's deeply invested in the "find a cure" approach to the
problem. I'm not disabled and am not the person to ask about how well a
story handles disability, but I suspect this one may leave something to be
desired.
I thought the opening of this story is great. Zinnia is a great
first-person protagonist and the opening few chapters are overflowing with
snark and acerbic commentary. Dumping Zinnia into another world but
having text messaging still work is genius, and I kind of wish Harrow had
made that even more central to the book. The rest of the story was good
but not as good, and the ending was somewhat predictable and a bit of a
deus ex machina. But the characters carried it throughout, and I
will happily read more of this. Recommended, with the caveat about
disability and the content warning for parents.
Followed by A Mirror Mended, which I have already pre-ordered.
Rating: 8 out of 10
Review: Out of Office, by Charlie Warzel & Anne Helen Petersen
Publisher:
Alfred A. Knopf
Copyright:
2021
ISBN:
0-593-32010-7
Format:
Kindle
Pages:
260
Out of Office opens with the provocative assertion that you were
not working from home during the pandemic, even if you were among the 42%
of Americans who were able to work remotely.
You were, quite literally, doing your job from home.
But you weren't working from home. You were laboring in confinement
and under duress. Others have described it as living at work. You
were frantically tapping out an email while trying to make lunch and
supervise distance learning. You were stuck alone in a cramped
apartment for weeks, unable to see friends or family, exhausted, and
managing a level of stress you didn't know was possible. Work became
life, and life became work. You weren't thriving. You were
surviving.
The stated goal of this book is to reclaim the concept of working from
home, not only from the pandemic, but also from the boundary-destroying
metastasis of work into non-work life. It does work towards that goal,
but the description of what would be required for working from home to
live up to its promise becomes a sweeping critique of the organization and
conception of work, leaving it nearly as applicable to those who continue
working from an office. Turns out that the main problem with working from
home is the work part, not the "from home" part.
This was a fascinating book to read in conjunction with
A World Without Email. Warzel and
Petersen do the the structural and political analysis that I sometimes
wish Newport would do more of, but as a result offer less concrete advice.
Both, however, have similar diagnoses of the core problems of the sort of
modern office work that could be done from home: it's poorly organized,
poorly managed, and desperately inefficient. Rather than attempting to
fix those problems, which is difficult, structural, and requires thought
and institutional cooperation, we're compensating by working more. This
both doesn't work and isn't sustainable.
Newport has a background in productivity books and a love of systems and
protocols, so his focus in A World Without Email is on building
better systems of communication and organization of work. Warzel and
Petersen come from a background of reporting and cultural critique, so
they put more focus on power imbalances and power-serving myths about the
American dream. Where Newport sees an easy-to-deploy ad hoc work style
that isn't fit for purpose, Warzel and Petersen are more willing to point
out intentional exploitation of workers in the guise of flexibility. But
they arrive at some similar conclusions. The way office work is organized
is not leading to more productivity. Tools like Slack encourage the
public performance of apparent productivity at the cost of the attention
and focus required to do meaningful work. And the process is making us
miserable.
Out of Office is, in part, a discussion of what would be required
to do better work with less stress, but it also shares a goal with Newport
and some (but not most) corners of productivity writing: spend less time
and energy on work. The goal of Out of Office is not to get more
work done. It's to work more efficiently and sustainably and thus work
less. To reclaim the promise of flexibility so that it benefits the
employee and not the employer. To recognize, in the authors' words, that
the office can be a bully, locking people in to commute schedules and
unnatural work patterns, although it also provides valuable moments of
spontaneous human connection. Out of Office tries to envision a
style of work that includes the office sometimes, home sometimes, time
during the day to attend to personal chores or simply to take a mental
break from an unnatural eight hours (or more) of continuous focus,
universal design, real worker-centric flexibility, and an end to the
constant productivity ratchet where faster work simply means more work for
the same pay.
That's a lot of topics for a short book, and structurally this is a grab
bag. Some sections will land and some won't. Loom's video messages sound
like a nightmare to me, and I rolled my eyes heavily at the VR boosterism,
reluctant as it may be. The section on DEI (diversity, equity, and
inclusion) was a valiant effort that at least gestures towards the dismal
track record of most such efforts, but still left me unconvinced that
anyone knows how to improve diversity in an existing organization without
far more brute-force approaches than anyone with power is usually willing
to consider. But there's enough here, and the authors move through topics
quickly enough, that a section that isn't working for you will soon be
over.
And some of the sections that do work are great. For example, the whole
discussion of management.
Many of these companies view middle management as bloat, waste, what
David Graeber would call a "bullshit job." But that's because bad
management is a waste; you're paying someone more money to essentially
annoy everyone around them. And the more people experience that sort
of bad management, and think of it as "just the way it is," the less
they're going to value management in general.
I admit to a lot of confirmation bias here, since I've been ranting about
this for years, but management must be the most wide-spread professional
job for which we ignore both training and capability and assume that
anyone who can do any type of useful work can also manage people doing
that work. It's simply not true, it creates workplaces full of horrible
management, and that in turn creates a deep and unhelpful cynicism about
all management.
There is still a tendency on the left to frame this problem in terms of
class struggle, on the reasonable grounds that for decades under
"scientific management" of manufacturing that's what it was. Managers
were there to overwork workers and extract more profits for the owners,
and labor unions were there to fight back against managers. But while
some of this does happen in the sort of office work this book is focused
on, I think Warzel and Petersen correctly point to a different cause.
"The reason she was underpaid on the team was not because her boss was
cackling in the corner. It was because nobody told the boss it was
their responsibility to look at the fucking spreadsheet."
We don't train managers, we have no clear expectations for what managers
should do, we don't meaningfully measure their performance, we accept a
high-overhead and high-chaos workstyle based on ad hoc one-to-one
communication that de-emphasizes management, and many managers have never
seen good management and therefore have no idea what they're supposed to
be doing. The management problem for many office workers is less
malicious management than incompetent management, or simply no effective
management at all apart from an occasional reorg and a complicated and
mind-numbing annual review form.
The last section of this book (apart from concluding letters to bosses and
workers) is on community, and more specifically on extracting time and
energy from work (via the roadmap in previous chapters) and instead
investing it in the people around you. Much ink has been spilled about
the collapse of American civic life, about how we went from a nation of
joiners to a nation of isolated individual workers with weak and failing
community institutions. Warzel and Petersen correctly lay some blame for
this at the foot of work, and see the reorganization of work and an
increase in work from home (and thus a decrease in commutes) as an
opportunity to reverse that trend.
David Brooks recently filled in for Ezra Klein on his podcast and
talked with University of Chicago professor Leon Kass, which I listened
to shortly after reading this book. In one segment, they talked about
marriage and complained about the decline in marriage rates. They were
looking for causes in people's moral upbringing, in their life priorities,
in the lack of aspiration for permanence in kids these days, and in any
other personal or moral failing that would allow them to be smugly
judgmental. It was a truly remarkable thing to witness. Neither man at
any point in the conversation mentioned either money or time.
Back in the world most Americans live in, real wages have been stagnant
for decades, student loan debt is skyrocketing as people desperately try
to keep up with the ever-shifting requirements for a halfway-decent job,
and work has expanded to fill all hours of the day, even for people who
don't have to work multiple jobs to make ends meet. Employers have fully
embraced a "flexible" workforce via layoffs, micro-optimizing work
scheduling, eliminating benefits, relying on contract and gig labor, and
embracing exceptional levels of employee turnover. The American worker
has far less of money, time, and stability, three important foundations
for marriage and family as well as participation in most other civic
institutions. People like Brooks and Kass stubbornly cling to their
feelings of moral superiority instead of seeing a resource crisis. Work
has stolen the resources that people previously put into those other areas
of their life. And it's not even using those resources effectively.
That's, in a way, a restatement of the topic of this book. Our current
way of organizing work is not sustainable, healthy, or wise. Working from
home may be part of a strategy for changing it. The pandemic has already
heavily disrupted work, and some of those changes, including increased
working from home, seem likely to stick. That provides a narrow
opportunity to renegotiate our arrangement with work and try to make those
changes stick.
I largely agree with the analysis, but I'm pessimistic. I think the
authors are as well. We're very bad at social change, and there will be
immense pressure for everything to go "back to normal." Those in the best
bargaining position to renegotiate work for themselves are not in the
habit of sharing that renegotiation with anyone else. But I'm somewhat
heartened by how much public discussion there currently is about a more
fundamental renegotiation of the rules of office work. I'm also reminded
of a deceptively profound aphorism from economist Herbert Stein: "If
something cannot go on forever, it will stop."
This book is a bit uneven and is more of a collection of related thoughts
than a cohesive argument, but if you are hungry for more worker-centric
analyses of the dynamics of office work (inside or outside the office), I
think it's worth reading.
Rating: 7 out of 10
For those, who haven't realized, yet: MATE 1.26 has now been uploaded to Debian and should be available in Debian testing to all happy testers.
During December, me and the whole family, we had been infected with Covid-19. All of us have recovered well, by now. In fact, I was very happy about a proper fever which I haven't had in years. (Fever is a well-known form of cancer prevention / prophylaxis). Drinking a lot (of warm water!), not eating for five days, and additionally following some health practices from the natural healing context supported the recovery process really well.
The MATE 1.26 DEB package preparations had been done while sitting in bed with my hot water bottle in the back and a pot of honeyed thyme tea next to me on the window sill. Things were getting too boring while being sick, so the monotonous wrapping up of +/- 40 desktop environment DEB packages was a welcome change then (and not too complex for the reduced brain activity of mine, either).
Hope, that MATE 1.26 in Debian works well for many Debian users. I also plan to bring MATE 1.26 to bullseye-backports soon (second half of January, probably).
light+love
Mike (aka sunweaver at debian.org)
Happy solstice, and happy
Volunteer Responsibility Amnesty Day!
After my inventory of my code today, I have decided it's time to pass
on moreutils to someone new.
This project remains interesting to people, including me. People still send
patches, which are easy to deal with. Taking up basic maintenance of this
package will be easy for you, if you feel like stepping forward.
People still contribute ideas and code for new tools to add to moreutils.
But I have not added any new tools to it since 2016. There is a big
collections of ideas that I have done nothing with. The problem, I
realized, is that "general-purpose new unix tool" is rather open-ended,
and kind of problimatic. Picking new tools to add is an editorial process,
or it becomes a mishmash of too many tools that are perhaps not general
purpose. I am not a great editor, and so I tightened my requirements
for "general-purpose" and "new" so far that I stopped adding anything.
If you have ideas to solve that, or fearless good taste in curating a
collection, this project is for you.
The other reason it's less appealing to me is that unix tools as a whole
are less appealing to me now. Now, as a functional programmer, I can
get excited about actual general-purpose functional tools. And these are
well curated and collected and can be shown to fit because the math says
they do. Even a tiny Haskell function like this is really very
interesting in how something so maximally trivial is actually usable in so
many contexts.
id :: a -> a
id x = x
Anyway, I am not dropping maintenance of moreutils unless and until someone
steps up to take it on. As I said, it's easy. But I am laying down the
burden of editorial responsibility and won't be thinking about adding new
tools to it.
Thanks very much to Sumana Harihareswara for developing and promoting
the amnesty day idea!
A new maintenance RcppSMC release 0.2.6 arrived at CRAN yesterday. It chiefly updates the code to comply with g++-11 which default to C++17 which brings us std::data(). And if one is not careful, as we weren t in three files, this can clash with other uses of data as I tweeted a good week ago. Otherwise some JSS URLs now sport the preferred shorter doi form.
RcppSMC provides Rcpp-based bindings to R for the Sequential Monte Carlo Template Classes (SMCTC) by Adam Johansen described in his JSS article. Sequential Monte Carlo is also referred to as Particle Filter in some contexts. The package features the Google Summer of Code work by Leah South in 2017, and by Ilya Zarubin in 2021.
This release is summarized below.
Changes in RcppSMC version 0.2.6 (2021-12-17)
Updated URLs to JSS for the new DOI scheme upon their request
Adjusted three source files for C++17 compilation under g++-11
The first time I applied for grad school it was a bit of a lark. I was serious about it, I wanted to go, I had goals, and I am happy to be here now. However, it was a little fun. I took a white paper and crisped it up with the help of some friends who read it and provided comments. I wrote a personal statement, got some letters of recommendation, and generally felt pretty good about the process. It wasn t stressful.
The second time I applied to grad school it was a slog. For several weeks I gave up most of my free time to application writing and when I wasn t working on applications I thought about how I ought to be doing something about it. Applications are due while you re coming up on the end of your semester or end of the year push at work or both! There just isn t enough time for everything. I think even applying for grad school qualifies you to attend.
Here are some things I learned in the application process. Note, I haven t gotten in anywhere (yet), so we ll see how it pans out.
You have to do a lot of research.
This changes by field, school, and even individual faculty preference. Some possible mentors / advisors like to talk with prospective students ahead of time. On two of my applications I was explicitly asked who I spoke with in the department. On others I was asked to list faculty (in order of preference even!) that I would be interested in working with. Some schools requested in essays to list faculty. In general, it s considered important to explain why a particular school: what about that school attracts you? What resources do they have that you want to take advantage of? What research that they are doing interests you?
Faculty profiles and department websites are useful for this, but far from complete. A co-worker suggested I contact someone who, based on their profile, I shared no research interests with. However, we talked and it turns out we had things in common! In general, colleagues, peers, other academics, and friends were the best resource I had for investigating schools and potential faculty.
I also went to some Q&A sessions / office hours run by schools / departments / labs. Some really cool people wrote blog posts and / or Tweets soliciting grad students. These are great.
Sometimes the people you want to work with aren t taking grad students.
Most schools I looked at did not maintain lists of who is taking on grad students starting in the fall, but I think two did. Sometimes I contacted people and got back Sorry, not taking on anyone this year. Try $OtherProfessor. This was actually really helpful! But, it s a downer to learn you re not going to get to work with one of your academic heroes because the timing is wrong.
It s expensive and waivers might not help.
Most applications in the US cost about $100 (USD). In some fields it s recommended you apply to 8-10 schools. That s a lot of money. I think everywhere I applied had a waiver you could apply for, but I generally didn t qualify. Some waivers require you to submit days to weeks ahead of the deadline. Others require that you participate in certain professional organizations, student organizations, or live locally to the school. These might be less useful than you were hoping.
Everyone says your writing sample matters, but only five people will read it.
This is what I was told anyway. I was told that my writing sample (which was 20 pages!) will probably only be read by faculty who are thinking of taking me on as an advisee. Someone else might pick it up and read it out of curiosity. I was told stories about how the right writing sample turned eh, maybe candidates into enthusiastic yeses.
Everyone says letters of recommendation matter and it s extremely frustrating.
My recommenders are all amazing people I have so much respect and admiration for it s wild. They re people I want to be like in my academic career. They also all got their letters in the day they were due. I had a moment where I genuinely thought I was just not going to go to grad school because of how close the deadline was.
I ve been told that a great letter matters a lot, but meh letters don t hold you back as much as it sounds like they will. I ve been told that where a recommender is affiliated matters a lot.
My personal statement radically changed based on school / program.
Two of the schools I applied to had very specific requirements for their personal statements. Other schools wanted me to mostly talk about my research interests. One school had a 350 word personal statement, but a 1,000 word research statement. I wrote a research statement and a personal statement and then used them as the basis for what I submitted to different schools. Each application ended up with something pretty different, and not just because I talked about why each program was exciting to me in different ways.
I also applied to different kinds of programs, and presented myself a differently depending on the program s focus and the faculty. For the more social science heavy programs I emphasized the empirical research I did, while for others I leaned more heavily on my philosophical background and theoretical interests.
Oh, also, I was told to not use contractions. Getting rid of them in all my materials was super tedious.
Diversity Statements are becoming more common.
A few of my schools had diversity statements either required or optional. The purpose of these, I was told, is not to play some sort of marginalization Olympics, but to show that you can talk about diversity (and equity and inclusion, etc) without being offensive. It s just as valid to write about your own disability as the disability of a parent (though, ask their permission first).
Triple check what s required.
I made spreadsheets about what each school required. For example, some people wanted official transcripts, some unofficial. Some places required essays rather than generic personal statements, and I needed to build in enough time to manage that.
Ask your friends to help.
I hate asking for help, but applying for grad school made me shameless. I asked anyone I could to read over materials, proofread, or just talk with me about what I was writing. People picked up on things like you used the word technology five times in this one sentence and it looks real weird.
Some schools have projects where current grad students will even look over materials!
Advent of Code 2021Advent of Code, for those not in the know,
is a yearly Advent calendar (since 2015) of coding puzzles many people
participate in for a plenary of reasons ranging from speed coding to code
golf with stops at learning a new language or practicing already known
ones.
I usually write boring C++, but any language and then some can be used.
There are reports of people implementing it in hardware, solving them by
hand on paper or using Microsoft Excel
so, after solving a puzzle the easy way yesterday, this time
I thought: CHALLENGE ACCEPTED! as I somehow remembered an old 2008
article about solving Sudoku with aptitude
(Daniel Burrows via archive.org as the blog is long gone)
and the good same old a package management system that can solve [puzzles] based on package dependency rules is not something that I think would be useful or worth having (Russell Coker).
Day 8 has a rather lengthy
problem description and can reasonably be approached in a bunch of
different way. One unreasonable approach might be to massage the
problem description into Debian packages and let apt help me solve the
problem (specifically Part 2, which you unlock by solving Part 1. You
can do that now, I will wait here.)
Be warned: I am spoiling Part 2 in the following, so solve it yourself
first if you are interested.
I will try to be reasonable consistent in naming things in the following
and so have chosen: The input we get are lines like acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab cdfeb fcadb cdfeb cdbaf.
The letters are wires mixed up and connected to the segments of the
displays: A group of these letters is hence a digit (the first 10)
which represent one of the digits 0 to 9 and (after the pipe) the four
displays which match (after sorting) one of the digits which means
this display shows this digit. We are interested in which digits are
displayed to solve the puzzle. To help us we also know which segments
form which digit, we just don't know the wiring in the back.
So we should identify which wire maps to which segment!
We are introducing the packages wire-X-connects-to-Y for this which
each provide & conflict1 with the virtual packages segment-Y and
wire-X-connects.
The later ensures that for a given wire we can only pick one segment and
the former ensures that not multiple wires map onto the same segment.
As an example: wire a's possible association with segment b is
described as:
Note that we do not know if this is true! We generate packages for
all possible (and then some) combinations and hope dependency resolution
will solve the problem for us. So don't worry, the hard part will be
done by apt, we just have to provide all (im)possibilities!
What we need now is to translate the 10 digits (and 4 outputs) from
something like acedgfb into digit-0-is-eight and not, say
digit-0-is-one. A clever solution might realize that a one consists
only of two segments so a digit wiring up seven segments can not be
a 1 (and must be 8 instead), but again we aren't here to be clever:
We want apt to figure that out for us! So what we do is simply making
every digit-0-is-N (im)possible choice available as a package and
apply constraints: A given digit-N can only display one number and
each N is unique as digit so for both we deploy Provides
& Conflicts again.
We also need to reason about the segments in the digits: Each of the
digit packages gets Depends on wire-X-connects-to-Y where X is each
possible wire (e.g. acedgfb) and Y each segment forming the digit
(e.g. cf for one). The different choices for X are or'ed together,
so that either of them satisfies the Y.
We know something else too through: The segments which are not used by
the digit can not be wired to any of the Xs. We model this with
Conflicts on wire-X-connects-to-Y.
As an example: If digit-0s acedgfb would be displaying a one
(remember, it can't) the following package would be installable:
Repeat such stanzas for all 10 possible digits for digit-0 and then
repeat this for all the other nine digit-N. We produce pretty much the
same stanzas for display-0(-is-one), just that we omit the second
Provides & Conflicts from above (digit-is-one) as in the display
digits can be repeated. The rest is the same (modulo using display
instead of digit as name of course).
Lastly we create a package dubbed solution which depends on all 10
digit-N and 4 display-N all of them virtual packages apt will have
to choose an installable provider from and we are nearly done!
The resulting Packages file2 we can give to apt while requesting to
install the package solution and it will spit out not only the display
values we are interested in but also which number each digit represents
and which wire is connected to which segment. Nifty!
$ ./skip-aoc 'acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab cdfeb fcadb cdfeb cdbaf'
[ ]
The following additional packages will be installed:
digit-0-is-eight digit-1-is-five digit-2-is-two digit-3-is-three
digit-4-is-seven digit-5-is-nine digit-6-is-six digit-7-is-four
digit-8-is-zero digit-9-is-one display-1-is-five display-2-is-three
display-3-is-five display-4-is-three wire-a-connects-to-c
wire-b-connects-to-f wire-c-connects-to-g wire-d-connects-to-a
wire-e-connects-to-b wire-f-connects-to-d wire-g-connects-to-e
[ ]
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
We are only interested in the numbers on the display through, so grepping
the apt output (-V is our friend here) a bit should let us end up with
what we need as calculating3 is (unsurprisingly) not a strong suit of
our package relationship language so we need a few shell commands to
help us with the rest.
$ ./skip-aoc 'acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab cdfeb fcadb cdfeb cdbaf' -qq
5353
I have written the skip-aoc script as a testcase for apt,
so to run it you need to place it in
/path/to/source/of/apt/test/integration and built apt first, but that
is only due to my laziness. We could write a standalone script
interfacing with the system installed apt directly and in any apt
version since
~2011.
To hand in the solution for the puzzle we just need to run this on each
line of the input (~200 lines) and add all numbers together. In other
words: Behold this beautiful shell one-liner:
parallel -I ' ' ./skip-aoc ' ' -qq < input.txt paste -s -d'+' - bc
(You may want to run parallel with -P to properly grill your CPU as
that process can take a while otherwise and it still does anyhow as
I haven't optimized it at all the testing framework does a lot of
pointless things wasting time here, but we aren't aiming for the
leaderboard so )
That might or even likely will fail through as I have so far omitted a
not unimportant detail: The default APT resolver is not able to solve
this puzzle with the given problem description we need another solver!
Thankfully that is as easy as installing apt-cudf (and with it aspcud)
which the script is using via --solver aspcud to make apt hand over the
puzzle to a "proper" solver (or better: A solver who is supposed to be
good at "answering set" questions). The buildds are using this for
experimental and/or backports builds and also for installability checks
via dose3 btw, so you might have encountered it before.
Be careful however: Just because aspcud can solve this puzzle doesn't
mean it is a good default resolver for your day to day apt. One of the
reasons the default resolver has such a hard time solving this here is
that or-groups have usually an order in which the first is preferred over
every later option and so fort. This is of no concern here as all these
alternatives will collapse to a single solution anyhow, but if there are
multiple viable solutions (which is often the case) picking the "wrong"
alternative can have bad consequences. A classic example would be
exim4 postfix nullmailer. They are all MTAs
but behave very different. The non-default solvers also tend to lack
certain features like keeping track of auto-installed packages or
installing Recommends/Suggests. That said, Julian is working on
another solver
as I write this which might deal with more of these issues.
And lastly: I am also relatively sure that with a bit of massaging the
default resolver could be made to understand the problem, but I can't
play all day with this maybe some other day.
Disclaimer: Originally posted in the daily megathread
on reddit, the version here is just slightly better understandable as
I have hopefully renamed all the packages to have more conventional
names and tried to explain what I am actually doing.
No cows were harmed in this improved version, either.
If you would upload those packages somewhere, it would be good
style to add Replaces as well, but it is of minor concern for apt
so I am leaving them out here for readability.
We have generated 49 wires, 100 digits, 40 display and 1 solution
package for a grant total of 190 packages. We are also making use of
a few purely virtual ones, but that doesn't add up to many packages
in total. So few packages are practically childs play for apt given it
usually deals with thousand times more. The instability for those
packages tends to be a lot better through as only 22 of 190 packages
we generated can (and will) be installed. Britney will hate you if
your uploads to Debian unstable are even remotely as bad as this.
What we could do is introduce 10.000 packages which denote every
possible display value from 0000 to 9999. We would then need to
duplicate our 10.190 packages for each line (namespace them) and then
add a bit more than a million packages with the correct dependencies
for summing up the individual packages for apt to be able to display
the final result all by itself. That would take a while through as at
that point we are looking at working with ~22 million packages with
a gazillion amount of dependencies probably overworking every solver
we would throw at it a bit of shell glue seems the better option for
now.
This article was written by David Kalnischkies on apt-get a life and republished here by pulling it from a syndication feed. You should check there for updates and more articles about apt and EDSP.